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Q,kDAAvBmQ,EAAuBD,QAAvBC,EAAuB,YAAvBA,CAAb,+FCXO,MAAM6B,KAAazQ,MAAa,wBAE1B0Q,KAAgB1Q,MAAa,0BAC7B2Q,KAAuB3Q,MAClC,mCACAE,SAEW0Q,KAAsB5Q,MAAa,+BAAD,sHCCxC,IAAe6Q,EAAtB,MAAM,MAAgBA,UAA2BnV,IAY/CC,YAAgCE,GAC9BE,MAAMF,GADwBG,WAXhCA,qBAAiB,CAahB,CAEG8U,mBACF,OAAOC,GACR,CAEGC,wBACF,OAAOA,GACR,CAEGC,oBACF,OAAOA,GACR,CAEGC,2BACF,OAAOA,IACR,+CA9BmBL,GAAkBpS,uCAAlBoS,EAAkBnS,mBAAlBmS,CAAtB,oDCZO,IAAKM,EA2GX,aA3GWA,QAAgB,KAC1BA,uCACAA,gDACAA,iCACAA,2CACAA,qCACAA,qCACAA,qCACAA,+BACAA,+BACAA,+BACAA,kDACAA,kCACAA,sDACAA,sDACAA,sDACAA,gEACAA,gEACAA,gEACAA,gDACAA,gDACAA,gDACAA,4CACAA,0BACAA,oBACAA,8BACAA,oBACAA,4BACAA,sBACAA,wCACAA,8BACAA,wBACAA,wBACAA,sCACAA,4CACAA,8CACAA,0DACAA,sDACAA,oDACAA,wDACAA,4DACAA,0DACAA,sCACAA,oCACAA,8BACAA,4BACAA,0CACAA,wCACAA,gCACAA,8BACAA,oCACAA,kCACAA,kDACAA,gDACAA,oCACAA,4BACAA,wCACAA,8BACAA,kCACAA,gDACAA,oCACAA,4BACAA,wCACAA,8BACAA,kCACAA,gDACAA,kCACAA,kCACAA,kDACAA,8CACAA,0DACAA,sDACAA,oDACAA,wDACAA,4DACAA,0DACAA,kDACAA,8CACAA,0DACAA,sDACAA,oDACAA,wDACAA,4DACAA,0DACAA,8CACAA,8CACAA,8BACAA,8BACAA,8BACAA,8CACAA,oEACAA,0CACAA,gEACAA,2CACAA,iEACAA,gCACAA,gCACAA,gCACAA,sCACAA,sCACAA,uCACAA,mCACAA,m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SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,OAAU,KACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,KACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,SAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,IACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU,SACV,OAAU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,CACI1qB,QAAS4mP,KACTp8N,eAAaC,OAAW,IAAM+5N,GAC9B95N,OAAO,GAEX+1N,IAr7B6FzwR,SA0a/Fw0R,MAioBN,SAASqC,EAAeC,EAAYC,GAChC,OAAOA,aAAuBztL,SACxB,IAAKwtL,KAAeC,KACpB,IAAKD,KAAeC,EAC7B,KACK9nN,QAAN,MAAMA,EACYhjD,eAAC8qQ,GACX,MAAO,CACHzY,SAAUrvM,EACVkrK,UAAW,CACP,CACInqM,QAASo6O,EACTl6O,SAAU6mP,GAEd,CACI/mP,QAASq6O,EACTn6O,SAAUo6O,GAEd,CACIt6O,QAASxjC,EACT86N,WAAYuvD,EACZ3vD,KAAM,CAACmjD,EAAgBD,IAE3B6B,GAGX,CACchgQ,kBACX,MAAO,CACHqyP,SAAUrvM,EAEjB,EAELA,SAAc0qC,UAAd,0BAA0G1qC,EAA1G,EACAA,EAAc+iD,UA7kCuFhyH,MA6kCrG,MAA2GivE,IAC3GA,EAAcgjD,UA9kCuFjyH,MA8kCrG,IA9BMivE,MAuCN,MAAM+nN,SAAwBr/J,WAAe,IACvCA,kBACO7sF,OAAW,IACdA,cACO8rD,OAAW,IACdA,cACO6Z,KAAS,IACZA,KACA,GAETumL,EAAeC,gBAEhBD,EAAeC,cAAgB,SAAUC,EAAYvuD,GAAU,EAHvE,+BC3rDA,0BACA,IACA,cACAroO,SAIA,CAHA,MAAI2N,GAEJ,YADAmlB,IAEA,CAEAlC,OACAuzF,KAEA11E,4BAEA,CAEe,cACf,kBACA,WACAlvC,YACA,iCACA,mBAEA,cACAs3R,qBACA,CAEA,cACAA,sBACA,CAEAC,SACA,EACA,CACA","names":["CustomControlAbstract","ComponentAbstract","constructor","ngControl","cdr","formDirective","super","this","FormControl","valueAccessor","showValidationErrorOrSubmitted","submitted","showValidationError","registerOnChange","fn","onChanged","registerOnTouched","onTouched","initControlBase","control","labelRequired","hasValidator","Validators","statusChanges","pipe","untilDestroyed","subscribe","status","checkControlStatus","listenControlTouched","markForCheck","errors","checkStatus","invalid","touched","markAsTouched","markAsUntouched","pristine","markAsPristine","markAsDirty","Observable","observer","originalMarkAsTouched","originalReset","reset","args","next","call","i0","features","getGeneralRoleRadioList","generalRoles","map","item","value","id","label","roleName","AdministrationAbstract","store","selectAllGeneralRoles","select","filter","tap","dispatch","setGeneralRoleRadioList","generalRoleRadioList","selectGeneralRoleRadioList","userRoles","detectChanges","loadAllUsers","createAction","loadAllUsersSucceeded","props","loadAllUsersFailed","loadPropertyUsers","loadPropertyUsersSucceeded","loadPropertyUsersFailed","clearAllUsers","loadAllPropertyRoles","clearAllPropertiesRoles","loadAllPropertiesRolesSucceeded","loadAllUserToPropertyMappings","clearAllUserToPropertyMappings","loadAllUserToProperyMappingsSucceeded","loadAllPermissionLevels","loadAllPermissionLevelsSucceeded","loadAllGeneralRolesToPermissionMapping","loadAllGeneralRolesToPermissionMappingSucceeded","loadUserToRoleMapping","loadUserToRoleMappingSucceeded","clearUserToRoleMapping","setSelectedUsers","loadAllGeneralRoles","loadAllGeneralRolesSucceeded","clearAllGeneralRoles","setAllUsersCombinedWithGeneralRoles","loadPropertiesStructure","clearPropertiesStructure","loadPropertiesStructureSucceeded","startAddNewUser","addingNewUserSucceeded","addingNewUserFailed","clearAddedUser","assignUserToProperty","assignUserToPropertySuccess","assignUserToPropertyError","removingPropertyAssignedUser","removingPropertyAssignedUserSuccess","removingPropertyAssignedUserError","requestFailure","saveUsersRolesAndUnits","selectGeneralRoleToEdit","saveUsersRolesAndUnitsSucceeded","startDeleteGeneralRole","deleteGeneralRoleSucceeded","deleteGeneralRoleFailed","clearSelectedGeneralRole","startSavingGeneralRole","savingGeneralRoleSucceeded","savingGeneralRoleFailed","startUpdatingGeneralRole","updatingGeneralRoleSucceeded","updatingGeneralRoleFailed","inviteNewUser","inviteNewUserSuccess","inviteNewUserError","updateUserData","updateUserDataSuccess","updateUserDataError","saveUserToGeneralRole","saveUserToGeneralRoleSuccess","saveUserToGeneralRoleError","clearUserPreviewData","removeUser","reactivateUser","removeUserSucceeded","reactivateUserSucceeded","removeUserFailed","VENDOR_ROLE_NAME","administrationFeatureKey","reducer","createReducer","addNewUserInProgress","addedUser","deleteGeneralRoleInProgress","generalRolesToPermissionMapping","permissionLevels","propertiesRoles","propertiesStructure","activePropertyUsers","propertyUsersLoading","saveGeneralRoleInProgress","selectedGeneralRole","selectedUsers","userToGeneralRole","userToPropertyMapping","activeUsers","activeUserOrVendorOptionsList","inactiveUsers","usersLoading","usersWithGeneralRoles","usersWithGeneralRolesLoading","userUpdateInProgress","userUpdateStatus","userInviteInProgress","userInviteStatus","userInvited","saveUserToGeneralRoleInProgress","saveUserToGeneralRoleStatus","assignUserIntoPropertyInProgress","assignUserIntoPropertyStatus","removingPropertyAssignedUserInProgress","removingPropertyAssignedUserStatus","removeUserInProgress","initialState","on","AdministrationActions","state","action","getUserOrVendorList","users","result","undefined","saveUserToPropertyInProgress","UpdateStatus","user","generalRole","selectAdministrationState","createFeatureSelector","fromAdministration","selectActiveUsers","createSelector","administrationState","selectInactiveUsers","selectAllUsers","concat","selectAllUsersLoading","selectAllPermissionLevels","selectAllUserToGeneralRoleMapping","selectAllGeneralRolesToPermissionMapping","selectAllPropertyRoles","selectAllSelectedUsers","selectAllUsersWithGeneralRoles","selectAllUsersWithGeneralRolesLoading","selectAllPropertiesStructure","selectSaveUserToGeneralRoleInProgress","selectSaveUserToGeneralRoleStatus","selectAssignUserIntoPropertyInProgress","selectAssignUserIntoPropertyStatus","selectRemovingPropertyAssignedUserInProgress","selectRemovingPropertyAssignedUserStatus","selectIsDeleteGeneralRoleInProgress","selectAddNewUserInProgress","selectAddedUser","selectAllUserToPropertyMappings","selectSelectedGeneralRole","selectSavingGeneralRoleInProgress","selectPropertyUsers","selectPropertyUsersLoading","selectUserInviteInProgress","selectUserInviteStatus","selectUserInvited","selectUserUpdateInProgress","selectUserUpdateStatus","selectUserRemoveInProgress","CustomInspectionContent","items","Subject","_itemsChanged","asObservable","_templateChanges","init","sort","a","b","position","addItem","inspectionItemName","inspectionItemId","uuidv4","push","inspectionItemChecked","onItemChanged","removeItem","updateItemName","innerItem","updateItemChecked","config","emitChangeTemplate","templateItems","options","emitChange","i","length","totalItemsCount","checkedItemsCount","progressBar","BoardService","service","modalsService","BehaviorSubject","getTurnoverList","boardId","portfolioId","getData","TurnoversService","getList","_list$","closed","ReplaySubject","getListInternal","list","error","refresh","of","updateSavedData","updateFunction","take","updatedList","route","getListByPortfolio","add","entity","post","update","index","findIndex","e","copyOfArray","splice","delete","removeBoard","boardName","selectUserPermissionLevel","permissionLevel","checkPermissionLevel","PermissionLevelType","switchMap","openConfirmationModal","title","content","confirmColor","afterClosed","DialogResult","boardRemoving$","factory","CustomInspectionService","_templatesLoading","getInspectionTemplates","preserveInspectionId","templates","template","isAvailable","name","finalize","getCustomInspectionContent","inspectionId","updateCustomInspectionContent","data","addCustomInspectionTemplateWithPredefinedItems","inspection","updateCustomInspectionTemplateContent","addCustomInspectionTemplateWithItems","addCustomInspectionTemplate","editCustomInspectionTemplate","getInspectionTemplate","getCustomInspectionTemplateContent","templateId","hideInspectionTemplate","removableTemplate","openRemovalTemplateModal","inspectionTemplate","titleCss","cancelLabel","confirmLabel","closeMenus","loadBoardList","loadBoardListSuccess","loadBoardListFailed","DashboardsAbstract","WorkflowStep","WorkflowStepEnumType","DashboardViewType","DashboardMode","TicketAttachmentType","PortfolioKpiType","setDashboardFilter","loadTurnoverKanbanProperty","loadTurnoverKanbanPropertySuccess","loadTurnoverKanbanPropertyError","resetTurnoverKanbanProperty","clearTurnoverKanbanPortfolio","loadTurnoverKanbanPortfolio","loadTurnoverKanbanPortfolioSuccess","loadTurnoverKanbanPortfolioError","resetTurnoverKanbanPortfolio","kanbanListGenerateSuccess","loadUserTurnovers","loadUserTurnoversSuccess","loadUserTurnoversError","resetUserTurnoversError","loadMyTasks","loadMyTasksSuccess","loadMyTasksError","myTasksHeaderData","clearMyTasks","loadPropertyKpi","loadPropertyKpiSucceded","loadPropertyKpiFailed","loadUnitSummaryByProperty","loadUnitSummaryByPropertySucceded","loadUnitSummaryByPropertyFailed","clearUnitSummaryByProperty","loadActiveTurnoversSummary","loadActiveTurnoversSummarySucceded","loadActiveTurnoversSummaryFailed","clearActiveTurnoversSummary","loadActiveTurnoversDetails","loadActiveTurnoversDetailsSucceded","loadActiveTurnoversDetailsFailed","loadDelinquencyByUnit","loadDelinquencyByUnitSucceded","loadDelinquencyByUnitFailed","loadDelinquencySummary","loadDelinquencySummarySucceded","loadDelinquencySummaryFailed","clearDelinquencySummary","loadRenewalsSummary","loadRenewalsSummarySucceded","loadRenewalsSummaryFailed","clearRenewalsSummary","selectedPropertyId","loadUnitDetails","loadUnitDetailsSuccess","loadUnitDetailsFailed","loadUnitDetailsByType","loadUnitDetailsByTypeSuccess","loadUnitDetailsByTypeFailed","loadRenewalsDetails","loadRenewalsDetailsSuccess","loadRenewalsDetailsFailed","selectedDashboardViewType","selectedPortfolioId","loadMyProperties","loadMyPropertiesSuccess","loadMyPropertiesFailed","selectedDashboardMode","setCustomBreadcrumbs","loadUnitsWithActiveTurnovers","loadUnitsWithActiveTurnoversSuccess","loadUnitsWithActiveTurnoversFailed","resetUnitsWithActiveTurnoversList","loadUnitList","loadUnitListSuccess","loadUnitListFailed","resetUnitList","loadUnit","loadUnitSuccess","loadUnitFailed","clearUnit","updateUnit","updateUnitSuccess","updateUnitFailed","updateUnitDoNotAutoCreateTurns","updateUnitDoNotAutoCreateTurnsSuccess","updateUnitDoNotAutoCreateTurnsFailed","getRenewalStrategyForUnit","getRenewalStrategyForUnitSuccess","getRenewalStrategyForUnitFailed","setCurrentPortfolio","resetCurrentPortfolio","setCurrentProperty","resetCurrentProperty","joinProperties","setVacancyLossAttrType","setVacancyLossThreshold","loadPortfolioKpisTrend","loadPortfolioKpis","setPortfolioKpis","setPortfolioKpisTrend","loadPortfolioKpisFailed","loadPortfolioKpisTrendFailed","setPortfolioKpisFilter","clearPortfolioKpis","loadPortfolioKpiTrendLines","setPortfolioKpiTrendLines","clearPortfolioKpiTrendLines","setChartSelectorValue","setChartSettingsValue","TimerService","restApiService","reloadTimer","associate","DashboardEffects","actions$","snackbarService","turnoversService","renewalsService","timerService","kpiService","createEffect","ofType","getPropertyTurnovers","propertyId","taskList","tasks","catchError","SnackbarErrorMessage","getPortfolioTurnovers","combineLatest","getAllTasks","myTasks","withLatestFrom","selectCurrentDashboardViewTypeSimpleText","dashboardEnumValue","routePath","kpi","err","unitSummary","activeTurnoversSummary","activeTurnoversDetails","delinquencyFilterType","delinquencySummary","delinquencyByUnit","renewalsSummary","dashboardViewType","unitDetails","unitDetailsByType","renewalDetailsCombined","myProperties","unitList","unitId","unit","mergeMap","updatedUnit","doNotAutoCreateTurns","renewalTargetForUnitId","unitTypeRentTarget","dashboardFilterTransientFeatureKey","selectDashboardsStateTransient","selectTurnoversFilters","dashboardsState","turnoversFilters","setTurnoversFilters","resetTurnoversFilters","auditMode","TurnoverAuditMode","dashboardFilterFeatureKey","pathInitialValue","assignee","metaDashboardFilterReducers","hydrationMetaReducer","dashboardsFeatureKey","UPDATE_STORAGE_ACTIONS","activeTurnoversDetailsLoading","activeTurnoversSummaryLoading","breadcrumbList","currentPortfolioId","currentPropertyId","dashboardMode","delinquencyByUnitLoading","delinquencySummaryLoading","myPropertiesLoading","portfolioItems","portfolioItemsLoading","portfolioUserTaskList","portfolioUserTaskListLoading","kanbanListLoading","kanbanListCount","propertyKpi","propertyKpiLoading","propertyUserTaskList","propertyUserTaskListLoading","userTaskList","userTaskListLoading","myTasksLoading","myTasksTicketsCount","myTasksTurnoversCount","staleTurnoversCount","lateTurnoversCount","renewalDetailsCombinedLoading","renewalStrategyForUnit","renewalStrategyForUnitLoading","renewalsSummaryLoading","unitDetailsByTypeLoading","unitDetailsLoading","unitListLoading","unitListWithActiveTurnover","unitListWithActiveTurnoverLoading","unitLoading","unitDoNotAutoCreateTurnsLoading","unitsSummaryByProperty","unitsSummaryByPropertyLoading","selectedVacancyLossAttr","VacancyLossAttrType","selectedVacancyLossThreshold","VacancyLostThreshold","selectedVacancyLossThresholdKpiType","selectedVacancyLossThresholdKpiTypePerTurn","metaDashboardReducers","nextState","includes","type","localStorage","setItem","JSON","stringify","renewalsDetails","renewalKPI","attrType","thresholdType","kpiFeatureKey","portfolioKpis","portfolioKpisTrendLoading","portfolioKpisFilter","windowType","KpiWindowType","KpiType","portfolioKpisLoading","portfolioKpisTrend","portfolioKpiTrendLines","portfolioKpiTrendLinesLoading","chartSelectors","chartSettings","metaDashboardKpiReducers","kpis","selectorId","chartId","selectDashboardsState","fromDashboards","selectMyTasks","selectPropertyUserTaskList","selectPropertyUserTaskListLoading","selectMyTasksLoading","selectMyTasksTurnoversCount","selectStaleTurnoversCount","selectLateTurnoversCount","selectMyTasksTicketsCount","selectUserTaskListLoading","selectUserTaskList","selectKanbanListCount","selectPortfolioUserTaskList","selectPortfolioUserTaskListLoading","selectKanbanListLoading","selectSelectedPropertyId","selectPropertyKpiLoading","selectPropertyKpi","selectActiveTurnoversDetails","selectUnitsSummaryByProperty","selectUnitsSummaryByPropertyLoading","selectActiveTurnoversSummary","selectActiveTurnoversSummaryLoading","selectUnitDetails","selectActiveTurnoversDetailsLoading","selectDelinquencyByUnit","selectDelinquencyByUnitLoading","selectDelinquencySummary","selectDelinquencySummaryLoading","selectRenewalsSummary","selectRenewalsSummaryLoading","selectUnitDetailsLoading","selectUnitDetailsByType","selectUnitDetailsByTypeLoading","selectCurrentDashboardViewType","selectLoadRenewalsDetails","selectLoadRenewalsDetailsLoading","simpleText","selectCurrentDashboardViewTypeEnumerationValue","enumerationValue","selectSelectedPortfolioId","selectMyProperties","selectMyPropertiesLoading","selectSelectedDashboardMode","selectCustomBreadcrumbs","selectUnitList","selectUnitListWithActiveTurnover","selectUnitListWithActiveTurnoverLoading","selectUnitListLoading","selectUnit","selectUnitLoading","selectUnitDoNotAutoCreateTurnsLoading","selectRenewalStrategyForUnit","selectRenewalStrategyForUnitLoading","selectJoinProperties","selectCurrentProperty","selectCurrentPortfolio","selectSelectedVacancyLossAttr","selectSelectedVacancyLossThreshold","selectSelectedVacancyLossThresholdKpiType","selectSelectedVacancyLossThresholdKpiTypePerTurn","SpaceTemplateEffects","router","loadAllSpaceTemplates","exhaustMap","loadAllSpaceTemplatesSuccess","listItems","loadAllSpaceTemplatesFailed","loadAllCategories","loadAllCategoriesSuccess","categoriesList","loadAllCategoriesFailed","updateSpaceTemplateDetails","entityDetails","updateSpaceTemplateDetailsFailed","createNewSpaceTemplate","create","navigate","AppRoutes","queryParamsHandling","then","deleteSpaceTemplate","SpaceTemplateStoreModule","EffectsModule","SurveysEffects","StoreModule","fromSpaceTemplateReducer","fromSurveyReducer","clearSpaceTemplateData","spaceTemplateFeatureKey","listItemsLoading","entityUpdateOngoing","deleteEntityOngoing","categories","unitTypes","TEMPLATE_VIEWS","TemplateEffects","surveyService","loadAllUserTemplates","loadAllUserTemplatesSuccess","loadAllUserTemplatesFailed","loadAllUnitTypes","loadAllUnitTypesSuccess","loadAllUnitTypesFailed","updateTemplateDetails","templateDetails","updateTemplateDetailsFailed","removeAreaFromTemplate","areaId","createTemplateDetails","inspectionTemplateAreas","s","deleteTemplate","ErrorCode","TemplateStoreModule","fromTemplateReducer","clearTemplateData","templateFeatureKey","templateAreaUpdateOngoing","templateAreaRemoveOngoing","templateAreaUpdateStatus","addInspectionSurveyTemplate","updateInspectionSurveyTemplate","saveInspectionSurveyTemplateSuccess","SendInspectionComponent","formBuilder","dialogRef","inputErrorService","inspectionTitle","ButtonType","group","to","EmailPatternValidator","subject","body","form","patchValue","ngOnInit","ok","isSubmitted","valid","close","controls","toArray","flatMap","reduce","acc","cur","strErrors","Object","entries","key","errorParams","getValidationMessage","join","MAT_DIALOG_DATA","selectors","NgControl","ctx","InspectionService","matDialog","survey","_currentSurvey","static","timezone","forEach","TimezoneEntityHelper","fixTimezoneForRestInspectionsModelList","updateCalendarView","inspectionModel","calendarPosition","dueDate","getById","getBeUnitId","openSendDialog","minWidth","panelClass","sendRequest","firstValueFrom","_this","open","sendReport","success","console","request","KpiEffects","fetch","kpiTypes","dateOffset","trend","trendDays","DeleteRoleSummaryDialogComponent","UserRoles","isUserExisting","IsUserExistingPipe","AdministrationEffects","dialog","restapiService","userService","adminPanelService","getUserList","isActive","getPropertyUserList","inactivePropertyUsers","generalRoleToPermissionMapping","allUsers","allUserToGeneralRoleMapping","usersCombinedWithRoles","combineUsersWithGeneralRoles","entry","first","userId","roleId","transform","associatedRole","setUserToGeneralRole","usersToGeneralRoleList","setUserToPropertyRole","userToPropertyRoleList","removeUserFromPropertyRole","deleteUserToPropertyMappings","oldGeneralRoles","newGeneralRoles","oldRole","allGeneralRoles","feedback","message","split","parsedFeedback","parseGeneralRoleFeedback","usersWithRolesList","find","autoFocus","width","selectUserGeneralRole","currentUserGeneralRole","expireCashedUserData","loadUserData","inviteUser","selectedProperty","param","errorMessage","email","setUserData","info","firstName","keyValuePair","lowerFirst","parseInt","SystemConfigurationEffects","systemConfigService","getSystemConfig","getSystemConfigSuccess","systemConfig","getSystemConfigError","deleteSystemConfig","updateSystemConfigError","updateSystemConfig","pmsCredential","addSystemConfig","updateSystemConfigSuccess","getTimerReport","timerReport","getTimerReportSuccess","getTimerReportError","getChatChannels","getChatHooksChannels","channels","getChatChannelsSuccess","getChatChannelsError","setPropertyChatChannels","setPropertyChatChannel","channelIds","setPropertyChatChannelsSuccess","setPropertyChatChannelsError","BidsService","bidList","bid","reject","getBid","bidId","setAttachment","attachmentToEntity","getTurnoverBids","turnoverId","getCompanyBids","companyId","getAllBids","deleteBidAttachment","attachmentId","getBidAttachments","createBulkScope","bulkScope","getBulkScopeList","getBulkScope","bulkScopeId","updateBulkScope","addUnitsToBulk","addBulkTurnoversAttachment","BulkBidsEffects","bidsService","createNewBulkScope","createNewBulkScopeSuccess","createNewBulkScopeFailed","getBulkScopeSuccess","getBulkScopeFailed","updateBulkScopeSuccess","updateBulkScopeFailed","getBulkScopeListSuccess","bulkList","attachment","addBulkTurnoversAttachmentSuccess","addBulkTurnoversAttachmentFailed","addUnitsToBulkSuccess","addUnitsToBulkFailed","PunchService","loadPunchById","punchId","loadPunchesByTurnoverId","createPunch","punch","updatePunch","PunchEffects","punchService","loadPunchByIdFinished","loadPunchByIdFailed","sendPunch","iif","sendPunchFinished","sendPunchFailed","loadPunchesByTurnoverIdFinished","loadPunchesByTurnoverIdFailed","TurnoverBidsService","model","accept","reason","approve","approved","denyReason","uploadInvoice","fileUploadId","categoryList","addCategory","TurnoverBidsEffects","turnoverBidsService","fileUploadsService","loadTurnoverBids","bids","loadTurnoverBidsSuccess","loadTurnoverBidsFailed","createTurnoverBid","createTurnoverBidSuccess","createTurnoverBidFailed","acceptTurnoverBid","acceptTurnoverBidSuccess","acceptTurnoverBidFailed","rejectTurnoverBid","rejectTurnoverBidSuccess","rejectTurnoverBidFailed","uploadTurnoverBidInvoice","uploadFile","file","upload","uploadTurnoverBidInvoiceSuccess","uploadTurnoverBidInvoiceFailed","updateTurnoverBid","updateTurnoverBidSuccess","updateTurnoverBidFailed","removeTurnoverBid","removeTurnoverBidSuccess","removeTurnoverBidFailed","loadTurnoverBidCategories","loadTurnoverBidCategoriesSuccess","loadTurnoverBidCategoriesFailed","addTurnoverBidCategory","categoryId","addTurnoverBidCategorySuccess","addTurnoverBidCategoryFailed","approveTurnoverBid","approveTurnoverBidSuccess","approveTurnoverBidFailed","UpdateWorkflowStepAssigneeModelFunction","workflow","workflowStep","workflowStepAssignmentModel","userData","workflowStepEnumType","responsiblePartyId","responsiblePartyType","responsiblePartyGroupType","userType","UserType","AppliancesService","getAppliance","applianceId","TurnoversEffects","workflowActionsService","ticketsService","companiesService","appliancesService","workflowStepCommentsService","responsiblePartiesService","createNewTurnover","postTurnoverModel","turnoverData","createNewTurnoverSuccess","assignDefaultWorkflowStepAssignee","activeWorkflowStepType","createNewTurnoverFailed","selectUserData","getWorkflowAssignmentsByStepId","restWorkflowStepAssignmentModel","getTurnoverData","assignDefaultWorkflowStepAssigneeFailed","getTurnover","getTurnoverDataSuccess","ex","getTurnoverDataFailed","setTurnoverData","setTurnoverDataFailed","setStepAssignee","moveToNextStep","workflowAction","nextWorkflowStep","assigneeId","setStepAssigneeSuccess","setStepAssigneeFailed","getDefaultTurnoversAssignees","getResponsiblePartiesByPropertyId","getDefaultTurnoversAssigneesSuccess","defaultTurnoversAssignees","getDefaultTurnoversAssigneesFailed","setWorkflowStepSuccess","property","setAttachmentToTurnover","addedAttachment","setAttachmentToTurnoverSuccess","preventReloadList","emptyAction","getTurnoverAttachments","turnoverIds","setAttachmentToTurnoverFailed","updateTurnoverAttachment","updateAttachment","updateTurnoverAttachmentSuccess","updateTurnoverAttachmentFailed","getTurnoverTickets","getTicketsByTurnover","getTurnoverTicketsSuccess","turnoverTicketList","getTurnoverTicketsFailed","addNewTurnoverTicket","turnoverTicket","newTurnoverTicket","addNewTurnoverTicketSuccess","addNewTurnoverTicketFailed","updateTurnoverTicket","editedTicket","updateTurnoverTicketSuccess","updateTurnoverTicketFailed","updateTicketPreview","updateTicketPreviewSuccess","updateTicketPreviewFailed","getSelectedTicket","getTicket","ticketId","ticket","getSelectedTicketSuccess","getSelectedTicketFailed","deleteTurnoverTicket","selectTurnoverData","deleteTurnoverTicketSuccess","deleteTurnoverTicketFailed","setTicketAttachment","addedTicketAttachment","setTicketAttachmentSuccess","ticketType","TicketType","setTicketAttachmentFail","restTicketModel","getTicketSuccess","getTicketFailed","getTicketAttachments","getTicketAttachment","attachments","getTicketAttachmentsSuccess","ticketAttachments","getTicketAttachmentsFailed","getCompanyList","companyList","getCompanyListSuccess","getCompanyListFail","getBidTurnoverList","getBidTurnoverListSuccess","getBidTurnoverListFail","getBidCompanyList","getBidCompanyListSuccess","getBidCompanyListFail","getAllBidList","getAllBidListSuccess","getAllBidListFail","getBidSuccess","getBidFail","addNewBid","newBidList","addNewBidSuccess","addNewBidFail","rejectBid","updatedBid","rejectBidSuccess","rejectBidFail","updateBid","updateBidSuccess","updateBidFail","updateBidComment","updateBidCommentSuccess","updateBidCommentFail","setBidAttachment","addedBidAttachment","setBidAttachmentSuccess","getBidAttachmentList","setBidAttachmentFail","appliance","getApplianceSuccess","getApplianceFailed","getWorkflowStepCommentList","getWorkflowStepComments","workflowStepCommentList","getWorkflowStepCommentListSuccess","getWorkflowStepCommentListFailed","addWorkflowStepComment","commentItem","addWorkflowStepCommentSuccess","turnoverDataId","addWorkflowStepCommentFailed","updateWorkflowStepComment","updateWorkflowStepCommentSuccess","updateWorkflowStepCommentFailed","deleteWorkflowStepComment","deleteWorkflowStepCommentSuccess","deleteWorkflowStepCommentFailed","deleteTurnover","workflowAssignment","deleteTurnoverSuccess","deleteTurnoverFailed","deleteTurnoverAttachment","fileId","deleteFileFromRepository","deleteFileFromRepositorySuccess","deleteTurnoverAttachmentSuccess","deleteFileFromRepositoryFailed","deleteTurnoverTicketAttachment","deleteTurnoverTicketAttachmentSuccess","deleteTurnoverTicketAttachmentFailed","removeFile","getTurnoversAttachments","getTurnoverAttachmentsSuccess","allAttachments","getTurnoverAttachmentsFailed","getBidAttachmentListSuccess","getBidAttachmentListFailed","deleteBidAttachmentSuccess","deleteBidAttachmentFailed","toggleAllSections","selectAllPropertyIds","allPropertyIds","active","activePropertyIds","setActiveSections","toggleSingleSection","selectActivePropertyIds","toggleInactiveFilteredSingleSection","selectInactiveFilteredPropertyIds","inactiveFilteredPropertyIds","setInactiveFilteredSections","loadTurnoverTimers","getTurnoversTimers","timers","turnoverTimersLoaded","setTurnoverTimersFailed","setTurnoverTimers","updateTurnoversTimers","setTurnoverTimersSuccess","setWorkflowStepAssignee","step","setWorkflowStepAssigneeSuccess","setWorkflowStepAssigneeFailed","setEmptyWorkflowStepAssignee","rememberIt","newBulkScopeInProgress","newBulkScopeInStatus","newBulkScopeInId","bulkScopeLoading","bulkScopeListLoading","bulkScopeList","updateBulkScopeInProgress","updateBulkScopeInStatus","allBidList","allBidListLoading","addUnitsInProgress","resetNewBulkScopeID","getBulkScopeListFailed","resetUpdateBulkScopeStatus","SharedStoreModule","PortfolioStoreModule","TurnoverConfigurationStoreModule","fromSystemConfiguration","fromDashboardsReducer","metaReducers","fromDashboardKpiReducer","fromDashboardFilterReducer","fromTurnovers","fromBulkBids","fromPunch","fromDashboardFilterTransient","turnoverBidsFeatureKey","turnoverBidsReducer","SingletonServicesModule","OidcSecurityService","ModalsService","SnackbarService","UnitsService","ScreenWiperService","NotificationsService","auth","connect","tokenPromise","watchForAccessToken","Boolean","hubConnection","signalR","configureLogging","environment","EnvironmentType","withUrl","transport","skipNegotiation","accessTokenFactory","withAutomaticReconnect","build","notification","distributeNotifications","start","catch","stop","addLatestNotification","MainApplicationComponent","authService","oidcSecurityService","notificationsService","appVersionService","activatedRoute","oidcStorageService","tokenRevoke","setWindowWidth","windowWidth","window","innerWidth","version$","distinctUntilChanged","appVersion","version_timestamp","currentVersionTimeStamp","currentVersion","version_number","events","event","NavigationEnd","checkSlackResponse","checkBuildiumResponse","isAuthenticated$","isAuthenticated","setAuthenticated","loadTenantData","loadEnumerations","selectTenantData","tenantData","tenantId","href","hostname","location","tenantUrl","setTimeout","url","URL","searchParams","append","toString","evt","RoutesRecognized","pairwise","previousEvent","_event","setPreviousRoute","previousRoute","urlAfterRedirects","pull","slackAdded","snapshot","queryParams","removeQueryParam","buildium","paramName","lt","ngOnDestroy","onClick","onResize","target","has","clear","__decorate","UntilDestroy","routes","path","component","children","RoutePath","canActivate","AutoLoginPartialRoutesGuard","AuthGuard","loadChildren","Promise","m","ResidentModule","ResidentGuard","ApplicationMenuModule","MainApplicationRoutingModule","RouterModule","playerFactory","player","tooltipDefaults","showDelay","hideDelay","touchendHideDelay","MainApplicationModule","YesEmptyPipe","ValueIfPositivePipe","ValueIfNonZeroPipe","provide","MAT_TOOLTIP_DEFAULT_OPTIONS","useValue","AbstractSecurityStorage","useClass","OidcStorageService","imports","LottieModule","LottieCacheModule","CommonModule","NotificationsModule","StoreDevtoolsModule","maxAge","logOnly","SharedModule","ModalsModule","ScrollingModule","FormsModule","ReactiveFormsModule","MatDialogModule","MatSnackBarModule","CompanyForm","CompaniesAbstract","AddNewCompanyModalComponent","displayName","get","DISPLAY_NAME","legalName","LEGAL_NAME","initForm","cancel","save","markAllAsTouched","addCompany","companyModel","contactPersonId","employees","addresses","ContractorsService","getUnassignedContractorsList","CompaniesEffects","adminService","contractorsService","getCompaniesList","getCompaniesListSuccess","getCompaniesListFailed","getCompany","getCompanySuccess","getCompanyFailed","addNewCompany","addCompanySuccess","addCompanyFailed","addCompanyWithOwner","company","addEmployeeToCompany","userIds","addCompanyWithOwnerSuccess","addCompanyWithOwnerFailure","updateCompany","updateCompanySuccess","updateCompanyFailed","deleteCompany","deleteCompanySuccess","deleteCompanyFailed","updateEmployeeItem","addEmployeeToCompanySuccess","getContractorList","addEmployeeToCompanyFailed","deleteEmployeeFromCompany","deleteEmployeeFromCompanySuccess","deleteEmployeeFromCompanyFailed","contractors","getContractorListSuccess","getContractorListFailed","addAddressToCompany","postCompanyAddressModel","addAddressToCompanySuccess","addAddressToCompanyFailed","updateAddressInCompany","restAddressModel","updateAddressInCompanySuccess","updateAddressInCompanyFailed","CompaniesStoreModule","fromCompanies","clearCompany","companiesFeatureKey","companyListLoading","companyAddLoading","companyModelLoading","addEmployeeToCompanyLoading","deleteEmployeeFromCompanyLoading","contractorsLoading","companyUpdateLoading","companyDeleteLoading","updateAddressInProgress","addCompanyWithOwnerInProgress","selectCompaniesState","selectCompanyList","companiesState","selectCompanyListLoading","selectCompany","selectCompanyLoading","selectUpdateAddressInProgress","selectCompanyUpdateLoading","selectAddEmployeeToCompanyLoading","selectContractors","selectDeleteEmployeeFromCompanyLoading","selectContractorsLoading","selectAddCompanyWithOwnerLoading","PortfolioEffects","propertiesService","unitsService","loadAllUserPortfolios","loadAllUserPortfoliosSuccess","loadAllUserPortfoliosFailed","loadPortfolioDetails","loadPortfolioDetailsSuccess","portfolioDetails","loadPortfolioDetailsFailed","loadPropertyDetails","loadPropertyDetailsSuccess","propertyDetails","loadPropertyDetailsFailed","loadAllUserProperties","getAllUserProperties","properties","loadAllUserPropertiesSucceeded","loadAllUserPropertiesFailed","loadAllUserUnassignedProperties","getAllUserUnassignedProperties","unassignedProperties","loadAllUserUnassignedPropertiesSucceeded","loadAllUserUnassignedPropertiesFailed","updatePortfolioName","selectPortfolioDetails","updatedPortfolioDetails","updatePortfolioDetailsFailed","updatePortfolioDetails","doNotRefetchPortfolios","updatePortfolioDetailsSuccess","updatePortfolioAutoAdd","autoAddNewProperties","preleaseFilterMode","addPropertyToPortfolio","propertyIds","removePropertyFromPortfolio","createNewPortfolio","loadPropertyManagers","getPropertyManagers","propertyManagers","loadPropertyManagersSucceeded","loadPropertyManagersFailed","loadPropertyManagersForProperty","getPropertyManagersForProperty","managerList","loadPropertyManagersForPropertySuccess","loadPropertyManagersForPropertyFailed","updateProperty","updatePropertyFailed","deletePortfolio","portfolioName","removePropertyManagers","propertyManagerModels","removePropertyManagersSuccess","removePropertyManagersFailed","setPropertyManagers","selectPropertyDetails","setPropertyManagersSuccess","setPropertyManagersFailed","changePropertyManagers","replacePropertyManagers","oldManager","newManager","getPropertyUnits","propertyUnits","getPropertyUnitsSuccess","getPropertyUnitsFailed","getUnitAttachments","getUnitAttachmentsSuccess","unitAttachments","setUnitAttachment","setUnitAttachmentSuccess","attachmentType","UnitAttachmentType","setUnitAttachmentFail","deleteUnitAttachment","deleteUnitAttachmentSuccess","targetAttachmentType","deleteUnitAttachmentFailed","fromPortfolioReducer","clearPortfolioData","changePropertyManagersSuccess","changePropertyManagersFailed","getUnitAttachmentsFail","clearPropertyData","portfolioFeatureKey","propertyManagersForPropertyLoading","allPropertyManagersLoading","unitAttachmentsLoading","deleteUnitAttachmentInProgress","deleteUnitAttachmentStatus","deletePortfolioOngoing","portfolioDetailsLoading","portfolioUpdateOngoing","portfolioNewPropertyUpdateOngoing","portfolioRemovePropertyUpdateOngoing","propertyDetailsLoading","propertyDetailsUpdateOngoing","userPropertiesLoading","userProperties","unassignedPropertiesLoading","allPropertyManagers","propertyManagersForProperty","propertyUnitsLoading","setUnitAttachmentInProgress","selectPortfolioState","fromPortfolio","selectPortfolios","portfolioState","selectPortfoliosLoading","selectPortfolioDetailsLoading","selectPropertyDetailsLoading","selectPropertyDetailsUpdateOngoing","selectProperties","selectPropertiesLoading","selectPortfolioUpdate","selectPortfolioNewPropertyUpdateOngoing","selectPortfolioRemovePropertyUpdateOngoing","selectPortfolioDeleteOngoing","selectUnassignedProperties","selectUnassignedPropertiesLoading","selectPropertyManagersForProperty","selectAllPropertyManagers","selectAllPropertyManagersLoading","selectPropertyUnits","selectPropertyManagersForPropertyLoading","selectPropertyUnitsLoading","selectUnitAttachments","selectDeleteUnitAttachmentInProgress","selectUnitAttachmentsLoading","selectDeleteUnitAttachmentStatus","setSystemSectionExpanded","systemConfigurationFeatureKey","systemConfigLoading","timerReportLoading","updateSystemStatus","updateSystemInProgress","chatHooksChannels","expandedSections","API","Hooks","DateTime","TimerReport","section","getTurnoverConfigurationList","getTurnoverConfigurationListSuccess","getTurnoverConfigurationListFailure","getTurnoverConfigurationByWorkflowStep","getTurnoverConfigurationByWorkflowStepSuccess","getTurnoverConfigurationByWorkflowStepFailure","updateTurnoverFieldConfiguration","updateTurnoverFieldConfigurationSuccess","updateTurnoverFieldConfigurationFailure","getElapsedDaysThresholds","getElapsedDaysThresholdsSuccess","getElapsedDaysThresholdsFailure","updateElapsedDaysThresholds","updateElapsedDaysThresholdsSuccess","updateElapsedDaysThresholdsFailure","loadFinish","loadFinishSucceded","loadFinishFailed","addFinish","addFinishSuccess","addFinishFailure","updateFinish","updateFinishSuccess","updateFinishFailure","deleteFinish","deleteFinishSuccess","deleteFinishFailure","TurnoverConfigurationStepAssigneesService","getDefaultAssigneesForPortfolio","updateDefaultAssigneesForPortfolio","deleteDefaultAssigneesForPortfolio","stepId","getResponsiblePartiesByPortfolioId","getResponsiblePartiesOverrideByPortfolioId","createResponsibleParties","workflowList","updateResponsibleParties","deleteResponsibleParties","workflowStepType","uri","turnoverConfigurationFeatureKey","isLoading","turnoverConfig","turnoverConfigLoading","turnoverConfigUpdateInProgress","turnoverStepConfigLoading","turnoverStepConfig","thresholdsConfiguration","thresholdsConfigurationLoading","thresholdsConfigurationUpdate","thresholdsConfigurationUpdateInProgress","finishTypes","finishInProgress","selectTurnoverConfigurationState","fromTurnoverConfiguration","selectTurnoverStepConfigLoading","selectTurnoverConfig","turnoverConfigState","selectTurnoverConfigLoading","selectTurnoverConfigUpdateInProgress","selectTurnoverStepConfig","selectThresholdsConfigurationLoading","selectThresholdsConfiguration","selectFinishes","selectThresholdsConfigurationUpdate","selectThresholdsConfigurationUpdateInProgress","selectFinishInProgress","TurnoverConfigurationEffects","turnoverConfigService","getTurnoverConfigList","getTurnoverConfigListByWorkflowType","getFinishTypes","addFinishType","finish","updateFinishType","deleteFinishType","clearNotificationsStore","addLatestAnyNotification","markAnyNotificationsAsRead","clearAnyNotifications","updateAnyNotifications","getLastNotificationList","getLastNotificationListSuccess","getLastNotificationListFailed","markAllAsRead","markAllAsReadSuccess","markAllAsReadFailed","markAsRead","markAsReadSuccess","markAsReadFailed","deleteNotification","deleteNotificationSuccess","deleteNotificationFailed","NotificationRestService","getNotifications","customPatchData","baseNotificationBody","notificationIds","NotificationsEffects","notificationRestService","sortedList","orderBy","moment","timestamp","valueOf","lastNotificationList","selectLastAnyNotificationList","notifications","readNotifications","wasRead","additionalData","selectLastNotificationList","notificationId","IconComponent","fromNotifications","notificationsFeatureKey","bidNotification","ticketNotification","turnoverNotification","lastAnyNotificationList","lastNotificationListLoading","markAllAsReadInProgress","markAllAsReadStatus","markAsReadInProgress","markAsReadStatus","markAsReadId","deleteNotificationInProgress","selectNotificationsState","notificationsState","selectLastNotificationListLoading","selectDeleteNotificationInProgress","selectMarkAsReadInProgress","selectMarkAsReadStatus","selectMarkAsReadId","loadSurveyTemplates","saveSurveyTemplate","saveSurveyTemplateSuccess","saveSurveyTemplateFailure","loadSurveyTemplatesSuccess","loadSurveyTemplatesFailure","saveInspectionSurveyTemplateFailure","surveysService","getSurveyTemplates","saveTemplate","inspectionTemplateId","surveyId","surveysFeatureKey","surveyTemplates","clearSelectedPunch","clearPunchesByTurnoverId","resetCreateNewTurnover","clearTurnoverData","setCurrentWorkflowStep","setCurrentWorkflowStepModel","resetWorkflowStepStatus","setTurnoverDataSuccess","setApplianceTypeList","setColorTypeList","setUserList","setUserListModel","setAllUserRadioList","setAllUserList","setCompanyRadioList","setCompanyNameRadioList","setCompanyEmailRadioList","clearAddedAttachment","resetNewTurnoverTicket","clearAddedTicketAttachment","clearBid","clearNewBidList","newBidInProgress","clearUpdatedBid","clearAddedBidAttachment","clearWorkflowStepCommentList","deleteTurnoverAttachmentFailed","clearTurnoverAttachments","clearTicketPreview","setStepInfo","cleanTurnoverStore","workflowAssignmentsByPropertyAndStepIdSucceded","workflowAssignmentsByPropertyAndStepIdFailure","assignDefaultWorkflowStepAssigneeSuccess","reloadAppliancesNeeded","reloadAppliancesNeededEnd","inspectTurnover","updateValidationParams","resetKanbanCounters","setAllPropertyIds","setDisplayedPropertyList","setSectionLostRevenue","clearTurnoverTimers","TurnoverDateRangeModule","InputErrorModule","DateDropdownModule","VacancyLostThresholdList","None","Medium","High","punchFeatureKey","punchesByTurnoverIdLoading","punchesByTurnoverId","selectedPunch","bidsLoading","bidCategories","bidAdding","turnoversFeatureKey","updatedTurnoverData","emptyTurnoverData","createTurnoverLoading","createdTurnover","turnoverDataLoading","setWorkflowStepStatus","setWorkflowStepLoading","currentWorkflowStep","currentWorkflowStepModel","applianceTypeList","colorTypeList","userList","userListModel","companyRadioList","companyNameRadioList","companyEmailRadioList","addBidAttachmentInProgress","addBidAttachmentStatus","turnoverTicketListLoading","newTurnoverTicketLoading","selectedTicket","selectedTicketLoading","addNewApplianceNeededLoading","isNewApplianceNeededAdd","markApplianceAsDoneLoading","isMarkApplianceAsDone","newBidListInProgress","bidTurnoverList","bidTurnoverListLoading","bidCompanyList","bidCompanyListLoading","editedBid","bidLoading","updatedBidLoading","updatedBidCommentLoading","applianceLoading","workflowStepCommentListLoading","workflowStepCommentUpdateLoading","workflowStepAssigneeId","workflowStepAssignmentLoading","deleteTurnoverInProgress","turnoverDeleteStatus","deleteTurnoverAttachmentInProgress","turnoverDeleteAttachmentStatus","addTurnoverAttachmentInProgress","addTurnoverAttachmentStatus","stepInfo","allAttachmentsLoading","deleteBidAttachmentInProgress","deleteBidAttachmentStatus","bidAttachments","bidAttachmentsLoading","updateTicketInProgress","updateTurnoverAttachmentInProgress","updateTurnoverAttachmentStatus","ticketLoading","ticketAttachmentsLoading","ticketUpdateInProgress","ticketUpdateInProgressStatus","inspectTurnoverId","validationParams","updateStepAssigneeInProgress","updateStepAssigneeStatus","defaultTurnoversAssigneesLoading","allUserRadioList","allUserList","displayedPropertyList","sectionsLostRevenue","rejectBidLoading","lostRevenue","selectPunchState","fromPunchReducer","selectPunchesByTurnoverId","selectSelectedPunch","selectPunchesByTurnoverIdLoading","selectTurnoverBidsState","selectTurnoverBids","selectTurnoverBidCategories","selectTurnoverBidAdding","selectTurnoverBidsLoading","selectTurnoversState","selectCreatedTurnover","turnoversState","selectCreateTurnoverLoading","selectTurnoverUnitName","unitName","selectTurnoverDataId","selectUpdatedTurnoverData","selectTurnoverDataLoading","selectEmptyTurnoverData","selectSetWorkflowStepLoading","selectSetWorkflowStepStatus","selectNextWorkflowStep","selectCurrentWorkflowStep","selectCurrentWorkflowStepModel","selectApplianceTypeList","selectColorTypeList","selectUserList","selectIsNewApplianceNeededAdd","selectAddNewApplianceNeededLoading","selectAllUserRadioList","selectAllUserList","selectListModel","selectCompanyRadioList","selectCompanyNameRadioList","selectCompanyEmailRadioList","selectAddedTicketAttachment","selectAddedAttachment","selectAddedBidAttachment","selectAddBidAttachmentInProgress","selectAddBidAttachmentStatus","selectAddTurnoverAttachmentStatus","selectAddTurnoverAttachmentInProgress","selectUpdateTurnoverAttachmentInProgress","selectDeleteTurnoverAttachmentInProgress","selectUpdateTurnoverAttachmentStatus","selectNewBidList","selectNewBidListInProgress","selectTurnoverTicketList","selectTurnoverTicketListLoading","selectNewTurnoverTicket","selectUpdateTicketInProgress","selectNewTurnoverTicketLoading","selectUpdatedTurnoverTicket","selectSelectedTicket","selectSelectedTicketLoading","selectBidTurnoverList","selectBidTurnoverListLoading","selectAllAttachments","selectAllBidList","selectAllBidListLoading","selectBidCompanyList","selectBidCompanyListLoading","selectUpdatedBid","selectAllAttachmentsLoading","selectBid","selectBidLoading","selectUpdatedBidLoading","selectRejectBidLoading","selectUpdatedBidCommentLoading","selectWorkflowStepCommentList","selectDeleteBidAttachmentInProgress","selectDeleteBidAttachmentStatus","selectBidAttachments","selectBidAttachmentsLoading","selectAppliance","selectApplianceLoading","selectWorkflowStepCommentListLoading","selectDeleteTurnoverInProgress","selectWorkflowStepCommentUpdateLoading","selectWorkflowAssignmentAssigneeId","selectWorkflowAssignmentLoading","selectReloadAppliancesNeeded","selectTurnoverDeleteStatus","selectStepInfo","selectTicket","selectTicketAttachments","selectTicketLoading","selectTicketUpdateInProgress","selectTicketAttachmentsLoading","selectTicketUpdateInProgressStatus","selectInspectTurnoverId","selectValidationParams","lockFields","nextStepAvailable","saveAvailable","nextStepChecking","customMessage","selectIsActiveSection","selectIsInactiveFilteredSection","selectUpdateStepAssigneeInProgress","selectDefaultTurnoversAssignees","selectUpdateStepAssigneeStatus","selectDefaultTurnoversAssigneesLoading","selectDisplayedPropertyList","selectTurnoverTimers","selectSectionsLostRevenue","turnoverState","loadEnumerationsSuccess","loadEnumerationsFailed","loadFileUploads","uploadFileSuccess","clearUploadedFile","uploadFileFail","deleteFile","deleteFileSuccess","deleteFileFailed","loadUserTenantSucceeded","loadUserTenantFailed","loadUserDataSucceded","loadUserDataFailed","loadUserById","loadUserByIdSucceded","loadUserByIdFailed","setUserGeneralRole","ContentEditableDirective","elementRef","renderer","_value","setAttribute","nativeElement","ngAfterViewInit","MutationObserver","onChange","innerHTML","observe","characterData","childList","subtree","disconnect","onInput","onBlur","writeValue","setProperty","setDisabledState","disabled","String","ElementRef","Renderer2","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","CustomTooltipComponent","CustomTooltipDirective","overlay","overlayPositionBuilder","showToolTip","positionStrategy","flexibleConnectedTo","withPositions","originX","originY","overlayX","overlayY","offsetY","overlayRef","show","hasAttached","tooltipRef","attach","ComponentPortal","instance","text","contentTemplate","hide","closeToolTip","detach","CustomTooltipModule","DirectivesModule","DropZoneDirective","EventEmitter","onDrop","preventDefault","dataTransfer","files","kind","getAsFile","fileDrop","emit","clearData","Array","from","onDragOver","stopPropagation","onDragLeave","onBodyDragOver","preventBodyDrop","onBodyDrop","HavePermissionDirective","templateRef","viewContainer","appHavePermission","checkPermission","permissionList","hasPermission","createEmbeddedView","LastElementDirective","isLastElement","lastItemParam","itemsCount","lastElementLoaded","SortHeaderDirective","addClass","ariaDirection","changeDirection","sortAction","currentDirection","fieldName","sortEvent","field","direction","TurnoverAttachmentType","EnumerationItemFields","check","isArray","some","v","getBidCategoriesRadioList","getCompanyRadioList","getDateObjectFunction","date","getUtc","getEnumerationRadioListFunction","enumerationItems","nullValueLabel","withNullValue","valueKey","displayText","getPortfolioProperties","localeCompare","defaultLabel","lastName","charAmount","substring","toUpperCase","trim","tooltip","userGroupType","companyName","getUserOrVendorItems","getUserItems","getInternalUserList","isAuthorized","returnUrl","getCashedUserData","createUrlTree","PreleaseFilterMode","isRestTurnoverTaskModel","object","isRestTurnoverDataModel","fileUploadFeatureKey","fileToUpload","fileToUploadLoading","uploadedFileItem","deleteInProgress","deleteStatus","storageValue","getItem","parsedValue","parse","featureKey","enumerationsLoading","enumerations","selectedUserLoading","selectedUser","CORE_FEATURE_KEY","reducers","fromUserReducer","enumeration","fromEnumerationReducer","fromFileUploadReducer","fromWindowResizeReducer","routeStateFeatureKey","RouteStateReducer","windowResizeFeatureKey","selectCoreModule","selectEnumerationState","coreState","selectLoadEnumerations","enumerationState","selectLoadEnumerationsLoading","selectDashboardViewType","selectDelinquencyResultsEnumeration","selectWorkflowPhasesEnumeration","workflowPhases","delinquencyResultTypes","selectRenewalResultTypesEnumeration","selectWorkflowStepsEnumeration","workflowSteps","renewalResultTypes","selectFinishTypesEnumeration","finishType","selectTimerTypesEnumeration","timerTypes","selectPmsTypesEnumeration","pmsTypes","selectNativeLanguagesEnumeration","nativeLanguage","selectUserState","userState","selectUserId","selectUserName","selectIsAuthenticated","selectSelectedUser","selectSelectedUserLoading","WindowResizeEffects","EnumerationEffects","FileUploadEffects","uploadedFile","attachmentSection","TenantService","getTenant","UserEffects","tenantService","getUserById","JwtHelperService","HTTP_INTERCEPTORS","TokenInterceptor","HttpClientModule","AttachmentItemComponent","fileUploadService","deleteConfirmation","deleteEvent","copyLink","copyToClipboard","selBox","document","createElement","style","left","top","opacity","appendChild","focus","execCommand","removeChild","attachmentItem","externalUrl","newAttachmentItem","link","download","getLink","startsWith","AttachmentItemModule","MatButtonModule","MatTooltipModule","PipesModule","InputFileComponent","setValue","valueChanges","uploadingFile$","browseFile","input","click","$event","clearEvent","filesDropped","uploadSelection","emitEvents","inputFileChanged","filesList","selectFilesEvent","checkSupportedFormatFunction","acceptedFormatList","acceptedFormats","uploadingProgress$","uploadFileProgress","HttpEventType","progress","Math","round","loaded","total","HttpResponse","AttachmentComponentForm","AttachmentComponent","AttachmentType","File","Link","setIsTouched","cleanInputAttachment","_attachmentItem","currentLink","attachmentItemEvent","keepSelection","debounceTime","AttachmentComponentType","urlRegex","submitLink","attachment_component_decorate","AttachmentModule","RadioButtonModule","InputFileModule","InputModule","MatProgressSpinnerModule","AttachmentsListComponent","AttachmentsListModule","ButtonComponent","buttonClick","clickEvent","ButtonModule","CalendarHeaderComponent","_intl","calendar","_dateAdapter","_dateFormats","stateChanges","periodLabel","format","activeDate","display","monthYearA11yLabel","previousClicked","addCalendarMonths","nextClicked","MatCalendar","MAT_DATE_FORMATS","DateDropdownComponent","timezoneService","locale","UntypedFormControl","getCurrentDateOnly","labelCss","_labelCss","labelInside","labelInsideDefaultCss","labelOutsideDefaultCss","attrDisable","disable","emitEvent","enable","isDisabled","dateRangeConfig","DateRange","attrClickableDisable","isOpened","disabledClickEvent","dateMenuTrigger","closeMenu","valueTyped","preparedValue","dt","isValid","toDate","updateCursor","selectionStart","dateClass","getTime","today","onSelect","end","onSelectSingleDate","selectRange","selectedRangeEvent","maskControl","DatePipe","displayMask","dateToggleMenu","menuExpanded","toggleMenu","openDateMenu","errorDisabledText","openMenu","LOCALE_ID","MAT_DATE_RANGE_SELECTION_STRATEGY","DefaultMatCalendarRangeStrategy","MatMenuModule","MatDatepickerModule","NgxMaskModule","MatIconModule","DividerComponent","DividerModule","MatDividerModule","AutoresizeDirective","resize","formControl","appAutoresize","textArea","newHeight","height","maxHeight","min","scrollHeight","InputAreaComponent","blurEvent","enter","keydownEnterEvent","observed","insertNewline","InputAreaModule","AutoresizeModule","MatInputModule","InputErrorComponent","validationMessages","visible","InputErrorService","validator","requiredLength","InputTypeFileModule","InputComponent","inputControl","keydownEnter","removeFocus","blur","MatFormFieldModule","PictureModule","RadioButtonDropdownComponent","valueCss","_valueCss","optionCss","_optionCss","controlSectionItems","controlItems","transformValueList","sortSection","flat","transformValue","listLoading","_listLoading","_labelElement","labelWidth","clientWidth","ngDoCheck","initControl","ngAfterContentChecked","autoSortList","sortBy","toLowerCase","searchFunction","term","indexOf","valueChange","isEmpty","isNil","showEmptyValue","hasValue","displayValue","onSelectValueContent","getCustomTransformValue","isUndefined","unsupportedValueLabel","displayLabelAsValue","valueStr","count","multiple","single","replace","mask","onSelectAll","t","onClearAll","onAddNew","addNewClicked","ngSelect","NgSelectComponent","RadioButtonDropdownModule","NgSelectModule","RadioButtonComponent","checkIfEmpty","isEmptyValue","getActiveValidationErrorFunction","activeErrors","required","MatRadioModule","ReadOnlyFieldComponent","ReadOnlyFieldModule","SelectTreeModule","TreeModule","SlideToggleComponent","NgModel","_pendingChange","viewToModelUpdate","i2","MatSlideToggleModule","i3","i1","i4","TableEmptyContentModule","TableStatusToggleModule","MatCheckboxModule","UserSelectDropdownComponent","enumerationValuePipe","prepareUsersList","myOptionItem","showMyOption","myLabel","allOptionItem","showAllOption","allLabel","bothLists","vendorList","preparedUsers","userListRaw","vendorListRaw","Employee","Contractor","userName","vendorName","UserSelectDropdownModule","DefaultModalConfigConstant","AddVendorUserModalModule","GalleryModalModule","InfoModalModule","NewBulkScopeModule","NextStepAssigneeModalModule","PromptModalModule","TicketPreviewModalModule","UserPreviewModalModule","AddVendorModalModule","CommentTooLongModalModule","ConfirmationModalModule","SpaceTemplateModalModule","MatTableModule","MatSortModule","TurnoverPunchModalModule","WorkflowActionsService","NewTurnoverModalModule","CustomInspectionSaveTemplateDialogComponent","customInspectionService","inspectionName","templateInput","doNotShowAgain","inspectionTemplateContent","isRequired","AddBidModalComponent","Date","FormGroup","bidAmount","vendorId","bidDate","inProgress$","fileUploaded","formSubmitted","draftInvoiceFileUploadId","turnoverDataBidCategoryId","addNewVendor","openNewVendorModal","addNewCategory","openPrompt","combineUserWithProperties","allProperties","propertyMapping","userPropertiesMappings","userMappedProperties","mapping","userProperty","formatPropertyStructureToTree","root","cloneDeep","propertiesIndexMap","singleProperty","parentId","parent","warn","UserPreviewFields","UserExistsValidator","emailAddressList","userAlreadyExists","UserInactiveValidator","userInactive","PropertyType","doForAllTreeNodes","treeModel","callback","roots","node","doForAllNodes","child","SelectTreeComponent","mouse","checkboxClick","bind","useCheckbox","useVirtualScroll","nodeHeight","actionMapping","updatePlaceholderAndEmit","treeInitialized","selectNodes","selectedNodes","clearSelection","tree","selectedLeafNodeIds","clearAll","hasNodesSelected","values","propertiesToSelect","treeNode","filterTree","filterNodes","allParentsName","getAncestorsName","toLower","collapseAll","expandRoot","expand","isExpanded","onListOpen","onListClose","selectionValue","toggleNodeSelection","assign","isSelected","selectedNodeIds","selectedLeaves","selectedRoots","isRootSelected","getSelectedNodes","placeholder","expandedNodeIds","expanderClick","hasChildren","onlySelectedNodes","isChecked","getSelectedRootsRecursive","nodes","getSelectedLeavesRecursive","propertyType","each","childNode","clearFilter","sizeChanged","filterString","TreeComponent","selectParentIfNeeded","deselectAncestorsIfNeeded","isNodeSelected","nodeToCheck","parentNode","every","AddVendorUserModalComponent","header","saveButtonText","phoneNumber","companyListLoading$","allRoles","vendorRoleId","nativeLanguages","existingActiveEmails","existingInactiveEmails","addValidators","operationsInProgress","invitedUser","c","arePropertiesChanged","selectedProperties","selectedRootsChange","add_vendor_user_modal_component_decorate","GalleryModalComponent","toolbar","zoomIn","zoomOut","oneToOne","prev","play","size","rotateLeft","rotateRight","flipHorizontal","flipVertical","deleteAttachmentInProgress$","attachmentsBSubject","getDeleteConfirmationLabels","viewer","Viewer","imagesList","viewerOptions","destroy","deleteItem","gallery_modal_component_decorate","InfoModalComponent","confirm","NextStepAssigneeModalComponent","ManagementRoute","WorkflowStepListConst","propertyName","updateInProgress$","propertyUserListLoading$","getCachedPropertyUserList","next_step_assignee_modal_component_decorate","PromptModalComponent","okButtonText","okButtonColor","cancelButtonColor","minLength","getAttachmentToEntityParams","params","description","originalFileName","selectFileUploadState","selectDeleteStatus","selectUploadedFileParams","fileUploadState","selectFileToUploadLoading","TicketPreviewModalComponent","turnoverAttachmentPipe","TurnoverForm","detailedInformation","ticketPriorityType","ticketStatusType","ableToResolve","isNew","addNewInProgress$","attachmentItems","ticketAttachmentType","delay","clearNewTicketAttachment","deleteTicketAttachment","deleteNewTicketAttachment","addTicketAttachment","scrollIntoView","behavior","block","formValue","endDate","markAsDone","dateCompleted","getCurrentDate","TicketStatusType","stepAssigneeId","PriorityType","createdBy","isTicketDone","ticket_preview_modal_component_decorate","UserPreviewModalComponent","rootNodes","validators","vendroRole","x","setValidators","updateValueAndValidity","updateUser","currentUserProperties","currentUserPropertyIds","newUserToPropertyMappings","prepareSelectedUserToPropertyMappings","selectedPropertyIds","propertyToDelete","user_preview_modal_component_decorate","NewVendorFields","AddVendorModalComponent","fb","FirstName","LastName","Email","Company","PhoneNumber","NativeLanguage","addOnlyVendor","existingEmails","send","add_vendor_modal_component_decorate","CommentTooLongModalComponent","ConfirmationModalComponent","closest","zIndex","cancelColor","doNotShowAgainMessage","updateDialogHiddenState","confirmation_modal_component_decorate","TurnoverPunchFields","TurnoverPunchModalComponent","turnoverAttachment","PriorityTypeListConst","priority","isNewPunch","isCompleted","turnoverUnitName$","punchLowThreshold","stepThresholds","lowThresholdValue","currentDate","defaultDate","setDate","getDate","deletePunchAttachment","deleteNewPunchAttachment","newAttachment","removeAttachmentsIfNeeded","hasAttachments","getAttachments","addAttachment","inProgress","DueDate","Priority","Title","Description","attachmentAdded$","isNewTicket","addAttachmentAndWaitForSuccess$","turnover_punch_modal_component_decorate","ModalDialogSizes","xxs","xs","sm","md","lg","nonPmsUnitCost","hidden","parsed","remove","d","isDialogHiddenByUser","openInfoModal","openCommentTooLongModal","maxCounter","openGalleryModal","openNewTurnoverModal","activeProperty","isNonPms","NewTurnoverModalComponent","minHeight","openNextStepAssigneeModal","disableClose","openTicketPreviewModal","openPunchModal","openNewVendor","openCustomInspectionSaveTemplateModal","getAcceptChargesText","nonPmsUnitCost$","cost","version","openUserPreviewModal","openVendorUserModal","addBid","unitNonPmsService","modalService","datePipe","startWorkflowStepType","noticeValidation","pmses","WorkflowStepListActive","defaultWorkflowStepType","tomorrow","MoveOutDate","customError","selectPropertiesLoading$","unitListLoading$","newTurnoverLoadingInProgress$","UnitId","acceptChargesText","PropertyId","nonPmsUnitMaxNumber","test","max","nextValue","userPropertiesList","activeProperties","otherProperties","userUnits","getUnitList","successMessage","reloadRoute","moveOutDate","newTurnover","dateMoveOut","navigateByUrl","skipLocationChange","EMAIL_REGEXP","AdminPanelService","billingReport","startDate","toISOString","runImporterNow","CacheService","getCachedInfo","f","cacheInfoDictionary","cachedSubject","expired","cacheInfo","expiredFromLocalStarage","complete","storageTimestamp","LocalStorageDataEnum","expireCachedInfo","CompaniesService","FileUploadsService","uploadProgress","search","query","ids","cloudUri","KpiService","filterKpiByType","kpiType","k","avg","precision","filtered","sumBy","unitsCount","isNaN","parseFloat","toFixed","sum","percent","OIDC_STORAGE_KEY_PREFIX","read","getKey","write","keys","PropertiesService","setPropertyPreleaseFilter","getTurnsWithoutAssignees","getTurnsWithoutPortfolioAssignees","RenewalsService","getRenewalDetails","renewalId","updateRenewalDetails","renewalModel","getRenewalList","renewalTargetList","updateRenewalTarget","renewalTargetModels","screenWipeState","screenClasses","globalWiperVisible","globalWiper","runWiper","setClasses","wipeDuration","SurveysService","SystemConfigService","buildiumTokenExchange","jwtToken","TicketsService","residentMode","rate","clientFeedbackRating","getTicketsByAssigneeId","getTicketsByPropertyId","getCategories","TurnoverConfigService","getTenantSettings","saveTenantSettings","tenantSettings","cacheService","restapiWithoutTimezone","patch","patchData","TimezoneHelper","updateMoveOutDateSortOrder","sortOrderValue","updateMoveInDateSortOrder","patchAdditionalData","fixTimezoneForTurnoverTaskModel","getCachedPortfolioTurnovers","getArchivedPortfolioTurnovers","fixTimezoneForArchivedTurnoverTaskModel","restoreTurnover","getWorkflowTemplates","UnitNonPmsService","_err","getPropertiesUnits","UserService","getCachedUserList","getCachedUserOrVendorList","getCachedUserListOptions","getUserData","claim","Number","resendInvitationEmail","stepType","moveToNextStepWithDefaultAssignee","turnover","getAssignee","assigneeInfo","currentAssigneeId","defaultAssigneeId","WorkflowStepCommentsService","comment","commentId","addReaction","reactionId","encodeURIComponent","deleteReaction","extendStatics","setPrototypeOf","__proto__","p","hasOwnProperty","__extends","__","prototype","__assign","n","arguments","apply","__read","o","Symbol","iterator","r","ar","done","return","__spread","EMPTY_ARRAY","freeze","EMPTY_OBJECT","mockGlobal","getGlobal","global","getNextId","globalState","mobxGuid","fail","invariant","Error","once","func","invoked","noop","isObject","isPlainObject","proto","getPrototypeOf","addHiddenProp","propName","defineProperty","enumerable","writable","configurable","addHiddenFinalProp","createInstanceofPredicate","clazz","isES6Map","thing","Map","isES6Set","Set","iteratorToArray","it","res","primitiveSymbol","toPrimitive","iteratorSymbol","declareIterator","prototType","iteratorFactory","makeIterable","getSelf","toStringTagSymbol","toStringTag","Atom","isPendingUnobservation","isBeingObserved","observers","observersIndexes","diffValue","lastAccessedBy","lowestObserverState","IDerivationState","NOT_TRACKING","onBecomeUnobserved","onBecomeObserved","reportObserved","reportChanged","startBatch","propagateChanged","observable","STALE","dependenciesState","UP_TO_DATE","isTracing","TraceMode","NONE","logTraceInfo","onBecomeStale","endBatch","isAtom","identityComparer","comparer","identity","structural","structuralComparer","deepEqual","default","defaultComparer","areBothNaN","shallow","shallowComparer","enumerableDescriptorCache","nonEnumerableDescriptorCache","createPropertyInitializerDescriptor","prop","cache","initializeInstance","set","__mobxDidRunLazyInitializers","decorators","__mobxDecorators","propertyCreator","descriptor","decoratorTarget","decoratorArguments","createPropDecorator","propertyInitiallyEnumerable","decorator","applyImmediately","quacksLikeADecorator","slice","deepEnhancer","_","isObservable","array","referenceEnhancer","newValue","createDecoratorForEnhancer","enhancer","_decoratorTarget","decoratorArgs","defineObservableProperty","adm","asObservableObject","hasInterceptors","change","interceptChange","ObservableValue","generateObservablePropConfig","observablePropertyConfigs","$mobx","notifyPropertyAddition","notify","hasListeners","notifySpy","isSpyEnabled","spyReportStart","notifyListeners","spyReportEnd","initializer","process","defaultCreateObservableOptions","deep","defaultDecorator","asCreateObservableOptions","getEnhancerFromOptions","deepDecorator","shallowDecorator","shallowEnhancer","isObservableObject","isObservableArray","isObservableMap","isObservableSet","refDecorator","refStructDecorator","refStructEnhancer","oldValue","observableFactories","box","incorrectlyUsedAsDecorator","equals","shallowBox","initialValues","ObservableArray","shallowArray","ObservableMap","shallowMap","ObservableSet","extendObservable","shallowObject","ref","struct","createObservable","arg2","arg3","methodName","computedDecorator","defineComputedProperty","context","ComputedValue","generateComputedPropConfig","computedPropertyConfigs","computedConfigurable","getAdministrationForComputedPropOwner","computedStructDecorator","computed","arg1","opts","POSSIBLY_STALE","LOG","BREAK","CaughtException","cause","isCaughtException","shouldCompute","derivation","prevUntracked","untrackedStart","obs","observing","l","obj","isComputedValue","disableErrorBoundaries","untrackedEnd","changeDependenciesStateTo0","checkIfStateModificationsAreAllowed","atom","hasObservers","computationDepth","allowStateChanges","enforceActions","trackDerivedFunction","prevAllowStateReads","allowStateReadsStart","newObserving","unboundDepsCount","runId","prevTracking","trackingDerivation","bindDependencies","prevObserving","lowestNewObservingDerivationState","dep","removeObserver","addObserver","allowStateReadsEnd","clearObserving","untracked","allowStateReads","currentActionId","nextActionId","actionName","executeAction","isMobxAction","scope","runInfo","_startAction","startTime","now","flattendArgs","prevDerivation","prevAllowStateChanges","allowStateChangesStart","actionId","parentActionId","_endAction","suppressReactionErrors","allowStateChangesEnd","time","_super","hasUnreportedChange","spyReport","dehanceValue","dehancer","prepareNewValue","UNCHANGED","setNewValue","intercept","handler","registerInterceptor","listener","fireImmediately","registerListener","toJSON","__mapid","isComputing","isRunningSetter","setter","compareStructural","requiresReaction","keepAlive","propagateMaybeChanged","inBatch","trackAndCompute","propagateChangeConfirmed","warnAboutUntrackedRead","computeValue","peek","wasSuspended","changed","track","suspend","firstTime","prevValue","autorun","prevU","MobXGlobals","pendingUnobservations","pendingReactions","isRunningReactions","spyListeners","globalReactionErrorHandlers","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","canMergeGlobalState","__mobxInstanceCount","__mobxGlobals","queueForUnobservation","filler","pop","runReactions","log","lines","printDepTree","getDependencyTree","nodeToDependencyTree","getAtom","Function","depth","dependencies","Reaction","onInvalidate","errorHandler","requiresObservable","isDisposed","_isScheduled","_isTrackPending","_isRunning","schedule","isScheduled","runReaction","reportExceptionInDerivation","dispose","getDisposer","trace","enterBreakPoint","_i","getAtomFromArgs","reactionScheduler","runReactionsHelper","allReactions","iterations","remainingReactions","isReaction","listeners","END_EVENT","dontReassignFields","namedActionDecorator","initializer_1","actionFieldDecorator","arg4","defineBoundAction","view","reaction","scheduler","scheduler_1","createSchedulerFromOptions","isScheduled_1","reactionRunner","onError","bound","boundActionDecorator","applyToInstance","run","expression","effect","effectAction","wrapErrorHandler","baseFn","runSync","interceptHook","hook","cb","orig","getOwnPropertyDescriptor","resultDescriptor","unique","_isObservable","transaction","thisArg","interceptable","interceptors","idx","listenable","changeListeners","safariPrototypeSetterInheritanceBug","OBSERVABLE_ARRAY_BUFFER_SIZE","StubArray","inherit","ctor","isFrozen","ObservableArrayAdministration","owned","lastKnownLength","newV","oldV","dehanceValues","added","addedCount","removed","removedCount","getArrayLength","setArrayLength","newLength","currentLength","newItems","spliceWithArray","updateArrayLength","oldLength","delta","reserveArrayBuffer","deleteCount","lengthDelta","spliceItemsIntoValues","notifyArraySplice","_a","notifyArrayChildUpdate","ENTRY_0","arrays","toJS","predicate","fromIndex","shift","unshift","reverse","clone","compareFn","move","toIndex","checkIndex","oldItems","impl","self","nextIndex","funcName","baseFunc","makeNonEnumerable","propNames","createArrayEntryDescriptor","createArrayBufferItem","isObservableArrayAdministration","ObservableMapMarker","initialData","_keys","_data","_hasMap","merge","_has","newEntry","stringifyKey","hasKey","_updateValue","_addValue","_updateHasMapEntry","other","_b","replacementMap","convertToMap","dataStructure","oldKeys","newKeys","keysChanged","oldKey","toPOJO","ObservableSetMarker","_atom","createAtom","onBecomeObservedHandler","onBecomeUnobservedHandler","callbackFn","observableValues","ObservableObjectAdministration","defaultEnhancer","owner","illegalAccess","getKeys","isObservableObjectAdministration","anyThing","getAdministration","eq","aStack","bStack","unwrap","className","areArrays","aCtor","bCtor","has$1","LoadingComponent_span_0_Template","rf","ɵngcc0","__MOBX_DEVTOOLS_GLOBAL_HOOK__","injectMobx","spy","extras","getDebugName","_c0","a0","$implicit","TreeViewportComponent_ng_container_0_Template","ctx_r0","getTotalHeight","_c1","dontDetach","_c2","_c3","_c4","_c5","_c6","_c7","_c8","a1","a2","a3","loadingTemplate","treeNodeTemplate","treeNodeWrapperTemplate","treeNodeFullTemplate","TreeComponent_tree_node_collection_3_Template","ctx_r1","TreeComponent_tree_node_drop_slot_4_Template","ctx_r2","virtualRoot","TreeNodeComponent_ng_container_0_div_1_tree_node_drop_slot_1_Template","TreeNodeComponent_ng_container_0_div_1_Template","getClass","isCollapsed","isLeaf","isFocused","_c9","TreeNodeComponent_ng_container_0_Template","TreeNodeContent_span_0_Template","displayField","_c10","TreeNodeExpanderComponent_ng_container_0_span_1_Template","_r4","ctx_r3","mouseAction","TreeNodeExpanderComponent_ng_container_0_span_2_Template","TreeNodeExpanderComponent_ng_container_0_Template","TreeNodeChildrenComponent_ng_container_0_div_1_tree_node_collection_1_Template","TreeNodeChildrenComponent_ng_container_0_div_1_tree_loading_component_2_Template","getNodePadding","TreeNodeChildrenComponent_ng_container_0_div_1_Template","levelPadding","TreeNodeChildrenComponent_ng_container_0_Template","animateSpeed","animateAcceleration","animateExpand","TreeNodeCollectionComponent_ng_container_0_tree_node_2_Template","node_r2","i_r3","TreeNodeCollectionComponent_ng_container_0_Template","marginTop","viewportNodes","trackNode","TreeNodeWrapperComponent_div_0_tree_node_checkbox_1_Template","TreeNodeWrapperComponent_div_0_Template","_r3","ctx_r4","ctx_r5","ctx_r6","ctx_r7","ctx_r8","ctx_r9","ctx_r10","ctx_r11","allowDrop","allowDragoverStyling","allowDrag","TreeNodeCheckboxComponent_ng_container_0_Template","_r2","isPartiallySelected","TreeMobxAutorunDirective","templateBindings","shouldDetach","autoDetect","treeMobxAutorun","ɵfac","ɵdir","inputs","TREE_ACTIONS","TOGGLE_ACTIVE","toggleActivated","TOGGLE_ACTIVE_MULTI","TOGGLE_SELECTED","toggleSelected","ACTIVATE","setIsActive","DEACTIVATE","SELECT","setIsSelected","DESELECT","FOCUS","TOGGLE_EXPANDED","toggleExpanded","EXPAND","COLLAPSE","collapse","DRILL_DOWN","focusDrillDown","DRILL_UP","focusDrillUp","NEXT_NODE","focusNextNode","PREVIOUS_NODE","focusPreviousNode","MOVE_NODE","ctrlKey","copyNode","moveNode","defaultActionMapping","dblClick","contextMenu","drop","TreeOptions","_c","_d","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_z","_0","_1","_2","_3","_4","_5","_6","_7","_8","_9","_10","_11","_12","_13","_14","_15","_16","_17","_18","_19","_20","_21","_22","_23","_24","_25","_26","_27","_28","_29","_30","_31","_32","_33","_34","_35","dragStart","drag","dragEnd","dragOver","dragLeave","dragEnter","mouseOver","mouseOut","rtl","hasChildrenField","childrenField","idField","isExpandedField","getChildren","scrollOnActivate","rootId","useTriState","scrollContainer","getNodeClone","nodeClone","element","nodeClass","virtual","dropSlotHeight","TREE_EVENTS","activate","deactivate","nodeActivate","nodeDeactivate","deselect","initialized","updateData","loadNodeChildren","changeFilter","stateChange","desc","Reflect","decorate","__metadata","metadata","TreeNode","uuid","floor","random","getField","_initChildren","autoLoadChildren","isHidden","isNodeFocused","isSelectable","isAllSelected","level","originalNode","_originalNode","isRoot","realParent","fireEvent","setField","_findAdjacentSibling","steps","skipHidden","siblings","_getParentsChildren","findNextSibling","findPreviousSibling","getVisibleChildren","visibleChildren","getFirstChild","getLastChild","findNextNode","goInside","findPreviousNode","previousSibling","_getLastOpenDescendant","lastChild","getIndexInParent","isDescendantOf","dropOnNode","resolve","eventName","doForAll","expandAll","ensureVisible","setIsExpanded","setExpandedNode","setActiveNode","setSelectedNode","setActiveAndVisible","force","virtualScroll","scroll","previousNode","getFocusedNode","setFocusedNode","setIsHidden","setFocus","getSelfHeight","computed$1","observable$1","action$1","__decorate$1","__metadata$1","TreeModel","eventNames","activeNodeIds","hiddenNodeIds","focusedNodeId","firstUpdate","subscriptions","subscription","focusedNode","getActiveNode","activeNodes","getActiveNodes","getVisibleRoots","getFirstRoot","getLastRoot","focusedTree","isEmptyTree","getNodeById","expandedNodes","hiddenNodes","selectedLeafNodes","getNodeByPath","startNode","childId","idStr","getNodeBy","found","foundInChildren","unsubscribeAll","unsubscribe","setData","virtualRootConfig","_calculateExpandedNodes","nextNode","_setActiveNodeMulti","_setActiveNodeSingle","setHiddenNodeIds","nodeIds","j","performKeyAction","keyAction","keyCode","autoShow","filterFn","_filterNode","fromParent","canMoveNode","fromChildren","toChildren","nodeCopy","getState","setState","subscribeToState","calculateExpandedNodes","isVisible","activeNode","ɵprov","token","TreeDraggedElement","_draggedElement","draggedElement","isDragging","ɵɵdefineInjectable","providedIn","__decorate$2","__metadata$2","TreeVirtualScroll","yBlocks","viewportHeight","viewport","_dispose","fixScroll","y","totalHeight","recalcPositions","isEnabled","_setYBlocks","_getPositionAfter","startPos","_getPositionAfterNode","setViewport","scrollLeft","scrollTop","getBoundingClientRect","scrollToMiddle","scrollContainerHeight","scrollContainerTop","nodeTop","getViewportNodes","visibleNodes","lastVisibleNode","firstIndex","binarySearch","lastIndex","maxY","condition","midIndex","LoadingComponent","ɵcmp","decls","vars","consts","ɵngcc1","encapsulation","TreeViewportComponent","throttle","scrollEventHandler","addEventListener","removeEventListener","timeFrame","lastTime","ngContentSelectors","treeDraggedElement","focused","onKeydown","activeElement","tagName","onMousedown","isOutsideClick","startElement","nodeName","localName","parentElement","ngOnChanges","changes","currentValue","pick","viewportComponent","contentQueries","dirIndex","viewQuery","hostBindings","outputs","TreeNodeDropSlot","TreeNodeCollectionComponent","TreeNodeComponent","TreeNodeChildrenComponent","TreeNodeWrapperComponent","TreeNodeContent","dropIndex","TreeDropDirective","TreeNodeExpanderComponent","TreeAnimateOpenDirective","actionInternal","computedInternal","observableInternal","__decorate$3","__metadata$3","_nodes","setNodes","firstNode","nodeIndexes","TreeDragDirective","TreeNodeCheckboxComponent","DRAG_OVER_CLASS","DRAG_DISABLED_CLASS","el","ngZone","onDropCallback","onDragOverCallback","onDragLeaveCallback","onDragEnterCallback","_allowDrop","dragOverEventHandler","dragEnterEventHandler","onDragEnter","dragLeaveEventHandler","treeAllowDrop","runOutsideAngular","addDisabledClass","removeDisabledClass","removeClass","dragEventHandler","onDrag","treeDragEnabled","onDragStart","ev","onDragEnd","viewContainerRef","isOpen","_show","_isOpen","_animateOpen","_animateClose","_hide","innerElement","ease","setStyle","setInterval","clearInterval","roundedMaxHeight","ɵmod","ɵinj","DEFAULT_RETRY_DELAYS_IN_MILLISECONDS","DefaultReconnectPolicy","retryDelays","_retryDelays","nextRetryDelayInMilliseconds","retryContext","previousRetryCount","HttpError","statusCode","trueProto","TimeoutError","AbortError","UnsupportedTransportError","errorType","DisabledTransportError","FailedToStartTransportError","FailedToNegotiateWithServerError","AggregateErrors","innerErrors","statusText","HttpClient","method","getCookieString","NullLogger","_logLevel","_message","Arg","val","match","Platform","isBrowser","isWebWorker","isReactNative","isNode","getDataDetail","includeContent","detail","isArrayBuffer","byteLength","formatArrayBuffer","Uint8Array","str","num","substr","ArrayBuffer","sendMessage","logger","transportName","httpClient","headers","Authorization","getUserAgentHeader","LogLevel","logMessageContent","responseType","response","timeout","withCredentials","SubjectSubscription","_subject","_observer","cancelCallback","ConsoleLogger","minimumLogLevel","_minLevel","out","logLevel","msg","userAgentHeaderName","constructUserAgent","getOsName","getRuntimeVersion","os","runtime","runtimeVersion","userAgent","majorAndMinor","platform","versions","getErrorString","stack","FetchHttpClient","_logger","requireFunc","__non_webpack_require__","_jar","CookieJar","_fetchType","getGlobalThis","globalThis","AbortController","_abortControllerType","abortSignal","aborted","abortController","onabort","abort","timeoutId","credentials","mode","redirect","signal","clearTimeout","deserializeContent","payload","cookies","getCookies","arrayBuffer","XhrHttpClient","xhr","XMLHttpRequest","setRequestHeader","onload","responseText","onerror","ontimeout","DefaultHttpClient","_httpClient","HeaderNames","Cookie","_isAborted","LongPollingTransport","_accessTokenFactory","_pollAbort","_options","_running","onreceive","onclose","pollAborted","transferFormat","TransferFormat","_url","De","pollOptions","_getAccessToken","_updateHeaderToken","pollUrl","_closeError","_receiving","_poll","_this2","_this3","_raiseOnClose","_this4","_this5","deleteOptions","logMessage","ServerSentEventsTransport","eventSource","opened","EventSource","onmessage","_close","onopen","_eventSource","WebSocketTransport","webSocketConstructor","_logMessageContent","_webSocketConstructor","_headers","webSocket","binaryType","_webSocket","ErrorEvent","readyState","OPEN","_isCloseEvent","wasClean","code","HttpConnection","_stopPromiseResolver","_negotiateVersion","createLogger","baseUrl","_resolveUrl","webSocketModule","eventSourceModule","WebSocket","_connectionState","_connectionStarted","_startInternalPromise","_startInternal","_stopPromise","_sendQueue","TransportSendQueue","_stopInternal","_stopError","_stopConnection","HttpTransportType","_constructTransport","_startTransport","negotiateResponse","redirects","_getNegotiationResponse","ProtocolVersion","accessToken","_createTransport","inherentKeepAlive","negotiateUrl","_resolveNegotiateUrl","negotiateVersion","connectionToken","connectionId","_createConnectUrl","requestedTransport","requestedTransferFormat","connectUrl","_this6","_isITransport","transportExceptions","transports","availableTransports","negotiate","endpoint","transportOrError","_resolveTransportOrError","transportMatches","actualTransport","transferFormats","lastIndexOf","aTag","_transport","_buffer","_executing","_sendBufferedData","PromiseSource","_transportResult","_sendLoopPromise","_sendLoop","_bufferData","promise","_this7","transportResult","_concatBuffers","arrayBuffers","totalLength","offset","buffer","_resolver","_rejecter","TextMessageFormat","output","RecordSeparator","messages","RecordSeparatorCode","fromCharCode","HandshakeProtocol","writeHandshakeRequest","handshakeRequest","parseHandshakeResponse","messageData","remainingData","binaryData","separatorIndex","responseLength","textData","MessageType","Invocation","StreamItem","Completion","StreamInvocation","CancelInvocation","Ping","Close","HubConnectionState","Disconnected","Connecting","Connected","Disconnecting","Reconnecting","HubConnection","connection","protocol","reconnectPolicy","_nextKeepAlive","_freezeEventListener","serverTimeoutInMilliseconds","keepAliveIntervalInMilliseconds","_protocol","_reconnectPolicy","_handshakeProtocol","_processIncomingData","_connectionClosed","_callbacks","_methods","_closedCallbacks","_reconnectingCallbacks","_reconnectedCallbacks","_invocationId","_receivedHandshakeResponse","_cachedPingMessage","writeMessage","_startPromise","_startWithStateTransitions","_stopDuringStartError","handshakePromise","_handshakeResolver","_handshakeRejecter","_sendMessage","_cleanupTimeout","_resetTimeoutPeriod","_resetKeepAliveInterval","_cleanupPingTimer","startPromise","_reconnectDelayHandle","_completeClose","stream","streams","streamIds","_replaceStreamingParams","invocationDescriptor","_createStreamInvocation","promiseQueue","cancelInvocation","_createCancelInvocation","invocationId","_sendWithProtocol","invocationEvent","_launchStreams","sendPromise","_createInvocation","invoke","newMethod","off","handlers","removeIdx","onreconnecting","onreconnected","_processHandshakeResponse","parseMessages","_invokeClientMethod","allowReconnect","responseMessage","_timeoutHandle","serverTimeout","_pingServerHandle","nextPing","invocationMessage","methods","_cancelCallbacksWithError","_reconnect","reconnectStartTime","previousReconnectAttempts","retryError","nextRetryDelay","_getNextRetryDelay","elapsedMilliseconds","retryReason","callbacks","nonblocking","streamId","_createCompletionMessage","_createStreamItemMessage","argument","arg","JsonHubProtocol","hubMessages","parsedMessage","_isInvocationMessage","_isStreamItemMessage","_isCompletionMessage","_assertNotEmptyString","LogLevelNameMapping","debug","information","warning","critical","none","HubConnectionBuilder","logging","isLogger","parseLogLevel","transportTypeOrOptions","httpConnectionOptions","withHubProtocol","retryDelaysOrReconnectPolicy","Trace","Debug","Information","Warning","Critical","WebSockets","ServerSentEvents","LongPolling","Text","Binary","navigator","svgNS","locationHref","_useWebWorker","initialDefaultFrame","setWebWorker","flag","getWebWorker","setLocationHref","getLocationHref","createTag","extendPrototype","sources","destination","sourcePrototype","len","attr","getDescriptor","createProxyFunction","ProxyFunction","audioControllerFactory","AudioController","audioFactory","audios","_volume","_isMuted","addAudio","audio","pause","resume","setRate","rateValue","createAudio","assetPath","Howl","src","isPlaying","seek","playing","setVolume","setAudioFactory","_updateVolume","mute","unmute","getVolume","volume","createTypedArray","createRegularArray","arr","Uint8ClampedArray","Float32Array","createTypedArrayFactory","Int16Array","createSizedArray","_typeof$6","subframeEnabled","expressionsPlugin","idPrefix$1","isSafari","_shouldRoundValues","bmPow","pow","bmSqrt","sqrt","bmFloor","bmMax","bmMin","BMMath","ProjectInterface$1","propertyNames","abs","absArr","defaultCurveSegments","degToRads","PI","roundCorner","roundValues","bmRnd","styleDiv","transformOrigin","webkitTransformOrigin","backfaceVisibility","webkitBackfaceVisibility","transformStyle","webkitTransformStyle","mozTransformStyle","BMEnterFrameEvent","currentTime","totalTime","frameMultiplier","BMCompleteEvent","BMCompleteLoopEvent","totalLoops","currentLoop","BMSegmentStartEvent","firstFrame","totalFrames","BMDestroyEvent","BMRenderFrameErrorEvent","nativeError","BMConfigErrorEvent","BMAnimationConfigErrorEvent","createElementID","_count","HSVtoRGB","h","g","q","RGBtoHSV","addSaturationToRGB","color","hsv","addBrightnessToRGB","addHueToRGB","rgbToHex","hex","colorMap","setSubframeEnabled","getSubframeEnabled","setExpressionsPlugin","getExpressionsPlugin","setDefaultCurveSegments","getDefaultCurveSegments","setIdPrefix","getIdPrefix","createNS","createElementNS","_typeof$5","dataManager","workerFn","workerInstance","_counterId","processes","workerProxy","postMessage","_workerSelf","setupWorker","createWorker","Worker","Blob","blob","createObjectURL","dataFunctionManager","completeLayers","layers","comps","layerData","jLen","kLen","completed","tt","td","hasMask","maskProps","masksProperties","pt","convertPathsToAbsoluteValues","ty","findCompLayers","refId","completeShapes","shapes","comp","findComp","__used","ks","checkVersion","minimum","animVersionString","animVersion","minimumVersion","checkText","updateTextLayer","textLayer","iterateLayers","animationData","assets","checkChars","chars","charData","ip","op","st","sr","sk","sa","checkPathProperties","pathData","checkColors","iterateShapes","checkShapes","completeClosingShapes","cl","moduleOb","completeData","__complete","completeChars","assetLoader","formatResponse","contentTypeHeader","getResponseHeader","load","loadAsset","fullPath","errorCallback","onreadystatechange","animation","onComplete","createProcess","loadAnimation","processId","origin","pathname","loadData","completeAnimation","anim","ImagePreloader","proxyImage","canvas","getContext","fillStyle","fillRect","imageLoaded","loadedAssets","totalImages","loadedFootagesCount","totalFootages","imagesLoadedCb","footageLoaded","getAssetsPath","assetData","assetsPath","originalPath","imagePath","u","testImageLoaded","img","intervalId","getBBox","_imageLoaded","createFootageData","ob","footageData","_footageLoaded","ImagePreloaderFactory","images","loadAssets","_createImageData","setAssetsPath","setPath","loadedImages","loadedFootages","getAsset","createImgData","crossOrigin","createImageData","setAttributeNS","_elementHelper","setCacheType","elementHelper","BaseEvent","triggerEvent","_cbs","markerParser","parsePayloadLines","line","keysCount","_markers","markers","_marker","markerData","tm","duration","dr","cm","ProjectInterface","registerComposition","compositions","_thisProjectFunction","nm","prepareFrame","xt","currentFrame","compInterface","renderers","registerRenderer","getRenderer","_typeof$4","AnimationItem","isLoaded","currentRawFrame","frameRate","frameMult","playSpeed","playDirection","playCount","isPaused","autoplay","loop","animationID","timeCompleted","segmentPos","isSubframeEnabled","segments","_idle","_completedLoop","projectInterface","imagePreloader","audioController","configAnimation","onSetupError","onSegmentComplete","drawnFrameEvent","setParams","wrapper","container","animType","RendererClass","rendererSettings","globalData","defs","setProjectInterface","autoloadSegments","initialSegment","setupAnimation","fileName","trigger","wrapperAttributes","attributes","getNamedItem","prerender","includeLayers","newLayers","fonts","fontManager","addChars","addFonts","initExpressions","loadNextSegment","segment","segmentPath","loadSegments","imagesLoaded","checkLoaded","preloadImages","animData","fr","searchExtraCompositions","updaFrameModifier","waitForFontsLoaded","triggerConfigError","rendererType","initItems","gotoFrame","updateContainerSize","setSubframe","renderFrame","triggerRenderFrameError","togglePause","setCurrentRawFrameValue","getMarkerData","markerName","marker","goToAndStop","isFrame","numValue","frameModifier","goToAndPlay","playSegments","advanceTime","_isComplete","checkSegments","adjustSegment","setSpeed","setDirection","setSegment","pendingFrame","forceFlag","resetSegments","onEnterFrame","onLoopComplete","onSegmentStart","onDestroy","getPath","getAssetData","getDuration","updateDocumentData","documentData","getElementByPath","animationManager","registeredAnimations","initTime","playingAnimationsNum","_stopped","_isFrozen","removeElement","animItem","subtractPlayingCount","registerAnimation","elem","addPlayingCount","nowTime","elapsedTime","requestAnimationFrame","searchAnimations","standalone","animElements","getElementsByClassName","lenAnims","getElementsByTagName","innerText","div","unfreeze","getRegisteredAnimations","animations","BezierFactory","getBezierEasing","beziers","bezEasing","BezierEasing","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","points","_mSampleValues","_precomputed","mX1","mY1","mX2","mY2","_precompute","_getTForX","_calcSampleValues","aX","mSampleValues","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","newtonRaphsonIterate","aGuessT","currentSlope","binarySubdivide","aA","aB","currentX","currentT","pooling","double","_double","poolFactory","initialLength","_create","_release","_length","_maxLength","pool","newElement","release","bezierLengthPool","addedLength","percents","lengths","segmentsLengthPool","bezFunction","math","pointOnLine2D","x1","y1","x2","y2","x3","y3","det1","getBezierLength","pt1","pt2","pt3","pt4","ptCoord","perc","ptDistance","curveSegments","point","lastPoint","lengthData","BezierData","segmentLength","PointData","partial","partialLength","storedData","buildBezierData","bezierName","bezierData","getDistancePerc","initPos","lengthPos","lPerc","dir","bezierSegmentPoints","getSegmentsLength","shapeData","segmentsLength","pathV","pathO","pathI","getNewSegment","startPerc","endPerc","t0","t1","u0","u1","u0u0u0","t0u0u0_3","t0t0u0_3","t0t0t0","u0u0u1","t0u0u1_3","t0t0u1_3","t0t0t1","u0u1u1","t0u1u1_3","t0t1u1_3","t0t1t1","u1u1u1","t1u1u1_3","t1t1u1_3","t1t1t1","getPointInSegment","pointOnLine3D","z1","z2","z3","diffDist","dist1","dist2","dist3","bez","PropertyFactory","initFrame","mathAbs","interpolateValue","frameNum","caching","offsetTime","propType","pv","keyData","nextKeyData","keyframeMetadata","iterationIndex","keyframes","keyframesMetadata","fnc","endValue","nextKeyTime","keyTime","ti","ind","__fnct","segmentPerc","distanceInLine","lastFrame","_lastKeyframeIndex","_lastAddedLength","_lastPoint","keyValue","sh","quaternionToEuler","quat","qx","qy","qz","qw","heading","atan2","attitude","asin","bank","slerp","omega","cosom","sinom","scale0","scale1","ax","ay","az","aw","bx","by","bz","bw","acos","sin","createQuaternion","c1","cos","c2","c3","s1","s2","s3","getValueAtCurrentTime","renderedFrame","endTime","_caching","renderResult","setVValue","multipliedValue","mult","_mdf","processEffectsSequence","frameId","effectsSequence","lock","_isFirstFrame","finalValue","kf","addEffect","effectFunction","addDynamicProperty","ValueProperty","vel","getValue","MultiDimensionalProperty","KeyframedValueProperty","KeyframedMultidimensionalProperty","arrLen","getProp","DynamicPropertyContainer","dynamicProperties","_isAnimated","iterateDynamicProperties","initDynamicPropertyContainer","pointPool","ShapePath","setPathData","setLength","doubleArrayLength","setXYAt","pos","setTripleAt","vX","vY","oX","oY","iX","iY","newPath","vertices","outPoints","inPoints","cnt","shapePool","shapePath","shape","cloned","ShapeCollection","addShape","releaseShapes","shapeCollectionPool","newShapeCollection","shapeCollection","ShapePropertyFactory","interpolateShape","previousValue","keyPropS","keyPropE","isHold","interpolateShapeCurrentTime","resetShape","paths","localShapeCollection","shapesEqual","shape1","shape2","ShapeProperty","KeyframedShapeProperty","EllShapeProperty","cPoint","EllShapePropertyFactory","convertEllToPath","p0","p1","s0","_cw","StarShapeProperty","StarShapePropertyFactory","sy","ir","is","convertToPath","convertStarToPath","convertPolygonToPath","or","rad","roundness","perimSegment","numPts","angle","longFlag","longRad","shortRad","longRound","shortRound","longPerimSegment","shortPerimSegment","currentAng","ox","oy","RectShapeProperty","RectShapePropertyFactory","convertRectToPath","v0","v1","getShapeProp","getConstructorFunction","getKeyframedConstructorFunction","Matrix","_cos","_sin","_tan","tan","_rnd","rotate","mCos","mSin","rotateX","rotateY","rotateZ","shear","sx","skew","skewFromAxis","scale","sz","setTransform","translate","tx","tz","b2","d2","e2","f2","g2","h2","j2","k2","l2","m2","n2","o2","p2","_identityCalculated","b1","d1","e1","f1","g1","h1","j1","k1","l1","m1","n1","o1","isIdentity","_identity","matr","cloneFromProps","applyToPoint","z","applyToX","applyToY","applyToZ","getInverseMatrix","determinant","inverseMatrix","inversePoint","applyToPointArray","inversePoints","pts","retPts","applyToTriplePoints","p4","p5","p12","p13","applyToPointStringified","toCSS","cssValue","roundMatrixProperty","to2dCSS","_typeof$3","lottie","setLocation","setSubframeRendering","setPrefix","prefix","setQuality","inBrowser","installPlugin","plugin","getFactory","checkReady","readyStateCheckInterval","getQueryVariable","variable","queryString","pair","decodeURIComponent","useWebWorker","setIDPrefix","__getFactory","scripts","myScript","exports","ShapeModifiers","modifiers","registerModifier","getModifier","ShapeModifier","TrimModifier","PuckerAndBloatModifier","initModifierProperties","addShapeToModifier","setAsAnimated","processKeys","sValue","eValue","pathsData","calculateShapeEdges","shapeLength","totalModifierLength","segmentOb","shapeSegments","releasePathsData","processShapes","shapePaths","totalShapeLength","edges","shapeS","shapeE","newShapesData","addShapes","lastShape","addPaths","newPaths","addSegment","newShape","addSegmentFromArray","shapeSegment","currentLengthData","segmentCount","amount","processPath","centerPoint","pathLength","clonedPath","TransformPropertyFactory","defaultVector","TransformProperty","pre","appliedTransformations","px","py","pz","rx","ry","rz","_isDirty","applyToMatrix","mat","forceRender","precalculateMatrix","autoOriented","v2","getValueAtTime","autoOrient","_addDynamicProperty","getTransformProperty","RepeaterModifier","RoundCornersModifier","getFontProperties","fontData","styleName","styles","fStyle","fWeight","weight","tr","so","eo","pMatrix","rMatrix","sMatrix","tMatrix","matrix","applyTransforms","inv","scaleX","scaleY","elemsData","_currentCopies","_elements","_groups","resetElements","elements","_processed","cloneElements","newElements","changeGroupRender","renderFlag","_render","itemsTransform","cont","hasReloaded","copies","ceil","ix","reloadShapes","elems","transformData","offsetModulo","roundOffset","pProps","rProps","sProps","iteration","mProps","rd","currentV","currentI","currentO","closerV","distance","newPosPerc","FontManager","emptyChar","w","combinedCharacters","surrogateModifiers","zeroWidthJoiner","setUpNode","font","family","fontFamily","fontSize","fontVariant","fontStyle","fontWeight","letterSpacing","offsetWidth","trimFontOptions","familyArray","enabledFamilies","createHelper","def","helper","engine","fontProps","tHelper","fFamily","textContent","fClass","tCanvasHelper","OffscreenCanvas","measureText","measure","getComputedTextLength","Font","typekitLoaded","_warned","setIsLoadedBinded","setIsLoaded","checkLoadedFontsBinded","checkLoadedFonts","isModifier","firstCharCode","secondCharCode","isZeroWidthJoiner","isCombinedCharacter","_char3","ch","fontArr","_pendingFonts","loadedSelector","shouldLoadFont","monoCase","sansCase","fPath","fOrigin","querySelectorAll","rel","sc","getCharData","_char","charCodeAt","getFontByName","fName","_char2","fontName","doubleSize","singleSize","loadedCount","RenderableElement","initRenderable","isInRange","isTransparent","renderableComponents","addRenderableComponent","removeRenderableComponent","prepareRenderableFrame","checkLayerLimits","checkTransparency","finalTransform","mProp","renderConfig","hideOnTransparent","renderRenderable","sourceRectAtTime","getLayerSize","MaskManagerInterface","MaskInterface","_mask","maskManager","_masksInterfaces","viewData","ExpressionPropertyInterface","defaultUnidimensionalValue","defaultMultidimensionalValue","completeProperty","expressionValue","getVelocityAtTime","numKeys","valueProp","valueAtTime","speedAtTime","getSpeedAtTime","velocityAtTime","propertyGroup","defaultGetter","UnidimensionalPropertyInterface","MultidimensionalPropertyInterface","arrValue","TransformExpressionInterface","_thisFunction","rotation","xRotation","yRotation","xPosition","yPosition","zPosition","anchorPoint","_px","_py","_pz","_transformFactory","LayerExpressionInterface","getMatrix","toWorldMat","_elem","toWorldVec","applyPoint","toWorld","fromWorldVec","invertPoint","fromWorld","hierarchy","fromComp","sampleImage","transformInterface","_thisLayerFunction","shapeInterface","textInterface","toComp","anchorPointDescriptor","defineProperties","hasParent","layerInterface","anchor_point","source","inPoint","outPoint","_name","registerMaskInterface","_registerMaskInterface","registerEffectsInterface","_registerEffectsInterface","effects","propertyGroupFactory","interfaceFunction","parentPropertyGroup","PropertyInterface","_propertyGroup","EffectsExpressionInterface","createGroupInterface","groupInterface","ef","mn","effectElements","createValueInterface","numProperties","np","enabled","en","expressionProperty","setGroupProperty","createEffectsInterface","effectsManager","effectsData","CompExpressionInterface","layer","pixelAspect","compSize","frameDuration","displayStartTime","numLayers","ShapePathInterface","propertyIndex","ShapeExpressionInterface","iterateElements","groupInterfaceFactory","fillInterfaceFactory","strokeInterfaceFactory","trimInterfaceFactory","ellipseInterfaceFactory","starInterfaceFactory","rectInterfaceFactory","roundedInterfaceFactory","repeaterInterfaceFactory","gradientFillInterfaceFactory","contentsInterfaceFactory","interfaces","transformInterfaceFactory","cix","startPoint","endPoint","_dashPropertyGroup","dashOb","dataProps","strokeWidth","dash","skewAxis","outerRadius","outerRoundness","innerRoundness","innerRadius","radius","_interfaceFunction","parentGroupWrapper","TextExpressionInterface","_prevValue","_sourceText","sourceText","textProperty","stringValue","currentData","getBlendMode","blendModeEnums","SliderEffect","AngleEffect","ColorEffect","PointEffect","LayerIndexEffect","MaskIndexEffect","CheckboxEffect","NoValueEffect","EffectsManager","effectItem","GroupEffect","BaseElement","FrameElement","_typeof$2","eff","checkMasks","effectsInterface","shapesData","itemsData","setBlendMode","blendModeValue","bm","baseElement","layerElement","initBaseData","layerId","getType","prepareProperties","_isParent","FootageInterface","dataInterfaceFactory","outlineInterface","currentPropertyName","currentProperty","getFootageData","searchProperty","propertyNameIndex","outlineInterfaceFactory","dataInterface","FootageElement","imageLoader","AudioElement","_isPlaying","_canPlay","_currentTime","_volumeMultiplier","_previousVolume","_placeholder","lv","au","BaseRenderer","TransformElement","MaskElement","maskElement","solidPath","rect","expansor","feMorph","currentMasks","maskType","maskRef","lastPath","filterID","expan","lastOperator","filterId","lastRadius","createLayerSolidPath","invRect","drawPath","maskedElement","getBaseElement","totalVolume","volumeValue","checkLayers","buildItem","checkPendingElements","createItem","createImage","createComp","createSolid","createNull","createShape","createText","createCamera","createFootage","buildAllItems","pInterface","progressiveLoad","buildElementParenting","parentName","setAsParent","setHierarchy","addPendingElement","pendingElements","pathValue","setupGlobalData","fontsContainer","animationItem","initTransform","_matMdf","_opMdf","ao","renderTransform","finalMat","globalToLocal","transforms","ptNew","mHelper","getMaskProperty","isFirstFrame","getMaskelement","pathNodes","pathString","pathShapeValue","filtersFactory","createFilter","filId","skipCoordinates","fil","createAlphaToLuminanceFilter","feColorMatrix","featureSupport","registeredEffects","idPrefix","SVGEffects","filterManager","filters","Effect","countsAsEffect","registerEffect","SVGBaseElement","HierarchyElement","RenderableDOMElement","IImageElement","initElement","sourceRect","ProcessedElement","IShapeElement","initRendererElement","createContainerElements","matteElement","transformedElement","_sizeChanged","gg","layerElementParent","masker","maskGroup","maskGrouper","feCTr","feFunc","alphaRect","ln","hd","cp","clipId","cpGroup","renderElement","destroyBaseElement","createRenderableComponents","renderableEffectsManager","setMatte","initHierarchy","checkParenting","createContent","renderInnerContent","innerElem","pr","imagePreserveAspectRatio","addShapeToModifiers","shapeModifiers","isShapeInAnimatedModifiers","isAnimatedWithShape","renderModifiers","searchProcessedElement","processedElements","addProcessedElement","lineCapEnum","lineJoinEnum","SVGShapeData","transformers","caches","lStr","lvl","SVGStyleData","pElem","msElem","DashProperty","dashStr","dashArray","dashoffset","SVGStrokeStyleData","styleOb","SVGFillStyleData","SVGNoStyleData","GradientProperty","cLength","_cmdf","_omdf","_collapsable","checkCollapsable","_hasOpacity","SVGGradientFillStyleData","initGradientData","SVGGradientStrokeStyleData","ShapeGroupData","prevViewData","gr","SVGTransformData","comparePoints","stops","setGradientData","setGradientOpacity","pathElement","gradientId","gfill","gf","cst","opacityId","maskId","opFill","lc","lj","ml","ms","ost","buildShapeString","shapeString","SVGElementsRenderer","_identityMatrix","_matrixHelper","renderContentTransform","styleData","itemData","renderNoop","renderPath","pathStringTransformed","redraw","lLen","renderFill","styleElem","renderGradientStroke","renderGradient","renderStroke","hasOpacity","attr1","attr2","cValues","oValues","ang","dist","createRenderFunction","SVGShapeElement","stylesList","animatedContents","LetterProps","sw","fc","TextProperty","_frameId","keysIndex","canResize","minimumFontSize","ascent","boxWidth","defaultBoxWidth","justifyOffset","lh","lineWidths","ls","ps","fillColorAnim","strokeColorAnim","strokeWidthAnim","yOffset","finalSize","finalText","finalLineHeight","copyData","completeTextData","initSecondaryElement","identityMatrix","buildExpressionInterface","searchShapes","filterUniqueShapes","tempShapes","areAnimated","setShapesAsAnimated","createStyleElement","elementData","addToAnimatedContents","createGroupElement","createTransformElement","transformProperty","createShapeElement","ownTransformers","setElementStyles","render","modifier","processedPos","ownStyles","ownModifiers","renderShape","animatedContent","updated","setCurrentData","searchKeyframes","getKeyframeValue","_finalValue","currentIndex","textKeys","buildFinalText","charCode","charactersArray","shouldCombine","charAt","newLineFlag","letters","anchorGrouping","currentSize","currentPos","currentLine","lineWidth","maxLineWidth","trackingOffset","currentHeight","boxHeight","lastSpaceIndex","currentChar","uncollapsedSpaces","an","anIndexes","animatorJustifyOffset","extra","animatorData","letterData","animators","based","indexes","fh","fs","rn","totalChars","newInd","currentInd","newData","dData","recalculate","canResizeFont","_canResize","setMinimumFontSize","_fontValue","TextSelectorProp","TextSelectorPropFactory","_currentTextLength","finalS","finalE","xe","ne","getMult","easer","tot","smoothness","threshold","newCharsFlag","divisor","getTextSelectorProp","TextAnimatorDataProperty","animatorProps","defaultData","textAnimatorAnimatables","TextAnimatorProperty","renderType","_hasMaskedPath","_textData","_renderType","_animatorsData","_pathData","_moreOptions","alignment","renderedLetters","lettersChangedFlag","ITextElement","searchProperties","getMeasures","xPos","yPos","pathInfo","currentPoint","pointInd","segmentInd","prevPoint","matrixHelper","renderedLettersCount","tLength","pi","letterValue","yOff","firstLine","offf","xPathPos","yPathPos","elemOpacity","letterSw","letterSc","letterFc","letterO","initPathPos","initSegmentInd","initPointInd","letterM","letterP","defaultPropsArray","animatorFirstCharOffset","justifyOffsetMult","isNewLine","animatorOffset","rot","atan","textAnimator","buildNewText","createPathShape","shapeStr","_fontSize","applyTextPropertiesToMatrix","lineNumber","buildColor","colorData","emptyProp","emptyShapeData","SVGTextLottieElement","textSpans","ISolidElement","NullElement","SVGRendererBase","ICompElement","SVGCompElement","supports3d","SVGRenderer","svgElement","ariaLabel","titleElement","titleId","descElement","descId","preserveAspectRatio","contentVisibility","viewBoxOnly","viewBoxSize","focusable","filterSize","destroyed","CVContextData","saved","cArrPos","cTr","cO","savedOp","ShapeTransformManager","sequences","sequenceList","transform_key_count","CVEffects","CVMaskElement","hasMasks","CVBaseElement","CVShapeData","transformsManager","styledShapes","styledShape","addTransformSequence","trNodes","CVShapeElement","CVTextElement","stroke","fill","currentRender","sWidth","fValue","CVImageElement","CVSolidElement","CanvasRendererBase","clearCanvas","dpr","devicePixelRatio","currentGlobalAlpha","contextData","transformMat","CVCompElement","CanvasRenderer","HBaseElement","HSolidElement","HShapeElement","shapesContainer","currentBBox","HTextElement","textPaths","isMasked","HCameraElement","pe","_prevMat","HImageElement","HybridRendererBase","threeDElements","camera","HCompElement","HybridRenderer","singleShape","textContainer","buildTextContents","textArray","textContents","currentTextContent","buildShapeData","shapeItem","usesGlyphs","tSpan","cachedSpansLength","span","childSpan","glyph","glyphElement","_debug","tElement","justify","textBox","bbox","renderedLetter","textSpan","appendElementInPos","nextElement","insertBefore","timeRemapped","setElements","getElements","destroyElements","duplicate","currentSavedOp","sequence","processSequence","processSequences","getNewKey","canvasContext","beginPath","moveTo","lineTo","bezierCurveTo","clip","createElements","blendMode","globalCompositeOperation","hideElement","showElement","forceRealStack","ctxTransform","ctxOpacity","restore","transformHelper","dashResetter","preTransforms","co","wi","da","do","addTransformToStyleList","removeTransformFromStyleList","closeStyles","shouldRender","currentTransform","ownTransforms","_shouldRender","renderShapeTransform","parentTransform","groupTransform","drawLayer","currentStyle","coOp","strokeStyle","grd","lineCap","lineJoin","miterLimit","setLineDash","lineDashOffset","closePath","isMain","renderGradientFill","renderStyledShape","shapeNodes","groupTransformMat","createLinearGradient","createRadialGradient","addColorStop","hasFill","hasStroke","commands","pathArr","commandsCounter","lastFill","lastStroke","lastStrokeW","widthCrop","heightCrop","imgW","imgH","imgRel","canvasRel","par","drawImage","cProps","trProps","globalAlpha","actionFlag","popped","containerStyle","mozTransformOrigin","transformCanvas","isDashed","elementWidth","elementHeight","elementRel","animationRel","offsetHeight","fillType","clearRect","checkBlendMode","tg","transformedElementStyle","matrixValue","webkitTransform","addEffects","backgroundColor","_renderShapeFrame","shapeCont","getTransformedPoint","calculateShapeBoundingBox","boundingBox","vPoint","oPoint","nextIPoint","nextVPoint","checkBounds","getBoundsOfCurve","bounds","shapeBoundingBox","xMax","right","yMax","bottom","tempBoundingBox","p3","b2ac","t2","calculateF","calculateBoundingBox","expandStrokeBoundingBox","widthProperty","kfw","currentBoxContains","shapeStyle","shapeTransform","compW","compH","innerElemStyle","textColor","lineHeight","tParent","tCont","tContStyle","tContTranslation","tStyle","tSpanTranslation","svgStyle","translation","textPath","margin","svgTransform","setup","perspectiveStyle","perspective","perspectiveElem","webkitPerspective","mTransf","diffVector","mag","lookDir","lookLengthOnXZ","mRotationX","mRotationY","hasMatrixChanged","matValue","Image","imageElem","newDOMElement","ddd","addTo3dContainer","nextDOMElement","nextLayer","getThreeDContainerByPos","endPos","createThreeDContainer","center","threeDContainerData","build3dContainers","lastThreeDContainerData","currentContainer","resizerElem","overflow","svg","cWidth","cHeight","floatingContainer","_createBaseContainerElements","Expressions","stackCount","registers","pushExpression","popExpression","releaseInstances","registerExpressionProperty","_typeof$1","seedRandom","rngname","startdenom","significance","ARC4","keylen","me","S","copy","flatten","typ","mixkey","seed","smear","stringseed","tostring","seedrandom","shortseed","entropy","autoseed","crypto","msCrypto","getRandomValues","browser","plugins","screen","arc4","prng","int32","quick","pass","is_math_call","initialize$2","propTypes","SHAPE","_typeof","ExpressionManager","frames","$bm_isInstanceOfArray","isNumerable","tOfV","$bm_neg","tOfA","lenA","retArr","easeInBez","easeOutBez","easeInOutBez","tOfB","lenB","sub","mul","mod","$bm_sum","$bm_sub","$bm_mul","$bm_div","$bm_mod","clamp","mm","radiansToDegrees","radians_to_degrees","degreesToRadians","degrees_to_radians","helperLengthArray","arr1","arr2","normalize","vec","rgbToHsl","hue2rgb","hslToRgb","linear","tMin","tMax","value1","value2","_tMin","rnd","createPath","inTangents","outTangents","inVertexPoint","outVertexPoint","arrPlaceholder","initiateExpression","needsVelocity","_needsRandom","elemType","$bm_transform","thisProperty","loopIn","loop_in","loopOut","loop_out","smooth","fromCompToSurface","thisLayer","thisComp","scoped_bm_rt","expression_function","eval","wiggle","freq","amp","iWiggle","lenWiggle","addedAmps","periods","loopInDuration","loopOutDuration","lookAt","elem1","elem2","fVec","pitch","easeOut","val1","val2","applyEase","easeIn","iKey","lenKey","nearestKey","obKey","framesToTime","fps","timeToFrames","randSeed","posterizeTime","framesPerSecond","velocity","textIndex","textTotal","selectorValue","executeExpression","frameExpressionId","__preventDeadCodeRemoval","expressionHelpers","searchExpressions","speed","_cachingAtTime","getStaticValueAtTime","addPropertyDecorator","durationFlag","cycleDuration","firstKeyFrame","ret","lastKeyFrame","initV","endV","current","repeats","lastValue","nextLastValue","firstValue","nextFirstValue","samples","sampleValue","sampleFrequency","getTransformValueAtTime","_transformCachingAtTime","anchor","rotationZ","rotationY","rotationX","orientation","positionX","positionY","positionZ","getTransformStaticValueAtTime","propertyGetProp","ShapePropertyConstructorFunction","KeyframedShapePropertyConstructorFunction","ShapeExpressions","isClosed","pointOnPath","_segmentsLength","accumulatedLength","endIndex","vectorOnPath","vectorType","xLength","yLength","magnitude","tangentOnPath","normalOnPath","getShapeValueAtTime","shapeValue","propertyGetShapeProp","trims","initialize$1","addDecorator","getExpressionValue","calculateExpression","isKeyframed","hasExpressions","initialize","SVGComposableEffect","SVGTintFilter","matrixFilter","feMerge","createMergeNode","SVGFillFilter","SVGStrokeEffect","SVGTritoneFilter","feComponentTransfer","feFuncR","feFuncG","feFuncB","SVGProLevelsFilter","createFeFunc","feFuncA","feFuncRComposed","feFuncGComposed","feFuncBComposed","SVGDropShadowEffect","globalFilterSize","feGaussianBlur","feOffset","feFlood","feComposite","resultId","ins","feMergeNode","colorBlack","colorWhite","groupPath","elemChildren","childNodes","removeAttribute","pathMasker","dasharrayValue","getTotalLength","units","color1","color2","color3","tableG","tableB","getTableValue","inputBlack","inputWhite","gamma","outputBlack","outputWhite","colorValue","table","outputDelta","inputDelta","col","_svgMatteSymbols","SVGMatte3Effect","filterElem","SVGGaussianBlurEffect","findSymbol","replaceInParent","symbolId","nextChild","useElem","setElementAsMask","symbol","sigma","dimensions","module","hasConfig","subscriber","SafeSubscriber","defaultValue","EmptyError","trueResult","falseResult","defer","delayWhen","delayDurationSelector","subscriptionDelay","ignoreElements","mapTo","due","asyncScheduler","timer","project","resultSelector","innerFrom","ii","operate","innerSub","isComplete","createOperatorSubscriber","outerValue","hasPrev","isFunction","lift","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","_classCallCheck","Constructor","TypeError","_defineProperties","DEFAULTS","backdrop","button","navbar","fullscreen","inheritedAttributes","initialCoverage","initialViewIndex","inline","interval","keyboard","loading","movable","rotatable","scalable","zoomable","zoomOnTouch","zoomOnWheel","slideOnTouch","toggleOnDblclick","transition","zIndexInline","zoomRatio","minZoomRatio","maxZoomRatio","ready","shown","viewed","moved","rotated","scaled","zoom","zoomed","IS_BROWSER","WINDOW","IS_TOUCH_DEVICE","documentElement","HAS_POINTER_EVENT","NAMESPACE","ACTION_MOVE","ACTION_SWITCH","ACTION_ZOOM","CLASS_ACTIVE","CLASS_CLOSE","CLASS_FADE","CLASS_FIXED","CLASS_FULLSCREEN","CLASS_FULLSCREEN_EXIT","CLASS_HIDE","CLASS_HIDE_MD_DOWN","CLASS_HIDE_SM_DOWN","CLASS_HIDE_XS_DOWN","CLASS_IN","CLASS_INVISIBLE","CLASS_LOADING","CLASS_MOVE","CLASS_OPEN","CLASS_SHOW","CLASS_TRANSITION","EVENT_CLICK","EVENT_DBLCLICK","EVENT_DRAG_START","EVENT_FOCUSIN","EVENT_KEY_DOWN","EVENT_LOAD","EVENT_ERROR","EVENT_POINTER_DOWN","EVENT_POINTER_MOVE","EVENT_POINTER_UP","EVENT_TRANSITION_END","EVENT_SHOW","EVENT_HIDE","EVENT_VIEW","EVENT_VIEWED","EVENT_MOVE","EVENT_MOVED","EVENT_ROTATE","EVENT_ROTATED","EVENT_SCALE","EVENT_SCALED","EVENT_ZOOM","EVENT_ZOOMED","EVENT_PLAY","EVENT_STOP","DATA_ACTION","REGEXP_SPACES","BUTTONS","isString","isNumber","_constructor","_len","_key","REGEXP_SUFFIX","escapeHTMLEntities","hasClass","classList","contains","toggleClass","REGEXP_HYPHENATE","hyphenate","dataset","getAttribute","onceSupported","supported","removeListener","addListener","_handler","_element$listeners","_len2","_key2","dispatchEvent","Event","CustomEvent","bubbles","cancelable","createEvent","initCustomEvent","getOffset","pageXOffset","clientLeft","pageYOffset","clientTop","getTransforms","_ref","translateX","translateY","WebkitTransform","msTransform","IS_SAFARI","getImageNaturalSizes","image","newImage","naturalWidth","naturalHeight","cssText","getResponsiveClass","getPointer","_ref2","endOnly","pageX","pageY","endX","endY","timeStamp","startX","startY","getPointersCenter","pointers","_ref3","initContainer","initViewer","initList","renderViewer","initBody","ownerDocument","scrollbarWidth","initialBodyPaddingRight","paddingRight","initialBodyComputedPaddingRight","getComputedStyle","containerData","innerHeight","viewerData","parentData","fulled","alt","getImageNameFromURL","getImageURL","onLoad","firstElementChild","loadImage","renderList","gutter","nextElementSibling","marginLeft","outerWidth","resetList","initImage","sizingImage","footerHeight","footer","viewerWidth","viewerHeight","oldImageData","imageData","imageInitializing","aspectRatio","oldRatio","ratio","initialImageData","renderImage","viewing","moving","rotating","scaling","zooming","onTransitionEnd","imageRendering","resetImage","dragstart","onPointerDown","pointerdown","onPointerMove","pointermove","onPointerUp","pointerup","onKeyDown","keydown","onWheel","wheel","passive","capture","onDblclick","dblclick","unbind","isTrusted","clickCanvasTimeout","played","exit","full","toggle","doubleClickImageTimeout","originalEvent","originalImage","parentWidth","parentHeight","filled","which","buttons","showing","hiding","pointerType","changedTouches","touch","identifier","pointerId","isSwitchable","pointer","imageClicked","isShown","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","wheeling","deltaY","wheelDelta","immediate","transitioning","initialOffsetWidth","hideImmediately","onViewerTransitionEnd","onImageTransitionEnd","zoomTo","querySelector","activeItem","onViewed","maxIndex","_originalEvent","oldX","oldY","degree","rotateTo","oldDegree","_scaleX","_scaleY","oldScaleX","oldScaleY","showTooltip","pivot","_zoomable","newWidth","onLoadWhenPlay","requestFullscreen","referrerPolicy","_this8","exitFullscreen","_this9","enforceFocus","_this10","clearEnforceFocus","_this11","tooltipBox","tooltipping","fading","_this12","isImg","changedIndexes","changedIndex","delaying","initializing","onStart","others","onFocusin","fucus","webkitRequestFullscreen","Element","ALLOW_KEYBOARD_INPUT","mozRequestFullScreen","msRequestFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","offsetX","getMaxZoomRatio","pointers2","ratios","pointer2","absoluteOffsetX","AnotherViewer","getUniqueID","nodeType","_createClass","protoProps","staticProps","custom","zoomButtons","rotateButtons","scaleButtons","rotates","nextSibling","DataSource","isDataSource","ConnectableObservable","_DisposeViewRepeaterStrategy","applyChanges","itemContextFactory","itemValueResolver","itemViewChanged","forEachOperation","record","adjustedPreviousIndex","operation","previousIndex","insertContext","_view","_RecycleViewRepeaterStrategy","viewCacheSize","_viewCache","_insertView","_detachAndCacheView","_moveView","_view2","viewArgsFactory","cachedView","_insertViewFromCache","viewArgs","detachedView","_maybeCacheView","insert","SelectionModel","_multiple","initiallySelectedValues","_emitChanges","compareWith","_selection","_deselectedToEmit","_selectedToEmit","_markSelected","selected","_selected","_verifyValueAssignment","_hasQueuedChanges","_emitChangeEvent","_unmarkSelected","setSelection","oldValues","newSelectedSet","flushEvent","_unmarkAll","otherValue","isMultipleSelection","UniqueSelectionDispatcher","_listeners","listen","registered","_VIEW_REPEATER_STRATEGY","InjectionToken","mixinHasStickyInput","base","_sticky","_hasStickyChanged","sticky","coerceBooleanProperty","hasStickyChanged","resetStickyChanged","CDK_TABLE","TEXT_COLUMN_OPTIONS","CdkCellDef","CdkHeaderCellDef","CdkFooterCellDef","CdkColumnDefBase","_CdkColumnDefBase","CdkColumnDef","_table","_stickyEnd","_setNameInput","stickyEnd","_updateColumnCssClassName","_columnCssClassName","cssClassFriendlyName","BaseCdkCell","columnDef","CdkHeaderCell","CdkFooterCell","_elementRef","tableRole","CdkCell","_Schedule","endTasks","_COALESCED_STYLE_SCHEDULER","_CoalescedStyleScheduler","_ngZone","_currentSchedule","_destroyed","task","_createScheduleIfNeeded","scheduleEnd","_getScheduleObservable","takeUntil","isStable","onStable","BaseRowDef","_differs","_columnsDiffer","columns","diff","getColumnsDiff","extractCellTemplate","column","CdkHeaderRowDef","headerCell","CdkFooterRowDef","footerCell","cell","CdkHeaderRowDefBase","_CdkHeaderRowDefBase","CdkFooterRowDefBase","_CdkFooterRowDefBase","CdkRowDef","CdkCellOutlet","_viewContainer","mostRecentCellOutlet","CdkHeaderRow","CdkFooterRow","CdkRow","CdkNoDataRow","_contentClassName","STICKY_DIRECTIONS","StickyStyler","_isNativeHtmlTable","_stickCellCss","_coalescedStyleScheduler","_isBrowser","_needsPositionStickyOnElement","_positionListener","_cachedCellWidths","_borderCellCss","clearStickyPositioning","rows","stickyDirections","elementsToClear","row","ELEMENT_NODE","_removeStickyStyle","updateStickyColumns","stickyStartStates","stickyEndStates","recalculateCellWidths","stickyColumnsUpdated","sizes","stickyEndColumnsUpdated","firstRow","numCells","cellWidths","_getCellWidths","startPositions","_getStickyStartColumnPositions","endPositions","_getStickyEndColumnPositions","lastStickyStart","firstStickyEnd","isRtl","_addStickyStyle","stickRows","rowsToStick","stickyStates","states","stickyOffsets","stickyCellHeights","elementsToStick","rowIndex","stickyOffset","borderedRowIndex","isBorderedRowIndex","_this$_positionListen2","stickyHeaderRowsUpdated","offsets","stickyFooterRowsUpdated","updateStickyFooterContainer","tableElement","tfoot","_getCalculatedZIndex","dirValue","isBorderElement","zIndexIncrements","firstRowCells","widths","positions","nextPosition","STICKY_POSITIONING_LISTENER","DataRowOutlet","HeaderRowOutlet","FooterRowOutlet","NoDataRowOutlet","CdkTable","_changeDetectorRef","role","_dir","_document","_platform","_viewRepeater","_viewportRuler","_stickyPositioningListener","_onDestroy","_columnDefsByName","_customColumnDefs","_customRowDefs","_customHeaderRowDefs","_customFooterRowDefs","_headerRowDefChanged","_footerRowDefChanged","_stickyColumnStylesNeedReset","_forceRecalculateCellWidths","_cachedRenderRowsMap","stickyCssClass","needsPositionStickyOnElement","_isShowingNoDataRow","_multiTemplateDataRows","_fixedLayout","contentChanged","viewChange","MAX_VALUE","trackBy","_trackByFn","dataSource","_dataSource","_switchDataSource","multiTemplateDataRows","_rowOutlet","_forceRenderDataRows","updateStickyColumnStyles","fixedLayout","_setupStickyStyler","_applyNativeTableSections","_dataDiffer","dataRow","dataIndex","_cacheRowDefs","_cacheColumnDefs","rowDefsChanged","_renderUpdatedColumns","_forceRenderHeaderRows","_forceRenderFooterRows","_rowDefs","_renderChangeSubscription","_observeRenderChanges","_checkStickyStates","_headerRowOutlet","_footerRowOutlet","_headerRowDefs","_footerRowDefs","_defaultRowDef","renderRows","_renderRows","_getAllRenderRows","_updateNoDataRow","_adjustedPreviousIndex","_getEmbeddedViewArgs","_renderCellTemplateForItem","rowDef","_updateRowIndexContext","forEachIdentityChange","NgZone","addColumnDef","removeColumnDef","addRowDef","removeRowDef","addHeaderRowDef","headerRowDef","removeHeaderRowDef","addFooterRowDef","footerRowDef","removeFooterRowDef","setNoDataRow","noDataRow","_customNoDataRow","updateStickyHeaderRowStyles","headerRows","_getRenderedRows","thead","_stickyStyler","updateStickyFooterRowStyles","footerRows","dataRows","headerRow","_addStickyColumnStyles","footerRow","prevCachedRenderRows","renderRowsForData","_getRenderRowsForData","WeakMap","renderRow","_getRowDefs","cachedRenderRows","mergeArrayAndSet","_getOwnDefs","_contentColumnDefs","_contentHeaderRowDefs","_contentFooterRowDefs","_contentRowDefs","defaultRowDefs","when","columnsDiffReducer","dataColumnsChanged","headerColumnsChanged","footerColumnsChanged","dataStream","_renderRow","columnDefs","columnName","rowOutlet","renderedRows","viewRef","rowDefs","outlet","cellTemplate","_getCellTemplates","renderIndex","last","even","odd","columnId","documentFragment","createDocumentFragment","sections","tag","outlets","_noDataRowOutlet","stickyCheckReducer","_noDataRow","shouldShow","rootNode","DOCUMENT","CdkTextColumn","_syncColumnDefName","headerText","_createDefaultHeaderText","dataAccessor","defaultDataAccessor","defaultHeaderTextTransform","CdkTableModule","MAT_CHECKBOX_DEFAULT_OPTIONS","MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY","clickAction","nextUniqueId","defaults","MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR","MatCheckbox","MatCheckboxChange","_MatCheckboxMixinBase","mixinTabIndex","mixinColor","mixinDisableRipple","mixinDisabled","_MatCheckboxBase","tabIndex","_animationMode","ariaLabelledby","labelPosition","indeterminateChange","_onTouched","_currentAnimationClass","_currentCheckState","_controlValueAccessorChangeFn","_checked","_disabled","_indeterminate","defaultColor","_uniqueId","inputId","_required","_syncIndeterminate","checked","indeterminate","_transitionCheckState","_isRippleDisabled","disableRipple","_onLabelTextChange","_getAriaChecked","newState","oldState","_getAnimationTargetElement","_getAnimationClassForCheckStateTransition","animationClass","_createChangeEvent","_inputElement","_handleInputClick","_this$_options","_onInteractionEvent","_onBlur","_animationClasses","uncheckedToChecked","checkedToIndeterminate","uncheckedToIndeterminate","checkedToUnchecked","indeterminateToChecked","indeterminateToUnchecked","nativeCheckbox","MatRipple","changeDetectorRef","_focusMonitor","animationMode","monitor","focusOrigin","stopMonitoring","_onInputClick","focusVia","ANIMATION_MODULE_TYPE","_MatCheckboxRequiredValidatorModule","MatRippleModule","MatCommonModule","ObserversModule","_r9","day_r1","_r5","_r8","_r12","ctx_r13","ctx_r14","MatDatepickerIntl","calendarLabel","openCalendarLabel","closeCalendarLabel","prevMonthLabel","nextMonthLabel","prevYearLabel","nextYearLabel","prevMultiYearLabel","nextMultiYearLabel","switchToMonthViewLabel","switchToMultiYearViewLabel","startDateLabel","endDateLabel","formatYearRange","formatYearRangeLabel","MatCalendarCell","cssClasses","compareValue","rawValue","MatCalendarBody","_focusActiveCellAfterViewChecked","numCols","activeCell","isRange","cellAspectRatio","previewStart","previewEnd","selectedValueChange","previewChange","activeDateChange","_enterHandler","_skipNextFocus","_getCellFromElement","_leaveHandler","ngAfterViewChecked","_focusActiveCell","_cellClicked","_emitActiveDateChange","_isSelected","startValue","columnChanges","_firstRowOffset","_cellPadding","_cellWidth","_isActiveCell","colIndex","cellNumber","movePreview","_scheduleFocusActiveCellAfterViewChecked","_isRangeStart","isStart","_isRangeEnd","isEnd","_isInRange","_isComparisonStart","comparisonStart","comparisonEnd","_isComparisonBridgeStart","previousCell","previousRow","_isComparisonBridgeEnd","_isComparisonEnd","nextCell","nextRow","_isInComparisonRange","_isComparisonIdentical","_isPreviewStart","_isPreviewEnd","_isInPreview","isTableCell","attrs","rangeEnabled","MatDateSelectionModel","selection","_adapter","_selectionChanged","selectionChanged","updateSelection","_isValidDateInstance","isDateInstance","MatSingleDateSelectionModel","adapter","i1$1","MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER","deps","Optional","SkipSelf","DateAdapter","useFactory","MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY","selectionFinished","currentRange","compareDate","createPreview","MatMonthView","_rangeStrategy","_rerenderSubscription","Subscription","selectedChange","_userSelection","_activeDate","oldActiveDate","validDate","getValidDateOrNull","deserialize","clampDate","minDate","maxDate","_hasSameMonthAndYear","_init","_setRanges","_minDate","_maxDate","ngAfterContentInit","localeChanges","startWith","comparisonChange","firstChange","_dateSelected","selectedDate","_getDateFromDayOfMonth","rangeStartDate","rangeEndDate","_getDateInCurrentMonth","_previewStart","_previewEnd","_updateActiveDate","_handleCalendarBodyKeydown","_isRtl","LEFT_ARROW","addCalendarDays","RIGHT_ARROW","UP_ARROW","DOWN_ARROW","HOME","END","getNumDaysInMonth","PAGE_UP","altKey","addCalendarYears","PAGE_DOWN","ENTER","SPACE","_selectionKeyPressed","_canSelect","ESCAPE","hasModifierKey","_handleCalendarBodyKeyup","_todayDate","_getCellCompareValue","_monthLabel","monthLabel","getMonthNames","getMonth","toLocaleUpperCase","firstOfMonth","createDate","getYear","_firstWeekOffset","getDayOfWeek","getFirstDayOfWeek","_initWeekdays","_createWeekCells","_matCalendarBody","_previewChanged","previewRange","dayOfMonth","firstDayOfWeek","narrowWeekdays","getDayOfWeekNames","weekdays","long","narrow","_weekdays","daysInMonth","dateNames","getDateNames","_weeks","_shouldEnableDate","dateA11yLabel","cellClasses","dateFilter","year","month","day","selectedValue","_rangeStart","_rangeEnd","_isRange","_comparisonRangeStart","_comparisonRangeEnd","MatMultiYearView","yearSelected","isSameMultiYearView","_setSelectedYear","_todayYear","minYearOfPage","getActiveOffset","_years","_createCellForYear","_yearSelected","selectedYear","_getDateFromYear","yearsPerPage","_getActiveCell","activeMonth","yearName","getYearName","_shouldEnableYear","_selectedYear","dateAdapter","date1","date2","year1","year2","startingYear","getStartingYear","euclideanModulo","MatYearView","monthSelected","_setSelectedMonth","_monthSelected","selectedMonth","_getDateFromMonth","_todayMonth","_getMonthInCurrentYear","_yearLabel","monthNames","_months","_createCellForMonth","normalizedDate","monthName","_shouldEnableMonth","activeYear","_isYearAndMonthAfterMaxDate","_isYearAndMonthBeforeMinDate","maxYear","maxMonth","minYear","minMonth","_selectedMonth","uniqueId","MatCalendarHeader","_buttonDescriptionId","periodButtonText","currentView","monthYearLabel","maxYearOfPage","minYearName","maxYearName","periodButtonLabel","prevButtonLabel","nextButtonLabel","currentPeriodClicked","previousEnabled","_isSameView","nextEnabled","_moveFocusOnNextTick","startView","viewChanged","_intlChanges","startAt","_startAt","_clampedActiveDate","_currentView","viewChangedResult","_calendarHeaderPortal","headerComponent","focusActiveCell","minDateChange","sameDate","maxDateChange","_getCurrentViewComponent","updateTodaysDate","_yearSelectedInMultiYearView","normalizedYear","_monthSelectedInYearView","normalizedMonth","_goToDateInView","monthView","yearView","multiYearView","i5","i6","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","Overlay","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY","scrollStrategies","reposition","OverlayModule","A11yModule","PortalModule","CdkScrollableModule","DialogConfig","hasBackdrop","backdropClass","ariaDescribedBy","ariaLabelledBy","ariaModal","restoreFocus","closeOnNavigation","closeOnDestroy","CdkDialogContainer","BasePortalOutlet","_focusTrapFactory","_config","_interactivityChecker","_overlayRef","_elementFocusedBeforeDialogWasOpened","_closeInteractionType","attachDomPortal","portal","_portalOutlet","_contentAttached","_ariaLabelledBy","_initializeFocusTrap","_handleBackdropClicks","_captureInitialFocus","_trapFocus","_restoreFocus","attachComponentPortal","attachTemplatePortal","_recaptureFocus","_containsFocus","_forceFocus","isFocusable","_focusByCssSelector","selector","elementToFocus","_focusTrap","focusInitialElementWhenReady","focusedSuccessfully","_focusDialogContainer","focusConfig","focusTargetElement","_getFocusedElementPierceShadowDom","backdropClick","CdkPortalOutlet","DialogRef","keydownEvents","outsidePointerEvents","containerInstance","closedSubject","componentInstance","updatePosition","updateSize","addPanelClass","classes","removePanelClass","DIALOG_SCROLL_STRATEGY","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","DIALOG_SCROLL_STRATEGY_PROVIDER","DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","Dialog","_overlay","_injector","_defaultOptions","_parentDialog","_overlayContainer","scrollStrategy","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","afterAllClosed","openDialogs","_getAfterAllClosed","_scrollStrategy","afterOpened","componentOrTemplateRef","getDialogById","overlayConfig","_getOverlayConfig","dialogContainer","_attachContainer","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","_removeOpenDialog","closeAll","reverseForEach","OverlayConfig","centerHorizontally","centerVertically","maxWidth","disposeOnNavigation","userInjector","injector","_config$viewContainer","providers","OverlayRef","containerType","containerPortal","Injector","componentFactoryResolver","TemplateRef","_createInjector","templateContext","TemplatePortal","contentRef","fallbackInjector","_config$viewContainer2","Directionality","InjectFlags","overlayContainer","getContainerElement","sibling","hasAttribute","DialogModule","defaultParams","enterAnimationDuration","exitAnimationDuration","matDialogAnimations","animate","animateChild","optional","MatDialogConfig","delayFocusTrap","_MatDialogContainerBase","focusTrapFactory","dialogConfig","interactivityChecker","focusMonitor","_animationStateChanged","_openAnimationDone","MatDialogContainer","checker","_state","_onAnimationDone","toState","_onAnimationStart","_startExitAnimation","_getAnimationState","MatDialogRef","_containerInstance","_afterOpened","_beforeClosed","_closeFallbackTimeout","_finishDialogClose","detachments","_result","_closeDialogVia","dialogResult","detachBackdrop","beforeClosed","strategy","interactionType","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","_MatDialogBase","_dialogRefConstructor","_dialogContainerType","_dialogDataToken","_idPrefix","_dialog","cdkRef","cdkConfig","_closeDialogs","dialogs","MatDialog","_location","defaultOptions","parentDialog","dialogElementUid","MatDialogClose","getClosestDialog","proxiedChange","_matDialogClose","_matDialogCloseResult","_onButtonClick","screenX","screenY","MatDialogTitle","_dialogRef","MatDialogContent","MatDialogActions","align","MatDivider","_vertical","_inset","vertical","inset","_r10","ctx_r12","_r16","ctx_r15","ctx_r17","MAT_ERROR","matFormFieldAnimations","transitionMessages","MatFormFieldControl","_MAT_HINT","MatLabel","MatPlaceholder","MAT_PREFIX","MatPrefix","MAT_SUFFIX","_MatFormFieldBase","MAT_FORM_FIELD_DEFAULT_OPTIONS","MAT_FORM_FIELD","MatFormField","_defaults","_outlineGapCalculationNeededImmediately","_outlineGapCalculationNeededOnStable","_hideRequiredMarker","_showAlwaysAnimate","_subscriptAnimationState","_hintLabel","_hintLabelId","_labelId","floatLabel","_getDefaultFloatLabelState","_animationsEnabled","appearance","hideRequiredMarker","_appearance","_this$_defaults","_shouldAlwaysFloat","_canLabelFloat","hintLabel","_processHints","_floatLabel","_control","_explicitFormFieldControl","_controlNonStatic","_controlStatic","getLabelId","_hasFloatingLabel","getConnectedOverlayOrigin","_connectionContainerRef","_validateControlChild","controlType","_validatePlaceholders","_syncDescribedByIds","updateOutlineGap","_prefixChildren","_suffixChildren","_hintChildren","_errorChildren","_shouldForward","_hasPlaceholder","_placeholderChild","_hasLabel","_labelChildNonStatic","_labelChildStatic","_shouldLabelFloat","shouldLabelFloat","_hideControlPlaceholder","_getDisplayedMessages","errorState","_animateAndLockLabel","_label","fromEvent","_validateHints","userAriaDescribedBy","startHint","hint","endHint","setDescribedByIds","labelEl","outlineStartSelector","outlineGapSelector","gapElements","_isAttachedToDOM","startWidth","gapWidth","startEls","gapEls","containerRect","containerStart","_getStartEnd","labelChildren","labelStart","outlineGapPadding","getRootNode","changeDetection","listenerOptions","normalizePassiveListenerOptions","AutofillMonitor","_monitoredElements","elementOrRef","EMPTY","coerceElement","cssClass","animationName","isAutofilled","unlisten","_info","TextFieldModule","MAT_INPUT_VALUE_ACCESSOR","MAT_INPUT_INVALID_TYPES","_MatInputBase","mixinErrorState","_defaultErrorStateMatcher","_parentForm","_parentFormGroup","MatInput","inputValueAccessor","_autofillMonitor","_formField","_uid","autofilled","_type","_readonly","_neverEmptyInputTypes","getSupportedInputTypes","_iOSKeyupListener","selectionEnd","setSelectionRange","_inputValueAccessor","_previousNativeValue","IOS","_isServer","_isNativeSelect","_isTextarea","_isInFormField","_id","_this$ngControl","_this$ngControl$contr","_validateType","readonly","updateErrorState","_dirtyCheckNativeValue","_dirtyCheckPlaceholder","_focusChanged","_onInput","formField","_formField$_hasLabel","_previousPlaceholder","_isNeverEmpty","_isBadInput","validity","badInput","empty","selectElement","firstOption","selectedIndex","onContainerClick","_isInlineSelect","ErrorStateMatcher","matMenuAnimations","transformMenu","fadeInItems","MAT_MENU_CONTENT","_MatMenuContentBase","_template","_componentFactoryResolver","_appRef","_viewContainerRef","_attached","_portal","_outlet","DomPortalOutlet","outletElement","isAttached","MatMenuContent","MAT_MENU_PANEL","_MatMenuItemBase","MatMenuItem","_parentMenu","_hovered","_focused","_highlighted","_triggersSubmenu","_getHostElement","_getTabIndex","_checkDisabled","_handleMouseEnter","getLabel","cloneNode","icons","_setHighlighted","isHighlighted","_hasFocus","MAT_MENU_DEFAULT_OPTIONS","MAT_MENU_DEFAULT_OPTIONS_FACTORY","overlapTrigger","menuPanelUid","_MatMenuBase","_xPosition","_yPosition","_directDescendantItems","QueryList","_tabSubscription","_classList","_panelAnimationState","_animationDone","overlayPanelClass","_overlapTrigger","_hasBackdrop","panelId","setPositionClasses","previousPanelClass","_previousPanelClass","_updateDirectDescendants","_keyManager","FocusKeyManager","withWrap","withTypeAhead","withHomeAndEnd","tabOut","focusedItem","updateActiveItem","itemsList","manager","_manager$activeItem","activeItemIndex","setActiveItem","setNextItemActive","_item","_handleKeydown","parentMenu","setFocusOrigin","focusFirstItem","menuPanel","setFirstItemActive","resetActiveItem","setElevation","elevation","_baseElevation","newElevation","_elevationPrefix","customElevation","_previousElevation","posX","posY","_startAnimation","_resetAnimation","_isAnimating","_allItems","notifyOnChanges","MatMenu","MAT_MENU_SCROLL_STRATEGY","MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_MENU_SCROLL_STRATEGY_FACTORY","passiveEventListenerOptions","_MatMenuTriggerBase","_element","_menuItemInstance","_menuOpen","_closingActionsSubscription","_hoverSubscription","_menuCloseSubscription","_handleTouchStart","isFakeTouchstartFromScreenReader","_openedBy","menuOpened","onMenuOpen","menuClosed","onMenuClose","_parentMaterialMenu","triggersSubmenu","_deprecatedMatMenuTriggerFor","menu","_menu","_destroyMenu","_handleHover","menuOpen","_createOverlay","getConfig","_setPosition","_getPortal","lazyContent","menuData","_menuClosingActions","_initMenu","withLockedPosition","reapplyLastPosition","_setIsMenuOpen","_setMenuElevation","_subscribeToPositions","withGrowAfterOpen","withTransformOriginOn","positionChanges","connectionPair","originFallbackX","overlayFallbackY","originFallbackY","overlayFallbackX","_parentInnerPadding","firstItem","offsetTop","parentClose","hover","_handleMousedown","isFakeMousedownFromScreenReader","_handleClick","asapScheduler","i3$1","hostVars","MatMenuTrigger","MAT_RADIO_DEFAULT_OPTIONS","MAT_RADIO_DEFAULT_OPTIONS_FACTORY","MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR","MatRadioGroup","MatRadioChange","MAT_RADIO_GROUP","_MatRadioGroupBase","_changeDetector","_isInitialized","_labelPosition","_updateRadioButtonNames","_markRadiosForCheck","_updateSelectedRadioFromValue","_checkSelectedRadioButton","_touch","_radios","radio","_markForCheck","MatRadioButton","MatRadioButtonBase","_MatRadioButtonMixinBase","_MatRadioButtonBase","radioGroup","_radioDispatcher","_providerOverride","_removeUniqueSelectionListener","_noopAnimations","coerceNumberProperty","newCheckedState","_setDisabled","_color","_updateTabIndex","_onInputInteraction","groupValueChanged","_previousTabIndex","_this$_inputElement","changeDetector","radioDispatcher","providerOverride","MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS","disableToggleValue","MAT_SLIDE_TOGGLE_VALUE_ACCESSOR","MatSlideToggle","MatSlideToggleChange","_MatSlideToggleMixinBase","_MatSlideToggleBase","_onChange","toggleChange","_onChangeEvent","_MatSlideToggleRequiredValidatorModule","MAT_SORT_DEFAULT_OPTIONS","_MatSortBase","mixinInitialized","MatSort","sortables","_stateChanges","_direction","sortChange","disableClear","_disableClear","register","sortable","deregister","getNextSortDirection","_this$_defaultOptions","sortDirectionCycle","getSortDirectionCycle","sortOrder","nextDirectionIndex","_markInitialized","SORT_ANIMATION_TRANSITION","AnimationDurations","AnimationCurves","matSortAnimations","indicator","leftPointer","rightPointer","arrowOpacity","arrowPosition","allowChildren","MatSortHeaderIntl","MAT_SORT_HEADER_INTL_PROVIDER","MAT_SORT_HEADER_INTL_PROVIDER_FACTORY","parentIntl","_MatSortHeaderBase","MatSortHeader","_sort","_columnDef","_ariaDescriber","_showIndicatorHint","_viewState","_arrowDirection","_disableViewStateAnimation","_sortActionDescription","_handleStateChanges","sortActionDescription","_updateSortActionDescription","_updateArrowDirection","_setAnimationTransitionState","_isSorted","_sortButton","_setIndicatorHintVisible","_isDisabled","fromState","viewState","_toggleOnInteraction","_getArrowDirectionState","_getArrowViewState","_getAriaSortAttribute","_renderArrow","newDescription","removeDescription","describe","MatTable","MatCellDef","MatHeaderCellDef","MatFooterCellDef","MatColumnDef","MatHeaderCell","MatFooterCell","MatCell","MatHeaderRowDef","MatFooterRowDef","MatRowDef","MatHeaderRow","MatFooterRow","MatRow","MatNoDataRow","_MatTableDataSource","_renderData","_filter","_internalPageChanges","_renderChangesSubscription","sortingDataAccessor","sortHeaderId","_isNumberValue","numberValue","sortData","valueA","valueB","valueAType","valueBType","comparatorResult","filterPredicate","dataStr","currentTerm","transformedFilter","_updateChangeSubscription","_filterData","paginator","_paginator","pageChange","page","filteredData","orderedData","_orderData","paginatedData","_pageData","_updatePaginator","startIndex","pageIndex","pageSize","filteredDataLength","lastPageIndex","newPageIndex","MatTableDataSource","PANEL_CLASS","passiveListenerOptions","MAT_TOOLTIP_SCROLL_STRATEGY","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY","scrollThrottle","MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY","_MatTooltipBase","_scrollDispatcher","_position","_viewInitialized","_pointerExitEventsInitialized","_viewportMargin","_cssClassPrefix","_showDelay","_hideDelay","touchGestures","_passiveListeners","_updatePosition","_tooltipInstance","_setupPointerEnterEventsIfNeeded","_mouseLeaveHideDelay","_isTooltipVisible","_updateTooltipMessage","tooltipClass","_tooltipClass","_setTooltipClass","_touchstartTimeout","_cancelPendingAnimations","_detach","_tooltipComponent","_triggerElement","afterHidden","scrollableAncestors","getAncestorScrollContainers","withFlexibleDimensions","withViewportMargin","withScrollableContainers","_updateCurrentPositionClass","scrollableViewProperties","isOverlayClipped","_this$_tooltipInstanc3","_handleBodyInteraction","disableTooltipInteractivity","_getOrigin","_getOverlayPosition","_addOffset","main","fallback","isLtr","originPosition","_invertPosition","overlayPosition","onMicrotaskEmpty","newPosition","_currentPosition","classPrefix","_platformSupportsMouseEvents","_setupPointerExitEventsIfNeeded","_disableNativeGesturesIfNecessary","_addListeners","exitListeners","newTarget","relatedTarget","_this$_overlayRef","overlayElement","_wheelListener","touchendListener","ANDROID","elementUnderPointer","elementFromPoint","clientX","clientY","gestures","userSelect","msUserSelect","webkitUserSelect","MozUserSelect","draggable","webkitUserDrag","touchAction","webkitTapHighlightColor","MatTooltip","scrollDispatcher","ariaDescriber","TooltipComponent","_TooltipComponentBase","_closeOnInteraction","_isVisible","_onHide","_animationsDisabled","_hideTimeoutId","_showTimeoutId","_toggleVisibility","_handleMouseLeave","_finalizeAnimation","_onShow","_handleAnimationEnd","_showAnimation","_hideAnimation","toVisible","_tooltip","showClass","hideClass","getPropertyValue","_breakpointObserver","_isHandset","Breakpoints","i7","_r13","_r30","ctx_r29","ctx_r31","ctx_r33","_r36","ctx_r35","ctx_r37","ctx_r39","ctx_r42","ctx_r45","_r48","ctx_r47","ctx_r49","ctx_r50","ctx_r51","unescapedHTMLExp","hasUnescapedHTMLExp","RegExp","htmlEscapes","isDefined","NgItemLabelDirective","escape","escapeHTML","chr","ngItemLabel","NgOptionTemplateDirective","NgOptgroupTemplateDirective","NgLabelTemplateDirective","NgMultiLabelTemplateDirective","NgHeaderTemplateDirective","NgFooterTemplateDirective","NgNotFoundTemplateDirective","NgTypeToSearchTemplateDirective","NgLoadingTextTemplateDirective","NgTagTemplateDirective","NgLoadingSpinnerTemplateDirective","newId","diacritics","stripSpecialChars","ItemsList","_ngSelect","_selectionModel","_items","_filteredItems","_markedIndex","filteredItems","markedIndex","selectedItems","markedItem","noItemsToSelect","hideSelected","maxItemsSelected","maxSelectedItems","lastSelectedItem","setItems","mapItem","groupBy","_groupBy","_flatten","clearSelected","selectableGroupAsModel","_hideSelected","unselect","_showSelected","findItem","findBy","bindValue","resolveNested","bindLabel","option","keepDisabled","marked","resetFilteredItems","findByLabel","toLocaleLowerCase","searchFn","_defaultSearchFn","matchedItems","head","unmarkItem","markNextItem","_stepToItem","markPreviousItem","markItem","markSelectedOrDefault","markDefault","lastMarkedIndex","_getLastMarkedIndex","$ngOptionLabel","$ngOptionValue","htmlId","dropdownId","mapSelectedItems","opt","_getNextItemIndex","groups","isFnKey","keyFn","isGroupByFn","withoutGroup","isObjectKey","selectableGroup","groupKey","groupValue","Qt","KeyCode","Tab","Enter","Esc","Space","ArrowUp","ArrowDown","Backspace","NgDropdownPanelService","_dimensions","itemHeight","panelHeight","itemsPerViewport","calculateItems","scrollPos","itemsLength","indexByScrollTop","maxStart","topPadding","setDimensions","getScrollTo","itemTop","lastScroll","itemBottom","CSS_POSITIONS","SCROLL_SCHEDULER","animationFrameScheduler","NgDropdownPanelComponent","_renderer","_zone","_panelService","filterValue","scrollToEnd","outsideClick","_destroy$","_scrollToEndFired","_updateScrollHeight","_lastScrollPosition","_dropdown","currentPosition","_itemsLength","_onItemsLengthChanged","_startOffset","_select","_virtualPadding","paddingElementRef","_scrollablePanel","scrollElementRef","_contentPanel","contentElementRef","_handleScroll","_handleOutsideClick","_appendDropdown","_setupMousedownListener","_onItemsChange","appendTo","scrollTo","startFromOption","clientHeight","scrollToTag","panel","adjustPosition","_updateYPosition","_handleDropdownPosition","_calculateCurrentPosition","_updateDropdownClass","REMOVE_CSS_CLASS","ADD_CSS_CLASS","auditTime","composedPath","_onContentScrolled","_checkToClose","shadowRoot","_updateItemsRange","_setVirtualHeight","_updateItems","_measureDimensions","_renderItemsRange","_fireScrollToEnd","_updateVirtualHeight","range","bufferAmount","optionHeight","dropdownEl","selectRect","_parent","_updateXPosition","NgOptionComponent","stateChange$","_previousLabel","NgSelectConfig","notFoundText","typeToSearchText","addTagText","loadingText","clearAllText","disableVirtualScroll","openOnEnter","ConsoleService","SELECTION_MODEL_FACTORY","newSelectionModel","_cd","_console","markFirst","dropdownPosition","closeOnSelect","selectOnTab","trackByFn","clearOnBackspace","labelForId","inputAttrs","searchWhileComposing","minTermLength","editableSearchTerm","keyDownFn","addTag","searchable","clearable","focusEvent","changeEvent","openEvent","closeEvent","searchEvent","addEvent","removeEvent","useDefaultClass","viewPortItems","searchTerm","_defaultLabel","_pressedKeys","_isComposing","_keyPress$","clearItem","trackByOption","_mergeGlobalConfig","_itemsAreUsed","_compareWith","clearSearchOnAdd","_clearSearchOnAdd","_editableSearchTerm","selectedValues","currentPanelPosition","dropdownPanel","_handleKeyPresses","_setInputAttributes","_setItems","_manualOpen","_setItemsFromNgOptions","handleKeyDown","handleKeyCode","_handleArrowDown","_handleArrowUp","_handleSpace","_handleEnter","_handleTab","_handleBackspace","handleMousedown","handleClearClick","handleArrowClick","_updateNgModel","_clearSearch","_onSelectionChanged","clearModel","_handleWriteValue","_isTypeahead","toggleItem","_setSearchTermFromItems","searchInput","selectTag","_primitive","handleTag","isPromise","showClear","showAddTag","_validTerm","showNoItemsFound","showTypeToSearch","onCompositionStart","onCompositionEnd","typeahead","onInputFocus","onInputBlur","onItemHover","mapNgOptions","handleOptionChange","changedOrDestroyed","ngOptions","_isValidWriteValue","validateBinding","ngModel","isValObject","isPrimitive","letter","_scrollToMarked","autocorrect","autocapitalize","autocomplete","_changeSearch","_scrollToTag","_nextItemIsTag","nextStep","_r52","DefaultSelectionModelFactory","DefaultSelectionModel","groupAsModel","childrenCount","selectedCount","_setChildrenSelectedState","_removeChildren","_activeChildren","_removeParent","Notification","observeNotification","nextHandler","completeHandler","nextOrObserver","toObservable","throwError","completeNotification","keySelector","elementOrOptions","connector","handleError","consumer","activeGroups","teardownAttempted","groupBySourceSubscriber","OperatorSubscriber","grouped","createGroupedObservable","groupSubject","groupSubscriber","durationSubscriber","DEFAULT_EFFECT_CONFIG","useEffectsErrorHandler","CREATE_EFFECT_METADATA_KEY","getCreateEffectMetadata","getOwnPropertyNames","getSourceForInstance","METADATA_KEY","getEffectDecoratorMetadata","compose","getEffectMetadataEntries","sourceProto","hasMetadataEntries","mergeEffects","sourceInstance","globalErrorHandler","effectsErrorHandler","sourceName","observables$","getSourceMetadata","observable$","effectAction$","materialize","defaultEffectsErrorHandler","retryAttemptLeft","Actions","operator","ScannedActionsSubject","allowedTypes","typeOrActionCreator","_ROOT_EFFECTS_GUARD","USER_PROVIDED_EFFECTS","_ROOT_EFFECTS","ROOT_EFFECTS","_FEATURE_EFFECTS","FEATURE_EFFECTS","EFFECTS_ERROR_HANDLER","ROOT_EFFECTS_INIT","isOnInitEffects","functionName","rootEffectsInit","EffectSources","effectSourceInstance","toActions","source$","effectsInstance","effect$","resolveEffectSource","mergedEffects$","isOnRunEffects","ngrxOnRunEffects","reportInvalidActions","reporter","isAction","getEffectName","isMethod","dematerialize","init$","ngrxOnInitEffects","isOnIdentifyEffects","ngrxOnIdentifyEffects","EffectsRunner","effectSources","effectsSubscription","isStarted","EffectsRootModule","runner","rootEffects","storeRootModule","storeFeatureModule","guard","EffectsFeatureModule","effectSourceGroups","featureEffects","ngModule","createEffects","_provideForRootGuard","Self","effectGroups","userProvidedEffectGroups","mergedEffects","effectGroup","userProvidedEffectGroup","createEffectInstances","PERFORM_ACTION","REFRESH","RESET","ROLLBACK","COMMIT","SWEEP","TOGGLE_ACTION","SET_ACTIONS_ACTIVE","JUMP_TO_STATE","JUMP_TO_ACTION","IMPORT_STATE","LOCK_CHANGES","PAUSE_RECORDING","PerformAction","Refresh","Reset","Rollback","Commit","Sweep","ToggleAction","SetActionsActive","JumpToState","JumpToAction","ImportState","nextLiftedState","LockChanges","PauseRecording","StoreDevtoolsConfig","STORE_DEVTOOLS_CONFIG","INITIAL_OPTIONS","noMonitor","DEFAULT_NAME","createConfig","optionsInput","DEFAULT_OPTIONS","actionSanitizer","stateSanitizer","serialize","autoPause","persist","export","import","jump","skip","reorder","difference","second","unliftState","liftedState","computedStates","currentStateIndex","unliftAction","actionsById","liftAction","sanitizeActions","actions","sanitizedActions","actionIdx","sanitizeAction","sanitizeStates","computedState","sanitizeState","stateIdx","shouldFilterActions","actionsSafelist","actionsBlocklist","filterLiftedState","safelist","blocklist","filteredStagedActionIds","filteredActionsById","filteredComputedStates","stagedActionIds","liftedAction","isActionFiltered","blockedlist","predicateMatch","safelistMatch","escapeRegExp","blocklistMatch","DevtoolsDispatcher","ActionsSubject","ExtensionActionTypes","START","DISPATCH","STOP","ACTION","REDUX_DEVTOOLS_EXTENSION","DevtoolsExtension","devtoolsExtension","dispatcher","createActionStreams","isLocked","currentState","sanitizedState","sanitizedAction","sendToReduxDevtools","extensionConnection","sanitizedLiftedState","getExtensionConfig","createChangesObservable","changes$","share","start$","stop$","liftedActions$","unwrapAction","concatMap","UPDATE","actionsUntilStop$","liftedUntilStop$","extensionOptions","INIT_ACTION","INIT","RECOMPUTE","RECOMPUTE_ACTION","computeNextEntry","nextError","recomputeStates","minInvalidatedStateIndex","committedState","skippedActionIds","nextComputedStates","lastIncludedActionId","previousEntry","previousState","previousError","liftInitialState","initialCommittedState","monitorReducer","monitorState","liftReducerWith","initialLiftedState","commitExcessActions","excess","idsToDelete","commitChanges","Infinity","actionIds","lastState","cmp","StoreDevtools","reducers$","extension","scannedActions","liftedInitialState","liftReducer","liftedAction$","observeOn","queueScheduler","liftedReducer$","liftedStateSubject","liftedStateSubscription","scan","reducedLiftedState","extensionStartSubscription","liftedState$","state$","stateSubscription","performAction","rollback","commit","sweep","toggleAction","jumpToAction","jumpToState","importState","lockChanges","pauseRecording","INITIAL_STATE","IS_EXTENSION_OR_MONITOR_PRESENT","createIsExtensionOrMonitorPresent","createReduxDevtoolsExtension","extensionKey","provideStoreDevtools","ɵproviders","StateObservable","createStateObservable","ReducerManagerDispatcher","devtools","NEW_CONFIG","INITIAL_CONFIG","initialConfig","suffix","thousandSeparator","decimalMarker","clearIfNotMatch","showTemplate","showMaskTyped","placeHolderCharacter","dropSpecialCharacters","hiddenInput","shownMaskExpression","separatorLimit","allowNegativeNumbers","validation","specialCharacters","leadZeroDateTime","triggerOnMaskChange","maskFilled","patterns","pattern","X","U","L","M","H","timeMasks","withoutValidation","MaskApplierService","maskExpression","actualValue","_formatWithSeparators","thousandSeparatorChar","decimalChars","decimalChar","regExp","_str$match","decimals","rgx","percentage","getPrecision","checkAndRemoveSuffix","inputValue","_this$suffix2","_this$suffix4","checkInputPrecision","dm","precisionRegEx","_charToRegExpExpression","precisionMatchLength","_precisionMatch$","_compareOrIncludes","_shift","maskSpecialCharacters","maskAvailablePatterns","applyMaskWithPattern","maskAndPattern","customPattern","applyMask","justPasted","backspaced","cursor","backspaceShift","stepBack","_inputValue","inputArray","valuesIP","ipError","_validIP","_inputValue$i2","_inputValue$i","cpfCnpjError","_stripToDecimal","thousandSeparatorCharEscaped","invalidChars","invalidCharRegexp","strForSep","commaShift","shiftStep","inputSymbol","_checkSymbolMask","_shiftStep","daysCount","withoutDays","monthsCount","day1monthInput","day2monthInput","day1monthPaste","day2monthPaste","_this$maskAvailablePa","_findSpecialChar","actualShift","onlySpecial","char","maskSymbol","_this$maskAvailablePa3","isDecimalMarker","inputLength","comparedValue","excludedValue","MaskService","isNumberValue","maskIsShown","selStart","selEnd","writingValue","maskChanged","showMaskInInput","formControlResult","getSymbol","newInputValue","actualResult","removeMask","shiftTypedSymbols","getActualValue","hideInput","resLen","prefNmask","countSkipedSymbol","_numberSkipedSymbols","regex","exec","applyValueChanges","formElement","_getActiveElement","clearIfNotMatchFn","curr","_this$maskAvailablePa5","_this$maskAvailablePa4","compare","maskChar","symbolToReplace","currSymbol","replaceSymbol","numberToString","toLocaleString","useGrouping","maximumFractionDigits","inputVal","_checkForIp","_checkForCpfCnpj","formElementProperty","checkSpecialCharAmount","_removeMask","_removeSuffix","_removePrefix","cpf","cnpj","shadowRootEl","_document$activeEleme","_toNumber","_checkSymbols","specialCharactersForRemove","_regExpForRemove","_retrieveSeparatorValue","_replaceDecimalMarkerToDot","separatorPrecision","_retrieveSeparatorPrecision","separatorValue","_checkPrecision","maskExpretion","matcher","separatorExpression","MaskDirective","_maskService","_maskValue","_maskExpressionArray","_justPasted","onTouch","_setMask","_applyMask","validate","_createValidationError","_validateTime","counterOfOpt","_this$_maskService$ma","onPaste","onModelChange","caretShift","_code","_backspaceShift","positionToApply","_getActualInputLength","checkSelectionOnDeletion","cursorStart","readOnly","metaKey","_document$activeEleme2","_repeatPatternSymbols","maskExp","accum","currVal","_start","_end","repeatNumber","replaceWith","rowMaskLen","requiredMask","_this$_maskService$re2","NG_VALIDATORS","_configFactory","initConfig","configValue","commonjsGlobal","KeyboardEvent","_eventType","asyncGeneratorStep","_next"],"sourceRoot":"webpack:///","sources":["./src/app/components/abstract/custom-control.abstract.ts","./src/app/modules/main-application/administration/functions/get-general-roles-radio-list.function.ts","./src/app/modules/main-application/administration/abstract/administration-abstract.ts","./src/app/modules/main-application/administration/actions/administration.actions.ts","./src/app/modules/main-application/administration/constants/vendor-role-name.constant.ts","./src/app/modules/main-application/administration/reducers/administration.reducer.ts","./src/app/modules/main-application/administration/selectors/administration.selectors.ts","./src/app/modules/main-application/boards/interfaces/custom-inspection.ts","./src/app/modules/main-application/boards/services/board.service.ts","./src/app/modules/main-application/boards/services/custom-inpection.service.ts","./src/app/modules/main-application/boards/store/boards.actions.ts","./src/app/modules/main-application/dashboard-roles/components/abstract/dashboards.abstract.ts","./src/app/modules/main-application/dashboard-roles/models/portfolio-kpi.ts","./src/app/modules/main-application/dashboard-roles/store/actions/dashboard-filter.actions.ts","./src/app/modules/main-application/dashboard-roles/store/actions/dashboard.actions.ts","./src/app/modules/main-application/dashboard-roles/store/actions/kpi.actions.ts","./src/app/services/timer.service.ts","./src/app/modules/main-application/dashboard-roles/store/effects/dashboard.effects.ts","./src/app/modules/main-application/dashboard-roles/store/index.ts","./src/app/modules/main-application/dashboard-roles/store/reducers/dashboard-filter.reducer.ts","./src/app/modules/main-application/dashboard-roles/store/reducers/dashboards.reducer.ts","./src/app/modules/main-application/dashboard-roles/store/reducers/kpi.reducer.ts","./src/app/modules/main-application/dashboard-roles/store/selectors/dashboards.selectors.ts","./src/app/modules/main-application/inspections/pages/space-template/store/space-template.effects.ts","./src/app/modules/main-application/inspections/pages/space-template/store/space-template-store.module.ts","./src/app/modules/main-application/inspections/pages/space-template/store/space-template.actions.ts","./src/app/modules/main-application/inspections/pages/space-template/store/space-template.reducer.ts","./src/app/modules/main-application/inspections/pages/template/models/template-views.ts","./src/app/modules/main-application/inspections/pages/template/store/template.effects.ts","./src/app/modules/main-application/inspections/pages/template/store/template-store.module.ts","./src/app/modules/main-application/inspections/pages/template/store/template.actions.ts","./src/app/modules/main-application/inspections/pages/template/store/template.reducer.ts","./src/app/modules/main-application/inspections/components/send-inspection/send-inspection.component.ts","./src/app/modules/main-application/inspections/components/send-inspection/send-inspection.component.html","./src/app/modules/main-application/inspections/services/inspection.service.ts","./src/app/modules/main-application/dashboard-roles/store/effects/kpi.effects.ts","./src/app/modules/main-application/administration/components/delete-role-summary-dialog/delete-role-summary-dialog.component.html","./src/app/modules/main-application/administration/components/delete-role-summary-dialog/delete-role-summary-dialog.component.ts","./src/app/modules/shared/enums/user-roles.ts","./src/app/modules/main-application/administration/functions/combineUsersWithRoles.ts","./src/app/modules/main-application/administration/effects/administration.effects.ts","./src/app/modules/main-application/management/components/system-configuration/store/system-configuration.effects.ts","./src/app/services/bids.service.ts","./src/app/modules/main-application/turnovers/effects/bulk-bids.effects.ts","./src/app/services/punch.service.ts","./src/app/modules/main-application/turnovers/effects/punch.effects.ts","./src/app/services/turnover-bids.service.ts","./src/app/modules/main-application/turnovers/effects/turnover-bids.effects.ts","./src/app/modules/shared/functions/update-workflow-step-responsible-party-model.function.ts","./src/app/services/appliances.service.ts","./src/app/modules/main-application/turnovers/effects/turnovers.effects.ts","./src/app/modules/main-application/turnovers/reducers/bulk-bids.reducer.ts","./src/app/modules/main-application/dashboard-roles/store/shared-store.module.ts","./src/app/modules/shared/singleton-service.module.ts","./src/app/modules/main-application/notifications/services/notifications.service.ts","./src/app/modules/main-application/main-application.component.ts","./src/app/modules/shared/functions/get-dashboard-mode.function.ts","./src/app/modules/main-application/main-application.component.html","./src/app/modules/main-application/main-application.routing.module.ts","./src/app/modules/main-application/main-application.module.ts","./src/app/modules/main-application/management/components/companies/config/enums/company-form.ts","./src/app/modules/main-application/management/components/companies/abstract/companies-abstract.ts","./src/app/modules/main-application/management/components/companies/components/add-new-company-modal/add-new-company-modal.component.ts","./src/app/modules/main-application/management/components/companies/components/add-new-company-modal/add-new-company-modal.component.html","./src/app/services/contractors.service.ts","./src/app/modules/main-application/management/components/companies/store/companies.effects.ts","./src/app/modules/main-application/management/components/companies/store/companies-store.module.ts","./src/app/modules/main-application/management/components/companies/store/companies.actions.ts","./src/app/modules/main-application/management/components/companies/store/companies.reducer.ts","./src/app/modules/main-application/management/components/companies/store/companies.selectors.ts","./src/app/modules/main-application/management/components/portfolio/store/portfolio.effects.ts","./src/app/modules/main-application/management/components/portfolio/store/portfolio-store.module.ts","./src/app/modules/main-application/management/components/portfolio/store/portfolio.actions.ts","./src/app/modules/main-application/management/components/portfolio/store/portfolio.reducer.ts","./src/app/modules/main-application/management/components/portfolio/store/portfolio.selectors.ts","./src/app/modules/main-application/management/components/system-configuration/store/system-configuration.actions.ts","./src/app/modules/main-application/management/components/system-configuration/store/system-configuration.reducer.ts","./src/app/modules/main-application/management/components/turnover-configuration/actions/turnover-configuration.actions.ts","./src/app/modules/main-application/management/components/turnover-configuration/components/turnover-configuration-step-assignees/services/turnover-configuration-step-assignees.service.ts","./src/app/modules/main-application/management/components/turnover-configuration/reducers/index.ts","./src/app/modules/main-application/management/components/turnover-configuration/selectors/turnover-configuration.selectors.ts","./src/app/modules/main-application/management/components/turnover-configuration/effects/turnover-configuration.effects.ts","./src/app/modules/main-application/management/components/turnover-configuration/store/turnover-configuration-store.module.ts","./src/app/modules/main-application/notifications/actions/notifications.actions.ts","./src/app/services/notification-rest.service.ts","./src/app/modules/main-application/notifications/effects/notifications.effects.ts","./src/app/modules/main-application/notifications/notifications.module.ts","./src/app/modules/main-application/notifications/reducers/notifications.reducer.ts","./src/app/modules/main-application/notifications/selectors/notifications.selectors.ts","./src/app/modules/main-application/survey-creator/actions/surveys.actions.ts","./src/app/modules/main-application/survey-creator/effects/surveys.effects.ts","./src/app/modules/main-application/survey-creator/reducers/surveys.reducer.ts","./src/app/modules/main-application/turnovers/actions/bulk-and-scope.actions.ts","./src/app/modules/main-application/turnovers/actions/punch.actions.ts","./src/app/modules/main-application/turnovers/actions/turnover-bids.actions.ts","./src/app/modules/main-application/turnovers/actions/turnovers.actions.ts","./src/app/modules/main-application/turnovers/components/sections/turnover-date-range/turnover-date-range.module.ts","./src/app/modules/main-application/turnovers/interfaces/vacancy-loss-attr.ts","./src/app/modules/main-application/turnovers/interfaces/vacancy-loss-threshold.ts","./src/app/modules/main-application/turnovers/reducers/punch.reducer.ts","./src/app/modules/main-application/turnovers/reducers/turnover-bids.reducer.ts","./src/app/modules/main-application/turnovers/reducers/turnovers.reducer.ts","./src/app/modules/main-application/turnovers/selectors/punch.selectors.ts","./src/app/modules/main-application/turnovers/selectors/turnover-bids.selectors.ts","./src/app/modules/main-application/turnovers/selectors/turnovers.selectors.ts","./src/app/modules/shared/actions/enumerations.actions.ts","./src/app/modules/shared/actions/file-upload.actions.ts","./src/app/modules/shared/actions/route-state.action.ts","./src/app/modules/shared/actions/user.actions.ts","./src/app/modules/shared/actions/window-resize.actions.ts","./src/app/modules/shared/directives/content-editable.directive.ts","./src/app/modules/ui-components/components/custom-tooltip/custom-tooltip.component.html","./src/app/modules/ui-components/components/custom-tooltip/custom-tooltip.component.ts","./src/app/modules/shared/directives/custom-tooltip.directive.ts","./src/app/modules/ui-components/components/custom-tooltip/custom-tooltip.module.ts","./src/app/modules/shared/directives/directives.module.ts","./src/app/modules/shared/directives/drop-zone.directive.ts","./src/app/modules/shared/directives/have-permission.directive.ts","./src/app/modules/shared/directives/last-element.directive.ts","./src/app/modules/shared/directives/sort-header.directive.ts","./src/app/modules/shared/enums/attachment-type.ts","./src/app/modules/shared/enums/dashboard-mode.ts","./src/app/modules/shared/enums/enumeration-item-fields.ts","./src/app/modules/shared/enums/kpi-type.ts","./src/app/modules/shared/enums/kpi-window-type.ts","./src/app/modules/shared/enums/ticket-type.ts","./src/app/modules/shared/functions/check-permission-level.function.ts","./src/app/modules/shared/functions/get-bid-categories-radio-list.function.ts","./src/app/modules/shared/functions/get-company-radio-list.function.ts","./src/app/modules/shared/functions/get-date-object.function.ts","./src/app/modules/shared/functions/get-enumeration-radio-list.function.ts","./src/app/modules/shared/functions/get-portfolio-properties.function.ts","./src/app/modules/shared/functions/get-user-list.function.ts","./src/app/modules/shared/guards/auth.guard.ts","./src/app/modules/shared/guards/resident.guard.ts","./src/app/modules/shared/interfaces/turnover.interface.ts","./src/app/modules/shared/reducers/file-upload.reducer.ts","./src/app/modules/shared/reducers/hydration-meta.reducer.ts","./src/app/modules/shared/reducers/enumeration.reducer.ts","./src/app/modules/shared/reducers/user.reducer.ts","./src/app/modules/shared/reducers/index.ts","./src/app/modules/shared/reducers/route.reducer.ts","./src/app/modules/shared/reducers/window-resize.reducer.ts","./src/app/modules/shared/selectors/core.selector.ts","./src/app/modules/shared/selectors/enumeration.selectors.ts","./src/app/modules/shared/selectors/user.selectors.ts","./src/app/modules/shared/effects/window-resize.effects.ts","./src/app/modules/shared/effects/enumeration.effects.ts","./src/app/modules/shared/effects/file-upload.effects.ts","./src/app/services/tenant.service.ts","./src/app/modules/shared/effects/user.effects.ts","./src/app/modules/shared/shared.module.ts","./src/app/modules/ui-components/components/attachment-item/attachment-item.component.html","./src/app/modules/ui-components/components/attachment-item/attachment-item.component.ts","./src/app/modules/shared/functions/copy-to-clipboard.function.ts","./src/app/modules/ui-components/components/attachment-item/attachment-item.module.ts","./src/app/modules/ui-components/components/input-file/input-file.component.html","./src/app/modules/ui-components/components/input-file/input-file.component.ts","./src/app/modules/shared/functions/check-supported-format.function.ts","./src/app/modules/ui-components/components/attachment/attachment.component.html","./src/app/modules/ui-components/components/attachment/attachment.component.ts","./src/app/modules/ui-components/components/attachment/attachment.module.ts","./src/app/modules/ui-components/components/attachments-list/attachments-list.component.html","./src/app/modules/ui-components/components/attachments-list/attachments-list.component.ts","./src/app/modules/ui-components/components/attachments-list/attachments-list.module.ts","./src/app/modules/ui-components/components/button/button.component.html","./src/app/modules/ui-components/components/button/button.component.ts","./src/app/modules/ui-components/components/button/button.module.ts","./src/app/modules/ui-components/components/calendar-header/calendar-header.component.ts","./src/app/modules/ui-components/components/calendar-header/calendar-header.component.html","./src/app/modules/ui-components/components/date-dropdown/date-dropdown.component.html","./src/app/modules/ui-components/components/date-dropdown/date-dropdown.component.ts","./src/app/modules/ui-components/components/date-dropdown/date-dropdown.module.ts","./src/app/modules/ui-components/components/divider/divider.component.html","./src/app/modules/ui-components/components/divider/divider.component.ts","./src/app/modules/ui-components/components/divider/divider.module.ts","./src/app/modules/ui-components/directives/autoresize/autoresize.directive.ts","./src/app/modules/ui-components/components/input-area/input-area.component.html","./src/app/modules/ui-components/components/input-area/input-area.component.ts","./src/app/modules/ui-components/components/input-area/input-area.module.ts","./src/app/modules/ui-components/components/input-error/input-error.component.html","./src/app/modules/ui-components/components/input-error/input-error.component.ts","./src/app/modules/ui-components/components/input-error/input-error.module.ts","./src/app/modules/ui-components/components/input-error/services/input-error.service.ts","./src/app/modules/ui-components/components/input-file/input-file.module.ts","./src/app/modules/ui-components/components/input-type-file/input-type-file.module.ts","./src/app/modules/ui-components/components/input/input.component.html","./src/app/modules/ui-components/components/input/input.component.ts","./src/app/modules/ui-components/components/input/input.module.ts","./src/app/modules/ui-components/components/picture/picture.module.ts","./src/app/modules/ui-components/components/radio-button-dropdown/radio-button-dropdown.component.html","./src/app/modules/ui-components/components/radio-button-dropdown/radio-button-dropdown.component.ts","./src/app/modules/ui-components/components/radio-button-dropdown/radio-button-dropdown.module.ts","./src/app/modules/ui-components/components/radio-button/radio-button.component.html","./src/app/modules/ui-components/components/radio-button/radio-button.component.ts","./src/app/modules/shared/functions/get-active-validation-error.function.ts","./src/app/modules/ui-components/components/radio-button/radio-button.module.ts","./src/app/modules/ui-components/components/read-only-field/read-only-field.component.html","./src/app/modules/ui-components/components/read-only-field/read-only-field.component.ts","./src/app/modules/ui-components/components/read-only-field/read-only-field.module.ts","./src/app/modules/ui-components/components/select-tree/select-tree.module.ts","./src/app/modules/ui-components/components/slide-toggle/slide-toggle.component.ts","./src/app/modules/ui-components/components/slide-toggle/slide-toggle.component.html","./src/app/modules/ui-components/components/table-empty-content/table-empty-content.module.ts","./src/app/modules/ui-components/components/table-status-toggle/table-status-toggle.module.ts","./src/app/modules/ui-components/components/user-select-dropdown/user-select-dropdown.component.html","./src/app/modules/ui-components/components/user-select-dropdown/user-select-dropdown.component.ts","./src/app/modules/ui-components/components/user-select-dropdown/user-select-dropdown.module.ts","./src/app/modules/ui-components/directives/autoresize/autoresize.module.ts","./src/app/modules/ui-components/modals/config/default-modal-config.constant.ts","./src/app/modules/ui-components/modals/config/dialog-result.enum.ts","./src/app/modules/ui-components/modals/add-vendor-user-modal/add-vendor-user-modal.module.ts","./src/app/modules/ui-components/modals/gallery-modal/gallery-modal.module.ts","./src/app/modules/ui-components/modals/info-modal/info-modal.module.ts","./src/app/modules/ui-components/modals/new-bulk-scope/new-bulk-scope.module.ts","./src/app/modules/ui-components/modals/next-step-assignee-modal/next-step-assignee-modal.module.ts","./src/app/modules/ui-components/modals/prompt-modal/prompt-modal.module.ts","./src/app/modules/ui-components/modals/ticket-preview-modal/ticket-preview-modal.module.ts","./src/app/modules/ui-components/modals/user-preview-modal/user-preview-modal.module.ts","./src/app/modules/ui-components/modals/add-vendor-modal/add-vendor-modal.module.ts","./src/app/modules/ui-components/modals/comment-too-long-modal/comment-too-long-modal.module.ts","./src/app/modules/ui-components/modals/confirmation-modal/confirmation-modal.module.ts","./src/app/modules/ui-components/modals/space-template-modal/space-template-modal.module.ts","./src/app/modules/ui-components/modals/turnover-punch-modal/turnover-punch-modal.module.ts","./src/app/modules/ui-components/modals/modals.module.ts","./src/app/modules/main-application/boards/boards-view/boards-cell/cell-types/schedule-cell/custom-inspection-save-template-dialog/custom-inspection-save-template-dialog.component.html","./src/app/modules/main-application/boards/boards-view/boards-cell/cell-types/schedule-cell/custom-inspection-save-template-dialog/custom-inspection-save-template-dialog.component.ts","./src/app/modules/ui-components/modals/add-bid-modal/add-bid-modal.component.html","./src/app/modules/ui-components/modals/add-bid-modal/add-bid-modal.component.ts","./src/app/modules/main-application/administration/functions/combineUserWithProperties.ts","./src/app/modules/main-application/administration/functions/propertyStructureToTree.ts","./src/app/modules/main-application/administration/users/config/enums/user-preview.ts","./src/app/modules/shared/validators/user-exists.validator.ts","./src/app/modules/shared/validators/user-inactive.validator.ts","./src/app/modules/shared/enums/property-type.enum.ts","./src/app/modules/ui-components/components/select-tree/functions/tree-utils.ts","./src/app/modules/ui-components/components/select-tree/select-tree.component.html","./src/app/modules/ui-components/components/select-tree/select-tree.component.ts","./src/app/modules/ui-components/modals/add-vendor-user-modal/add-vendor-user-modal.component.html","./src/app/modules/ui-components/modals/add-vendor-user-modal/add-vendor-user-modal.component.ts","./src/app/modules/ui-components/modals/gallery-modal/gallery-modal.component.html","./src/app/modules/ui-components/modals/gallery-modal/gallery-modal.component.ts","./src/app/modules/ui-components/modals/info-modal/info-modal.component.html","./src/app/modules/ui-components/modals/info-modal/info-modal.component.ts","./src/app/modules/ui-components/modals/next-step-assignee-modal/next-step-assignee-modal.component.html","./src/app/modules/ui-components/modals/next-step-assignee-modal/next-step-assignee-modal.component.ts","./src/app/modules/ui-components/modals/prompt-modal/prompt-modal.component.ts","./src/app/modules/ui-components/modals/prompt-modal/prompt-modal.component.html","./src/app/modules/shared/functions/ticket-attachment.utils.ts","./src/app/modules/shared/selectors/file-upload.selectors.ts","./src/app/modules/ui-components/modals/ticket-preview-modal/ticket-preview-modal.component.html","./src/app/modules/ui-components/modals/ticket-preview-modal/ticket-preview-modal.component.ts","./src/app/modules/ui-components/modals/user-preview-modal/user-preview-modal.component.html","./src/app/modules/ui-components/modals/user-preview-modal/user-preview-modal.component.ts","./src/app/modules/main-application/administration/functions/userToPropertyMappingHandlers.ts","./src/app/modules/ui-components/modals/add-vendor-modal/add-vendor-modal.component.html","./src/app/modules/ui-components/modals/add-vendor-modal/add-vendor-modal.component.ts","./src/app/modules/ui-components/modals/comment-too-long-modal/comment-too-long-modal.component.ts","./src/app/modules/ui-components/modals/comment-too-long-modal/comment-too-long-modal.component.html","./src/app/modules/ui-components/modals/confirmation-modal/confirmation-modal.component.html","./src/app/modules/ui-components/modals/confirmation-modal/confirmation-modal.component.ts","./src/app/modules/shared/enums/turnover-punch-fields.enum.ts","./src/app/modules/ui-components/modals/turnover-punch-modal/turnover-punch-modal.component.html","./src/app/modules/ui-components/modals/turnover-punch-modal/turnover-punch-modal.component.ts","./src/app/modules/ui-components/modals/modals.service.ts","./src/app/modules/ui-components/modals/new-turnover-modal/new-turnover-modal.component.html","./src/app/modules/ui-components/modals/new-turnover-modal/new-turnover-modal.component.ts","./src/app/modules/ui-components/modals/new-turnover-modal/new-turnover-modal.module.ts","./src/app/modules/shared/constants/email.regexp.const.ts","./src/app/modules/ui-components/validators/email.validator.ts","./src/app/services/admin-panel.service.ts","./src/app/services/cache.service.ts","./src/app/services/companies.service.ts","./src/app/services/file-uploads.service.ts","./src/app/services/kpi.service.ts","./src/app/services/oidc-storage.service.ts","./src/app/services/properties.service.ts","./src/app/services/renewals.service.ts","./src/app/services/screen-wiper.service.ts","./src/app/services/surveys.service.ts","./src/app/services/system-config.service.ts","./src/app/services/tickets.service.ts","./src/app/services/turnover-config.service.ts","./src/app/services/turnovers.service.ts","./src/app/services/unit-non-pms.service.ts","./src/app/services/units.service.ts","./src/app/services/user.service.ts","./src/app/services/workflow-actions.service.ts","./src/app/services/workflow-step-comments.service.ts","./node_modules/mobx/lib/mobx.module.js","./node_modules/@circlon/angular-tree-component/__ivy_ngcc__/fesm2015/circlon-angular-tree-component.js","./node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js","./node_modules/@microsoft/signalr/dist/esm/Errors.js","./node_modules/@microsoft/signalr/dist/esm/HttpClient.js","./node_modules/@microsoft/signalr/dist/esm/Loggers.js","./node_modules/@microsoft/signalr/dist/esm/Utils.js","./node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js","./node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js","./node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js","./node_modules/@microsoft/signalr/dist/esm/HeaderNames.js","./node_modules/@microsoft/signalr/dist/esm/AbortController.js","./node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js","./node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js","./node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js","./node_modules/@microsoft/signalr/dist/esm/HttpConnection.js","./node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","./node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js","./node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","./node_modules/@microsoft/signalr/dist/esm/Subject.js","./node_modules/@microsoft/signalr/dist/esm/HubConnection.js","./node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js","./node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","./node_modules/@microsoft/signalr/dist/esm/ILogger.js","./node_modules/@microsoft/signalr/dist/esm/ITransport.js","./node_modules/lottie-web/build/player/lottie.js","./node_modules/rxjs/dist/esm/internal/firstValueFrom.js","./node_modules/rxjs/dist/esm/internal/observable/iif.js","./node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","./node_modules/rxjs/dist/esm/internal/operators/delay.js","./node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js","./node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","./node_modules/rxjs/dist/esm/internal/operators/pairwise.js","./node_modules/rxjs/dist/esm/internal/util/isObservable.js","./node_modules/viewerjs/dist/viewer.js","./node_modules/@angular/cdk/fesm2020/collections.mjs","./node_modules/@angular/cdk/fesm2020/table.mjs","./node_modules/@angular/material/fesm2020/checkbox.mjs","./node_modules/@angular/material/fesm2020/datepicker.mjs","./node_modules/@angular/cdk/fesm2020/dialog.mjs","./node_modules/@angular/material/fesm2020/dialog.mjs","./node_modules/@angular/material/fesm2020/divider.mjs","./node_modules/@angular/material/fesm2020/form-field.mjs","./node_modules/@angular/cdk/fesm2020/text-field.mjs","./node_modules/@angular/material/fesm2020/input.mjs","./node_modules/@angular/material/fesm2020/menu.mjs","./node_modules/@angular/material/fesm2020/radio.mjs","./node_modules/@angular/material/fesm2020/slide-toggle.mjs","./node_modules/@angular/material/fesm2020/sort.mjs","./node_modules/@angular/material/fesm2020/table.mjs","./node_modules/@angular/material/fesm2020/tooltip.mjs","./node_modules/@ng-select/ng-select/fesm2020/ng-select-ng-select.mjs","./node_modules/rxjs/dist/esm/internal/Notification.js","./node_modules/rxjs/dist/esm/internal/operators/groupBy.js","./node_modules/@ngrx/effects/fesm2020/ngrx-effects.mjs","./node_modules/rxjs/dist/esm/internal/operators/materialize.js","./node_modules/rxjs/dist/esm/internal/operators/dematerialize.js","./node_modules/@ngrx/store-devtools/fesm2020/ngrx-store-devtools.mjs","./node_modules/ngx-mask/fesm2020/ngx-mask.mjs","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["import { ChangeDetectorRef, Directive, Optional } from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormControl,\n FormControlStatus,\n FormGroupDirective,\n NgControl,\n UntypedFormControl,\n Validators,\n} from '@angular/forms';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { Observable } from 'rxjs';\n\nimport { ComponentAbstract } from './component.abstract';\n\n@Directive()\nexport abstract class CustomControlAbstract extends ComponentAbstract implements ControlValueAccessor {\n control = new FormControl(null);\n labelRequired: boolean;\n\n protected constructor(\n protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() private formDirective: FormGroupDirective\n ) {\n super(cdr);\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n get showValidationErrorOrSubmitted() {\n return this.formDirective?.submitted || this.showValidationError;\n }\n\n abstract writeValue(obj: any): void;\n\n registerOnChange(fn: any): void {\n this.onChanged = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n protected onChanged: (value: any) => void = () => {};\n onTouched: () => void = () => {};\n\n protected initControlBase() {\n if (this.ngControl?.control) {\n this.control = this.ngControl?.control as UntypedFormControl;\n\n if (typeof this.labelRequired === 'undefined') {\n this.labelRequired = this.control.hasValidator(Validators.required);\n }\n }\n\n this.control.statusChanges.pipe(untilDestroyed(this)).subscribe(status => this.checkControlStatus(status));\n\n this.listenControlTouched(this.control)\n .pipe(untilDestroyed(this))\n .subscribe(() => this.cdr.markForCheck());\n\n if (this.ngControl?.control) {\n if (this.ngControl.control.errors) {\n this.errors = { ...this.ngControl.control.errors };\n }\n this.checkStatus();\n }\n }\n\n protected checkStatus() {\n if (this.ngControl?.control) {\n this.invalid = this.ngControl.control.invalid;\n\n if (this.control != this.ngControl.control) {\n //Remove this part than all controls will be done normal way\n if (this.ngControl.control.touched) {\n this.control.markAsTouched();\n } else {\n this.control.markAsUntouched();\n }\n if (this.ngControl.control.pristine) {\n this.control.markAsPristine();\n } else {\n this.control.markAsDirty();\n }\n }\n }\n }\n\n protected listenControlTouched(control: AbstractControl): Observable {\n return new Observable(observer => {\n const originalMarkAsTouched = control.markAsTouched;\n const originalReset = control.reset;\n\n control.reset = (...args) => {\n observer.next(false);\n originalReset.call(control, ...args);\n };\n\n control.markAsTouched = (...args) => {\n observer.next(true);\n originalMarkAsTouched.call(control, ...args);\n };\n\n observer.next(control.touched);\n\n return () => {\n control.markAsTouched = originalMarkAsTouched;\n control.reset = originalReset;\n };\n });\n }\n\n protected checkControlStatus(status: FormControlStatus) {\n this.checkStatus();\n if (status === 'VALID' || status === 'DISABLED') {\n this.errors = null;\n this.cdr.markForCheck();\n } else if (status === 'INVALID') {\n this.errors = { ...this.ngControl?.control.errors };\n this.cdr.markForCheck();\n } else {\n this.errors = null;\n }\n }\n}\n","import { GeneralRole } from '@shared/interfaces/general-role';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\nexport function getGeneralRoleRadioList(generalRoles: GeneralRole[]): IRadioButtonOption[] {\n return generalRoles.map(item => {\n return {\n value: item.id,\n label: item.roleName,\n };\n });\n}\n","import { ChangeDetectorRef, Directive } from '@angular/core';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { setGeneralRoleRadioList } from '@main-application/administration/actions/administration.actions';\nimport {\n selectAllGeneralRoles,\n selectGeneralRoleRadioList,\n} from '@main-application/administration/selectors/administration.selectors';\nimport { GeneralRole } from '@shared/interfaces/general-role';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\nimport { getGeneralRoleRadioList } from '../functions/get-general-roles-radio-list.function';\n\n@Directive()\nexport abstract class AdministrationAbstract extends ComponentAbstract {\n isLoading = true;\n\n inProgress$: Observable;\n\n userRoles: IRadioButtonOption[] = [];\n\n userStates: IRadioButtonOption[] = [\n {\n value: true,\n label: 'Active',\n },\n {\n value: false,\n label: 'Inactive',\n },\n ];\n\n protected constructor(protected cdr: ChangeDetectorRef, protected store: Store<{}>) {\n super(cdr);\n }\n\n selectAllGeneralRoles(): Observable {\n return this.store.select(selectAllGeneralRoles).pipe(\n untilDestroyed(this),\n filter((generalRoles: GeneralRole[]) => !!generalRoles),\n tap((generalRoles: GeneralRole[]) => {\n this.store.dispatch(setGeneralRoleRadioList({ generalRoleRadioList: getGeneralRoleRadioList(generalRoles) }));\n })\n );\n }\n\n selectGeneralRoleRadioList(): Observable[]> {\n return this.store.select(selectGeneralRoleRadioList).pipe(\n untilDestroyed(this),\n filter((generalRoleRadioList: IRadioButtonOption[]) => !!generalRoleRadioList),\n tap((generalRoleRadioList: IRadioButtonOption[]) => {\n this.userRoles = generalRoleRadioList;\n this.cdr.detectChanges();\n })\n );\n }\n}\n","import { createAction, props } from '@ngrx/store';\n\nimport { GeneralRoleModel } from '@shared/enums/general-role-model';\nimport { GeneralRole } from '@shared/interfaces/general-role';\nimport { GeneralRoleToPermissionLevel } from '@shared/interfaces/general-role-to-permission-level';\nimport { PermissionLevel } from '@shared/interfaces/permission-level';\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { UserToGeneralRoleMapping } from '@shared/interfaces/user-to-general-role-mapping';\nimport { UserToGeneralRoleModel } from '@shared/interfaces/user-to-general-role-model';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { InviteRestUserModel, RestUserModel, UpdateRestUserModel } from '@shared/interfaces/user.interface';\n\nexport const loadAllUsers = createAction('[Administration] Load all users');\n\nexport const loadAllUsersSucceeded = createAction(\n '[Administration] Load all users succeeded',\n props<{ activeUsers: RestUserModel[]; inactiveUsers: RestUserModel[] }>()\n);\n\nexport const loadAllUsersFailed = createAction(\n '[Administration] Load all users failed',\n props<{ users: RestUserModel[] }>()\n);\n\nexport const loadPropertyUsers = createAction('[Administration] Load property users', props<{ propertyId: number }>());\n\nexport const loadPropertyUsersSucceeded = createAction(\n '[Administration] Load property users succeeded',\n props<{ activePropertyUsers: RestUserModel[]; inactivePropertyUsers: RestUserModel[] }>()\n);\nexport const loadPropertyUsersFailed = createAction('[Administration] Load property users failed');\n\nexport const clearAllUsers = createAction('[Administration] Clear all users');\n\nexport const loadAllPropertyRoles = createAction('[Administration] Load all properties roles');\n\nexport const clearAllPropertiesRoles = createAction('[Administration] Clear all properties roles');\n\nexport const loadAllPropertiesRolesSucceeded = createAction(\n '[Administration] Load all properties roles succeeded',\n props<{ result: any }>()\n);\n\nexport const loadAllUserToPropertyMappings = createAction('[Administration] Load all user to property mappings');\n\nexport const clearAllUserToPropertyMappings = createAction('[Administration] Clear all user to property mappings');\n\nexport const loadAllUserToProperyMappingsSucceeded = createAction(\n '[Administration] Load all user to property mappings succeeded',\n props<{ userToPropertyMapping: UserToPropertyMapping[] }>()\n);\n\nexport const loadAllPermissionLevels = createAction('[Administration] Load all permission levels');\n\nexport const loadAllPermissionLevelsSucceeded = createAction(\n '[Administration] Load all permission levels succeeded',\n props<{ result: PermissionLevel[] }>()\n);\n\nexport const loadAllGeneralRolesToPermissionMapping = createAction(\n '[Administration] Load all general roles to permission mapping'\n);\n\nexport const loadAllGeneralRolesToPermissionMappingSucceeded = createAction(\n '[Administration] Load all general roles to permission mapping succeeded',\n props<{ result: GeneralRoleToPermissionLevel[] }>()\n);\n\nexport const loadUserToRoleMapping = createAction('[Administration] Load user to role mapping');\n\nexport const loadUserToRoleMappingSucceeded = createAction(\n '[Administration] Load user to general role mapping succeeded',\n props<{ userToGeneralRole: UserToGeneralRoleMapping[] }>()\n);\n\nexport const clearUserToRoleMapping = createAction('[Administration] Clear user to role mapping');\n\nexport const setSelectedUsers = createAction(\n '[Administration] Set selected users',\n props<{ users: UserWithGeneralRole[] }>()\n);\n\nexport const loadAllGeneralRoles = createAction('[Administration] Load all general roles');\n\nexport const loadAllGeneralRolesSucceeded = createAction(\n '[Administration] Load all general roles succeeded',\n props<{ generalRoles: GeneralRole[] }>()\n);\n\nexport const clearAllGeneralRoles = createAction('[Administration] Clear all general roles');\n\nexport const setAllUsersCombinedWithGeneralRoles = createAction(\n '[Administration] Set all users combined with general roles',\n props<{ usersWithGeneralRoles: UserWithGeneralRole[] }>()\n);\n\nexport const loadPropertiesStructure = createAction('[Administration] Load properties structure');\n\nexport const clearPropertiesStructure = createAction('[Administration] Clear all properties structure');\n\nexport const loadPropertiesStructureSucceeded = createAction(\n '[Administration] Load properties structure succeeded',\n props<{ propertiesStructure: PropertyBasicInfo[] }>()\n);\n\nexport const startAddNewUser = createAction('[Administration] Start adding new user', props<{ user: RestUserModel }>());\n\nexport const addingNewUserSucceeded = createAction(\n '[Administration] Adding new user succeeded',\n props<{ user: RestUserModel }>()\n);\n\nexport const addingNewUserFailed = createAction('[Administration] Adding new user failed');\n\nexport const clearAddedUser = createAction('[Administration] clear Added User');\n\n/**\n * assign user into property\n */\nexport const assignUserToProperty = createAction(\n '[Administration] assign User to Property',\n props<{ userToPropertyRoleList: UserToPropertyMapping[] }>()\n);\nexport const assignUserToPropertySuccess = createAction('[Administration] assign User to Property Success');\nexport const assignUserToPropertyError = createAction('[Administration] assign User to Property Error');\n\n/**\n * removing property assigned user\n */\nexport const removingPropertyAssignedUser = createAction(\n '[Administration] removing property assigned user',\n props<{ deleteUserToPropertyMappings: number[] }>()\n);\nexport const removingPropertyAssignedUserSuccess = createAction(\n '[Administration] removing property assigned user success'\n);\nexport const removingPropertyAssignedUserError = createAction('[Administration] removing property assigned user error');\n\nexport const requestFailure = createAction('[Administration] Request failure', props());\n\nexport const saveUsersRolesAndUnits = createAction(\n '[Administration] Start saving users roles and units',\n props<{ userToGeneralRole: UserToGeneralRoleModel[]; userToPropertyRole: UserToPropertyMapping[] }>()\n);\n\nexport const saveUsersRolesAndUnitsSucceeded = createAction('[Administration] Saving users roles and units succeeded');\n\nexport const selectGeneralRoleToEdit = createAction(\n '[Administration] Select general role to edit',\n props<{ generalRole: GeneralRole }>()\n);\n\nexport const startDeleteGeneralRole = createAction('[Administration] Start delete general role', props());\n\nexport const deleteGeneralRoleSucceeded = createAction(\n '[Administration] Delete general role succeded',\n props()\n);\n\nexport const deleteGeneralRoleFailed = createAction('[Administration] Delete general role failed', props());\n\nexport const clearSelectedGeneralRole = createAction('[Administration] Clear selected general role');\n\nexport const startSavingGeneralRole = createAction(\n '[Administration] Start saving general role',\n props<{ generalRole: GeneralRoleModel }>()\n);\n\nexport const savingGeneralRoleSucceeded = createAction('[Administration] Saving general role succeded');\n\nexport const savingGeneralRoleFailed = createAction('[Administration] Saving general role failed');\n\nexport const startUpdatingGeneralRole = createAction(\n '[Administration] Start updating general role',\n props<{ generalRole: GeneralRoleModel }>()\n);\n\nexport const updatingGeneralRoleSucceeded = createAction('[Administration] Updating general role succeded');\n\nexport const updatingGeneralRoleFailed = createAction('[Administration] Updating general role failed');\n\nexport const setGeneralRoleRadioList = createAction(\n '[Administration] set General Role Radio List',\n props<{ generalRoleRadioList: IRadioButtonOption[] }>()\n);\n\n/**\n * invite new user\n */\nexport const inviteNewUser = createAction(\n '[Administration] invite new user',\n props<{\n user: InviteRestUserModel;\n roleId: number;\n selectedProperty: number[];\n }>()\n);\nexport const inviteNewUserSuccess = createAction(\n '[Administration] invite new user success',\n props<{ user: RestUserModel }>()\n);\nexport const inviteNewUserError = createAction('[Administration] invite new user error');\n\n/**\n * Update user data\n */\nexport const updateUserData = createAction(\n '[Administration] update User Data',\n props<{\n user: UpdateRestUserModel;\n roleId: number;\n userToPropertyRoleList: UserToPropertyMapping[];\n deleteUserToPropertyMappings: number[];\n }>()\n);\nexport const updateUserDataSuccess = createAction('[Administration] update User Data success');\nexport const updateUserDataError = createAction('[Administration] update User Data error');\n\n/**\n * save User To General Role\n */\nexport const saveUserToGeneralRole = createAction(\n '[Administration] save User To General Role',\n props<{ usersToGeneralRoleList: UserToGeneralRoleModel[] }>()\n);\nexport const saveUserToGeneralRoleSuccess = createAction('[Administration] save User To General Role success');\nexport const saveUserToGeneralRoleError = createAction('[Administration] save User To General Role error');\n\nexport const clearUserPreviewData = createAction('[Administration] clear User Preview Data');\n\nexport const removeUser = createAction('[Administration] remove user', props<{ user: UserWithGeneralRole }>());\nexport const reactivateUser = createAction('[Administration] reactivate user', props<{ user: UserWithGeneralRole }>());\nexport const removeUserSucceeded = createAction('[Administration] remove user succeeded');\nexport const reactivateUserSucceeded = createAction('[Administration] reactivate user succeeded');\nexport const removeUserFailed = createAction('[Administration] remove user failed');\n","export const VENDOR_ROLE_NAME = 'Vendor';\n","import { createReducer, on } from '@ngrx/store';\n\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { getUserOrVendorList } from '@shared/functions/get-user-list.function';\nimport { GeneralRole } from '@shared/interfaces/general-role';\nimport { GeneralRoleToPermissionLevel } from '@shared/interfaces/general-role-to-permission-level';\nimport { PermissionLevel } from '@shared/interfaces/permission-level';\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { UserToGeneralRoleMapping } from '@shared/interfaces/user-to-general-role-mapping';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\nimport * as AdministrationActions from '../actions/administration.actions';\n\nexport const administrationFeatureKey = 'administration';\n\nexport interface State {\n activeUsers: RestUserModel[];\n activeUserOrVendorOptionsList: IRadioButtonOption[];\n inactiveUsers: RestUserModel[];\n usersLoading: boolean;\n activePropertyUsers: RestUserModel[];\n propertyUsersLoading: boolean;\n permissionLevels: PermissionLevel[];\n generalRolesToPermissionMapping: GeneralRoleToPermissionLevel[];\n propertiesRoles: any;\n userToGeneralRole: UserToGeneralRoleMapping[];\n selectedUsers: UserWithGeneralRole[];\n generalRoles: GeneralRole[];\n usersWithGeneralRoles: UserWithGeneralRole[];\n usersWithGeneralRolesLoading: boolean;\n propertiesStructure: PropertyBasicInfo[];\n\n addNewUserInProgress: boolean;\n addedUser: RestUserModel;\n deleteGeneralRoleInProgress: boolean;\n selectedGeneralRole: GeneralRole;\n saveGeneralRoleInProgress: boolean;\n userToPropertyMapping: UserToPropertyMapping[];\n generalRoleRadioList: IRadioButtonOption[];\n\n userUpdateInProgress: boolean;\n userUpdateStatus: UpdateStatus;\n\n userInviteInProgress: boolean;\n userInviteStatus: UpdateStatus;\n userInvited: RestUserModel | null;\n\n saveUserToGeneralRoleInProgress: boolean;\n saveUserToGeneralRoleStatus: UpdateStatus;\n\n assignUserIntoPropertyInProgress: boolean;\n assignUserIntoPropertyStatus: UpdateStatus;\n\n removingPropertyAssignedUserInProgress: boolean;\n removingPropertyAssignedUserStatus: UpdateStatus;\n removeUserInProgress: boolean;\n}\n\nexport const initialState: State = {\n addNewUserInProgress: false,\n addedUser: null,\n deleteGeneralRoleInProgress: false,\n generalRoles: [],\n generalRolesToPermissionMapping: [],\n permissionLevels: [],\n propertiesRoles: null,\n propertiesStructure: [],\n activePropertyUsers: [],\n propertyUsersLoading: false,\n saveGeneralRoleInProgress: false,\n\n selectedGeneralRole: null,\n selectedUsers: [],\n userToGeneralRole: [],\n userToPropertyMapping: [],\n activeUsers: [],\n activeUserOrVendorOptionsList: [],\n inactiveUsers: [],\n usersLoading: false,\n usersWithGeneralRoles: [],\n usersWithGeneralRolesLoading: false,\n\n generalRoleRadioList: [],\n\n userUpdateInProgress: false,\n userUpdateStatus: null,\n\n userInviteInProgress: false,\n userInviteStatus: null,\n userInvited: null,\n\n saveUserToGeneralRoleInProgress: false,\n saveUserToGeneralRoleStatus: null,\n\n assignUserIntoPropertyInProgress: false,\n assignUserIntoPropertyStatus: null,\n\n removingPropertyAssignedUserInProgress: false,\n removingPropertyAssignedUserStatus: null,\n removeUserInProgress: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n\n on(AdministrationActions.loadAllUsers, (state, action) => ({\n ...state,\n usersLoading: true,\n usersWithGeneralRolesLoading: true,\n })),\n on(AdministrationActions.loadAllUsersSucceeded, (state, action) => ({\n ...state,\n activeUsers: action.activeUsers,\n activeUserOrVendorOptionsList: getUserOrVendorList(action.activeUsers),\n inactiveUsers: action.inactiveUsers,\n usersLoading: false,\n })),\n on(AdministrationActions.loadAllUsersFailed, (state, action) => ({ ...state, users: [], usersLoading: false })),\n on(AdministrationActions.clearAllUsers, (state, action) => ({ ...state, users: null })),\n\n on(AdministrationActions.loadPropertyUsers, (state, action) => ({ ...state, propertyUsersLoading: true })),\n on(AdministrationActions.loadPropertyUsersSucceeded, (state, action) => ({\n ...state,\n activePropertyUsers: action.activePropertyUsers,\n propertyUsersLoading: false,\n })),\n on(AdministrationActions.loadPropertyUsersFailed, (state, action) => ({\n ...state,\n activePropertyUsers: [],\n propertyUsersLoading: false,\n })),\n\n on(AdministrationActions.loadAllPermissionLevelsSucceeded, (state, action) => ({\n ...state,\n permissionLevels: action.result,\n })),\n on(AdministrationActions.loadAllGeneralRolesToPermissionMappingSucceeded, (state, action) => ({\n ...state,\n generalRolesToPermissionMapping: action.result,\n })),\n on(AdministrationActions.loadAllPropertiesRolesSucceeded, (state, action) => ({\n ...state,\n propertiesRoles: action.result,\n })),\n on(AdministrationActions.clearAllPropertiesRoles, (state, action) => ({ ...state, propertiesRoles: undefined })),\n on(AdministrationActions.loadUserToRoleMappingSucceeded, (state, action) => ({\n ...state,\n userToGeneralRole: action.userToGeneralRole,\n })),\n on(AdministrationActions.setSelectedUsers, (state, action) => ({ ...state, selectedUsers: action.users })),\n on(AdministrationActions.loadAllGeneralRolesSucceeded, (state, action) => ({\n ...state,\n generalRoles: action.generalRoles,\n })),\n on(AdministrationActions.clearAllGeneralRoles, (state, action) => ({ ...state, generalRoles: undefined })),\n on(AdministrationActions.setAllUsersCombinedWithGeneralRoles, (state, action) => ({\n ...state,\n usersWithGeneralRoles: action.usersWithGeneralRoles,\n usersWithGeneralRolesLoading: false,\n })),\n on(AdministrationActions.clearPropertiesStructure, (state, action) => ({ ...state, propertiesStructure: undefined })),\n on(AdministrationActions.loadPropertiesStructureSucceeded, (state, action) => ({\n ...state,\n propertiesStructure: action.propertiesStructure,\n })),\n on(AdministrationActions.saveUsersRolesAndUnits, (state, action) => ({\n ...state,\n saveUserToGeneralRoleInProgress: true,\n saveUserToPropertyInProgress: true,\n })),\n\n /**\n * assign user into property\n */\n on(AdministrationActions.assignUserToProperty, (state, action) => ({\n ...state,\n assignUserIntoPropertyInProgress: true,\n assignUserIntoPropertyStatus: UpdateStatus.IN_PROGRESS,\n })),\n on(AdministrationActions.assignUserToPropertySuccess, (state, action) => ({\n ...state,\n assignUserIntoPropertyInProgress: false,\n assignUserIntoPropertyStatus: UpdateStatus.UPDATED,\n })),\n on(AdministrationActions.assignUserToPropertyError, (state, action) => ({\n ...state,\n assignUserIntoPropertyInProgress: false,\n assignUserIntoPropertyStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * removing property assigned user\n */\n on(AdministrationActions.removingPropertyAssignedUser, (state, action) => ({\n ...state,\n removingPropertyAssignedUserInProgress: true,\n removingPropertyAssignedUserStatus: UpdateStatus.IN_PROGRESS,\n })),\n on(\n AdministrationActions.removingPropertyAssignedUserSuccess,\n AdministrationActions.removingPropertyAssignedUserError,\n (state, action) => ({\n ...state,\n removingPropertyAssignedUserInProgress: false,\n removingPropertyAssignedUserStatus: UpdateStatus.DELETED,\n })\n ),\n on(\n AdministrationActions.removingPropertyAssignedUserSuccess,\n AdministrationActions.removingPropertyAssignedUserError,\n (state, action) => ({\n ...state,\n removingPropertyAssignedUserInProgress: false,\n removingPropertyAssignedUserStatus: UpdateStatus.ERROR,\n })\n ),\n\n /**\n * save User To General Role\n */\n on(AdministrationActions.saveUserToGeneralRole, (state, action) => ({\n ...state,\n saveUserToGeneralRoleInProgress: true,\n saveUserToGeneralRoleStatus: UpdateStatus.IN_PROGRESS,\n })),\n\n on(AdministrationActions.saveUserToGeneralRoleSuccess, (state, action) => ({\n ...state,\n saveUserToGeneralRoleInProgress: false,\n saveUserToGeneralRoleStatus: UpdateStatus.UPDATED,\n })),\n\n on(AdministrationActions.saveUserToGeneralRoleError, (state, action) => ({\n ...state,\n saveUserToGeneralRoleInProgress: false,\n saveUserToGeneralRoleStatus: UpdateStatus.ERROR,\n })),\n\n on(AdministrationActions.clearUserToRoleMapping, (state, action) => ({\n ...state,\n saveUserToGeneralRoleInProgress: undefined,\n })),\n\n on(\n AdministrationActions.assignUserToPropertySuccess,\n AdministrationActions.assignUserToPropertyError,\n (state, action) => ({ ...state, saveUserToPropertyInProgress: false })\n ),\n on(AdministrationActions.startAddNewUser, (state, action) => ({\n ...state,\n addNewUserInProgress: true,\n addedUser: null,\n })),\n\n on(AdministrationActions.addingNewUserSucceeded, (state, action) => ({\n ...state,\n addNewUserInProgress: false,\n addedUser: action.user,\n })),\n\n on(AdministrationActions.addingNewUserFailed, (state, action) => ({\n ...state,\n addNewUserInProgress: false,\n addedUser: null,\n })),\n on(AdministrationActions.clearAddedUser, (state, action) => ({\n ...state,\n addedUser: null,\n })),\n\n on(AdministrationActions.startDeleteGeneralRole, (state, action) => ({\n ...state,\n deleteGeneralRoleInProgress: true,\n })),\n on(\n AdministrationActions.deleteGeneralRoleSucceeded,\n AdministrationActions.deleteGeneralRoleFailed,\n (state, action) => ({ ...state, deleteGeneralRoleInProgress: false })\n ),\n on(AdministrationActions.selectGeneralRoleToEdit, (state, action) => ({\n ...state,\n selectedGeneralRole: action.generalRole,\n })),\n on(AdministrationActions.clearSelectedGeneralRole, (state, action) => ({ ...state, selectedGeneralRole: undefined })),\n on(AdministrationActions.startSavingGeneralRole, (state, action) => ({ ...state, saveGeneralRoleInProgress: true })),\n on(\n AdministrationActions.savingGeneralRoleSucceeded,\n AdministrationActions.savingGeneralRoleFailed,\n (state, action) => ({ ...state, saveGeneralRoleInProgress: false })\n ),\n on(AdministrationActions.loadAllUserToProperyMappingsSucceeded, (state, action) => ({\n ...state,\n userToPropertyMapping: action.userToPropertyMapping,\n })),\n on(AdministrationActions.clearAllUserToPropertyMappings, (state, action) => ({\n ...state,\n userToPropertyMapping: undefined,\n })),\n on(AdministrationActions.setGeneralRoleRadioList, (state, action) => ({\n ...state,\n generalRoleRadioList: action.generalRoleRadioList,\n })),\n\n /**\n * invite User\n */\n on(AdministrationActions.inviteNewUser, (state, action) => ({\n ...state,\n userInviteInProgress: true,\n userInviteStatus: UpdateStatus.IN_PROGRESS,\n userInvited: null,\n })),\n on(AdministrationActions.inviteNewUserSuccess, (state, action) => ({\n ...state,\n userInviteInProgress: false,\n userInviteStatus: UpdateStatus.OK,\n userInvited: action.user,\n })),\n on(AdministrationActions.inviteNewUserError, (state, action) => ({\n ...state,\n userInviteInProgress: false,\n userInviteStatus: UpdateStatus.ERROR,\n userInvited: null,\n })),\n\n /**\n * update User\n */\n on(AdministrationActions.updateUserData, (state, action) => ({\n ...state,\n userUpdateInProgress: true,\n userUpdateStatus: UpdateStatus.IN_PROGRESS,\n })),\n on(AdministrationActions.updateUserDataSuccess, (state, action) => ({\n ...state,\n userUpdateInProgress: false,\n userUpdateStatus: UpdateStatus.UPDATED,\n })),\n on(AdministrationActions.updateUserDataError, (state, action) => ({\n ...state,\n userUpdateInProgress: false,\n userUpdateStatus: UpdateStatus.ERROR,\n })),\n on(AdministrationActions.removeUser, (state, action) => ({\n ...state,\n removeUserInProgress: true,\n })),\n on(AdministrationActions.removeUserFailed, AdministrationActions.removeUserSucceeded, (state, action) => ({\n ...state,\n removeUserInProgress: false,\n })),\n\n /**\n * clear User Preview Data\n **/\n on(AdministrationActions.clearUserPreviewData, (state, action) => ({\n ...state,\n userUpdateInProgress: false,\n userUpdateStatus: null,\n userInviteInProgress: false,\n userInviteStatus: null,\n userInvited: null,\n saveUserToGeneralRoleInProgress: false,\n saveUserToGeneralRoleStatus: null,\n assignUserIntoPropertyInProgress: false,\n assignUserIntoPropertyStatus: null,\n removingPropertyAssignedUserInProgress: false,\n removingPropertyAssignedUserStatus: null,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\nimport * as fromAdministration from '../reducers/administration.reducer';\n\nexport const selectAdministrationState = createFeatureSelector(\n fromAdministration.administrationFeatureKey\n);\n\nexport const selectActiveUsers = createSelector(\n selectAdministrationState,\n administrationState => administrationState.activeUsers\n);\n\nexport const activeUserOrVendorOptionsList = createSelector(\n selectAdministrationState,\n administrationState => administrationState.activeUserOrVendorOptionsList\n);\n\nexport const selectInactiveUsers = createSelector(\n selectAdministrationState,\n administrationState => administrationState.inactiveUsers\n);\n\nexport const selectAllUsers = createSelector(\n selectActiveUsers,\n selectInactiveUsers,\n (activeUsers, inactiveUsers) => [].concat(activeUsers).concat(inactiveUsers) as RestUserModel[]\n);\n\nexport const selectAllUsersLoading = createSelector(\n selectAdministrationState,\n administrationState => administrationState.usersLoading\n);\n\nexport const selectAllPermissionLevels = createSelector(\n selectAdministrationState,\n administrationState => administrationState.permissionLevels\n);\n\nexport const selectAllGeneralRolesToPermissionMapping = createSelector(\n selectAdministrationState,\n administrationState => administrationState.generalRolesToPermissionMapping\n);\n\nexport const selectAllPropertyRoles = createSelector(\n selectAdministrationState,\n administrationState => administrationState.propertiesRoles\n);\n\nexport const selectAllUserToGeneralRoleMapping = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userToGeneralRole\n);\n\nexport const selectAllSelectedUsers = createSelector(\n selectAdministrationState,\n administrationState => administrationState.selectedUsers\n);\n\nexport const selectAllGeneralRoles = createSelector(\n selectAdministrationState,\n administrationState => administrationState.generalRoles\n);\n\nexport const selectAllUsersWithGeneralRoles = createSelector(\n selectAdministrationState,\n administrationState => administrationState.usersWithGeneralRoles\n);\n\nexport const selectAllUsersWithGeneralRolesLoading = createSelector(\n selectAdministrationState,\n administrationState => administrationState.usersWithGeneralRolesLoading\n);\n\nexport const selectAllPropertiesStructure = createSelector(\n selectAdministrationState,\n administrationState => administrationState.propertiesStructure\n);\n\n/**\n * save User To General Role\n */\nexport const selectSaveUserToGeneralRoleInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.saveUserToGeneralRoleInProgress\n);\n\nexport const selectSaveUserToGeneralRoleStatus = createSelector(\n selectAdministrationState,\n administrationState => administrationState.saveUserToGeneralRoleStatus\n);\n/**\n * assign user into property\n */\nexport const selectAssignUserIntoPropertyInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.assignUserIntoPropertyInProgress\n);\n\nexport const selectAssignUserIntoPropertyStatus = createSelector(\n selectAdministrationState,\n administrationState => administrationState.assignUserIntoPropertyStatus\n);\n\n/**\n * removing property assigned user\n */\nexport const selectRemovingPropertyAssignedUserInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.removingPropertyAssignedUserInProgress\n);\nexport const selectRemovingPropertyAssignedUserStatus = createSelector(\n selectAdministrationState,\n administrationState => administrationState.removingPropertyAssignedUserStatus\n);\n\nexport const selectAddNewUserInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.addNewUserInProgress\n);\n\nexport const selectAddedUser = createSelector(\n selectAdministrationState,\n administrationState => administrationState.addedUser\n);\n\nexport const selectIsDeleteGeneralRoleInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.deleteGeneralRoleInProgress\n);\n\nexport const selectSelectedGeneralRole = createSelector(\n selectAdministrationState,\n administrationState => administrationState.selectedGeneralRole\n);\n\nexport const selectSavingGeneralRoleInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.saveGeneralRoleInProgress\n);\n\nexport const selectAllUserToPropertyMappings = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userToPropertyMapping\n);\n\nexport const selectPropertyUsers = createSelector(\n selectAdministrationState,\n administrationState => administrationState.activePropertyUsers\n);\n\nexport const selectPropertyUsersLoading = createSelector(\n selectAdministrationState,\n administrationState => administrationState.propertyUsersLoading\n);\n\nexport const selectGeneralRoleRadioList = createSelector(\n selectAdministrationState,\n administrationState => administrationState.generalRoleRadioList\n);\n\n/**\n * User invite\n **/\nexport const selectUserInviteInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userInviteInProgress\n);\n\nexport const selectUserInviteStatus = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userInviteStatus\n);\n\nexport const selectUserInvited = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userInvited\n);\n\n/**\n * User Update\n **/\nexport const selectUserUpdateInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userUpdateInProgress\n);\n\nexport const selectUserUpdateStatus = createSelector(\n selectAdministrationState,\n administrationState => administrationState.userUpdateStatus\n);\n\n/**\n * User Remove\n **/\nexport const selectUserRemoveInProgress = createSelector(\n selectAdministrationState,\n administrationState => administrationState.removeUserInProgress\n);\n","import { Subject } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface CustomInspectionChangeConfig {\n emitChange?: boolean;\n emitChangeTemplate?: boolean;\n}\nexport class CustomInspectionContent {\n items: RestCustomInspectionContentItemModel[];\n private _itemsChanged = new Subject();\n itemsChanges$ = this._itemsChanged.asObservable();\n\n private _templateChanges = new Subject();\n templateChanges$ = this._templateChanges.asObservable();\n constructor(items: RestCustomInspectionContentItemModel[] = []) {\n this.init(items);\n }\n\n init(items: RestCustomInspectionContentItemModel[]) {\n this.items = [...items].sort((a, b) => {\n if (a.position > b.position) return 1;\n if (a.position < b.position) return -1;\n return 0;\n });\n }\n\n addItem(inspectionItemName: string) {\n const inspectionItemId = uuidv4();\n this.items.push({\n inspectionItemId,\n inspectionItemName,\n inspectionItemChecked: false,\n });\n this.onItemChanged();\n\n return inspectionItemId;\n }\n\n removeItem(id: string) {\n this.items = [...this.items.filter(item => item.inspectionItemId !== id)];\n this.onItemChanged();\n }\n\n updateItemName(item: RestCustomInspectionContentItemModel) {\n this.items = this.items.map(innerItem =>\n innerItem.inspectionItemId !== item.inspectionItemId\n ? innerItem\n : { ...innerItem, inspectionItemName: item.inspectionItemName }\n );\n this.onItemChanged();\n }\n updateItemChecked(item: RestCustomInspectionContentItemModel, config?: CustomInspectionChangeConfig) {\n this.items = this.items.map(innerItem =>\n innerItem.inspectionItemId !== item.inspectionItemId\n ? innerItem\n : { ...innerItem, inspectionItemChecked: item.inspectionItemChecked }\n );\n this.onItemChanged({ ...{ emitChangeTemplate: false }, ...config });\n }\n\n get templateItems() {\n return this.items.map(item => ({ ...item, inspectionItemChecked: false }));\n }\n\n onItemChanged(config: CustomInspectionChangeConfig = {}) {\n const options = { ...{ emitChange: true, emitChangeTemplate: true }, ...config };\n for (let i = 0; i < this.items.length; i++) {\n this.items[i].position = i;\n }\n if (options.emitChange) {\n this._itemsChanged.next(this.items);\n }\n\n if (options.emitChangeTemplate) {\n this._templateChanges.next();\n }\n }\n\n get totalItemsCount(): number {\n return this.items.length;\n }\n\n get checkedItemsCount(): number {\n return this.items.filter(item => item.inspectionItemChecked).length;\n }\n\n get progressBar(): number {\n return this.totalItemsCount ? (this.checkedItemsCount / this.totalItemsCount) * 100 : 100;\n }\n}\n\nexport interface RestCustomInspectionModel {\n id?: number;\n inspectionName: string;\n isRequired?: boolean;\n}\nexport interface RestCustomInspectionContentItemModel {\n inspectionItemName: string;\n inspectionItemChecked: boolean | null;\n inspectionItemId?: string;\n position?: number;\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, ReplaySubject, filter, of, switchMap, take, tap } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { TurnoversService } from '@app/services/turnovers.service';\nimport { PermissionLevelType } from '@shared/enums/permission-level.enum';\nimport { checkPermissionLevel } from '@shared/functions/check-permission-level.function';\nimport { RestTurnoverTaskModel } from '@shared/interfaces/turnover.interface';\nimport { selectUserPermissionLevel } from '@shared/selectors/user.selectors';\nimport { DialogResult } from '@ui-components/modals/config/dialog-result.enum';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\nimport { RestBoardModel } from '../interfaces/board';\n\n@Injectable()\nexport class BoardService {\n private readonly route = 'boards/';\n private _list$: ReplaySubject;\n boardRemoving$ = new BehaviorSubject(0);\n\n constructor(private service: RestapiService, private modalsService: ModalsService, private store: Store<{}>) {}\n\n getTurnoverList(boardId: number, portfolioId: number) {\n return this.service.getData(\n `turnovers/bb/${boardId}/${portfolioId}`,\n TurnoversService.fixTimezoneForTurnoverTaskModel\n );\n }\n\n getList() {\n if (!this._list$ || this._list$.closed) {\n this._list$ = new ReplaySubject(1);\n this.getListInternal().subscribe({\n next: list => this._list$.next(list),\n error: error => this._list$.error(error),\n });\n }\n return this._list$.asObservable();\n }\n\n refresh() {\n if (this._list$ && !this._list$.closed) {\n return this.getListInternal().pipe(tap(list => this._list$.next(list)));\n }\n return of(null);\n }\n\n private updateSavedData(updateFunction: (list: RestBoardModel[]) => RestBoardModel[]) {\n if (!this._list$ || this._list$.closed) {\n return;\n }\n this._list$.pipe(take(1)).subscribe(list => {\n const updatedList = updateFunction(list);\n this._list$.next(updatedList);\n });\n }\n\n private getListInternal() {\n return this.service.getData(this.route + 'list');\n }\n\n getListByPortfolio(portfolioId: number) {\n return this.service.getData(this.route + 'getByPortfolio/' + portfolioId);\n }\n\n add(entity: RestBoardModel) {\n return this.service\n .post(this.route + 'add', entity)\n .pipe(tap(id => this.updateSavedData(list => [...list, { ...entity, id: id }])));\n }\n\n update(entity: RestBoardModel) {\n return this.service.post(this.route + 'update', entity).pipe(\n tap(() =>\n this.updateSavedData(list => {\n const index = list.findIndex(e => e.id === entity.id);\n const copyOfArray = [...list];\n if (index >= 0) {\n copyOfArray.splice(index, 1, entity);\n }\n return copyOfArray;\n })\n )\n );\n }\n\n delete(id: number) {\n return this.service\n .post(this.route + `delete/${id}`)\n .pipe(tap(() => this.updateSavedData(list => list.filter(e => e.id != id))));\n }\n\n removeBoard(boardName: string, boardId: number) {\n return this.store.select(selectUserPermissionLevel).pipe(\n take(1),\n filter(\n (permissionLevel: PermissionLevelType[]) =>\n !!permissionLevel?.length && checkPermissionLevel(permissionLevel, PermissionLevelType.Board_Edit)\n ),\n switchMap(() =>\n this.modalsService\n .openConfirmationModal({\n title: `Delete board: \"${boardName}\"?`,\n content: `Board will be deleted permanently along with its data.`,\n confirmColor: 'warn',\n })\n .afterClosed()\n .pipe(\n take(1),\n filter(result => result === DialogResult.Success),\n tap(() => {\n this.boardRemoving$.next(boardId);\n }),\n switchMap(() => this.delete(boardId))\n )\n )\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, finalize, switchMap } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport {\n CustomInspectionContent,\n RestCustomInspectionContentItemModel,\n RestCustomInspectionModel,\n} from '@main-application/boards/interfaces/custom-inspection';\nimport { ConfirmationModalData } from '@shared/interfaces/modal-data';\nimport { RestTemplateModel } from '@template/models/rest-template-model.interface';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\n@Injectable()\nexport class CustomInspectionService {\n private readonly route = 'inspections/';\n _templatesLoading = new BehaviorSubject(false);\n templatesLoading$ = this._templatesLoading.asObservable();\n constructor(private service: RestapiService, private modalsService: ModalsService) {}\n\n getInspectionTemplates(preserveInspectionId?: number) {\n this._templatesLoading.next(true);\n return this.service\n .getData(this.route + 'template/list?filterUnavailableTemplates=false')\n .pipe(\n map(templates => {\n if (!templates?.length) {\n return [];\n }\n const filteredTemplates = templates.filter(\n template => template.isAvailable || template.id === preserveInspectionId\n );\n return filteredTemplates.sort((a, b) => {\n if (a.name === b.name) return 0;\n return a.name > b.name ? 1 : -1;\n });\n }),\n finalize(() => {\n this._templatesLoading.next(false);\n })\n );\n }\n\n getCustomInspectionContent(inspectionId: number) {\n return this.service.getData(\n this.route + 'getCustomInspectionContent/' + inspectionId\n );\n }\n\n updateCustomInspectionContent(inspectionId: number, data: RestCustomInspectionContentItemModel[]) {\n return this.service.post(\n this.route + 'updateCustomInspection/' + inspectionId,\n data\n );\n }\n\n addCustomInspectionTemplateWithPredefinedItems(data: RestCustomInspectionModel) {\n return this.service.post(this.route + 'template/addCustomInspection', data).pipe(\n switchMap(id => {\n const inspection = new CustomInspectionContent();\n inspection.addItem('Item 1');\n inspection.addItem('Item 2');\n inspection.addItem('Item 3');\n return this.updateCustomInspectionTemplateContent(id, inspection.items).pipe(\n map(items => [id, items] as const)\n );\n })\n );\n }\n\n addCustomInspectionTemplateWithItems(data: RestCustomInspectionModel, items: RestCustomInspectionContentItemModel[]) {\n return this.service.post(this.route + 'template/addCustomInspection', data).pipe(\n switchMap(id => {\n return this.updateCustomInspectionTemplateContent(id, items).pipe(map(items => [id, items] as const));\n })\n );\n }\n\n addCustomInspectionTemplate(data: RestCustomInspectionModel) {\n return this.service.post(this.route + 'template/addCustomInspection', data);\n }\n\n editCustomInspectionTemplate(inspectionId: number, data: RestCustomInspectionModel) {\n return this.service.post(\n this.route + 'template/editCustomInspection/' + inspectionId,\n data\n );\n }\n\n updateCustomInspectionTemplateContent(inspectionId: number, data: RestCustomInspectionContentItemModel[]) {\n return this.service.post(\n this.route + 'template/updateCustomInspectionContent/' + inspectionId,\n data\n );\n }\n\n getInspectionTemplate(inspectionId: number) {\n return this.service.getData(this.route + 'template/' + inspectionId);\n }\n\n getCustomInspectionTemplateContent(templateId: number) {\n return this.service.getData(\n this.route + 'template/getCustomInspectionContent/' + templateId\n );\n }\n\n hideInspectionTemplate(template: RestTemplateModel) {\n const removableTemplate = { ...template, isAvailable: false };\n return this.service.post(this.route + 'template/edit', removableTemplate);\n }\n\n openRemovalTemplateModal(inspectionTemplate: RestTemplateModel, data: ConfirmationModalData = {}) {\n return this.modalsService.openConfirmationModal(\n {\n ...{\n title: `Delete ${inspectionTemplate.name} template?`,\n titleCss: 'fade-truncate',\n content: `This will delete it as a template from all boards. Are you feeling this confident? 💪`,\n cancelLabel: 'Yikes, no!',\n confirmLabel: 'Yes, delete it',\n confirmColor: 'warn',\n },\n ...data,\n },\n 360\n );\n }\n}\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestBoardModel } from '@main-application/boards/interfaces/board';\n\nexport const closeMenus = createAction('[Boards] close menus');\n\nexport const loadBoardList = createAction('[Boards] loadBoardList');\nexport const loadBoardListSuccess = createAction(\n '[Boards] loadBoardListSuccess',\n props<{ boards: RestBoardModel[] }>()\n);\nexport const loadBoardListFailed = createAction('[Boards] loadBoardListFailed');\n","import { ChangeDetectorRef, Directive } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { TicketAttachmentType } from '@shared/enums/attachment-type';\nimport { DashboardMode } from '@shared/enums/dashboard-mode';\nimport { DashboardViewType } from '@shared/enums/dashboard-view-type';\nimport { PermissionLevelType } from '@shared/enums/permission-level.enum';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { EnumerationConfig } from '@shared/interfaces/enumeration-config';\n\n@Directive()\nexport abstract class DashboardsAbstract extends ComponentAbstract {\n emptyDashboard = true;\n\n selectSelectedPropertyId$: Observable;\n selectSelectedPortfolioId$: Observable;\n enumerations$: Observable;\n\n dashboardMode: DashboardMode;\n dashboardMode$: Observable;\n permissionList: PermissionLevelType[];\n permissionsList$: Observable;\n\n protected constructor(protected cdr: ChangeDetectorRef) {\n super(cdr);\n }\n\n get WorkflowStep(): typeof WorkflowStepEnumType {\n return WorkflowStepEnumType;\n }\n\n get DashboardViewType(): typeof DashboardViewType {\n return DashboardViewType;\n }\n\n get DashboardMode(): typeof DashboardMode {\n return DashboardMode;\n }\n\n get TicketAttachmentType(): typeof TicketAttachmentType {\n return TicketAttachmentType;\n }\n}\n","export enum PortfolioKpiType {\n AvgTurnoverTime = 1,\n AvgOpenTurnoverNow = 93,\n VacantCount = 2,\n OccupancyPercent = 3,\n Expirations30 = 4,\n Expirations60 = 5,\n Expirations90 = 6,\n MoveOuts30 = 7,\n MoveOuts60 = 8,\n MoveOuts90 = 9,\n ApplicationsTotal30 = 10,\n Preleased30 = 11,\n EstOccupancyPercent30 = 12,\n EstOccupancyPercent60 = 13,\n EstOccupancyPercent90 = 14,\n EstOccupancyPercentSmart30 = 15,\n EstOccupancyPercentSmart60 = 16,\n EstOccupancyPercentSmart90 = 17,\n ExpirationsSmart30 = 18,\n ExpirationsSmart60 = 19,\n ExpirationsSmart90 = 20,\n MoveOutTurnovers = 21,\n Notices = 22,\n Bids = 23,\n MakeReady = 24,\n Reno = 25,\n Approval = 27,\n Punch = 26,\n TotalTurnovers = 28,\n Marketing = 29,\n Leasup = 30,\n MoveIn = 31,\n UnleasedUnits = 32,\n UnleasedUnitsNow = 94,\n NewApplications30 = 33,\n CancelledApplications30 = 34,\n PendingApplications30 = 35,\n DeniedApplications30 = 36,\n ApprovedApplications30 = 37,\n ConvertingApplications30 = 38,\n ConvertedApplications30 = 39,\n AvgMoveOutNow = 85,\n AvgMoveOut30 = 40,\n AvgBidNow = 86,\n AvgBid30 = 41,\n AvgMakeReadyNow = 87,\n AvgMakeReady30 = 42,\n AvgRenoNow = 88,\n AvgReno30 = 43,\n AvgLeasupNow = 89,\n AvgLeasup30 = 44,\n AvgApprovalPunchNow = 91,\n AvgApprovalPunch30 = 45,\n AvgMoveOut60 = 46,\n AvgBid60 = 47,\n AvgMakeReady60 = 48,\n AvgReno60 = 49,\n AvgLeasup60 = 50,\n AvgApprovalPunch60 = 51,\n AvgMoveOut90 = 52,\n AvgBid90 = 53,\n AvgMakeReady90 = 54,\n AvgReno90 = 55,\n AvgLeasup90 = 56,\n AvgApprovalPunch90 = 57,\n Preleased60 = 58,\n Preleased90 = 59,\n ApplicationsTotal60 = 60,\n NewApplications60 = 61,\n CancelledApplications60 = 62,\n PendingApplications60 = 63,\n DeniedApplications60 = 64,\n ApprovedApplications60 = 65,\n ConvertingApplications60 = 66,\n ConvertedApplications60 = 67,\n ApplicationsTotal90 = 68,\n NewApplications90 = 69,\n CancelledApplications90 = 70,\n PendingApplications90 = 71,\n DeniedApplications90 = 72,\n ApprovedApplications90 = 73,\n ConvertingApplications90 = 74,\n ConvertedApplications90 = 75,\n AverageTurnTime60 = 76,\n AverageTurnTime90 = 77,\n Leasing30 = 78,\n Leasing60 = 79,\n Leasing90 = 80,\n VacancyLossMedium = 81,\n VacancyLossMediumActiveTurns = 82,\n VacancyLossHigh = 83,\n VacancyLossHighActiveTurns = 84,\n VacancyLossNone = 131,\n VacancyLossNoneActiveTurns = 132,\n AvgPunch30 = 95,\n AvgPunch60 = 96,\n AvgPunch90 = 97,\n AvgApproval30 = 98,\n AvgApproval60 = 99,\n AvgApproval90 = 100,\n AvgMoveIn30 = 101,\n AvgMoveIn60 = 102,\n AvgMoveIn90 = 103,\n AvgPunchNow = 90,\n AvgApprovalNow = 91,\n AvgMoveInNow = 92,\n}\n\nexport interface RestPortfolioKpi {\n calculationDate: string;\n dateUpdated: string;\n kpiType: PortfolioKpiType;\n portfolioId: number;\n propertyId: number;\n unitsCount: number;\n value: number;\n}\n","import { createAction, props } from '@ngrx/store';\n\nimport { DashboardFilter } from '@dashboards/models/dashboard-filter';\n\nexport const setDashboardFilter = createAction('[DashboardFilter] Load DashboardFilters', props());\n","import { createAction, props } from '@ngrx/store';\n\nimport { VacancyLossAttrType } from '@main-application/turnovers/interfaces/vacancy-loss-attr';\nimport { VacancyLostThreshold } from '@main-application/turnovers/interfaces/vacancy-loss-threshold';\nimport { DashboardMode } from '@shared/enums/dashboard-mode';\nimport { DashboardViewType } from '@shared/enums/dashboard-view-type';\nimport { ActiveTurnoversDetailsCombined } from '@shared/interfaces/active-turnover-details';\nimport { BreadcrumbItem } from '@shared/interfaces/breadcrumb-item';\nimport { DelinquencyDetailsCombined } from '@shared/interfaces/delinquency.interface';\nimport { EnumerationItem } from '@shared/interfaces/enumeration-item';\nimport { MyProperties } from '@shared/interfaces/my-properties.interface';\nimport { RestUnitRenewalTargetModel } from '@shared/interfaces/renevals.interface';\nimport { RenewalDetailsCombined } from '@shared/interfaces/renewal.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/rest-unit-summary-model.interface';\nimport { RestTurnoverTaskModel } from '@shared/interfaces/turnover.interface';\nimport { UnitDetailsByType } from '@shared/interfaces/unit-details-by-type';\nimport { UnitDetails } from '@shared/interfaces/unit-details.interface';\nimport { RestUnitModel } from '@shared/interfaces/unit.interface';\n\nimport { ActiveTurnoversSummary } from '../../models/active-turnover-summary';\nimport { DelinquencySummary } from '../../models/delinquency-summary';\nimport { RenewalsSummary } from '../../models/renewals-summary';\nimport { UnitsSummary } from '../../models/units-summary';\n\nexport const loadTurnoverKanbanProperty = createAction(\n '[Dashboard] load Turnover Kanban Property',\n props<{ propertyId: number }>()\n);\nexport const loadTurnoverKanbanPropertySuccess = createAction(\n '[Dashboard] load Turnover Kanban Property success',\n props<{ tasks: RestTurnoverTaskModel[] }>()\n);\nexport const loadTurnoverKanbanPropertyError = createAction('[Dashboard] load Turnover Kanban Property error');\nexport const resetTurnoverKanbanProperty = createAction('[Dashboard] reset Turnover Kanban Property');\n\nexport const clearTurnoverKanbanPortfolio = createAction('[Dashboard] clear Turnover Kanban portfolio');\nexport const loadTurnoverKanbanPortfolio = createAction(\n '[Dashboard] load Turnover Kanban portfolio',\n props<{ portfolioId: number }>()\n);\nexport const loadTurnoverKanbanPortfolioSuccess = createAction(\n '[Dashboard] load Turnover Kanban portfolio success',\n props<{ tasks: RestTurnoverTaskModel[] }>()\n);\nexport const loadTurnoverKanbanPortfolioError = createAction('[Dashboard] load Turnover Kanban portfolio error');\nexport const resetTurnoverKanbanPortfolio = createAction('[Dashboard] reset Turnover Kanban portfolio');\nexport const kanbanListGenerateSuccess = createAction(\n '[Dashboard] kanban List Generate Success',\n props<{ kanbanListCount: number }>()\n);\n\nexport const loadUserTurnovers = createAction('[Dashboard] load User Turnovers', props<{ userId: number }>());\nexport const loadUserTurnoversSuccess = createAction(\n '[Dashboard] load User Turnovers success',\n props<{ tasks: RestTurnoverTaskModel[] }>()\n);\nexport const loadUserTurnoversError = createAction('[Dashboard] load User Turnovers error');\nexport const resetUserTurnoversError = createAction('[Dashboard] reset User Turnovers error');\n\nexport const loadMyTasks = createAction('[Dashboard] load My Tasks', props<{ portfolioId: number }>());\nexport const loadMyTasksSuccess = createAction(\n '[Dashboard] load My Tasks success',\n props<{ myTasks: RestTurnoverTaskModel[] }>()\n);\nexport const loadMyTasksError = createAction('[Dashboard] load My Tasks error');\nexport const myTasksHeaderData = createAction(\n '[Dashboard] My Tasks header Data',\n props<{\n myTasksTurnoversCount: number;\n myTasksTicketsCount: number;\n staleTurnoversCount: number;\n lateTurnoversCount: number;\n }>()\n);\n\nexport const clearMyTasks = createAction('[Dashboard] clear My Tasks');\n\nexport const loadPropertyKpi = createAction('[Dashboard] Load property kpi', props<{ propertyId: number }>());\nexport const loadPropertyKpiSucceded = createAction('[Dashboard] Load property kpi succeded', props<{ kpi: any }>());\nexport const loadPropertyKpiFailed = createAction('[Dashboard] Load property kpi failed');\n\nexport const loadUnitSummaryByProperty = createAction(\n '[Dashboard] Load unit summary by property',\n props<{ propertyId: number }>()\n);\nexport const loadUnitSummaryByPropertySucceded = createAction(\n '[Dashboard] Load unit summary by property succeded',\n props<{ unitSummary: UnitsSummary }>()\n);\nexport const loadUnitSummaryByPropertyFailed = createAction('[Dashboard] Load unit summary by property failed');\n\nexport const clearUnitSummaryByProperty = createAction('[Dashboard] clear unit summary by property');\n\nexport const loadActiveTurnoversSummary = createAction(\n '[Dashboard] Load active turnovers summary by property',\n props<{ propertyId: number }>()\n);\nexport const loadActiveTurnoversSummarySucceded = createAction(\n '[Dashboard] Load active turnovers summary by property succeded',\n props<{ activeTurnoversSummary: ActiveTurnoversSummary }>()\n);\nexport const loadActiveTurnoversSummaryFailed = createAction(\n '[Dashboard] Load active turnovers summary by property failed'\n);\n\nexport const clearActiveTurnoversSummary = createAction('[Dashboard] clear Active Turnovers Summary');\n\nexport const loadActiveTurnoversDetails = createAction(\n '[Dashboard] Load active turnovers details by property',\n props<{ propertyId: number }>()\n);\nexport const loadActiveTurnoversDetailsSucceded = createAction(\n '[Dashboard] Load active turnovers details by property succeded',\n props<{ activeTurnoversDetails: ActiveTurnoversDetailsCombined }>()\n);\nexport const loadActiveTurnoversDetailsFailed = createAction(\n '[Dashboard] Load active turnovers details by property failed'\n);\n\nexport const loadDelinquencyByUnit = createAction(\n '[Dashboard] Load delinquency by unit',\n props<{ propertyId: number }>()\n);\nexport const loadDelinquencyByUnitSucceded = createAction(\n '[Dashboard] Load delinquency by unit succeded',\n props<{ delinquencyByUnit: DelinquencyDetailsCombined }>()\n);\nexport const loadDelinquencyByUnitFailed = createAction('[Dashboard] Load delinquency by unit failed');\n\nexport const loadDelinquencySummary = createAction(\n '[Dashboard] Load delinquency summary',\n props<{ propertyId: number; delinquencyFilterType: string }>()\n);\nexport const loadDelinquencySummarySucceded = createAction(\n '[Dashboard] Load delinquency succeded',\n props<{ delinquencySummary: DelinquencySummary }>()\n);\nexport const loadDelinquencySummaryFailed = createAction('[Dashboard] Load delinquency failed');\nexport const clearDelinquencySummary = createAction('[Dashboard] clear delinquency summary');\n\nexport const loadRenewalsSummary = createAction('[Dashboard] Load renewals summary', props<{ propertyId: number }>());\nexport const loadRenewalsSummarySucceded = createAction(\n '[Dashboard] Load renewals summary succeded',\n props<{ renewalsSummary: RenewalsSummary }>()\n);\nexport const loadRenewalsSummaryFailed = createAction('[Dashboard] Load renewals summary failed');\nexport const clearRenewalsSummary = createAction('[Dashboard] clear renewals summary');\n\nexport const selectedPropertyId = createAction('[Dashboard] Selected property id', props<{ propertyId: number }>());\n\nexport const loadUnitDetails = createAction(\n '[Dashboard] Load unit details',\n props<{ propertyId: number; dashboardViewType: DashboardViewType }>()\n);\nexport const loadUnitDetailsSuccess = createAction(\n '[Dashboard] Unit details loaded successfully',\n props<{ unitDetails: UnitDetails[] }>()\n);\nexport const loadUnitDetailsFailed = createAction('[Dashboard] Unit details loading failed');\n\nexport const loadUnitDetailsByType = createAction(\n '[Dashboard] Load unit details by type',\n props<{ propertyId: number }>()\n);\nexport const loadUnitDetailsByTypeSuccess = createAction(\n '[Dashboard] Unit details by type loaded successfully',\n props<{ unitDetailsByType: UnitDetailsByType[] }>()\n);\nexport const loadUnitDetailsByTypeFailed = createAction('[Dashboard] Unit details by type loading failed');\n\nexport const loadRenewalsDetails = createAction('[Dashboard] Load renewals details', props<{ propertyId: number }>());\nexport const loadRenewalsDetailsSuccess = createAction(\n '[Dashboard] Renewals details loaded successfully',\n props<{ renewalDetailsCombined: RenewalDetailsCombined }>()\n);\nexport const loadRenewalsDetailsFailed = createAction('[Dashboard] renewals details loading failed');\n\nexport const selectedDashboardViewType = createAction(\n '[Dashboard] Selected dashboard type',\n props<{ dashboardViewType: EnumerationItem }>()\n);\n\nexport const selectedPortfolioId = createAction('[Dashboard] Selected portfolio id', props<{ portfolioId: number }>());\n\nexport const loadMyProperties = createAction('[Dashboard] Load my properties', props<{ portfolioId: number }>());\nexport const loadMyPropertiesSuccess = createAction(\n '[Dashboard] My properties loaded successfully',\n props<{ myProperties: MyProperties[] }>()\n);\nexport const loadMyPropertiesFailed = createAction('[Dashboard] My properties loading failed');\n\nexport const selectedDashboardMode = createAction(\n '[Dashboard] Selected dashboard mode',\n props<{ dashboardMode: DashboardMode }>()\n);\n\nexport const setCustomBreadcrumbs = createAction(\n '[Dashboard] Set custom breadcrumbs',\n props<{ breadcrumbList: BreadcrumbItem[] }>()\n);\n\n/**\n * load Units With Active Turnovers\n */\nexport const loadUnitsWithActiveTurnovers = createAction(\n '[Dashboard] load Units With Active Turnovers',\n props<{ propertyId: number }>()\n);\nexport const loadUnitsWithActiveTurnoversSuccess = createAction(\n '[Dashboard] load Units With Active Turnovers success',\n props<{ unitList: RestUnitSummaryModel[] }>()\n);\nexport const loadUnitsWithActiveTurnoversFailed = createAction('[Dashboard] load Units With Active Turnovers failed');\nexport const resetUnitsWithActiveTurnoversList = createAction('[Dashboard] reset Units With Active Turnovers list');\n/**\n * load Units List\n */\nexport const loadUnitList = createAction('[Dashboard] load Units List', props<{ propertyId: number }>());\nexport const loadUnitListSuccess = createAction(\n '[Dashboard] load Units List success',\n props<{ unitList: RestUnitSummaryModel[] }>()\n);\nexport const loadUnitListFailed = createAction('[Dashboard] load Units List failed');\nexport const resetUnitList = createAction('[Dashboard] reset Unit List');\n\n/**\n * load Unit\n */\nexport const loadUnit = createAction('[Dashboard] load Unit', props<{ unitId: number }>());\nexport const loadUnitSuccess = createAction('[Dashboard] load Unit success', props<{ unit: RestUnitModel }>());\nexport const loadUnitFailed = createAction('[Dashboard] load Unit failed');\nexport const clearUnit = createAction('[Dashboard] load clear unit data');\n\n/**\n * update unit\n */\nexport const updateUnit = createAction('[Dashboard] update unit', props<{ unit: RestUnitModel }>());\nexport const updateUnitSuccess = createAction(\n '[Dashboard] update unit success',\n props<{ updatedUnit: RestUnitModel }>()\n);\nexport const updateUnitFailed = createAction('[Dashboard] update unit failed');\n\nexport const updateUnitDoNotAutoCreateTurns = createAction(\n '[Dashboard] update unit DoNotAutoCreateTurns',\n props<{ unitId: number; doNotAutoCreateTurns: boolean }>()\n);\nexport const updateUnitDoNotAutoCreateTurnsSuccess = createAction(\n '[Dashboard] update unit DoNotAutoCreateTurns success',\n props<{ doNotAutoCreateTurns: boolean }>()\n);\nexport const updateUnitDoNotAutoCreateTurnsFailed = createAction('[Dashboard] update unit DoNotAutoCreateTurns failed');\n\n/**\n * get renewal Strategy For Unit\n */\nexport const getRenewalStrategyForUnit = createAction(\n '[Dashboard] get renewal Strategy For Unit',\n props<{ unitId: number }>()\n);\nexport const getRenewalStrategyForUnitSuccess = createAction(\n '[Dashboard] get renewal Strategy For Unit success',\n props<{ unitTypeRentTarget: RestUnitRenewalTargetModel }>()\n);\nexport const getRenewalStrategyForUnitFailed = createAction('[Dashboard] get renewal Strategy For Unit failed');\n\n/**\n * current portfolio\n */\nexport const setCurrentPortfolio = createAction('[Dashboard] set current portfolio', props<{ portfolioId: number }>());\nexport const resetCurrentPortfolio = createAction('[Dashboard] reset current portfolio');\n\n/**\n * current property\n */\nexport const setCurrentProperty = createAction('[Dashboard] set current portfolio', props<{ propertyId: number }>());\nexport const resetCurrentProperty = createAction('[Dashboard] reset current portfolio');\n\nexport const joinProperties = createAction('[Dashboard] join properties', props<{ state: boolean }>());\nexport const setVacancyLossAttrType = createAction(\n '[Dashboard] setVacancyLossAttrType',\n props<{ attrType: VacancyLossAttrType }>()\n);\n\nexport const setVacancyLossThreshold = createAction(\n '[Dashboard] setVacancyLossThreshold',\n props<{ thresholdType: VacancyLostThreshold }>()\n);\n","import { createAction, props } from '@ngrx/store';\n\nimport { PortfolioKpiType, RestPortfolioKpi } from '@dashboards/models/portfolio-kpi';\nimport { KpiWindowType } from '@shared/enums/kpi-window-type';\nimport { PortfolioKpiFilter } from '@shared/interfaces/portfolio-kpi-filter';\n\n/**\n * load portfolio kpi\n */\nexport const loadPortfolioKpisTrend = createAction(\n '[Dashboard] load portfolio kpis trend',\n props<{ portfolioId: number; kpiTypes: PortfolioKpiType[]; dateOffset: KpiWindowType }>()\n);\nexport const loadPortfolioKpis = createAction(\n '[Dashboard] load portfolio kpis',\n props<{ portfolioId: number; kpiTypes: PortfolioKpiType[] }>()\n);\nexport const setPortfolioKpis = createAction('[Dashboard] set portfolio kpis', props<{ kpis: RestPortfolioKpi[] }>());\nexport const setPortfolioKpisTrend = createAction(\n '[Dashboard] set portfolio kpis trend',\n props<{ kpis: RestPortfolioKpi[] }>()\n);\nexport const loadPortfolioKpisFailed = createAction('[Dashboard] load portfolio kpis failed');\n\nexport const loadPortfolioKpisTrendFailed = createAction('[Dashboard] load portfolio kpis trend failed');\n\nexport const setPortfolioKpisFilter = createAction(\n '[Dashboard] set portfolio kpi filter',\n props<{ portfolioKpisFilter: PortfolioKpiFilter }>()\n);\n\nexport const clearPortfolioKpis = createAction('[Dashboard] clear portfolio kpis');\n\nexport const loadPortfolioKpiTrendLines = createAction(\n '[Dashboard] load portfolio kpi trend lines',\n props<{ portfolioId: number; trendDays: number[]; kpiTypes: PortfolioKpiType[] }>()\n);\n\nexport const setPortfolioKpiTrendLines = createAction(\n '[Dashboard] set portfolio kpi trend lines',\n props<{ kpis: RestPortfolioKpi[] }>()\n);\n\nexport const clearPortfolioKpiTrendLines = createAction('[Dashboard] clear portfolio kpi trends');\n\nexport const setChartSelectorValue = createAction(\n '[Dashboard] set chart selector value',\n props<{ selectorId: string; value: number }>()\n);\n\nexport const setChartSettingsValue = createAction(\n '[Dashboard] set chart settings value',\n props<{ chartId: string; value: any }>()\n);\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TimerService {\n constructor(private restApiService: RestapiService) {}\n\n reloadTimer(): Observable {\n return this.restApiService.associate(`Timer/refresh`, null);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { combineLatest, of } from 'rxjs';\nimport { catchError, map, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';\n\nimport { KpiService } from '@app/services/kpi.service';\nimport { RenewalsService } from '@app/services/renewals.service';\nimport { TimerService } from '@app/services/timer.service';\nimport { TurnoversService } from '@app/services/turnovers.service';\nimport { ActiveTurnoversDetailsCombined } from '@shared/interfaces/active-turnover-details';\nimport { DelinquencyDetailsCombined } from '@shared/interfaces/delinquency.interface';\nimport { PropertyKpi } from '@shared/interfaces/kpi';\nimport { MyProperties } from '@shared/interfaces/my-properties.interface';\nimport { RenewalDetailsCombined } from '@shared/interfaces/renewal.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/rest-unit-summary-model.interface';\nimport { UnitDetailsByType } from '@shared/interfaces/unit-details-by-type';\nimport { UnitDetails } from '@shared/interfaces/unit-details.interface';\nimport { RestUnitModel } from '@shared/interfaces/unit.interface';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { RestapiService } from 'src/app/services/restapi.service';\n\nimport { ActiveTurnoversSummary } from '../../models/active-turnover-summary';\nimport { DelinquencySummary } from '../../models/delinquency-summary';\nimport { RenewalsSummary } from '../../models/renewals-summary';\nimport { UnitsSummary } from '../../models/units-summary';\nimport {\n getRenewalStrategyForUnit,\n getRenewalStrategyForUnitFailed,\n getRenewalStrategyForUnitSuccess,\n loadActiveTurnoversDetails,\n loadActiveTurnoversDetailsFailed,\n loadActiveTurnoversDetailsSucceded,\n loadActiveTurnoversSummary,\n loadActiveTurnoversSummaryFailed,\n loadActiveTurnoversSummarySucceded,\n loadDelinquencyByUnit,\n loadDelinquencyByUnitFailed,\n loadDelinquencyByUnitSucceded,\n loadDelinquencySummary,\n loadDelinquencySummaryFailed,\n loadDelinquencySummarySucceded,\n loadMyProperties,\n loadMyPropertiesFailed,\n loadMyPropertiesSuccess,\n loadMyTasks,\n loadMyTasksError,\n loadMyTasksSuccess,\n loadPropertyKpi,\n loadPropertyKpiFailed,\n loadPropertyKpiSucceded,\n loadRenewalsDetails,\n loadRenewalsDetailsFailed,\n loadRenewalsDetailsSuccess,\n loadRenewalsSummary,\n loadRenewalsSummaryFailed,\n loadRenewalsSummarySucceded,\n loadTurnoverKanbanPortfolio,\n loadTurnoverKanbanPortfolioError,\n loadTurnoverKanbanPortfolioSuccess,\n loadTurnoverKanbanProperty,\n loadTurnoverKanbanPropertyError,\n loadTurnoverKanbanPropertySuccess,\n loadUnit,\n loadUnitDetails,\n loadUnitDetailsByType,\n loadUnitDetailsByTypeFailed,\n loadUnitDetailsByTypeSuccess,\n loadUnitDetailsFailed,\n loadUnitDetailsSuccess,\n loadUnitFailed,\n loadUnitList,\n loadUnitListFailed,\n loadUnitListSuccess,\n loadUnitSuccess,\n loadUnitSummaryByProperty,\n loadUnitSummaryByPropertySucceded,\n loadUnitsWithActiveTurnovers,\n loadUnitsWithActiveTurnoversFailed,\n loadUnitsWithActiveTurnoversSuccess,\n updateUnit,\n updateUnitDoNotAutoCreateTurns,\n updateUnitDoNotAutoCreateTurnsFailed,\n updateUnitDoNotAutoCreateTurnsSuccess,\n updateUnitFailed,\n updateUnitSuccess,\n} from '../actions/dashboard.actions';\nimport { selectCurrentDashboardViewTypeSimpleText } from '../selectors/dashboards.selectors';\n\n@Injectable()\nexport class DashboardEffects {\n readonly routePath = 'properties/dashboards/';\n\n loadTurnoverKanbanProperty$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTurnoverKanbanProperty),\n switchMap(action =>\n this.turnoversService.getPropertyTurnovers(action.propertyId).pipe(\n map(taskList => loadTurnoverKanbanPropertySuccess({ tasks: taskList || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.T01RetrievingTasks);\n return of(loadTurnoverKanbanPropertyError());\n })\n )\n )\n )\n );\n\n loadTurnoverKanbanPortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTurnoverKanbanPortfolio),\n switchMap(action =>\n this.timerService.reloadTimer().pipe(\n switchMap(() =>\n this.turnoversService.getPortfolioTurnovers(action.portfolioId).pipe(\n map(tasks => loadTurnoverKanbanPortfolioSuccess({ tasks: tasks || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.T02RetrievingTasks);\n return of(loadTurnoverKanbanPortfolioError());\n })\n )\n )\n )\n )\n )\n );\n\n loadMyTasks$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadMyTasks),\n switchMap(action =>\n combineLatest([this.timerService.reloadTimer(), this.turnoversService.getAllTasks(action.portfolioId)]).pipe(\n map(([, tasks]) => loadMyTasksSuccess({ myTasks: tasks || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingMyTasks);\n return of(loadMyTasksError());\n })\n )\n )\n )\n );\n\n loadPropertyKpi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPropertyKpi),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(`${this.routePath}PropertyKPI/${action.propertyId}/${dashboardEnumValue}`)\n .pipe(\n map(kpi => loadPropertyKpiSucceded({ kpi })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.T03RetrievingTasks);\n return of(loadPropertyKpiFailed());\n })\n )\n )\n )\n );\n\n loadUnitSummaryByProperty$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnitSummaryByProperty),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(`${this.routePath}UnitSummaryByProperty/${action.propertyId}/${dashboardEnumValue}`)\n .pipe(\n map(unitSummary => loadUnitSummaryByPropertySucceded({ unitSummary })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.T04RetrievingTasks);\n\n return of(loadDelinquencySummaryFailed());\n })\n )\n )\n )\n );\n\n loadActiveTurnoversSummary$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadActiveTurnoversSummary),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(\n `${this.routePath}ActiveTurnoversSummary/${action.propertyId}/${dashboardEnumValue}`\n )\n .pipe(\n map(result => loadActiveTurnoversSummarySucceded({ activeTurnoversSummary: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingTurnoverSummary);\n return of(loadActiveTurnoversSummaryFailed());\n })\n )\n )\n )\n );\n\n loadActiveTurnoversDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadActiveTurnoversDetails),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(\n `${this.routePath}ActiveTurnoversDetails/${action.propertyId}/${dashboardEnumValue}`\n )\n .pipe(\n map(result => loadActiveTurnoversDetailsSucceded({ activeTurnoversDetails: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingTurnoverDetails);\n return of(loadActiveTurnoversDetailsFailed());\n })\n )\n )\n )\n );\n\n loadDelinquencySummary$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadDelinquencySummary),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(\n `${this.routePath}DelinquencySummary/${action.propertyId}/${dashboardEnumValue}/${action.delinquencyFilterType}`\n )\n .pipe(\n map(result => loadDelinquencySummarySucceded({ delinquencySummary: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingDelinquencySummary);\n return of(loadDelinquencySummaryFailed());\n })\n )\n )\n )\n );\n\n loadDelinquencyByUnit$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadDelinquencyByUnit),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(\n `${this.routePath}DelinquencyDetails/${action.propertyId}/${dashboardEnumValue}/MoreThanTwentyFive`\n ) // TODO verify this option - MoreThanTwentyFive\n .pipe(\n map(result => loadDelinquencyByUnitSucceded({ delinquencyByUnit: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingDelinquencyDetails);\n return of(loadDelinquencyByUnitFailed());\n })\n )\n )\n )\n );\n\n loadRenewalsSummary$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadRenewalsSummary),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(`${this.routePath}RenewalsSummary/${action.propertyId}/${dashboardEnumValue}`)\n .pipe(\n map(renewalsSummary => loadRenewalsSummarySucceded({ renewalsSummary })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingRenewalsSummary);\n return of(loadRenewalsSummaryFailed());\n })\n )\n )\n )\n );\n\n loadUnitDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnitDetails),\n switchMap(action =>\n this.restApiService\n .getData(`${this.routePath}UnitDetails/${action.propertyId}/${action.dashboardViewType}`)\n .pipe(\n map(result => loadUnitDetailsSuccess({ unitDetails: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingUnitDetails);\n return of(loadUnitDetailsFailed());\n })\n )\n )\n )\n );\n\n loadUnitDetailsByType$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnitDetailsByType),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(`${this.routePath}UnitDetailsByType/${action.propertyId}/${dashboardEnumValue}`)\n .pipe(\n map(result => loadUnitDetailsByTypeSuccess({ unitDetailsByType: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingUnitDetailsByProperty);\n return of(loadUnitDetailsByTypeFailed());\n })\n )\n )\n )\n );\n\n loadRenewalsDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadRenewalsDetails),\n withLatestFrom(this.store.select(selectCurrentDashboardViewTypeSimpleText)),\n switchMap(([action, dashboardEnumValue]) =>\n this.restApiService\n .getData(\n `${this.routePath}RenewalsDetails/${action.propertyId}/${dashboardEnumValue}`\n )\n .pipe(\n map(renewalDetailsCombined => loadRenewalsDetailsSuccess({ renewalDetailsCombined })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingRenewalDetails);\n return of(loadRenewalsDetailsFailed());\n })\n )\n )\n )\n );\n\n loadMyProperties$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadMyProperties),\n switchMap(action =>\n this.restApiService.getData(`${this.routePath}MyProperties/${action.portfolioId}`).pipe(\n map(result => loadMyPropertiesSuccess({ myProperties: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingProperties);\n return of(loadMyPropertiesFailed());\n })\n )\n )\n )\n );\n\n loadUnitsWithActiveTurnovers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnitsWithActiveTurnovers),\n switchMap(action =>\n this.restApiService\n .getData(`Units/property/${action.propertyId}/WithActiveTurnovers`)\n .pipe(\n map(unitList => loadUnitsWithActiveTurnoversSuccess({ unitList })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UL01LoadingUnitList);\n return of(loadUnitsWithActiveTurnoversFailed());\n })\n )\n )\n )\n );\n\n loadUnitList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnitList),\n switchMap(action =>\n this.restApiService\n .getData(`Units/property/${action.propertyId}/WithNoActiveTurnovers`)\n .pipe(\n map(unitList => loadUnitListSuccess({ unitList })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UL02LoadingUnitList);\n return of(loadUnitListFailed());\n })\n )\n )\n )\n );\n\n loadUnit$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUnit),\n switchMap(action =>\n this.restApiService.getData(`Units/${action.unitId}`).pipe(\n map(unit => loadUnitSuccess({ unit })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingUnit);\n return of(loadUnitFailed());\n })\n )\n )\n )\n );\n\n updateUnit$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateUnit),\n mergeMap(action =>\n this.restApiService.update(`Units/${action.unit.id}`, action.unit).pipe(\n map(updatedUnit => updateUnitSuccess({ updatedUnit })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingUnit);\n return of(updateUnitFailed());\n })\n )\n )\n )\n );\n\n updateUnitDoNotAutoCreateTurns$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateUnitDoNotAutoCreateTurns),\n mergeMap(action =>\n this.restApiService\n .post(`Units/${action.unitId}/SetDoNotAutoCreateTurns`, {\n doNotAutoCreateTurns: action.doNotAutoCreateTurns,\n })\n .pipe(\n map(() => updateUnitDoNotAutoCreateTurnsSuccess({ doNotAutoCreateTurns: action.doNotAutoCreateTurns })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingUnit);\n return of(updateUnitDoNotAutoCreateTurnsFailed());\n })\n )\n )\n )\n );\n\n getRenewalStrategyForUnit$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getRenewalStrategyForUnit),\n switchMap(action =>\n this.renewalsService.renewalTargetForUnitId(action.unitId).pipe(\n map(unitTypeRentTarget => getRenewalStrategyForUnitSuccess({ unitTypeRentTarget })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingRenealStrategy);\n return of(getRenewalStrategyForUnitFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private restApiService: RestapiService,\n private store: Store<{}>,\n private snackbarService: SnackbarService,\n private turnoversService: TurnoversService,\n private renewalsService: RenewalsService,\n private timerService: TimerService,\n private kpiService: KpiService\n ) {}\n}\n","import { createAction, createFeatureSelector, createReducer, createSelector, on, props } from '@ngrx/store';\n\nimport { TurnoverAuditMode } from '@shared/enums/turnover-audit-mode';\nimport { TurnoversFilters } from '@shared/interfaces/turnovers-filters.interface';\n\nexport const dashboardFilterTransientFeatureKey = 'dashboardFilterTransient';\n\nexport const selectDashboardsStateTransient = createFeatureSelector(\n dashboardFilterTransientFeatureKey\n);\n\n/**\n * dashboards filters\n */\nexport const selectTurnoversFilters = createSelector(\n selectDashboardsStateTransient,\n dashboardsState => dashboardsState.turnoversFilters\n);\n\nexport interface DashboardsStateTransient {\n turnoversFilters: TurnoversFilters;\n}\n\n/**\n * set turnovers filters\n */\nexport const setTurnoversFilters = createAction(\n '[Dashboard] set turnovers filters',\n props<{ turnoversFilters: TurnoversFilters }>()\n);\n\nexport const resetTurnoversFilters = createAction('[Dashboard] reset turnovers filters');\n\nexport const initialState: DashboardsStateTransient = {\n turnoversFilters: {\n auditMode: TurnoverAuditMode.ELAPSED_DAYS,\n },\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * turnovers filters\n */\n on(setTurnoversFilters, (state, action) => ({\n ...state,\n turnoversFilters: action.turnoversFilters,\n })),\n on(resetTurnoversFilters, (state, action) => ({\n ...state,\n turnoversFilters: initialState.turnoversFilters,\n }))\n);\n","import { MetaReducer, createReducer, on } from '@ngrx/store';\n\nimport { setDashboardFilter } from '@dashboards/store/actions/dashboard-filter.actions';\nimport { hydrationMetaReducer, pathInitialValue } from '@shared/reducers/hydration-meta.reducer';\n\nexport const dashboardFilterFeatureKey = 'dashboardFilter';\n\nexport interface DashboardFilterState {\n assignee?: number;\n}\n\nexport const initialState: DashboardFilterState = pathInitialValue(\n {\n assignee: null,\n },\n dashboardFilterFeatureKey\n);\n\nexport const metaDashboardFilterReducers: Array> = [\n hydrationMetaReducer(dashboardFilterFeatureKey),\n];\n\nexport const reducer = createReducer(\n initialState,\n on(setDashboardFilter, (state, action) => ({ ...state, ...action }))\n);\n","import { ActionReducer, MetaReducer, createReducer, on } from '@ngrx/store';\n\nimport { PortfolioKpiType } from '@dashboards/models/portfolio-kpi';\nimport { VacancyLossAttrType } from '@main-application/turnovers/interfaces/vacancy-loss-attr';\nimport { VacancyLostThreshold } from '@main-application/turnovers/interfaces/vacancy-loss-threshold';\nimport { DashboardMode } from '@shared/enums/dashboard-mode';\nimport { ActiveTurnoversDetailsCombined } from '@shared/interfaces/active-turnover-details';\nimport { BreadcrumbItem } from '@shared/interfaces/breadcrumb-item';\nimport { DelinquencyDetailsCombined } from '@shared/interfaces/delinquency.interface';\nimport { EnumerationItem } from '@shared/interfaces/enumeration-item';\nimport { PropertyKpi } from '@shared/interfaces/kpi';\nimport { MyProperties } from '@shared/interfaces/my-properties.interface';\nimport { RestUnitRenewalTargetModel } from '@shared/interfaces/renevals.interface';\nimport { RenewalDetailsCombined } from '@shared/interfaces/renewal.interface';\nimport { RestPortfolioModel } from '@shared/interfaces/rest-portfolio-model.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/rest-unit-summary-model.interface';\nimport { RestTurnoverTaskModel } from '@shared/interfaces/turnover.interface';\nimport { UnitDetailsByType } from '@shared/interfaces/unit-details-by-type';\nimport { UnitDetails } from '@shared/interfaces/unit-details.interface';\nimport { RestUnitModel } from '@shared/interfaces/unit.interface';\nimport { pathInitialValue } from '@shared/reducers/hydration-meta.reducer';\n\nimport { ActiveTurnoversSummary } from '../../models/active-turnover-summary';\nimport { DelinquencySummary } from '../../models/delinquency-summary';\nimport { RenewalsSummary } from '../../models/renewals-summary';\nimport { UnitsSummary } from '../../models/units-summary';\nimport {\n clearActiveTurnoversSummary,\n clearDelinquencySummary,\n clearMyTasks,\n clearRenewalsSummary,\n clearTurnoverKanbanPortfolio,\n clearUnit,\n clearUnitSummaryByProperty,\n getRenewalStrategyForUnit,\n getRenewalStrategyForUnitFailed,\n getRenewalStrategyForUnitSuccess,\n joinProperties,\n kanbanListGenerateSuccess,\n loadActiveTurnoversDetails,\n loadActiveTurnoversDetailsFailed,\n loadActiveTurnoversDetailsSucceded,\n loadActiveTurnoversSummary,\n loadActiveTurnoversSummaryFailed,\n loadActiveTurnoversSummarySucceded,\n loadDelinquencyByUnit,\n loadDelinquencyByUnitFailed,\n loadDelinquencyByUnitSucceded,\n loadDelinquencySummary,\n loadDelinquencySummaryFailed,\n loadDelinquencySummarySucceded,\n loadMyProperties,\n loadMyPropertiesFailed,\n loadMyPropertiesSuccess,\n loadMyTasks,\n loadMyTasksError,\n loadMyTasksSuccess,\n loadPropertyKpi,\n loadPropertyKpiFailed,\n loadPropertyKpiSucceded,\n loadRenewalsDetails,\n loadRenewalsDetailsFailed,\n loadRenewalsDetailsSuccess,\n loadRenewalsSummary,\n loadRenewalsSummaryFailed,\n loadRenewalsSummarySucceded,\n loadTurnoverKanbanPortfolio,\n loadTurnoverKanbanPortfolioError,\n loadTurnoverKanbanPortfolioSuccess,\n loadTurnoverKanbanProperty,\n loadTurnoverKanbanPropertyError,\n loadTurnoverKanbanPropertySuccess,\n loadUnit,\n loadUnitDetails,\n loadUnitDetailsByType,\n loadUnitDetailsByTypeFailed,\n loadUnitDetailsByTypeSuccess,\n loadUnitDetailsFailed,\n loadUnitDetailsSuccess,\n loadUnitFailed,\n loadUnitList,\n loadUnitListFailed,\n loadUnitListSuccess,\n loadUnitSuccess,\n loadUnitSummaryByProperty,\n loadUnitSummaryByPropertyFailed,\n loadUnitSummaryByPropertySucceded,\n loadUnitsWithActiveTurnovers,\n loadUnitsWithActiveTurnoversFailed,\n loadUnitsWithActiveTurnoversSuccess,\n loadUserTurnovers,\n loadUserTurnoversError,\n loadUserTurnoversSuccess,\n myTasksHeaderData,\n resetCurrentPortfolio,\n resetCurrentProperty,\n resetTurnoverKanbanPortfolio,\n resetTurnoverKanbanProperty,\n resetUnitList,\n resetUnitsWithActiveTurnoversList,\n resetUserTurnoversError,\n selectedDashboardMode,\n selectedDashboardViewType,\n selectedPortfolioId,\n selectedPropertyId,\n setCurrentPortfolio,\n setCurrentProperty,\n setCustomBreadcrumbs,\n setVacancyLossAttrType,\n setVacancyLossThreshold,\n updateUnit,\n updateUnitDoNotAutoCreateTurns,\n updateUnitDoNotAutoCreateTurnsFailed,\n updateUnitDoNotAutoCreateTurnsSuccess,\n updateUnitFailed,\n updateUnitSuccess,\n} from '../actions/dashboard.actions';\n\nexport const dashboardsFeatureKey = 'main-dashboard';\n\nconst UPDATE_STORAGE_ACTIONS: string[] = [\n selectedPortfolioId.type,\n selectedPropertyId.type,\n joinProperties.type,\n setVacancyLossAttrType.type,\n setVacancyLossThreshold.type,\n];\n\nexport interface DashboardsState {\n propertyUserTaskList: RestTurnoverTaskModel[];\n propertyUserTaskListLoading: boolean;\n portfolioUserTaskList: RestTurnoverTaskModel[];\n portfolioUserTaskListLoading: boolean;\n userTaskList: RestTurnoverTaskModel[];\n userTaskListLoading: boolean;\n myTasks: RestTurnoverTaskModel[];\n myTasksLoading: boolean;\n myTasksTicketsCount: number;\n myTasksTurnoversCount: number;\n staleTurnoversCount: number;\n lateTurnoversCount: number;\n kanbanListLoading: boolean;\n propertyKpi: PropertyKpi;\n propertyKpiLoading: boolean;\n kanbanListCount: number;\n unitsSummaryByProperty: UnitsSummary;\n unitsSummaryByPropertyLoading: boolean;\n activeTurnoversSummary: ActiveTurnoversSummary;\n activeTurnoversSummaryLoading: boolean;\n activeTurnoversDetails: ActiveTurnoversDetailsCombined;\n activeTurnoversDetailsLoading: boolean;\n delinquencyByUnit: DelinquencyDetailsCombined;\n delinquencyByUnitLoading: boolean;\n delinquencySummary: DelinquencySummary;\n delinquencySummaryLoading: boolean;\n renewalsSummary: RenewalsSummary;\n renewalsSummaryLoading: boolean;\n selectedPropertyId: number;\n selectedPortfolioId: number;\n unitDetailsLoading: boolean;\n unitDetails: UnitDetails[];\n unitDetailsByTypeLoading: boolean;\n unitDetailsByType: UnitDetailsByType[];\n renewalDetailsCombinedLoading: boolean;\n renewalDetailsCombined: RenewalDetailsCombined;\n selectedDashboardViewType: EnumerationItem;\n portfolioItemsLoading: boolean;\n portfolioItems: RestPortfolioModel[];\n myPropertiesLoading: boolean;\n myProperties: MyProperties[];\n dashboardMode: DashboardMode;\n breadcrumbList: BreadcrumbItem[];\n unitListWithActiveTurnover: RestUnitSummaryModel[];\n unitListWithActiveTurnoverLoading: boolean;\n unitList: RestUnitSummaryModel[];\n unitListLoading: boolean;\n unit: RestUnitModel;\n unitLoading: boolean;\n unitDoNotAutoCreateTurnsLoading: boolean;\n renewalStrategyForUnit: RestUnitRenewalTargetModel;\n renewalStrategyForUnitLoading: boolean;\n currentPropertyId: number;\n currentPortfolioId: number;\n joinProperties: boolean;\n selectedVacancyLossAttr: VacancyLossAttrType;\n selectedVacancyLossThreshold: VacancyLostThreshold;\n selectedVacancyLossThresholdKpiType: PortfolioKpiType;\n selectedVacancyLossThresholdKpiTypePerTurn: PortfolioKpiType;\n}\n\nexport const initialState: DashboardsState = pathInitialValue(\n {\n activeTurnoversDetails: null,\n activeTurnoversDetailsLoading: false,\n activeTurnoversSummary: null,\n activeTurnoversSummaryLoading: false,\n breadcrumbList: [],\n currentPortfolioId: null,\n currentPropertyId: null,\n dashboardMode: null,\n delinquencyByUnit: null,\n delinquencyByUnitLoading: false,\n delinquencySummary: null,\n delinquencySummaryLoading: false,\n myProperties: [],\n myPropertiesLoading: false,\n portfolioItems: [],\n portfolioItemsLoading: false,\n portfolioUserTaskList: [],\n portfolioUserTaskListLoading: false,\n kanbanListLoading: false,\n kanbanListCount: null,\n propertyKpi: null,\n propertyKpiLoading: false,\n propertyUserTaskList: [],\n propertyUserTaskListLoading: false,\n userTaskList: [],\n userTaskListLoading: false,\n myTasks: [],\n myTasksLoading: false,\n myTasksTicketsCount: null,\n myTasksTurnoversCount: null,\n staleTurnoversCount: null,\n lateTurnoversCount: null,\n renewalDetailsCombined: null,\n renewalDetailsCombinedLoading: false,\n renewalStrategyForUnit: null,\n renewalStrategyForUnitLoading: false,\n renewalsSummary: null,\n renewalsSummaryLoading: false,\n selectedDashboardViewType: null,\n selectedPortfolioId: null,\n selectedPropertyId: undefined,\n unit: null,\n unitDetails: [],\n unitDetailsByType: [],\n unitDetailsByTypeLoading: false,\n unitDetailsLoading: false,\n unitList: [],\n unitListLoading: false,\n unitListWithActiveTurnover: [],\n unitListWithActiveTurnoverLoading: false,\n unitLoading: false,\n unitDoNotAutoCreateTurnsLoading: false,\n unitsSummaryByProperty: null,\n unitsSummaryByPropertyLoading: false,\n joinProperties: false,\n selectedVacancyLossAttr: VacancyLossAttrType.Gross,\n selectedVacancyLossThreshold: VacancyLostThreshold.None,\n selectedVacancyLossThresholdKpiType: PortfolioKpiType.VacancyLossNone,\n selectedVacancyLossThresholdKpiTypePerTurn: PortfolioKpiType.VacancyLossNoneActiveTurns,\n },\n dashboardsFeatureKey\n);\n\nconst hydrationMetaReducer = (reducer: ActionReducer): ActionReducer => {\n return (state, action) => {\n const nextState = reducer(state, action);\n if (UPDATE_STORAGE_ACTIONS.includes(action.type)) {\n localStorage.setItem(\n dashboardsFeatureKey,\n JSON.stringify({\n selectedPortfolioId: nextState.selectedPortfolioId,\n selectedPropertyId: nextState.selectedPropertyId,\n joinProperties: nextState.joinProperties,\n selectedVacancyLossAttr: nextState.selectedVacancyLossAttr,\n selectedVacancyLossThreshold: nextState.selectedVacancyLossThreshold,\n selectedVacancyLossThresholdKpiType: nextState.selectedVacancyLossThresholdKpiType,\n selectedVacancyLossThresholdKpiTypePerTurn: nextState.selectedVacancyLossThresholdKpiTypePerTurn,\n })\n );\n }\n return nextState;\n };\n};\n\nexport const metaDashboardReducers: Array> = [hydrationMetaReducer];\n\nexport const reducer = createReducer(\n initialState,\n on(loadTurnoverKanbanProperty, (state, action) => ({\n ...state,\n propertyUserTaskListLoading: true,\n })),\n on(loadTurnoverKanbanPropertySuccess, (state, action) => ({\n ...state,\n propertyUserTaskList: action.tasks,\n propertyUserTaskListLoading: false,\n })),\n on(loadTurnoverKanbanPropertyError, (state, action) => ({\n ...state,\n propertyUserTaskList: [],\n propertyUserTaskListLoading: false,\n })),\n on(resetTurnoverKanbanProperty, (state, action) => ({\n ...state,\n propertyUserTaskList: [],\n })),\n on(loadUserTurnovers, (state, action) => ({\n ...state,\n userTaskListLoading: true,\n })),\n on(loadUserTurnoversSuccess, (state, action) => ({\n ...state,\n userTaskList: action.tasks,\n userTaskListLoading: false,\n })),\n on(loadUserTurnoversError, (state, action) => ({\n ...state,\n userTaskList: [],\n userTaskListLoading: false,\n })),\n on(resetUserTurnoversError, (state, action) => ({\n ...state,\n userTaskList: [],\n })),\n on(loadMyTasks, (state, action) => ({\n ...state,\n myTasksLoading: true,\n })),\n on(loadMyTasksSuccess, (state, action) => ({\n ...state,\n myTasks: action.myTasks,\n myTasksLoading: false,\n })),\n on(loadMyTasksError, (state, action) => ({\n ...state,\n myTasks: [],\n myTasksLoading: false,\n })),\n on(clearMyTasks, (state, action) => ({\n ...state,\n myTasks: [],\n })),\n on(myTasksHeaderData, (state, action) => ({\n ...state,\n myTasksTicketsCount: action.myTasksTicketsCount,\n myTasksTurnoversCount: action.myTasksTurnoversCount,\n staleTurnoversCount: action.staleTurnoversCount,\n lateTurnoversCount: action.lateTurnoversCount,\n })),\n on(clearTurnoverKanbanPortfolio, (state, action) => ({\n ...state,\n portfolioUserTaskList: null,\n })),\n on(loadTurnoverKanbanPortfolio, (state, action) => ({\n ...state,\n portfolioUserTaskListLoading: true,\n kanbanListLoading: true,\n })),\n on(loadTurnoverKanbanPortfolioSuccess, (state, action) => ({\n ...state,\n portfolioUserTaskList: action.tasks,\n portfolioUserTaskListLoading: false,\n })),\n on(loadTurnoverKanbanPortfolioError, (state, action) => ({\n ...state,\n portfolioUserTaskList: [],\n portfolioUserTaskListLoading: false,\n kanbanListLoading: false,\n kanbanListCount: 0,\n })),\n on(resetTurnoverKanbanPortfolio, (state, action) => ({\n ...state,\n portfolioUserTaskList: [],\n })),\n on(kanbanListGenerateSuccess, (state, action) => ({\n ...state,\n kanbanListLoading: false,\n kanbanListCount: action.kanbanListCount,\n })),\n\n on(loadPropertyKpi, (state, action) => ({ ...state, propertyKpiLoading: true })),\n on(loadPropertyKpiSucceded, (state, action) => ({ ...state, propertyKpiLoading: false, propertyKpi: action.kpi })),\n on(loadPropertyKpiFailed, (state, action) => ({ ...state, propertyKpiLoading: false, propertyKpi: null })),\n on(loadUnitSummaryByProperty, (state, action) => ({ ...state, unitsSummaryByPropertyLoading: true })),\n on(loadUnitSummaryByPropertySucceded, (state, action) => ({\n ...state,\n unitsSummaryByPropertyLoading: false,\n unitsSummaryByProperty: action.unitSummary,\n })),\n on(loadUnitSummaryByPropertyFailed, (state, action) => ({\n ...state,\n unitsSummaryByPropertyLoading: false,\n unitsSummaryByProperty: null,\n })),\n on(clearUnitSummaryByProperty, (state, action) => ({\n ...state,\n unitsSummaryByProperty: null,\n })),\n on(loadActiveTurnoversSummary, (state, action) => ({ ...state, activeTurnoversSummaryLoading: true })),\n on(loadActiveTurnoversSummarySucceded, (state, action) => ({\n ...state,\n activeTurnoversSummaryLoading: false,\n activeTurnoversSummary: action.activeTurnoversSummary,\n })),\n on(loadActiveTurnoversSummaryFailed, (state, action) => ({\n ...state,\n activeTurnoversSummaryLoading: false,\n activeTurnoversSummary: null,\n })),\n on(clearActiveTurnoversSummary, (state, action) => ({\n ...state,\n activeTurnoversSummary: null,\n })),\n on(loadActiveTurnoversDetails, (state, action) => ({ ...state, activeTurnoversDetailsLoading: true })),\n on(loadActiveTurnoversDetailsSucceded, (state, action) => ({\n ...state,\n activeTurnoversDetailsLoading: false,\n activeTurnoversDetails: action.activeTurnoversDetails,\n })),\n on(loadActiveTurnoversDetailsFailed, (state, action) => ({\n ...state,\n activeTurnoversDetailsLoading: false,\n activeTurnoversDetails: null,\n })),\n on(loadDelinquencySummary, (state, action) => ({ ...state, delinquencySummaryLoading: true })),\n on(loadDelinquencySummarySucceded, (state, action) => ({\n ...state,\n delinquencySummary: action.delinquencySummary,\n delinquencySummaryLoading: false,\n })),\n on(loadDelinquencySummaryFailed, (state, action) => ({\n ...state,\n delinquencySummaryLoading: false,\n delinquencySummary: null,\n })),\n on(clearDelinquencySummary, (state, action) => ({ ...state, delinquencySummary: null })),\n\n on(loadDelinquencyByUnit, (state, action) => ({ ...state, delinquencyByUnitLoading: true })),\n on(loadDelinquencyByUnitSucceded, (state, action) => ({\n ...state,\n delinquencyByUnitLoading: false,\n delinquencyByUnit: action.delinquencyByUnit,\n })),\n on(loadDelinquencyByUnitFailed, (state, action) => ({\n ...state,\n delinquencyByUnitLoading: false,\n delinquencyByUnit: null,\n })),\n on(loadRenewalsSummary, (state, action) => ({ ...state, renewalsSummaryLoading: true })),\n on(loadRenewalsSummarySucceded, (state, action) => ({\n ...state,\n renewalsSummaryLoading: false,\n renewalsSummary: action.renewalsSummary,\n })),\n on(loadRenewalsSummaryFailed, (state, action) => ({\n ...state,\n renewalsSummaryLoading: false,\n renewalsSummary: null,\n })),\n on(clearRenewalsSummary, (state, action) => ({\n ...state,\n renewalsSummary: null,\n })),\n\n on(selectedPropertyId, (state, action) => ({ ...state, selectedPropertyId: action.propertyId })),\n\n on(loadUnitDetails, (state, action) => ({ ...state, unitDetailsLoading: true })),\n on(loadUnitDetailsSuccess, (state, action) => ({\n ...state,\n unitDetailsLoading: false,\n unitDetails: action.unitDetails,\n })),\n on(loadUnitDetailsFailed, (state, action) => ({ ...state, unitDetailsLoading: false, unitDetails: [] })),\n on(loadUnitDetailsByType, (state, action) => ({ ...state, unitDetailsByTypeLoading: true })),\n on(loadUnitDetailsByTypeSuccess, (state, action) => ({\n ...state,\n unitDetailsByTypeLoading: false,\n unitDetailsByType: action.unitDetailsByType,\n })),\n on(loadUnitDetailsByTypeFailed, (state, action) => ({\n ...state,\n unitDetailsByTypeLoading: false,\n unitDetailsByType: [],\n })),\n on(loadRenewalsDetails, (state, action) => ({ ...state, renewalDetailsCombinedLoading: true })),\n on(loadRenewalsDetailsSuccess, (state, action) => ({\n ...state,\n renewalDetailsCombinedLoading: false,\n renewalDetailsCombined: action.renewalDetailsCombined,\n })),\n on(loadRenewalsDetailsFailed, (state, action) => ({\n ...state,\n renewalDetailsCombinedLoading: false,\n renewalsDetails: {\n renewalDetailsCombined: [],\n renewalKPI: null,\n },\n })),\n on(selectedDashboardViewType, (state, action) => ({\n ...state,\n selectedDashboardViewType: action.dashboardViewType,\n })),\n on(selectedPortfolioId, (state, action) => ({ ...state, selectedPortfolioId: action.portfolioId })),\n on(loadMyProperties, (state, action) => ({ ...state, myPropertiesLoading: true })),\n on(loadMyPropertiesSuccess, (state, action) => ({\n ...state,\n myPropertiesLoading: false,\n myProperties: action.myProperties,\n })),\n on(loadMyPropertiesFailed, (state, action) => ({\n ...state,\n myPropertiesLoading: false,\n myProperties: [],\n })),\n on(selectedDashboardMode, (state, action) => ({ ...state, dashboardMode: action.dashboardMode })),\n on(setCustomBreadcrumbs, (state, action) => ({ ...state, breadcrumbList: action.breadcrumbList })),\n\n /**\n * load Units With Active Turnovers\n */\n on(loadUnitsWithActiveTurnovers, (state, action) => ({ ...state, unitListWithActiveTurnoverLoading: true })),\n on(loadUnitsWithActiveTurnoversSuccess, (state, action) => ({\n ...state,\n unitListWithActiveTurnover: action.unitList,\n unitListWithActiveTurnoverLoading: false,\n })),\n on(loadUnitsWithActiveTurnoversFailed, (state, action) => ({\n ...state,\n unitListWithActiveTurnover: [],\n unitListWithActiveTurnoverLoading: false,\n })),\n on(resetUnitsWithActiveTurnoversList, (state, action) => ({\n ...state,\n unitListWithActiveTurnover: [],\n })),\n /**\n * load Units With Active Turnovers\n */\n on(loadUnitList, (state, action) => ({ ...state, unitListLoading: true })),\n on(loadUnitListSuccess, (state, action) => ({\n ...state,\n unitList: action.unitList,\n unitListLoading: false,\n })),\n on(loadUnitListFailed, (state, action) => ({\n ...state,\n unitList: [],\n unitListLoading: false,\n })),\n on(resetUnitList, (state, action) => ({\n ...state,\n unitList: [],\n })),\n\n /**\n * load Unit\n */\n on(loadUnit, (state, action) => ({ ...state, unitLoading: true })),\n on(loadUnitSuccess, (state, action) => ({\n ...state,\n unit: action.unit,\n unitLoading: false,\n })),\n on(loadUnitFailed, (state, action) => ({\n ...state,\n unit: null,\n unitLoading: false,\n })),\n on(clearUnit, (state, action) => ({\n ...state,\n unit: null,\n })),\n\n /**\n * update Unit\n */\n on(updateUnit, (state, action) => ({ ...state, unitLoading: true })),\n on(updateUnitSuccess, (state, action) => ({\n ...state,\n unit: action.updatedUnit,\n unitLoading: false,\n })),\n on(updateUnitFailed, (state, action) => ({\n ...state,\n unit: null,\n unitLoading: false,\n })),\n\n /**\n * update Unit DoNotAutoCreateTurns\n */\n on(updateUnitDoNotAutoCreateTurns, (state, action) => ({ ...state, unitDoNotAutoCreateTurnsLoading: true })),\n on(updateUnitDoNotAutoCreateTurnsSuccess, (state, action) => ({\n ...state,\n unit: { ...state.unit, doNotAutoCreateTurns: action.doNotAutoCreateTurns },\n unitDoNotAutoCreateTurnsLoading: false,\n })),\n on(updateUnitDoNotAutoCreateTurnsFailed, (state, action) => ({\n ...state,\n unit: { ...state.unit },\n unitDoNotAutoCreateTurnsLoading: false,\n })),\n\n /**\n * get renewal Strategy For Unit\n */\n on(getRenewalStrategyForUnit, (state, action) => ({ ...state, renewalStrategyForUnitLoading: true })),\n on(getRenewalStrategyForUnitSuccess, (state, action) => ({\n ...state,\n renewalStrategyForUnit: action.unitTypeRentTarget,\n renewalStrategyForUnitLoading: false,\n })),\n on(getRenewalStrategyForUnitFailed, (state, action) => ({\n ...state,\n renewalStrategyForUnit: null,\n renewalStrategyForUnitLoading: false,\n })),\n /**\n * current portfolio\n */\n on(setCurrentPortfolio, (state, action) => ({\n ...state,\n currentPortfolioId: action.portfolioId,\n })),\n on(resetCurrentPortfolio, (state, action) => ({\n ...state,\n currentPortfolioId: null,\n })),\n\n /**\n * current property\n */\n on(setCurrentProperty, (state, action) => ({\n ...state,\n currentPropertyId: action.propertyId,\n })),\n on(resetCurrentProperty, (state, action) => ({\n ...state,\n currentPropertyId: null,\n })),\n on(joinProperties, (state, action) => ({\n ...state,\n joinProperties: action.state,\n })),\n on(setVacancyLossAttrType, (state, action) => ({\n ...state,\n selectedVacancyLossAttr: action.attrType,\n })),\n on(setVacancyLossThreshold, (state, action) => {\n let selectedVacancyLossThresholdKpiType, selectedVacancyLossThresholdKpiTypePerTurn: PortfolioKpiType;\n switch (action.thresholdType) {\n case VacancyLostThreshold.None:\n selectedVacancyLossThresholdKpiType = PortfolioKpiType.VacancyLossNone;\n selectedVacancyLossThresholdKpiTypePerTurn = PortfolioKpiType.VacancyLossNoneActiveTurns;\n break;\n case VacancyLostThreshold.Medium:\n selectedVacancyLossThresholdKpiType = PortfolioKpiType.VacancyLossMedium;\n selectedVacancyLossThresholdKpiTypePerTurn = PortfolioKpiType.VacancyLossMediumActiveTurns;\n break;\n case VacancyLostThreshold.High:\n selectedVacancyLossThresholdKpiType = PortfolioKpiType.VacancyLossHigh;\n selectedVacancyLossThresholdKpiTypePerTurn = PortfolioKpiType.VacancyLossHighActiveTurns;\n break;\n }\n return {\n ...state,\n selectedVacancyLossThreshold: action.thresholdType,\n selectedVacancyLossThresholdKpiType,\n selectedVacancyLossThresholdKpiTypePerTurn,\n };\n })\n);\n","import { MetaReducer, createReducer, on } from '@ngrx/store';\n\nimport { RestPortfolioKpi } from '@dashboards/models/portfolio-kpi';\nimport {\n clearPortfolioKpiTrendLines,\n clearPortfolioKpis,\n loadPortfolioKpiTrendLines,\n loadPortfolioKpis,\n loadPortfolioKpisFailed,\n loadPortfolioKpisTrend,\n loadPortfolioKpisTrendFailed,\n setChartSelectorValue,\n setChartSettingsValue,\n setPortfolioKpiTrendLines,\n setPortfolioKpis,\n setPortfolioKpisFilter,\n setPortfolioKpisTrend,\n} from '@dashboards/store/actions/kpi.actions';\nimport { KpiType } from '@shared/enums/kpi-type';\nimport { KpiWindowType } from '@shared/enums/kpi-window-type';\nimport { PortfolioKpiFilter } from '@shared/interfaces/portfolio-kpi-filter';\nimport { hydrationMetaReducer, pathInitialValue } from '@shared/reducers/hydration-meta.reducer';\n\nexport const kpiFeatureKey = 'dashboard-kpis';\n\nexport interface DashboardKpisState {\n portfolioKpis: RestPortfolioKpi[];\n portfolioKpisLoading: boolean;\n portfolioKpisTrend: RestPortfolioKpi[];\n portfolioKpisTrendLoading: boolean;\n portfolioKpisFilter: PortfolioKpiFilter;\n portfolioKpiTrendLines: RestPortfolioKpi[];\n portfolioKpiTrendLinesLoading: boolean;\n chartSelectors: {\n [key: string]: number;\n };\n chartSettings: {\n [key: string]: any;\n };\n}\n\nexport const initialState: DashboardKpisState = pathInitialValue(\n {\n portfolioKpis: [],\n portfolioKpisTrendLoading: false,\n portfolioKpisFilter: {\n windowType: KpiWindowType.Days30,\n type: KpiType.All,\n },\n portfolioKpisLoading: false,\n portfolioKpisTrend: [],\n portfolioKpiTrendLines: [],\n portfolioKpiTrendLinesLoading: false,\n chartSelectors: {},\n chartSettings: {},\n },\n kpiFeatureKey\n);\n\nexport const metaDashboardKpiReducers: Array> = [\n hydrationMetaReducer(kpiFeatureKey),\n];\n\nexport const reducer = createReducer(\n initialState,\n on(setPortfolioKpis, (state, action) => ({\n ...state,\n portfolioKpisLoading: false,\n portfolioKpis: action.kpis,\n })),\n on(setPortfolioKpisTrend, (state, action) => ({\n ...state,\n portfolioKpisTrendLoading: false,\n portfolioKpisTrend: action.kpis,\n })),\n on(loadPortfolioKpis, (state, action) => ({\n ...state,\n portfolioKpisLoading: true,\n })),\n on(loadPortfolioKpisTrend, (state, action) => ({\n ...state,\n portfolioKpisTrendLoading: true,\n })),\n on(loadPortfolioKpisFailed, (state, action) => ({\n ...state,\n portfolioKpisLoading: false,\n })),\n on(loadPortfolioKpisTrendFailed, (state, action) => ({\n ...state,\n portfolioKpisTrendLoading: false,\n })),\n on(setPortfolioKpisFilter, (state, action) => ({\n ...state,\n portfolioKpisFilter: action.portfolioKpisFilter,\n })),\n on(clearPortfolioKpis, state => ({\n ...state,\n portfolioKpis: [],\n portfolioKpisTrend: [],\n })),\n on(setPortfolioKpiTrendLines, (state, action) => ({\n ...state,\n portfolioKpiTrendLines: action.kpis,\n portfolioKpiTrendLinesLoading: false,\n })),\n on(clearPortfolioKpiTrendLines, state => ({\n ...state,\n portfolioKpiTrendLines: [],\n })),\n on(setChartSelectorValue, (state, action) => ({\n ...state,\n chartSelectors: { ...state.chartSelectors, [action.selectorId]: action.value },\n })),\n on(setChartSettingsValue, (state, action) => ({\n ...state,\n chartSettings: { ...state.chartSettings, [action.chartId]: action.value },\n })),\n on(loadPortfolioKpiTrendLines, state => ({\n ...state,\n portfolioKpiTrendLinesLoading: true,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromDashboards from '../reducers/dashboards.reducer';\n\nexport const selectDashboardsState = createFeatureSelector(\n fromDashboards.dashboardsFeatureKey\n);\n\nexport const selectPropertyUserTaskList = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.propertyUserTaskList\n);\nexport const selectPropertyUserTaskListLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.propertyUserTaskListLoading\n);\n\nexport const selectMyTasks = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.myTasks);\nexport const selectMyTasksLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.myTasksLoading\n);\nexport const selectMyTasksTurnoversCount = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.myTasksTurnoversCount\n);\nexport const selectStaleTurnoversCount = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.staleTurnoversCount\n);\nexport const selectLateTurnoversCount = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.lateTurnoversCount\n);\n\nexport const selectMyTasksTicketsCount = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.myTasksTicketsCount\n);\n\nexport const selectUserTaskList = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.userTaskList\n);\nexport const selectUserTaskListLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.userTaskListLoading\n);\n\nexport const selectPortfolioUserTaskList = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.portfolioUserTaskList\n);\nexport const selectPortfolioUserTaskListLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.portfolioUserTaskListLoading\n);\nexport const selectKanbanListLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.kanbanListLoading\n);\n\nexport const selectKanbanListCount = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.kanbanListCount\n);\n\nexport const selectPropertyKpiLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.propertyKpiLoading\n);\n\nexport const selectPropertyKpi = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.propertyKpi);\n\nexport const selectSelectedPropertyId = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedPropertyId\n);\n\nexport const selectUnitsSummaryByProperty = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitsSummaryByProperty\n);\nexport const selectUnitsSummaryByPropertyLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitsSummaryByPropertyLoading\n);\n\nexport const selectActiveTurnoversSummary = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.activeTurnoversSummary\n);\nexport const selectActiveTurnoversSummaryLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.activeTurnoversSummaryLoading\n);\n\nexport const selectActiveTurnoversDetails = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.activeTurnoversDetails\n);\nexport const selectActiveTurnoversDetailsLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.activeTurnoversDetailsLoading\n);\n\nexport const selectDelinquencyByUnit = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.delinquencyByUnit\n);\nexport const selectDelinquencyByUnitLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.delinquencyByUnitLoading\n);\n\nexport const selectDelinquencySummary = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.delinquencySummary\n);\nexport const selectDelinquencySummaryLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.delinquencySummaryLoading\n);\n\nexport const selectRenewalsSummary = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalsSummary\n);\nexport const selectRenewalsSummaryLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalsSummaryLoading\n);\n\nexport const selectUnitDetails = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.unitDetails);\nexport const selectUnitDetailsLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitDetailsLoading\n);\n\nexport const selectUnitDetailsByType = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitDetailsByType\n);\nexport const selectUnitDetailsByTypeLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitDetailsByTypeLoading\n);\n\nexport const selectLoadRenewalsDetails = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalDetailsCombined\n);\nexport const selectLoadRenewalsDetailsLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalDetailsCombinedLoading\n);\n\nexport const selectCurrentDashboardViewType = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedDashboardViewType\n);\n\nexport const selectCurrentDashboardViewTypeSimpleText = createSelector(\n selectCurrentDashboardViewType,\n selectedDashboardViewType => selectedDashboardViewType?.simpleText\n);\n\nexport const selectCurrentDashboardViewTypeEnumerationValue = createSelector(\n selectCurrentDashboardViewType,\n selectedDashboardViewType => selectedDashboardViewType?.enumerationValue\n);\n\nexport const selectSelectedPortfolioId = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedPortfolioId\n);\n\nexport const selectMyProperties = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.myProperties\n);\n\nexport const selectMyPropertiesLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.myPropertiesLoading\n);\n\nexport const selectSelectedDashboardMode = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.dashboardMode\n);\n\nexport const selectCustomBreadcrumbs = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.breadcrumbList\n);\n/**\n * select Units With Active Turnovers\n */\n\nexport const selectUnitListWithActiveTurnover = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitListWithActiveTurnover\n);\nexport const selectUnitListWithActiveTurnoverLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitListWithActiveTurnoverLoading\n);\n\n/**\n * select Unit list\n */\nexport const selectUnitList = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.unitList);\nexport const selectUnitListLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitListLoading\n);\n\n/**\n * select unit\n */\nexport const selectUnit = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.unit);\nexport const selectUnitLoading = createSelector(selectDashboardsState, dashboardsState => dashboardsState?.unitLoading);\n\n/**\n * select unit unitDoNotAutoCreateTurnsLoading\n */\nexport const selectUnitDoNotAutoCreateTurnsLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.unitDoNotAutoCreateTurnsLoading\n);\n\n/**\n * select renewal Strategy For Unit\n */\nexport const selectRenewalStrategyForUnit = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalStrategyForUnit\n);\nexport const selectRenewalStrategyForUnitLoading = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.renewalStrategyForUnitLoading\n);\n\n/**\n * current property\n */\nexport const selectCurrentProperty = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.currentPropertyId\n);\n\n/**\n * current portfolio\n */\nexport const selectCurrentPortfolio = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.currentPortfolioId\n);\n\nexport const selectJoinProperties = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.joinProperties\n);\n\nexport const selectSelectedVacancyLossAttr = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedVacancyLossAttr\n);\n\nexport const selectSelectedVacancyLossThreshold = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedVacancyLossThreshold\n);\n\nexport const selectSelectedVacancyLossThresholdKpiType = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedVacancyLossThresholdKpiType\n);\n\nexport const selectSelectedVacancyLossThresholdKpiTypePerTurn = createSelector(\n selectDashboardsState,\n dashboardsState => dashboardsState?.selectedVacancyLossThresholdKpiTypePerTurn\n);\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n createNewSpaceTemplate,\n deleteSpaceTemplate,\n loadAllCategories,\n loadAllCategoriesFailed,\n loadAllCategoriesSuccess,\n loadAllSpaceTemplates,\n loadAllSpaceTemplatesFailed,\n loadAllSpaceTemplatesSuccess,\n updateSpaceTemplateDetails,\n updateSpaceTemplateDetailsFailed,\n} from './space-template.actions';\nimport {\n RestSharedInspectionSpaceCategory,\n RestSpaceTemplateModel,\n} from '../models/rest-space-template-model.interface';\n\n@Injectable()\nexport class SpaceTemplateEffects {\n loadAllTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllSpaceTemplates),\n exhaustMap(() =>\n this.restApiService.getData(`inspections/sharedSpaces/list`).pipe(\n map(result => loadAllSpaceTemplatesSuccess({ listItems: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingSpaceTemplatesList);\n return of(loadAllSpaceTemplatesFailed());\n })\n )\n )\n )\n );\n\n loadAllCategories$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllCategories),\n exhaustMap(() =>\n this.restApiService\n .getData(`inspections/sharedSpaces/categories/list`)\n .pipe(\n map(result => loadAllCategoriesSuccess({ categoriesList: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingCategories);\n return of(loadAllCategoriesFailed());\n })\n )\n )\n )\n );\n\n updateSpaceTemplateDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateSpaceTemplateDetails),\n mergeMap(action =>\n this.restApiService\n .post(\n `inspections/sharedSpaces/${action.entityDetails.id}/edit`,\n action.entityDetails\n )\n .pipe(\n mergeMap(() => [loadAllSpaceTemplates()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpadtingSpaceTemplate);\n return of(updateSpaceTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n createNewSpaceTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createNewSpaceTemplate),\n mergeMap(action =>\n this.restApiService.create(`inspections/sharedSpaces/add`, action.entityDetails).pipe(\n tap(id =>\n this.router\n .navigate([AppRoutes.SETTINGS_SPACE_TEMPLATE, id], {\n queryParamsHandling: 'preserve',\n })\n .then()\n ),\n mergeMap(() => [loadAllSpaceTemplates()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileCreatingNewSpaceTemplate);\n return of(updateSpaceTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n deleteSpaceTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteSpaceTemplate),\n mergeMap(action =>\n this.restApiService.post(`inspections/sharedSpaces/${action.id}/delete`).pipe(\n map(() => loadAllSpaceTemplates()),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RemovingSpaceTemplate);\n return of(updateSpaceTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private restApiService: RestapiService,\n private snackbarService: SnackbarService,\n private router: Router\n ) {}\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { SurveysEffects } from '@main-application/survey-creator/effects/surveys.effects';\nimport * as fromSurveyReducer from '@main-application/survey-creator/reducers/surveys.reducer';\n\nimport { SpaceTemplateEffects } from './space-template.effects';\nimport * as fromSpaceTemplateReducer from './space-template.reducer';\n@NgModule({\n declarations: [],\n imports: [\n EffectsModule.forFeature([SpaceTemplateEffects, SurveysEffects]),\n StoreModule.forFeature(fromSpaceTemplateReducer.spaceTemplateFeatureKey, fromSpaceTemplateReducer.reducer),\n StoreModule.forFeature(fromSurveyReducer.surveysFeatureKey, fromSurveyReducer.reducer),\n ],\n})\nexport class SpaceTemplateStoreModule {}\n","import { createAction, props } from '@ngrx/store';\n\nimport {\n RestSharedInspectionSpaceCategory,\n RestSpaceTemplateModel,\n} from '../models/rest-space-template-model.interface';\n\n/* Templates List */\nexport const loadAllSpaceTemplates = createAction('[SpaceTemplate] Load all space template');\nexport const loadAllSpaceTemplatesSuccess = createAction(\n '[SpaceTemplate] All space template loaded successfully',\n props<{ listItems: RestSpaceTemplateModel[] }>()\n);\nexport const loadAllSpaceTemplatesFailed = createAction('[SpaceTemplate] All space template loading failed');\n\n/* Add new space template */\nexport const createNewSpaceTemplate = createAction(\n '[SpaceTemplate] Add new space template',\n props<{ entityDetails: RestSpaceTemplateModel }>()\n);\nexport const updateSpaceTemplateDetails = createAction(\n '[SpaceTemplate] Update new space template',\n props<{ entityDetails: RestSpaceTemplateModel }>()\n);\nexport const updateSpaceTemplateDetailsFailed = createAction('[SpaceTemplate] Update space template failed');\n\n/* Delete space template */\nexport const deleteSpaceTemplate = createAction('[SpaceTemplate] Remove space template', props<{ id: number }>());\nexport const clearSpaceTemplateData = createAction('[SpaceTemplate] Clear space template data');\n\n/* Load categories */\nexport const loadAllCategories = createAction('[SpaceTemplate] Load unit types of exact property');\nexport const loadAllCategoriesSuccess = createAction(\n '[SpaceTemplate] All unit types loaded successfully',\n props<{ categoriesList: RestSharedInspectionSpaceCategory[] }>()\n);\nexport const loadAllCategoriesFailed = createAction('[SpaceTemplate] All unit types loading failed');\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n clearSpaceTemplateData,\n loadAllCategoriesFailed,\n loadAllCategoriesSuccess,\n loadAllSpaceTemplates,\n loadAllSpaceTemplatesFailed,\n loadAllSpaceTemplatesSuccess,\n} from './space-template.actions';\nimport {\n RestSharedInspectionSpaceCategory,\n RestSpaceTemplateModel,\n} from '../models/rest-space-template-model.interface';\n\nexport const spaceTemplateFeatureKey = 'space-template';\n\nexport interface SpaceTemplateState {\n listItemsLoading?: boolean;\n listItems?: RestSpaceTemplateModel[];\n categories?: RestSharedInspectionSpaceCategory[];\n\n entityUpdateOngoing?: boolean;\n deleteEntityOngoing?: boolean;\n}\n\nexport const initialState: SpaceTemplateState = {\n listItemsLoading: false,\n entityUpdateOngoing: false,\n deleteEntityOngoing: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n /* Templates List */\n on(loadAllSpaceTemplates, (state, action) => ({ ...state, listItemsLoading: true })),\n on(loadAllSpaceTemplatesSuccess, (state, action) => ({\n ...state,\n listItemsLoading: false,\n listItems: action.listItems,\n deleteEntityOngoing: false,\n })),\n on(loadAllSpaceTemplatesFailed, (state, action) => ({\n ...state,\n listItemsLoading: false,\n listItems: [],\n deleteEntityOngoing: false,\n })),\n on(clearSpaceTemplateData, (state, action) => ({\n ...state,\n listItemsLoading: false,\n entityUpdateOngoing: false,\n deleteEntityOngoing: false,\n })),\n on(loadAllCategoriesSuccess, (state, action) => ({\n ...state,\n categories: action.categoriesList,\n })),\n on(loadAllCategoriesFailed, (state, action) => ({\n ...state,\n unitTypes: [],\n }))\n);\n","export enum TEMPLATE_VIEWS {\n NEW_TEMPLATE = 'new-template',\n NEW_AREA = 'new-area',\n AREA = 'area',\n}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { SurveysService } from '@app/services/surveys.service';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { RestTemplateModel } from '@template/models/rest-template-model.interface';\nimport {\n createTemplateDetails,\n deleteTemplate,\n loadAllUnitTypes,\n loadAllUnitTypesFailed,\n loadAllUnitTypesSuccess,\n loadAllUserTemplates,\n loadAllUserTemplatesFailed,\n loadAllUserTemplatesSuccess,\n removeAreaFromTemplate,\n updateTemplateDetails,\n updateTemplateDetailsFailed,\n} from '@template/store/template.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@Injectable()\nexport class TemplateEffects {\n loadAllTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllUserTemplates),\n mergeMap(() =>\n this.restApiService\n .getData(`inspections/template/list?filterUnavailableTemplates=false`)\n .pipe(\n map(result => loadAllUserTemplatesSuccess({ listItems: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingTemplatesList);\n return of(loadAllUserTemplatesFailed());\n })\n )\n )\n )\n );\n\n loadAllUnitTypes$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllUnitTypes),\n exhaustMap(action =>\n this.restApiService.getData(`properties/${action.propertyId}/unitTypes`).pipe(\n map(result => loadAllUnitTypesSuccess({ unitTypes: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingUnitTypes);\n return of(loadAllUnitTypesFailed());\n })\n )\n )\n )\n );\n\n updateTemplateDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTemplateDetails),\n mergeMap(action =>\n this.restApiService.post(`inspections/template/edit`, action.entityDetails).pipe(\n mergeMap(templateDetails => [loadAllUserTemplates()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingTemplate);\n return of(updateTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n removeAreaFromTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removeAreaFromTemplate),\n mergeMap(action =>\n this.surveyService.delete(action.areaId).pipe(\n mergeMap(() => [loadAllUserTemplates()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileDeletingPropertyFromTemplate);\n return of(updateTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n createTemplateDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createTemplateDetails),\n mergeMap(action =>\n this.restApiService.create(`inspections/template/add`, action.entityDetails).pipe(\n tap(id =>\n this.router.navigate([AppRoutes.SETTINGS_TEMPLATE, id], { queryParamsHandling: 'preserve' }).then()\n ),\n mergeMap(() =>\n action.entityDetails.inspectionTemplateAreas\n ? action.entityDetails.inspectionTemplateAreas.map(s => this.surveyService.add({ ...s, id: 0 }))\n : of(undefined)\n ),\n mergeMap(() => [loadAllUserTemplates()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileCreatingNewTemplate);\n return of(updateTemplateDetailsFailed());\n })\n )\n )\n )\n );\n\n deleteTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteTemplate),\n mergeMap(action =>\n this.restApiService.post('inspections/template/delete', action.id).pipe(\n map(() => loadAllUserTemplates()),\n catchError(err => {\n if (err?.error?.['ErrorCode'] === 'inspection_template_delete_unavailable') {\n this.snackbarService.error(SnackbarErrorMessage.RemovingTemplateInUse);\n } else {\n this.snackbarService.error(SnackbarErrorMessage.RemovingTemplate);\n }\n\n return of(updateTemplateDetailsFailed(), loadAllUserTemplates());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private restApiService: RestapiService,\n private surveyService: SurveysService,\n private snackbarService: SnackbarService,\n private router: Router\n ) {}\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { SurveysEffects } from '@main-application/survey-creator/effects/surveys.effects';\nimport * as fromSurveyReducer from '@main-application/survey-creator/reducers/surveys.reducer';\n\nimport { TemplateEffects } from './template.effects';\nimport * as fromTemplateReducer from './template.reducer';\n\n@NgModule({\n declarations: [],\n imports: [\n EffectsModule.forFeature([TemplateEffects, SurveysEffects]),\n StoreModule.forFeature(fromTemplateReducer.templateFeatureKey, fromTemplateReducer.reducer),\n StoreModule.forFeature(fromSurveyReducer.surveysFeatureKey, fromSurveyReducer.reducer),\n ],\n})\nexport class TemplateStoreModule {}\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestTemplateModel } from '@template/models/rest-template-model.interface';\n\n/* Templates List */\nexport const loadAllUserTemplates = createAction('[Template] Load all template');\nexport const loadAllUserTemplatesSuccess = createAction(\n '[Template] All template loaded successfully',\n props<{ listItems: RestTemplateModel[] }>()\n);\nexport const loadAllUserTemplatesFailed = createAction('[Template] All template loading failed');\n\n/* Add new template */\nexport const createTemplateDetails = createAction(\n '[Template] Add new template',\n props<{ entityDetails: RestTemplateModel }>()\n);\nexport const updateTemplateDetails = createAction(\n '[Template] Update new template',\n props<{ entityDetails: RestTemplateModel }>()\n);\nexport const updateTemplateDetailsFailed = createAction('[Template] Update template failed');\n\n/* Delete template */\nexport const deleteTemplate = createAction('[Template] Remove template', props<{ id: number }>());\nexport const clearTemplateData = createAction('[Template] Clear template data');\n\n/* Delete template */\nexport const removeAreaFromTemplate = createAction('[Template] Remove area from template', props<{ areaId: number }>());\n/* Load unit types */\nexport const loadAllUnitTypes = createAction(\n '[Template] Load unit types of exact property',\n props<{ propertyId: number }>()\n);\nexport const loadAllUnitTypesSuccess = createAction(\n '[Template] All unit types loaded successfully',\n props<{ unitTypes: string[] }>()\n);\nexport const loadAllUnitTypesFailed = createAction('[Template] All unit types loading failed');\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n addInspectionSurveyTemplate,\n saveInspectionSurveyTemplateSuccess,\n updateInspectionSurveyTemplate,\n} from '@main-application/survey-creator/actions/surveys.actions';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { RestTemplateModel } from '@template/models/rest-template-model.interface';\nimport {\n clearTemplateData,\n createTemplateDetails,\n deleteTemplate,\n loadAllUnitTypesFailed,\n loadAllUnitTypesSuccess,\n loadAllUserTemplates,\n loadAllUserTemplatesFailed,\n loadAllUserTemplatesSuccess,\n removeAreaFromTemplate,\n updateTemplateDetails,\n updateTemplateDetailsFailed,\n} from '@template/store/template.actions';\n\nexport const templateFeatureKey = 'template';\n\nexport interface TemplateState {\n listItemsLoading?: boolean;\n listItems?: RestTemplateModel[];\n unitTypes?: string[];\n\n entityUpdateOngoing?: boolean;\n deleteEntityOngoing?: boolean;\n\n templateAreaUpdateOngoing?: boolean;\n templateAreaRemoveOngoing?: boolean;\n templateAreaUpdateStatus?: UpdateStatus;\n}\n\nexport const initialState: TemplateState = {\n listItemsLoading: false,\n entityUpdateOngoing: false,\n deleteEntityOngoing: false,\n templateAreaUpdateOngoing: false,\n templateAreaRemoveOngoing: false,\n templateAreaUpdateStatus: null,\n};\n\nexport const reducer = createReducer(\n initialState,\n /* Templates List */\n on(loadAllUserTemplates, (state, action) => ({ ...state, listItemsLoading: true })),\n on(loadAllUserTemplatesSuccess, (state, action) => ({\n ...state,\n listItemsLoading: false,\n listItems: action.listItems,\n entityUpdateOngoing: false,\n deleteEntityOngoing: false,\n templateAreaUpdateOngoing: false,\n templateAreaRemoveOngoing: false,\n })),\n on(updateTemplateDetails, createTemplateDetails, (state, action) => ({ ...state, entityUpdateOngoing: true })),\n on(deleteTemplate, (state, action) => ({ ...state, deleteEntityOngoing: true })),\n on(updateTemplateDetailsFailed, (state, action) => ({ ...state, deleteEntityOngoing: false })),\n on(clearTemplateData, (state, action) => ({\n ...state,\n listItemsLoading: false,\n entityUpdateOngoing: false,\n deleteEntityOngoing: false,\n templateAreaUpdateOngoing: false,\n templateAreaRemoveOngoing: false,\n templateAreaUpdateStatus: null,\n })),\n on(loadAllUserTemplatesFailed, (state, action) => ({\n ...state,\n listItemsLoading: false,\n listItems: [],\n deleteEntityOngoing: false,\n })),\n\n /* Template Survey & Area */\n on(addInspectionSurveyTemplate, updateInspectionSurveyTemplate, (state, action) => ({\n ...state,\n templateAreaUpdateOngoing: true,\n templateAreaUpdateStatus: UpdateStatus.IN_PROGRESS,\n })),\n on(saveInspectionSurveyTemplateSuccess, (state, action) => ({\n ...state,\n templateAreaUpdateStatus: UpdateStatus.UPDATED,\n })),\n on(removeAreaFromTemplate, (state, action) => ({ ...state, templateAreaRemoveOngoing: true })),\n\n /* Unit types */\n on(loadAllUnitTypesSuccess, (state, action) => ({\n ...state,\n unitTypes: action.unitTypes,\n })),\n on(loadAllUnitTypesFailed, (state, action) => ({\n ...state,\n unitTypes: [],\n }))\n);\n","import { Component, Inject, OnInit, QueryList, ViewChildren } from '@angular/core';\nimport { FormBuilder, NgControl, ValidationErrors, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonType } from '@shared/enums/button-type';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { InputErrorService } from '@ui-components/components/input-error/services/input-error.service';\nimport { EmailPatternValidator } from '@ui-components/validators/email.validator';\n\n@Component({\n selector: 'app-send-inspection',\n templateUrl: './send-inspection.component.html',\n styleUrls: ['./send-inspection.component.scss'],\n})\nexport class SendInspectionComponent implements OnInit {\n ButtonType = ButtonType;\n\n form = this.formBuilder.group({\n to: [null, [Validators.required, EmailPatternValidator, Validators.email]],\n subject: [null, [Validators.required]],\n body: [null],\n });\n isSubmitted = false;\n\n @ViewChildren(NgControl) controls: QueryList;\n\n constructor(\n private formBuilder: FormBuilder,\n private dialogRef: MatDialogRef,\n private inputErrorService: InputErrorService,\n private snackbarService: SnackbarService,\n @Inject(MAT_DIALOG_DATA) inspectionTitle: string\n ) {\n this.form.patchValue({ subject: inspectionTitle });\n }\n\n ngOnInit(): void {}\n\n ok() {\n this.isSubmitted = true;\n\n if (this.form.valid) {\n this.dialogRef.close({\n ...this.form.value,\n to: [this.form.value.to],\n });\n } else {\n const errors: ValidationErrors = this.controls\n .toArray()\n .flatMap(control => control.control.errors)\n .reduce((acc, cur) => ({ ...acc, ...cur }), {});\n\n const strErrors = (Object.entries(errors) || [])\n .filter(([key, errorParams]) => !!errorParams)\n .map(([key, errorParams]) => {\n return this.inputErrorService.getValidationMessage(key, errorParams);\n });\n this.snackbarService.error(strErrors.join('
'));\n }\n }\n}\n","

Email copy of inspection (as a .pdf)

\n\n
\n \n \n \n \n
\n\n \n \n\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { Observable, firstValueFrom } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { TimezoneEntityHelper } from '@main-application/management/components/system-configuration/components/timezone-entity.helper';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport { SendInspectionComponent } from '../components/send-inspection/send-inspection.component';\nimport {\n RestInspectionContents,\n RestInspectionCreateModel,\n RestInspectionsModel,\n SendInspectionReportRequest,\n} from '../models/rest-inspections-model.interface';\n\n@Injectable()\nexport class InspectionService {\n private _currentSurvey: RestInspectionContents | undefined;\n\n get survey() {\n return this._currentSurvey;\n }\n\n constructor(\n private readonly snackbarService: SnackbarService,\n private restApiService: RestapiService,\n private readonly matDialog: MatDialog\n ) {}\n\n private static fixTimezoneForRestInspectionsModelList(data: RestInspectionsModel[], timezone: number) {\n data.forEach(e => TimezoneEntityHelper.fixTimezoneForRestInspectionsModelToClient(e, timezone));\n return data;\n }\n\n list() {\n return this.restApiService.getData(\n `inspections/list?doNotReturnContent=true`,\n InspectionService.fixTimezoneForRestInspectionsModelList\n );\n }\n\n updateCalendarView(inspectionModel: RestInspectionsModel) {\n return this.restApiService.post(\n `inspections/updateCalendarView/${inspectionModel.id}`,\n {\n calendarPosition: inspectionModel.calendarPosition,\n dueDate: inspectionModel.dueDate,\n },\n TimezoneEntityHelper.fixTimezoneForRestInspectionsModelToServer\n );\n }\n\n create(inspectionModel: RestInspectionCreateModel): Observable {\n return this.restApiService.create(`inspections/add`, inspectionModel);\n }\n\n delete(inspectionId: number): Observable {\n return this.restApiService.delete(`inspections/${inspectionId}`);\n }\n\n getById(inspectionId: number) {\n return this.restApiService.getData(`inspections/${inspectionId}`);\n }\n\n getBeUnitId(unitId: number) {\n return this.restApiService.getData(`inspections/ByUnit/${unitId}`);\n }\n\n async openSendDialog(id: number, inspectionTitle: string) {\n const config: MatDialogConfig = {\n minWidth: '500px',\n panelClass: 'send-inspection-report-modal-container',\n data: inspectionTitle,\n };\n\n const sendRequest = await firstValueFrom(\n this.matDialog\n .open(SendInspectionComponent, config)\n .afterClosed()\n );\n\n if (sendRequest) {\n this.sendReport(id, sendRequest).subscribe({\n next: () => this.snackbarService.success(SnackbarErrorMessage.InspectionReportSentSuccessfully),\n error: error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorSendingInspectionReport);\n console.error(error);\n },\n });\n }\n }\n\n sendReport(inspectionId: number, request: SendInspectionReportRequest) {\n return this.restApiService.post(`inspections/${inspectionId}/sendReport`, request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { of } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\n\nimport { KpiService } from '@app/services/kpi.service';\nimport {\n loadPortfolioKpiTrendLines,\n loadPortfolioKpis,\n loadPortfolioKpisFailed,\n loadPortfolioKpisTrend,\n loadPortfolioKpisTrendFailed,\n setPortfolioKpiTrendLines,\n setPortfolioKpis,\n setPortfolioKpisTrend,\n} from '@dashboards/store/actions/kpi.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n@Injectable()\nexport class KpiEffects {\n loadPortfolioKpi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPortfolioKpis),\n switchMap(action =>\n this.kpiService.fetch(action.portfolioId, 0, action.kpiTypes).pipe(\n map(kpis => {\n return setPortfolioKpis({ kpis: kpis || [] });\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorPortfolioKpi);\n return of(loadPortfolioKpisFailed());\n })\n )\n )\n )\n );\n\n loadPortfolioKpisTrend$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPortfolioKpisTrend),\n switchMap(action =>\n this.kpiService.fetch(action.portfolioId, -action.dateOffset, action.kpiTypes).pipe(\n map(kpis => {\n return setPortfolioKpisTrend({ kpis: kpis || [] });\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorPortfolioKpi);\n return of(loadPortfolioKpisTrendFailed());\n })\n )\n )\n )\n );\n\n loadPortfolioKpiTrendLines$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPortfolioKpiTrendLines),\n switchMap(action =>\n this.kpiService.trend(action.portfolioId, action.kpiTypes, action.trendDays).pipe(\n map(kpis => {\n return setPortfolioKpiTrendLines({ kpis: kpis || [] });\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorPortfolioKpi);\n return of(loadPortfolioKpisTrendFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private store: Store<{}>,\n private snackbarService: SnackbarService,\n private kpiService: KpiService\n ) {}\n}\n","

Delete general role summary

\n\n
\n errorDelete general role operation failed.\n
\n General role \n {{ data[0]?.generalRole?.roleName }}\n is in use by following users:\n
  • \n \n {{ item?.user?.firstName }} {{ item?.user?.lastName }}\n \n {{ item?.user?.email }}\n
  • \n
    \n\n\n \n\n","import { Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-delete-role-summary-dialog',\n templateUrl: './delete-role-summary-dialog.component.html',\n styleUrls: ['./delete-role-summary-dialog.component.scss'],\n})\nexport class DeleteRoleSummaryDialogComponent {\n constructor(\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: any\n ) {}\n\n close() {\n this.dialogRef.close();\n }\n}\n","export enum UserRoles {\n Unassigned = 'unassigned',\n}\n","import { first } from 'lodash';\n\nimport { UserRoles } from '@shared/enums/user-roles';\nimport { UserToGeneralRoleMapping } from '@shared/interfaces/user-to-general-role-mapping';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { IsUserExistingPipe } from '@shared/pipes/is-user-existing.pipe';\n\nconst isUserExisting = new IsUserExistingPipe();\n\nexport function combineUsersWithGeneralRoles(\n allUsers: RestUserModel[],\n allUserToGeneralRoleMapping: UserToGeneralRoleMapping[]\n): UserWithGeneralRole[] {\n return allUsers.map(user => {\n const entry = first((allUserToGeneralRoleMapping || []).filter(item => item.userId === user.id));\n const roleId = entry?.roleId || null;\n const roleName = isUserExisting.transform(user) ? entry?.associatedRole.roleName || null : UserRoles.Unassigned;\n return {\n ...user,\n roleId,\n roleName,\n };\n });\n}\n\nfunction userWithoutRole(newUser) {\n if (isUserExisting.transform(newUser)) {\n return newUser;\n }\n\n newUser.roleName = UserRoles.Unassigned;\n return newUser;\n}\n\nfunction userWithGeneralRole(newUser, userRole) {\n newUser.roleName = isUserExisting.transform(newUser) ? userRole.roleName : UserRoles.Unassigned;\n\n return newUser;\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { filter, find, lowerFirst, transform } from 'lodash';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map, mergeMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';\n\nimport { selectUserGeneralRole } from '@app/modules/shared/selectors/user.selectors';\nimport { AdminPanelService } from '@app/services/admin-panel.service';\nimport { UserService } from '@app/services/user.service';\nimport { loadUserData } from '@shared/actions/user.actions';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { GeneralRole } from '@shared/interfaces/general-role';\nimport { GeneralRoleToPermissionLevel } from '@shared/interfaces/general-role-to-permission-level';\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { UserToGeneralRoleMapping } from '@shared/interfaces/user-to-general-role-mapping';\nimport { UserToGeneralRoleModel } from '@shared/interfaces/user-to-general-role-model';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { RestapiService } from 'src/app/services/restapi.service';\n\nimport * as AdministrationActions from '../actions/administration.actions';\nimport {\n addingNewUserFailed,\n addingNewUserSucceeded,\n assignUserToProperty,\n assignUserToPropertyError,\n assignUserToPropertySuccess,\n clearAllUsers,\n deleteGeneralRoleFailed,\n deleteGeneralRoleSucceeded,\n inviteNewUser,\n inviteNewUserError,\n inviteNewUserSuccess,\n loadAllGeneralRolesSucceeded,\n loadAllGeneralRolesToPermissionMappingSucceeded,\n loadAllPermissionLevelsSucceeded,\n loadAllPropertiesRolesSucceeded,\n loadAllUserToProperyMappingsSucceeded,\n loadAllUsers,\n loadAllUsersSucceeded,\n loadPropertiesStructure,\n loadPropertiesStructureSucceeded,\n loadPropertyUsersFailed,\n loadPropertyUsersSucceeded,\n loadUserToRoleMappingSucceeded,\n reactivateUser,\n reactivateUserSucceeded,\n removeUser,\n removeUserFailed,\n removeUserSucceeded,\n removingPropertyAssignedUser,\n removingPropertyAssignedUserError,\n removingPropertyAssignedUserSuccess,\n requestFailure,\n saveUserToGeneralRole,\n saveUserToGeneralRoleError,\n saveUserToGeneralRoleSuccess,\n savingGeneralRoleFailed,\n savingGeneralRoleSucceeded,\n setAllUsersCombinedWithGeneralRoles,\n startAddNewUser,\n startDeleteGeneralRole,\n startSavingGeneralRole,\n startUpdatingGeneralRole,\n updateUserData,\n updateUserDataSuccess,\n updatingGeneralRoleFailed,\n updatingGeneralRoleSucceeded,\n} from '../actions/administration.actions';\nimport { DeleteRoleSummaryDialogComponent } from '../components/delete-role-summary-dialog/delete-role-summary-dialog.component';\nimport { combineUsersWithGeneralRoles } from '../functions/combineUsersWithRoles';\nimport {\n selectActiveUsers,\n selectAllGeneralRoles,\n selectAllUserToGeneralRoleMapping,\n selectAllUsers,\n} from '../selectors/administration.selectors';\n\n@Injectable()\nexport class AdministrationEffects {\n loadAllUsers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllUsers),\n exhaustMap(() => {\n return this.userService.getUserList().pipe(\n map(list =>\n loadAllUsersSucceeded({\n activeUsers: filter(list, { isActive: true }),\n inactiveUsers: filter(list, { isActive: false }),\n })\n ),\n catchError(error => {\n return of(requestFailure(error));\n })\n );\n })\n )\n );\n\n loadPropertyUsers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadPropertyUsers),\n exhaustMap(action => {\n return this.userService.getPropertyUserList(action.propertyId).pipe(\n map(list =>\n loadPropertyUsersSucceeded({\n activePropertyUsers: filter(list, { isActive: true }),\n inactivePropertyUsers: filter(list, { isActive: false }),\n })\n ),\n catchError(error => {\n return of(loadPropertyUsersFailed());\n })\n );\n })\n )\n );\n\n loadAllPermissionLevels$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllPermissionLevels),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/PermissionLevels`).pipe(\n map(permissionLevels => loadAllPermissionLevelsSucceeded({ result: permissionLevels })),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n loadAllGeneralRolesToPermissionMapping$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllGeneralRolesToPermissionMapping),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/RolesToPermissions`).pipe(\n map(generalRoleToPermissionMapping =>\n loadAllGeneralRolesToPermissionMappingSucceeded({ result: generalRoleToPermissionMapping })\n ),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n loadAllPropertyRoles$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllPropertyRoles),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/PropertyRoles`).pipe(\n map(propertiesRoles => loadAllPropertiesRolesSucceeded({ result: propertiesRoles })),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n loadUserToRoleMapping$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadUserToRoleMapping),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/UserToGeneralRole/`).pipe(\n map(userToGeneralRole => loadUserToRoleMappingSucceeded({ userToGeneralRole })),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n loadAllGeneralRoles$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllGeneralRoles),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/GeneralRoles/`).pipe(\n map(generalRoles => loadAllGeneralRolesSucceeded({ generalRoles })),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n loadAllUserToPropertyMappings$ = createEffect(() =>\n this.actions$.pipe(\n ofType(AdministrationActions.loadAllUserToPropertyMappings),\n exhaustMap(() =>\n this.restapiService.getData(`AdminPanel/UserToPropertyRole/`).pipe(\n map(userToPropertyMapping => loadAllUserToProperyMappingsSucceeded({ userToPropertyMapping })),\n catchError(error => of(requestFailure(error)))\n )\n )\n )\n );\n\n combineUsersWithGeneralRoles$ = createEffect(() =>\n this.actions$.pipe(\n ofType(clearAllUsers, loadAllUsersSucceeded, loadUserToRoleMappingSucceeded),\n withLatestFrom(this.store.select(selectAllUsers), this.store.select(selectAllUserToGeneralRoleMapping)),\n map(([, allUsers, allUserToGeneralRoleMapping]) => {\n if (!allUsers || !allUserToGeneralRoleMapping) {\n return setAllUsersCombinedWithGeneralRoles({ usersWithGeneralRoles: null });\n }\n\n const usersCombinedWithRoles = combineUsersWithGeneralRoles(allUsers, allUserToGeneralRoleMapping);\n\n return setAllUsersCombinedWithGeneralRoles({ usersWithGeneralRoles: usersCombinedWithRoles });\n }),\n catchError(error => of(requestFailure(error)))\n )\n );\n\n loadPropertiesStructure$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPropertiesStructure),\n exhaustMap(() => {\n return this.restapiService.getData(`AdminPanel/PropertiesStructure`).pipe(\n map(propertiesStructure => {\n return loadPropertiesStructureSucceeded({ propertiesStructure });\n }),\n catchError(error => of(requestFailure(error)))\n );\n })\n )\n );\n\n startAddingNewUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType(startAddNewUser),\n mergeMap(action => {\n return this.restapiService.create(`Users`, action.user).pipe(\n map(user => addingNewUserSucceeded({ user })),\n catchError(error => {\n return of(requestFailure(error), addingNewUserFailed());\n })\n );\n })\n )\n );\n\n saveUserToGeneralRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(saveUserToGeneralRole),\n switchMap(action =>\n this.adminPanelService.setUserToGeneralRole(action.usersToGeneralRoleList).pipe(\n map(user => saveUserToGeneralRoleSuccess()),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorAssigningUserToRole);\n return of(saveUserToGeneralRoleError());\n })\n )\n )\n )\n );\n\n saveUserToPropertyRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(assignUserToProperty),\n switchMap(action =>\n this.adminPanelService.setUserToPropertyRole(action.userToPropertyRoleList).pipe(\n map(user => assignUserToPropertySuccess()),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorAssigningUserToProperty);\n return of(assignUserToPropertyError());\n })\n )\n )\n )\n );\n\n deleteUserToPropertyRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removingPropertyAssignedUser),\n switchMap(action =>\n this.adminPanelService.removeUserFromPropertyRole(action.deleteUserToPropertyMappings).pipe(\n map(user => removingPropertyAssignedUserSuccess()),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRemovingPropertyAssignedUser);\n return of(removingPropertyAssignedUserError());\n })\n )\n )\n )\n );\n\n deleteGeneralRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(startDeleteGeneralRole),\n mergeMap(generalRole =>\n this.restapiService.create(`AdminPanel/GeneralRoles/remove`, [generalRole.id]).pipe(\n withLatestFrom(this.store.select(selectAllGeneralRoles)),\n mergeMap(([, oldGeneralRoles]) => {\n const newGeneralRoles = oldGeneralRoles.filter(oldRole => oldRole.id !== generalRole.id);\n return [\n loadAllGeneralRolesSucceeded({ generalRoles: newGeneralRoles }),\n deleteGeneralRoleSucceeded(generalRole),\n ];\n }),\n catchError(error => of(deleteGeneralRoleFailed(error)))\n )\n )\n )\n );\n\n deleteGeneralRoleFailed$ = createEffect(\n () =>\n this.actions$.pipe(\n ofType(deleteGeneralRoleFailed),\n withLatestFrom(this.store.select(selectActiveUsers), this.store.select(selectAllGeneralRoles)),\n tap(([result, allUsers, allGeneralRoles]) => {\n const feedback = result.error.message.split('Roles in use error: ')[1];\n const parsedFeedback = this.parseGeneralRoleFeedback(feedback);\n const usersWithRolesList = transform(\n parsedFeedback,\n (acc, entry) => {\n const user = find(allUsers, { id: entry.userId });\n const generalRole = find(allGeneralRoles, { id: entry.roleId });\n acc.push({ user, generalRole });\n },\n []\n );\n this.dialog.open(DeleteRoleSummaryDialogComponent, {\n autoFocus: false,\n data: usersWithRolesList,\n width: '620px',\n });\n })\n ),\n { dispatch: false }\n );\n\n startSavingGeneralRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(startSavingGeneralRole),\n mergeMap(({ generalRole }) =>\n this.restapiService.create(`AdminPanel/GeneralRoles`, [generalRole]).pipe(\n tap(() => {\n this.router.navigate([AppRoutes.SETTINGS_ROLES]).then();\n }),\n map(() => savingGeneralRoleSucceeded()),\n catchError(error => of(savingGeneralRoleFailed(), requestFailure(error)))\n )\n )\n )\n );\n\n startUpdatingGeneralRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType(startUpdatingGeneralRole),\n withLatestFrom(this.store.select(selectUserGeneralRole)),\n mergeMap(([{ generalRole }, currentUserGeneralRole]) =>\n this.restapiService.update(`AdminPanel/GeneralRoles`, [generalRole]).pipe(\n tap(() => {\n this.router.navigate([AppRoutes.SETTINGS_ROLES]).then();\n }),\n mergeMap(() => {\n if (generalRole.roleName === currentUserGeneralRole) {\n this.userService.expireCashedUserData();\n return [updatingGeneralRoleSucceeded(), loadUserData()];\n }\n\n return [updatingGeneralRoleSucceeded()];\n }),\n catchError(error => of(updatingGeneralRoleFailed(), requestFailure(error)))\n )\n )\n )\n );\n\n requestFailure$ = createEffect(\n () =>\n this.actions$.pipe(\n ofType(requestFailure),\n tap(error => {\n this.snackbarService.error(error.message);\n })\n ),\n { dispatch: false }\n );\n\n inviteNewUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType(inviteNewUser),\n switchMap(action =>\n this.userService.inviteUser(action.user).pipe(\n map(user => {\n const userId = user.id;\n const roleId = action.roleId;\n const usersToGeneralRoleList: UserToGeneralRoleModel[] = [{ roleId, userId }];\n const userToPropertyRoleList: UserToPropertyMapping[] = action.selectedProperty.map(\n propertyId => {\n return {\n propertyId,\n userId,\n roleId,\n id: 0,\n };\n }\n );\n\n return { user, usersToGeneralRoleList, userToPropertyRoleList };\n }),\n mergeMap(param => [\n inviteNewUserSuccess({ user: param.user }),\n saveUserToGeneralRole({ usersToGeneralRoleList: param.usersToGeneralRoleList }),\n assignUserToProperty({ userToPropertyRoleList: param.userToPropertyRoleList }),\n ]),\n catchError(error => {\n const errorMessage = error?.error ?? '';\n const message = errorMessage.includes('User exists in Azure Active Directory')\n ? SnackbarErrorMessage.ErrorUserAlreadyExist.replace('{0}', action.user.email)\n : errorMessage.includes('One or more properties contains invalid values')\n ? SnackbarErrorMessage.ErrorWrongEmail\n : SnackbarErrorMessage.ErrorInvitingUser;\n this.snackbarService.error(message);\n return of(inviteNewUserError());\n })\n )\n )\n )\n );\n\n updateUserData$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateUserData),\n switchMap(action =>\n this.userService.setUserData(action.user).pipe(\n map(user => {\n const userId = user.id;\n const roleId = action.roleId;\n const usersToGeneralRoleList: UserToGeneralRoleModel[] = [{ roleId, userId }];\n return usersToGeneralRoleList;\n }),\n mergeMap(usersToGeneralRoleList => [\n updateUserDataSuccess(),\n saveUserToGeneralRole({ usersToGeneralRoleList }),\n assignUserToProperty({ userToPropertyRoleList: action.userToPropertyRoleList }),\n removingPropertyAssignedUser({ deleteUserToPropertyMappings: action.deleteUserToPropertyMappings }),\n ]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingUser);\n return of(savingGeneralRoleFailed());\n })\n )\n )\n )\n );\n\n removeUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removeUser),\n mergeMap(action =>\n this.userService.removeUser(action.user).pipe(\n mergeMap(() => [removeUserSucceeded(), loadAllUsers()]),\n tap(() => {\n this.snackbarService.info(\n `Any of ${action.user.firstName}'s turns/tickets reassigned to their PM` as SnackbarErrorMessage\n );\n }),\n catchError(() => of(removeUserFailed()))\n )\n )\n )\n );\n\n reactivateUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType(reactivateUser),\n mergeMap(action =>\n this.userService.reactivateUser(action.user).pipe(\n mergeMap(() => [reactivateUserSucceeded(), loadAllUsers()]),\n catchError(() => of(removeUserFailed()))\n )\n )\n )\n );\n\n constructor(\n private router: Router,\n private dialog: MatDialog,\n private actions$: Actions,\n private store: Store<{}>,\n private restapiService: RestapiService,\n private snackbarService: SnackbarService,\n private userService: UserService,\n private adminPanelService: AdminPanelService\n ) {}\n\n parseGeneralRoleFeedback(feedback: string): UserToGeneralRoleModel[] {\n const feedbackArray = feedback.split(';');\n return feedbackArray.map(entry => {\n return entry.split(',').reduce((acc, keyValuePair) => {\n const [key, value] = keyValuePair.split(':');\n acc[lowerFirst(key)] = parseInt(value, 10);\n return acc;\n }, {} as UserToGeneralRoleModel);\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { mergeMap, of, switchMap } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport { SystemConfigService } from '@app/services/system-config.service';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n deleteSystemConfig,\n getChatChannels,\n getChatChannelsError,\n getChatChannelsSuccess,\n getSystemConfig,\n getSystemConfigError,\n getSystemConfigSuccess,\n getTimerReport,\n getTimerReportError,\n getTimerReportSuccess,\n setPropertyChatChannels,\n setPropertyChatChannelsError,\n setPropertyChatChannelsSuccess,\n updateSystemConfig,\n updateSystemConfigError,\n updateSystemConfigSuccess,\n} from './system-configuration.actions';\n\n@Injectable()\nexport class SystemConfigurationEffects {\n getSystemConfig$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getSystemConfig),\n switchMap(() =>\n this.systemConfigService.getSystemConfig().pipe(\n map(config => getSystemConfigSuccess({ systemConfig: config })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRetrievingSystemConfig);\n return of(getSystemConfigError());\n })\n )\n )\n )\n );\n\n deleteSystemConfig$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteSystemConfig),\n switchMap(action =>\n this.systemConfigService.deleteSystemConfig(action.id).pipe(\n mergeMap(config => [getSystemConfig()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingSystemConfig);\n return of(updateSystemConfigError());\n })\n )\n )\n )\n );\n\n updateSystemConfig$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateSystemConfig),\n switchMap(action =>\n (action.pmsCredential.id > 0\n ? this.systemConfigService.updateSystemConfig(action.pmsCredential)\n : this.systemConfigService.addSystemConfig(action.pmsCredential)\n ).pipe(\n mergeMap(config => [updateSystemConfigSuccess(), getSystemConfig()]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingSystemConfig);\n return of(updateSystemConfigError());\n })\n )\n )\n )\n );\n\n getTimerReport$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTimerReport),\n switchMap(() =>\n this.systemConfigService.getTimerReport().pipe(\n map(timerReport => getTimerReportSuccess({ timerReport })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRetrievingTimerReport);\n return of(getTimerReportError());\n })\n )\n )\n )\n );\n\n getChatChannels$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getChatChannels),\n switchMap(() =>\n this.systemConfigService.getChatHooksChannels().pipe(\n map(channels => getChatChannelsSuccess({ channels })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRetrievingSlackChannels);\n return of(getChatChannelsError());\n })\n )\n )\n )\n );\n\n setPropertyChatChannels$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPropertyChatChannels),\n switchMap(action =>\n this.systemConfigService.setPropertyChatChannel(action.propertyId, action.channelIds).pipe(\n map(channels => {\n return setPropertyChatChannelsSuccess();\n }),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingSlackChannel);\n return of(setPropertyChatChannelsError());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private systemConfigService: SystemConfigService,\n private snackbarService: SnackbarService\n ) {}\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestBidModel, RestTypedBidAttachment } from '@shared/interfaces/bid.interface';\nimport { RestBulkScopeAndBidModel } from '@shared/interfaces/rest-bulk-scope-and-bid-model';\nimport { UpdateTypedAttachmentToEntityModel } from '@shared/interfaces/turnover.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BidsService {\n constructor(private restApiService: RestapiService) {}\n\n create(bidList: RestBidModel[]): Observable {\n return this.restApiService.create(`Bids`, bidList);\n }\n\n update(bid: RestBidModel): Observable {\n return this.restApiService.update(`Bids/${bid.id}`, bid);\n }\n\n reject(id: number): Observable {\n return this.restApiService.create(`Bids/reject/${id}`, {});\n }\n\n getBid(bidId: number): Observable {\n return this.restApiService.getData(`Bids/${bidId}`);\n }\n\n setAttachment(attachmentToEntity: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.create(\n `Bids/${attachmentToEntity.bidId}/Attachments`,\n attachmentToEntity\n );\n }\n\n getTurnoverBids(turnoverId: number): Observable {\n return this.restApiService.getData(`Bids/turnover/${turnoverId}`);\n }\n\n getCompanyBids(companyId: number): Observable {\n return this.restApiService.getData(`Bids/company/${companyId}`);\n }\n\n getAllBids(): Observable {\n return this.restApiService.getData(`Bids`);\n }\n\n deleteBidAttachment(bidId: number, attachmentId: number): Observable {\n return this.restApiService.delete(`Bids/${bidId}/Attachments/${attachmentId}`);\n }\n\n getBidAttachments(bidId: number): Observable {\n return this.restApiService.getData(`Bids/${bidId}/Attachments`);\n }\n\n createBulkScope(bulkScope: RestBulkScopeAndBidModel): Observable {\n return this.restApiService.create(`Bids/bulk-scope-and-bid`, bulkScope);\n }\n\n getBulkScopeList(propertyId: number): Observable {\n return this.restApiService.getData(`Bids/bulk-scope-and-bid/property/${propertyId}`);\n }\n\n getBulkScope(bulkScopeId: number): Observable {\n return this.restApiService.getData(`Bids/bulk-scope-and-bid/${bulkScopeId}`);\n }\n\n updateBulkScope(bulkScope: RestBulkScopeAndBidModel): Observable {\n return this.restApiService.update(`Bids/bulk-scope-and-bid`, bulkScope);\n }\n\n addUnitsToBulk(bulkScope: RestBulkScopeAndBidModel): Observable {\n return this.restApiService.update(`Bids/bulk-scope-and-bid/add-or-update`, bulkScope);\n }\n\n addBulkTurnoversAttachment(body: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.create('Turnovers/bulk/Attachments', body);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { catchError, map, mergeMap, of, switchMap } from 'rxjs';\n\nimport { BidsService } from '@app/services/bids.service';\nimport { RestBulkScopeAndBidModel } from '@shared/interfaces/rest-bulk-scope-and-bid-model';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n addBulkTurnoversAttachment,\n addBulkTurnoversAttachmentFailed,\n addBulkTurnoversAttachmentSuccess,\n addUnitsToBulk,\n addUnitsToBulkFailed,\n addUnitsToBulkSuccess,\n createNewBulkScope,\n createNewBulkScopeFailed,\n createNewBulkScopeSuccess,\n getBulkScope,\n getBulkScopeFailed,\n getBulkScopeList,\n getBulkScopeListSuccess,\n getBulkScopeSuccess,\n updateBulkScope,\n updateBulkScopeFailed,\n updateBulkScopeSuccess,\n} from '../actions/bulk-and-scope.actions';\n\n@Injectable()\nexport class BulkBidsEffects {\n createNewBulkScope$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createNewBulkScope),\n switchMap(action =>\n this.bidsService.createBulkScope(action.bulkScope).pipe(\n mergeMap((bulkScopeId: RestBulkScopeAndBidModel) => [\n createNewBulkScopeSuccess({ bulkScopeId: bulkScopeId.id }),\n ]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.CreatingBulkScope);\n return of(createNewBulkScopeFailed());\n })\n )\n )\n )\n );\n\n getBulkScope$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBulkScope),\n switchMap(action =>\n this.bidsService.getBulkScope(action.bulkScopeId).pipe(\n map(bulkScope => getBulkScopeSuccess({ bulkScope })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBulkScope);\n return of(getBulkScopeFailed());\n })\n )\n )\n )\n );\n\n updateBulkScope$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateBulkScope),\n mergeMap(action =>\n this.bidsService.updateBulkScope(action.bulkScope).pipe(\n map(bulkScope => updateBulkScopeSuccess()),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingBulkScope);\n return of(updateBulkScopeFailed());\n })\n )\n )\n )\n );\n\n getBulkScopeList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBulkScopeList),\n switchMap(action =>\n this.bidsService.getBulkScopeList(action.propertyId).pipe(\n map(list => getBulkScopeListSuccess({ bulkList: list || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBulkScopeList);\n return of(getBulkScopeFailed());\n })\n )\n )\n )\n );\n\n addBulkTurnoversAttachment = createEffect(() =>\n this.actions$.pipe(\n ofType(addBulkTurnoversAttachment),\n mergeMap(action =>\n this.bidsService.addBulkTurnoversAttachment(action.attachment).pipe(\n map(result => addBulkTurnoversAttachmentSuccess()),\n catchError(error => of(addBulkTurnoversAttachmentFailed()))\n )\n )\n )\n );\n\n addUnitsToBulk$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addUnitsToBulk),\n mergeMap(action =>\n this.bidsService.addUnitsToBulk(action.bulkScope).pipe(\n map(() => addUnitsToBulkSuccess()),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBulkScopeList);\n return of(addUnitsToBulkFailed());\n })\n )\n )\n )\n );\n\n constructor(private actions$: Actions, private bidsService: BidsService, private snackbarService: SnackbarService) {}\n}\n","import { Injectable } from '@angular/core';\n\nimport { RestTicketModel } from '@shared/interfaces/turnover.interface';\n\nimport { RestapiService } from './restapi.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PunchService {\n constructor(private restApiService: RestapiService) {}\n\n loadPunchById(punchId: number) {\n return this.restApiService.getData(`PunchTickets/${punchId}`);\n }\n\n loadPunchesByTurnoverId(turnoverId: string) {\n return this.restApiService.getData(`PunchTickets/ByTurnoverId/${turnoverId}`);\n }\n\n createPunch(punch: RestTicketModel) {\n return this.restApiService.create(`PunchTickets`, punch);\n }\n\n updatePunch(punch: RestTicketModel) {\n return this.restApiService.update(`PunchTickets/${punch.id}`, punch);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { iif, of } from 'rxjs';\nimport { catchError, map, mergeMap } from 'rxjs/operators';\n\nimport { PunchService } from '@app/services/punch.service';\n\nimport {\n loadPunchById,\n loadPunchByIdFailed,\n loadPunchByIdFinished,\n loadPunchesByTurnoverId,\n loadPunchesByTurnoverIdFailed,\n loadPunchesByTurnoverIdFinished,\n sendPunch,\n sendPunchFailed,\n sendPunchFinished,\n} from '../actions/punch.actions';\n\n@Injectable()\nexport class PunchEffects {\n loadPunchById$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPunchById),\n mergeMap(action => {\n return this.punchService.loadPunchById(action.punchId).pipe(\n map(punch => loadPunchByIdFinished({ punch })),\n catchError(error => of(loadPunchByIdFailed()))\n );\n })\n )\n );\n\n sendPunch$ = createEffect(() =>\n this.actions$.pipe(\n ofType(sendPunch),\n mergeMap(action => {\n return iif(\n () => !!action.punch.id,\n this.punchService.updatePunch(action.punch),\n this.punchService.createPunch(action.punch)\n ).pipe(\n map(punch => sendPunchFinished({ punch })),\n catchError(error => of(sendPunchFailed()))\n );\n })\n )\n );\n\n loadPunchesByTurnoverId$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPunchesByTurnoverId),\n mergeMap(action => {\n return this.punchService.loadPunchesByTurnoverId(action.turnoverId as any).pipe(\n map(result => loadPunchesByTurnoverIdFinished({ result })),\n catchError(error => of(loadPunchesByTurnoverIdFailed()))\n );\n })\n )\n );\n\n constructor(private actions$: Actions, private punchService: PunchService) {}\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport {\n AddUpdateTurnoverBid,\n RestTurnoverBid,\n RestTurnoverBidCategory,\n} from '@shared/interfaces/turnover-bids.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TurnoverBidsService {\n constructor(private restApiService: RestapiService) {}\n\n list(turnoverId: number): Observable {\n return this.restApiService.getData(`turnover/${turnoverId}/bids`);\n }\n\n add(model: AddUpdateTurnoverBid): Observable {\n return this.restApiService.create(`turnover/${model.turnoverId}/bids`, model);\n }\n\n update(model: AddUpdateTurnoverBid): Observable<{}> {\n return this.restApiService.update(`turnover/${model.turnoverId}/bids`, model);\n }\n\n delete(bidId: number): Observable<{}> {\n return this.restApiService.delete(`turnover/bids/${bidId}`);\n }\n\n accept(bidId: number): Observable<{}> {\n return this.restApiService.create(`turnover/bids/${bidId}/accept`, {});\n }\n\n reject(bidId: number, reason: string): Observable<{}> {\n return this.restApiService.create(`turnover/bids/${bidId}/reject`, { reason });\n }\n\n approve(bidId: number, approved: boolean | null, denyReason?: string): Observable<{}> {\n return this.restApiService.create(`turnover/bids/${bidId}/approve`, { approved, denyReason });\n }\n\n uploadInvoice(bidId: number, fileUploadId: number): Observable<{}> {\n return this.restApiService.create(`turnover/bids/${bidId}/uploadInvoice`, {\n fileUploadId,\n });\n }\n\n categoryList(): Observable {\n return this.restApiService.getData(`turnoverDataBidCategory`);\n }\n\n addCategory(name: string): Observable {\n return this.restApiService.create(`turnoverDataBidCategory`, {\n name,\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, map, mergeMap } from 'rxjs/operators';\n\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport { TurnoverBidsService } from '@app/services/turnover-bids.service';\nimport {\n acceptTurnoverBid,\n acceptTurnoverBidFailed,\n acceptTurnoverBidSuccess,\n addTurnoverBidCategory,\n addTurnoverBidCategoryFailed,\n addTurnoverBidCategorySuccess,\n approveTurnoverBid,\n approveTurnoverBidFailed,\n approveTurnoverBidSuccess,\n createTurnoverBid,\n createTurnoverBidFailed,\n createTurnoverBidSuccess,\n loadTurnoverBidCategories,\n loadTurnoverBidCategoriesFailed,\n loadTurnoverBidCategoriesSuccess,\n loadTurnoverBids,\n loadTurnoverBidsFailed,\n loadTurnoverBidsSuccess,\n rejectTurnoverBid,\n rejectTurnoverBidFailed,\n rejectTurnoverBidSuccess,\n removeTurnoverBid,\n removeTurnoverBidFailed,\n removeTurnoverBidSuccess,\n updateTurnoverBid,\n updateTurnoverBidFailed,\n updateTurnoverBidSuccess,\n uploadTurnoverBidInvoice,\n uploadTurnoverBidInvoiceFailed,\n uploadTurnoverBidInvoiceSuccess,\n} from '@main-application/turnovers/actions/turnover-bids.actions';\nimport { RestTurnoverBidCategory } from '@shared/interfaces/turnover-bids.interface';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@Injectable()\nexport class TurnoverBidsEffects {\n loadTurnoverBids$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTurnoverBids),\n mergeMap(action => {\n return this.turnoverBidsService.list(action.turnoverId).pipe(\n map(bids => loadTurnoverBidsSuccess({ bids })),\n catchError(error => of(loadTurnoverBidsFailed()))\n );\n })\n )\n );\n\n createTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.add(action.bid).pipe(\n map(bidId => createTurnoverBidSuccess({ bidId, turnoverId: action.bid.turnoverId })),\n catchError(error => of(createTurnoverBidFailed()))\n );\n })\n )\n );\n\n createTurnoverBidSuccess$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createTurnoverBidSuccess),\n mergeMap(action => {\n return of(loadTurnoverBids({ turnoverId: action.turnoverId }));\n })\n )\n );\n\n acceptTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(acceptTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.accept(action.bidId).pipe(\n map(bid => {\n this.snackbarService.success('Bid accepted');\n return acceptTurnoverBidSuccess();\n }),\n catchError(error => of(acceptTurnoverBidFailed()))\n );\n })\n )\n );\n\n rejectTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(rejectTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.reject(action.bidId, action.reason).pipe(\n map(bid => {\n this.snackbarService.success('Bid rejected');\n return rejectTurnoverBidSuccess();\n }),\n catchError(error => of(rejectTurnoverBidFailed()))\n );\n })\n )\n );\n\n uploadTurnoverBidInvoice$ = createEffect(() =>\n this.actions$.pipe(\n ofType(uploadTurnoverBidInvoice),\n mergeMap(action => {\n return this.fileUploadsService.uploadFile(action.file).pipe(\n map(upload => ({\n upload,\n bid: action.bid,\n }))\n );\n }),\n mergeMap(action => {\n return this.turnoverBidsService.uploadInvoice(action.bid.id, action.upload.id).pipe(\n mergeMap(bid => [loadTurnoverBids({ turnoverId: action.bid.turnoverId }), uploadTurnoverBidInvoiceSuccess()]),\n catchError(error => of(uploadTurnoverBidInvoiceFailed()))\n );\n })\n )\n );\n\n updateTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.update(action.bid).pipe(\n map(() => updateTurnoverBidSuccess({ bid: action.bid })),\n catchError(error => of(updateTurnoverBidFailed()))\n );\n })\n )\n );\n\n removeTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removeTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.delete(action.bidId).pipe(\n map(() => removeTurnoverBidSuccess()),\n catchError(error => of(removeTurnoverBidFailed()))\n );\n })\n )\n );\n\n loadTurnoverBidCategories$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTurnoverBidCategories),\n mergeMap(() => {\n return this.turnoverBidsService.categoryList().pipe(\n map((categories: RestTurnoverBidCategory[]) => loadTurnoverBidCategoriesSuccess({ categories })),\n catchError(error => of(loadTurnoverBidCategoriesFailed()))\n );\n })\n )\n );\n\n addTurnoverBidCategory$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addTurnoverBidCategory),\n mergeMap(action => {\n return this.turnoverBidsService.addCategory(action.name).pipe(\n mergeMap((categoryId: number) => [\n loadTurnoverBidCategories(),\n addTurnoverBidCategorySuccess({ categoryId }),\n ]),\n catchError(error => of(addTurnoverBidCategoryFailed()))\n );\n })\n )\n );\n\n approveTurnoverBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(approveTurnoverBid),\n mergeMap(action => {\n return this.turnoverBidsService.approve(action.bidId, action.approved, action.denyReason).pipe(\n map(bid => {\n if (action.approved) {\n this.snackbarService.success('Bid approved');\n } else {\n this.snackbarService.success('Bid denied');\n }\n return approveTurnoverBidSuccess();\n }),\n catchError(error => of(approveTurnoverBidFailed()))\n );\n })\n )\n );\n\n constructor(\n private actions$: Actions,\n private turnoverBidsService: TurnoverBidsService,\n private fileUploadsService: FileUploadsService,\n private snackbarService: SnackbarService\n ) {}\n}\n","import { UserType } from '@shared/enums/user-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestWorkflowStepAssignmentModel } from '@shared/interfaces/rest-workflow-step-assignment-model.interface';\nimport { RestWorkflowInstanceModel } from '@shared/interfaces/turnover.interface';\nimport { UserData } from '@shared/interfaces/user-data';\n\nexport function UpdateWorkflowStepAssigneeModelFunction(\n workflow: RestWorkflowInstanceModel[],\n workflowStep: WorkflowStepEnumType,\n workflowStepAssignmentModel: RestWorkflowStepAssignmentModel,\n userData?: UserData\n): RestWorkflowInstanceModel[] {\n return workflow.map(item => {\n if (item.workflowStepEnumType === workflowStep) {\n return {\n ...item,\n responsiblePartyId: workflowStepAssignmentModel?.responsiblePartyId || userData?.id || 0,\n responsiblePartyType:\n workflowStepAssignmentModel?.responsiblePartyGroupType || userData?.userType || UserType.None,\n };\n } else {\n return item;\n }\n });\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestApplianceModel } from '@shared/interfaces/appliance.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppliancesService {\n constructor(private restApiService: RestapiService) {}\n\n getAppliance(applianceId: number): Observable {\n return this.restApiService.getData(`Appliances/${applianceId}`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { first } from 'lodash';\nimport { iif, of } from 'rxjs';\nimport { catchError, exhaustMap, filter, map, mergeMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';\n\nimport { AppliancesService } from '@app/services/appliances.service';\nimport { BidsService } from '@app/services/bids.service';\nimport { CompaniesService } from '@app/services/companies.service';\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport { TicketsService } from '@app/services/tickets.service';\nimport { TurnoversService } from '@app/services/turnovers.service';\nimport { WorkflowActionsService } from '@app/services/workflow-actions.service';\nimport { WorkflowStepCommentsService } from '@app/services/workflow-step-comments.service';\nimport { resetTurnoversFilters, setTurnoversFilters } from '@dashboards/store';\nimport { TurnoverConfigurationStepAssigneesService } from '@main-application/management/components/turnover-configuration/components/turnover-configuration-step-assignees/services/turnover-configuration-step-assignees.service';\nimport {\n addNewBid,\n addNewBidFail,\n addNewBidSuccess,\n addNewTurnoverTicket,\n addNewTurnoverTicketFailed,\n addNewTurnoverTicketSuccess,\n addWorkflowStepComment,\n addWorkflowStepCommentFailed,\n addWorkflowStepCommentSuccess,\n assignDefaultWorkflowStepAssignee,\n assignDefaultWorkflowStepAssigneeFailed,\n createNewTurnover,\n createNewTurnoverFailed,\n createNewTurnoverSuccess,\n deleteBidAttachment,\n deleteBidAttachmentFailed,\n deleteBidAttachmentSuccess,\n deleteFileFromRepository,\n deleteFileFromRepositoryFailed,\n deleteFileFromRepositorySuccess,\n deleteTurnover,\n deleteTurnoverAttachment,\n deleteTurnoverAttachmentSuccess,\n deleteTurnoverFailed,\n deleteTurnoverSuccess,\n deleteTurnoverTicket,\n deleteTurnoverTicketAttachment,\n deleteTurnoverTicketAttachmentFailed,\n deleteTurnoverTicketAttachmentSuccess,\n deleteTurnoverTicketFailed,\n deleteTurnoverTicketSuccess,\n deleteWorkflowStepComment,\n deleteWorkflowStepCommentFailed,\n deleteWorkflowStepCommentSuccess,\n emptyAction,\n getAllBidList,\n getAllBidListFail,\n getAllBidListSuccess,\n getAppliance,\n getApplianceFailed,\n getApplianceSuccess,\n getBid,\n getBidAttachmentList,\n getBidAttachmentListFailed,\n getBidAttachmentListSuccess,\n getBidCompanyList,\n getBidCompanyListFail,\n getBidCompanyListSuccess,\n getBidFail,\n getBidSuccess,\n getBidTurnoverList,\n getBidTurnoverListFail,\n getBidTurnoverListSuccess,\n getCompanyList,\n getCompanyListFail,\n getCompanyListSuccess,\n getDefaultTurnoversAssignees,\n getDefaultTurnoversAssigneesFailed,\n getDefaultTurnoversAssigneesSuccess,\n getSelectedTicket,\n getSelectedTicketFailed,\n getSelectedTicketSuccess,\n getTicket,\n getTicketAttachments,\n getTicketAttachmentsFailed,\n getTicketAttachmentsSuccess,\n getTicketFailed,\n getTicketSuccess,\n getTurnoverAttachments,\n getTurnoverAttachmentsFailed,\n getTurnoverAttachmentsSuccess,\n getTurnoverData,\n getTurnoverDataFailed,\n getTurnoverDataSuccess,\n getTurnoverTickets,\n getTurnoverTicketsFailed,\n getTurnoverTicketsSuccess,\n getWorkflowStepCommentList,\n getWorkflowStepCommentListFailed,\n getWorkflowStepCommentListSuccess,\n loadTurnoverTimers,\n rejectBid,\n rejectBidFail,\n rejectBidSuccess,\n setActiveSections,\n setAttachmentToTurnover,\n setAttachmentToTurnoverFailed,\n setAttachmentToTurnoverSuccess,\n setBidAttachment,\n setBidAttachmentFail,\n setBidAttachmentSuccess,\n setEmptyWorkflowStepAssignee,\n setInactiveFilteredSections,\n setStepAssignee,\n setStepAssigneeFailed,\n setStepAssigneeSuccess,\n setTicketAttachment,\n setTicketAttachmentFail,\n setTicketAttachmentSuccess,\n setTurnoverData,\n setTurnoverDataFailed,\n setTurnoverTimers,\n setTurnoverTimersFailed,\n setTurnoverTimersSuccess,\n setWorkflowStepAssignee,\n setWorkflowStepAssigneeFailed,\n setWorkflowStepAssigneeSuccess,\n setWorkflowStepSuccess,\n toggleAllSections,\n toggleInactiveFilteredSingleSection,\n toggleSingleSection,\n turnoverTimersLoaded,\n updateBid,\n updateBidComment,\n updateBidCommentFail,\n updateBidCommentSuccess,\n updateBidFail,\n updateBidSuccess,\n updateTicketPreview,\n updateTicketPreviewFailed,\n updateTicketPreviewSuccess,\n updateTurnoverAttachment,\n updateTurnoverAttachmentFailed,\n updateTurnoverAttachmentSuccess,\n updateTurnoverTicket,\n updateTurnoverTicketFailed,\n updateTurnoverTicketSuccess,\n updateWorkflowStepComment,\n updateWorkflowStepCommentFailed,\n updateWorkflowStepCommentSuccess,\n workflowAssignmentsByPropertyAndStepIdFailure,\n workflowAssignmentsByPropertyAndStepIdSucceded,\n} from '@main-application/turnovers/actions/turnovers.actions';\nimport {\n selectActivePropertyIds,\n selectAllPropertyIds,\n selectInactiveFilteredPropertyIds,\n selectTurnoverData,\n} from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { TicketType } from '@shared/enums/ticket-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { UpdateWorkflowStepAssigneeModelFunction } from '@shared/functions/update-workflow-step-responsible-party-model.function';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { RestTypedBidAttachment } from '@shared/interfaces/bid.interface';\nimport { RestWorkflowStepAssignmentModel } from '@shared/interfaces/rest-workflow-step-assignment-model.interface';\nimport {\n RestTicketModel,\n RestTurnoverDataModel,\n RestTypedTicketAttachment,\n} from '@shared/interfaces/turnover.interface';\nimport { selectUserData } from '@shared/selectors/user.selectors';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport { loadPunchById } from '../actions/punch.actions';\n\n@Injectable()\nexport class TurnoversEffects {\n constructor(\n private actions$: Actions,\n private store: Store<{}>,\n private snackbarService: SnackbarService,\n private turnoversService: TurnoversService,\n private workflowActionsService: WorkflowActionsService,\n private ticketsService: TicketsService,\n private companiesService: CompaniesService,\n private bidsService: BidsService,\n private appliancesService: AppliancesService,\n private workflowStepCommentsService: WorkflowStepCommentsService,\n private responsiblePartiesService: TurnoverConfigurationStepAssigneesService,\n private fileUploadsService: FileUploadsService\n ) {}\n\n createTurnover$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createNewTurnover),\n switchMap(action =>\n this.turnoversService.create(action.postTurnoverModel).pipe(\n mergeMap(turnoverData => [\n createNewTurnoverSuccess({ turnoverData }),\n assignDefaultWorkflowStepAssignee({\n turnoverData,\n workflowStep: turnoverData.activeWorkflowStepType,\n propertyId: action.postTurnoverModel?.propertyId,\n }),\n ]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.CreatingTurnover);\n return of(createNewTurnoverFailed());\n })\n )\n )\n )\n );\n\n assignDefaultWorkflowStepAssignee$ = createEffect(() =>\n this.actions$.pipe(\n ofType(assignDefaultWorkflowStepAssignee),\n withLatestFrom(this.store.select(selectUserData)),\n filter(([action, userData]) => {\n return !first(\n (action.turnoverData.workflow || []).filter(item => item.workflowStepEnumType === action.workflowStep)\n )?.responsiblePartyId;\n }),\n switchMap(([action, userData]) =>\n this.responsiblePartiesService.getWorkflowAssignmentsByStepId(action.propertyId, action.workflowStep).pipe(\n filter(\n (restWorkflowStepAssignmentModel: RestWorkflowStepAssignmentModel) =>\n !!restWorkflowStepAssignmentModel || (action.workflowStep === WorkflowStepEnumType.MoveOut && !!userData)\n ),\n map(workflowStepAssignmentModel => {\n return {\n ...action.turnoverData,\n workflow: UpdateWorkflowStepAssigneeModelFunction(\n action.turnoverData.workflow,\n action.workflowStep,\n workflowStepAssignmentModel,\n userData\n ),\n };\n }),\n switchMap((turnoverData: RestTurnoverDataModel) => {\n return this.turnoversService.update(turnoverData).pipe(\n mergeMap(turnoverData => [getTurnoverData({ turnoverId: turnoverData.id })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AssigningAssignee);\n return of(assignDefaultWorkflowStepAssigneeFailed());\n })\n );\n })\n )\n )\n )\n );\n\n getTurnoverData$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTurnoverData),\n switchMap(action =>\n this.turnoversService.getTurnover(action.turnoverId).pipe(\n map(turnoverData => getTurnoverDataSuccess({ turnoverData })),\n catchError(ex => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverData);\n return of(getTurnoverDataFailed());\n })\n )\n )\n )\n );\n\n setTurnoverData$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setTurnoverData),\n switchMap(action => {\n return this.turnoversService.update(action.turnoverData).pipe(\n map(turnoverData => getTurnoverDataSuccess({ turnoverData })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingTurnoverData);\n return of(setTurnoverDataFailed());\n })\n );\n })\n )\n );\n\n setStepAssignee$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setStepAssignee),\n switchMap(action => {\n return this.workflowActionsService\n .moveToNextStep(\n action.workflowAction.turnoverId,\n action.workflowAction.nextWorkflowStep,\n action.workflowAction.assigneeId\n )\n .pipe(\n map(() => setStepAssigneeSuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingTurnoverStepAssignee);\n return of(setStepAssigneeFailed());\n })\n );\n })\n )\n );\n\n getDefaultTurnoversAssignees$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getDefaultTurnoversAssignees),\n switchMap(action => {\n return this.responsiblePartiesService.getResponsiblePartiesByPropertyId(action.propertyId).pipe(\n map(list => getDefaultTurnoversAssigneesSuccess({ defaultTurnoversAssignees: list || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRetrievingDefaultTurnoverAssignees);\n return of(getDefaultTurnoversAssigneesFailed());\n })\n );\n })\n )\n );\n\n updateDefaultAssigneeOnWorkflowStepChange$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setWorkflowStepSuccess),\n switchMap(action =>\n this.turnoversService.getTurnover(action.turnoverId).pipe(\n map(turnoverData =>\n assignDefaultWorkflowStepAssignee({\n turnoverData,\n workflowStep: action.nextWorkflowStep,\n propertyId: turnoverData.property?.id,\n })\n )\n )\n )\n )\n );\n\n setAttachmentToTurnover$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setAttachmentToTurnover),\n mergeMap(action =>\n this.turnoversService.setAttachment(action.attachmentToEntity).pipe(\n mergeMap(addedAttachment => [\n setAttachmentToTurnoverSuccess({ addedAttachment }),\n !action?.preventReloadList\n ? getTurnoverAttachments({ turnoverId: first(action.attachmentToEntity.turnoverIds) })\n : emptyAction(),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AssigningAttachmentToEntity);\n return of(setAttachmentToTurnoverFailed());\n })\n )\n )\n )\n );\n\n updateTurnoverAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTurnoverAttachment),\n mergeMap(action =>\n this.turnoversService.updateAttachment(action.attachmentToEntity).pipe(\n mergeMap(addedAttachment => [\n updateTurnoverAttachmentSuccess(),\n getTurnoverAttachments({ turnoverId: first(action.attachmentToEntity.turnoverIds) }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingAttachment);\n return of(updateTurnoverAttachmentFailed());\n })\n )\n )\n )\n );\n\n getTurnoverTickets$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTurnoverTickets),\n switchMap(action =>\n this.ticketsService.getTicketsByTurnover(action.turnoverId).pipe(\n map(list => getTurnoverTicketsSuccess({ turnoverTicketList: list || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverTickets);\n return of(getTurnoverTicketsFailed());\n })\n )\n )\n )\n );\n\n addNewTurnoverTicket$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addNewTurnoverTicket),\n mergeMap(action => {\n return this.ticketsService.create(action.turnoverTicket).pipe(\n mergeMap(newTurnoverTicket => [addNewTurnoverTicketSuccess({ newTurnoverTicket })]),\n tap(() => {\n this.snackbarService.success(SnackbarErrorMessage.TicketCreated);\n }),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.CreatingTicket);\n return of(addNewTurnoverTicketFailed());\n })\n );\n })\n )\n );\n\n updateTurnoverTicket$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTurnoverTicket),\n mergeMap(action =>\n this.ticketsService.update(action.turnoverTicket).pipe(\n mergeMap(editedTicket => [\n updateTurnoverTicketSuccess({ editedTicket }),\n getTurnoverTickets({ turnoverId: editedTicket.turnoverId }),\n ]),\n tap(() => {\n this.snackbarService.info(SnackbarErrorMessage.TicketUpdated);\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingTurnoverTicket);\n return of(updateTurnoverTicketFailed());\n })\n )\n )\n )\n );\n updateTurnoverTicketPreview$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTicketPreview),\n mergeMap(action =>\n this.ticketsService.update(action.turnoverTicket).pipe(\n mergeMap(editedTicket => [updateTicketPreviewSuccess({ editedTicket })]),\n tap(() => {\n this.snackbarService.info(SnackbarErrorMessage.TicketUpdated);\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingTicket);\n return of(updateTicketPreviewFailed());\n })\n )\n )\n )\n );\n\n getTurnoverTicket$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getSelectedTicket),\n switchMap(action =>\n this.ticketsService.getTicket(action.ticketId).pipe(\n map(ticket => getSelectedTicketSuccess({ ticket })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverTicket);\n return of(getSelectedTicketFailed());\n })\n )\n )\n )\n );\n\n deleteTurnoverTicket$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteTurnoverTicket),\n withLatestFrom(this.store.select(selectTurnoverData)),\n mergeMap(([action, turnoverData]) =>\n this.ticketsService.delete(action.ticketId).pipe(\n mergeMap(() => [deleteTurnoverTicketSuccess(), getTurnoverTickets({ turnoverId: turnoverData.id })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingTicket);\n return of(deleteTurnoverTicketFailed());\n })\n )\n )\n )\n );\n\n setTicketAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setTicketAttachment),\n mergeMap(action =>\n this.ticketsService.setAttachment(action.attachmentToEntity).pipe(\n mergeMap(addedTicketAttachment => [\n setTicketAttachmentSuccess({ addedTicketAttachment }),\n action.ticketType === TicketType.Ticket\n ? getSelectedTicket({ ticketId: action.attachmentToEntity.ticketId })\n : loadPunchById({ punchId: action.attachmentToEntity.ticketId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AssigningAttachmentToTicket);\n return of(setTicketAttachmentFail());\n })\n )\n )\n )\n );\n\n getTicket$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTicket),\n switchMap(action =>\n this.ticketsService.getTicket(action.ticketId).pipe(\n map((restTicketModel: RestTicketModel) => getTicketSuccess({ restTicketModel })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTicket);\n return of(getTicketFailed());\n })\n )\n )\n )\n );\n\n getTicketAttachments$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTicketAttachments),\n switchMap(action =>\n this.ticketsService.getTicketAttachment(action.ticketId).pipe(\n map((attachments: RestTypedTicketAttachment[]) =>\n getTicketAttachmentsSuccess({ ticketAttachments: attachments || [] })\n ),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTicketAttachment);\n return of(getTicketAttachmentsFailed());\n })\n )\n )\n )\n );\n\n getCompanyList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getCompanyList),\n exhaustMap(action =>\n this.companiesService.getCompanyList().pipe(\n map(companyList => getCompanyListSuccess({ companyList })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingCompaniesList);\n return of(getCompanyListFail());\n })\n )\n )\n )\n );\n\n getBidTurnoverList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBidTurnoverList),\n switchMap(action =>\n this.bidsService.getTurnoverBids(action.turnoverId).pipe(\n map(bidList => getBidTurnoverListSuccess({ bidList })),\n catchError(ex => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBidList);\n return of(getBidTurnoverListFail());\n })\n )\n )\n )\n );\n\n getBidCompanyList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBidCompanyList),\n switchMap(action =>\n this.bidsService.getCompanyBids(action.companyId).pipe(\n map(bidList => getBidCompanyListSuccess({ bidList })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingVendorsList);\n return of(getBidCompanyListFail());\n })\n )\n )\n )\n );\n\n getAllBidList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getAllBidList),\n switchMap(action =>\n this.bidsService.getAllBids().pipe(\n map(list => getAllBidListSuccess({ bidList: list || [] })),\n catchError(ex => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBidList);\n return of(getAllBidListFail());\n })\n )\n )\n )\n );\n\n getBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBid),\n switchMap(action =>\n this.bidsService.getBid(action.bidId).pipe(\n map(bid => getBidSuccess({ bid })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBid);\n return of(getBidFail());\n })\n )\n )\n )\n );\n\n addNewBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addNewBid),\n mergeMap(action =>\n this.bidsService.create(action.bidList).pipe(\n map(newBidList => addNewBidSuccess({ newBidList })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AddingBid);\n return of(addNewBidFail());\n })\n )\n )\n )\n );\n\n rejectBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(rejectBid),\n mergeMap(action =>\n this.bidsService.reject(action.id).pipe(\n mergeMap(updatedBid => [\n rejectBidSuccess({ updatedBid }),\n getBidTurnoverList({ turnoverId: first(updatedBid.turnoverIds) }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingBid);\n return of(rejectBidFail());\n })\n )\n )\n )\n );\n\n updateBid$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateBid),\n mergeMap(action =>\n this.bidsService.update(action.bid).pipe(\n mergeMap(updatedBid => [updateBidSuccess({ updatedBid })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingBid);\n return of(updateBidFail());\n })\n )\n )\n )\n );\n\n updateBidComment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateBidComment),\n mergeMap(action =>\n this.bidsService.update(action.bid).pipe(\n map(updatedBid => updateBidCommentSuccess({ updatedBid })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingBid);\n return of(updateBidCommentFail());\n })\n )\n )\n )\n );\n\n setBidAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setBidAttachment),\n mergeMap(action =>\n this.bidsService.setAttachment(action.attachmentToEntity).pipe(\n mergeMap((addedBidAttachment: RestTypedBidAttachment) => [\n setBidAttachmentSuccess({ addedBidAttachment }),\n getBidAttachmentList({ bidId: action.attachmentToEntity.bidId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AssigningAttachmentToBid);\n return of(setBidAttachmentFail());\n })\n )\n )\n )\n );\n\n getAppliance$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getAppliance),\n switchMap(action =>\n this.appliancesService.getAppliance(action.applianceId).pipe(\n map(appliance => getApplianceSuccess({ appliance })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingApplianceData);\n return of(getApplianceFailed());\n })\n )\n )\n )\n );\n\n getWorkflowStepCommentList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getWorkflowStepCommentList),\n switchMap(action =>\n this.workflowStepCommentsService.getWorkflowStepComments(action.turnoverId).pipe(\n map(workflowStepCommentList => getWorkflowStepCommentListSuccess({ workflowStepCommentList })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ReceivingTurnoverComments);\n return of(getWorkflowStepCommentListFailed());\n })\n )\n )\n )\n );\n\n addWorkflowStepComment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addWorkflowStepComment),\n mergeMap(action =>\n this.workflowStepCommentsService.create(action.commentItem).pipe(\n mergeMap(commentItem => [\n addWorkflowStepCommentSuccess({ commentItem }),\n getWorkflowStepCommentList({ turnoverId: commentItem.turnoverDataId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AddingComment);\n return of(addWorkflowStepCommentFailed());\n })\n )\n )\n )\n );\n\n updateWorkflowStepComment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateWorkflowStepComment),\n mergeMap(action =>\n this.workflowStepCommentsService.update(action.commentItem).pipe(\n mergeMap(commentItem => [\n updateWorkflowStepCommentSuccess({ commentItem }),\n getWorkflowStepCommentList({ turnoverId: commentItem.turnoverDataId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingComment);\n return of(updateWorkflowStepCommentFailed());\n })\n )\n )\n )\n );\n\n deleteWorkflowStepComment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteWorkflowStepComment),\n mergeMap(action =>\n this.workflowStepCommentsService.delete(action.commentItem.id).pipe(\n mergeMap(workflowStepCommentList => [\n deleteWorkflowStepCommentSuccess(),\n getWorkflowStepCommentList({ turnoverId: action.commentItem.turnoverDataId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.Deletingcomment);\n return of(deleteWorkflowStepCommentFailed());\n })\n )\n )\n )\n );\n\n // loadWorkflowAssignmentsByPropertyAndStepId$ = createEffect(() =>\n // this.actions$.pipe(\n // ofType(loadWorkflowAssignmentsByPropertyAndStepId),\n // switchMap(action =>\n // this.responsiblePartiesService.getWorkflowAssignmentsByStepId(action.propertyId, action.stepId).pipe(\n // map(workflowAssignment =>\n // workflowAssignmentsByPropertyAndStepIdSucceded({\n // workflowStepAssigneeId: workflowAssignment?.responsiblePartyId || null,\n // })\n // ),\n // catchError(() => {\n // this.snackbarService.error(SnackbarErrorMessage.LoadingworkflowAssignment);\n // return of(workflowAssignmentsByPropertyAndStepIdFailure());\n // })\n // )\n // )\n // )\n // );\n\n deleteTurnover$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteTurnover),\n mergeMap(action =>\n this.turnoversService.deleteTurnover(action.turnoverId).pipe(\n map(workflowAssignment => deleteTurnoverSuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingTurnover);\n return of(deleteTurnoverFailed());\n })\n )\n )\n )\n );\n\n deleteTurnoverAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteTurnoverAttachment),\n withLatestFrom(this.store.select(selectTurnoverData)),\n mergeMap(([action, turnoverData]) =>\n this.turnoversService.deleteTurnoverAttachment(turnoverData.id, action.attachment.id).pipe(\n switchMap(() =>\n iif(\n () => !!action.attachment?.fileUploadId,\n of(action.attachment?.fileUploadId).pipe(\n map((fileId: number) => deleteFileFromRepository({ fileId: action.attachment?.fileUploadId }))\n ),\n of(turnoverData.id).pipe(map((turnoverId: number) => deleteFileFromRepositorySuccess()))\n )\n ),\n mergeMap(() => [deleteTurnoverAttachmentSuccess(), getTurnoverAttachments({ turnoverId: turnoverData.id })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingAttachment);\n return of(deleteFileFromRepositoryFailed());\n })\n )\n )\n )\n );\n\n deleteTurnoverTicketAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteTurnoverTicketAttachment),\n mergeMap(action =>\n this.ticketsService.deleteTurnoverAttachment(action.ticketId, action.attachment.id).pipe(\n switchMap(() =>\n iif(\n () => !!action.attachment?.fileUploadId,\n of(action.attachment?.fileUploadId).pipe(map((fileId: number) => deleteFileFromRepository({ fileId }))),\n of(null)\n )\n ),\n mergeMap(() => [\n deleteTurnoverTicketAttachmentSuccess(),\n action.ticketType === TicketType.Ticket\n ? getTicket({ ticketId: action.ticketId })\n : loadPunchById({ punchId: action.ticketId }),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingAttachment);\n return of(deleteTurnoverTicketAttachmentFailed());\n })\n )\n )\n )\n );\n\n deleteFileFromRepository$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteFileFromRepository),\n mergeMap(action =>\n this.fileUploadsService.removeFile(action.fileId).pipe(\n map(() => deleteFileFromRepositorySuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingFileFromRepository);\n return of(deleteFileFromRepositoryFailed());\n })\n )\n )\n )\n );\n\n getTurnoverAttachments$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTurnoverAttachments),\n mergeMap(action =>\n this.turnoversService.getTurnoversAttachments(action.turnoverId).pipe(\n map((attachments: RestGenericTypedAttachment[]) =>\n getTurnoverAttachmentsSuccess({ allAttachments: attachments || [] })\n ),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverAttachmentList);\n return of(getTurnoverAttachmentsFailed());\n })\n )\n )\n )\n );\n\n getBidAttachmentList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getBidAttachmentList),\n mergeMap(action =>\n this.bidsService.getBidAttachments(action.bidId).pipe(\n map((attachments: RestGenericTypedAttachment[]) =>\n getBidAttachmentListSuccess({ allAttachments: attachments || [] })\n ),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingBidAttachmentList);\n return of(getBidAttachmentListFailed());\n })\n )\n )\n )\n );\n\n deleteBidAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteBidAttachment),\n mergeMap(action =>\n this.bidsService.deleteBidAttachment(action.bidId, action.attachment.id).pipe(\n switchMap(() =>\n iif(\n () => !!action.attachment?.fileUploadId,\n of(action.attachment?.fileUploadId).pipe(map((fileId: number) => deleteFileFromRepository({ fileId }))),\n of(null)\n )\n ),\n mergeMap(() => [deleteBidAttachmentSuccess(), getBidAttachmentList({ bidId: action.bidId })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingAttachment);\n return of(deleteBidAttachmentFailed());\n })\n )\n )\n )\n );\n\n toggleAllSections$ = createEffect(() =>\n this.actions$.pipe(\n ofType(toggleAllSections),\n withLatestFrom(this.store.select(selectAllPropertyIds)),\n mergeMap(([action, allPropertyIds]) =>\n this.turnoversService\n .toggleAllSections(allPropertyIds, action.active)\n .pipe(map(activePropertyIds => setActiveSections({ activePropertyIds })))\n )\n )\n );\n\n toggleSingleSection$ = createEffect(() =>\n this.actions$.pipe(\n ofType(toggleSingleSection),\n withLatestFrom(this.store.select(selectActivePropertyIds)),\n mergeMap(([action, activePropertyIds]) =>\n this.turnoversService\n .toggleSingleSection(activePropertyIds, action.propertyId, action.active)\n .pipe(map(activePropertyIds => setActiveSections({ activePropertyIds })))\n )\n )\n );\n\n toggleInactiveFilteredSingleSection$ = createEffect(() =>\n this.actions$.pipe(\n ofType(toggleInactiveFilteredSingleSection),\n withLatestFrom(this.store.select(selectInactiveFilteredPropertyIds)),\n mergeMap(([action, selectInactiveFilteredPropertyIds]) =>\n this.turnoversService\n .toggleSingleSection(selectInactiveFilteredPropertyIds, action.propertyId, action.active)\n .pipe(map(inactiveFilteredPropertyIds => setInactiveFilteredSections({ inactiveFilteredPropertyIds })))\n )\n )\n );\n\n resetInactiveFilteredSections$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setTurnoversFilters, resetTurnoversFilters),\n map(() => setInactiveFilteredSections({ inactiveFilteredPropertyIds: [] }))\n )\n );\n\n loadTurnoverTimers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTurnoverTimers),\n mergeMap(action =>\n this.turnoversService.getTurnoversTimers(action.turnoverId).pipe(\n map(timers => turnoverTimersLoaded({ turnoverId: action.turnoverId, timers })),\n catchError(() => {\n return of(setTurnoverTimersFailed());\n })\n )\n )\n )\n );\n\n setTurnoverTimers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setTurnoverTimers),\n mergeMap(action =>\n this.turnoversService.updateTurnoversTimers(action.turnoverId, action.timers).pipe(\n map(() => setTurnoverTimersSuccess()),\n catchError(() => {\n this.snackbarService.error('Timer update failed');\n return of(setTurnoverTimersFailed());\n })\n )\n )\n )\n );\n\n setWorkflowStepAssignee$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setWorkflowStepAssignee),\n mergeMap(action =>\n this.workflowActionsService.setWorkflowStepAssignee(action.turnoverId, action.step, action.assigneeId).pipe(\n mergeMap(() => [\n setWorkflowStepAssigneeSuccess(),\n getWorkflowStepCommentList({ turnoverId: action.turnoverId }),\n ]),\n catchError(() => {\n return of(setWorkflowStepAssigneeFailed());\n })\n )\n )\n )\n );\n\n setEmptyWorkflowStepAssignee$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setEmptyWorkflowStepAssignee),\n mergeMap(action =>\n this.workflowActionsService\n .setWorkflowStepAssignee(action.turnoverId, action.step, action.assigneeId, action.rememberIt)\n .pipe(\n mergeMap(() => [getTurnoverData({ ...action })]),\n catchError(() => {\n return of(setWorkflowStepAssigneeFailed());\n })\n )\n )\n )\n );\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { RestBidModel } from '@shared/interfaces/bid.interface';\nimport { RestBulkScopeAndBidModel } from '@shared/interfaces/rest-bulk-scope-and-bid-model';\n\nimport {\n addUnitsToBulk,\n addUnitsToBulkSuccess,\n createNewBulkScope,\n createNewBulkScopeFailed,\n createNewBulkScopeSuccess,\n getBulkScope,\n getBulkScopeFailed,\n getBulkScopeList,\n getBulkScopeListFailed,\n getBulkScopeListSuccess,\n getBulkScopeSuccess,\n resetNewBulkScopeID,\n resetUpdateBulkScopeStatus,\n updateBulkScope,\n updateBulkScopeFailed,\n updateBulkScopeSuccess,\n} from '../actions/bulk-and-scope.actions';\n\nexport const bulkBidsFeatureKey = 'bulk-bids';\n\nexport interface State {\n newBulkScopeInProgress: boolean;\n newBulkScopeInStatus: UpdateStatus;\n newBulkScopeInId: number;\n\n bulkScopeLoading: boolean;\n bulkScope: RestBulkScopeAndBidModel;\n\n bulkScopeListLoading: boolean;\n bulkScopeList: RestBulkScopeAndBidModel[];\n\n updateBulkScopeInProgress: boolean;\n updateBulkScopeInStatus: UpdateStatus;\n\n allBidList: RestBidModel[];\n allBidListLoading: boolean;\n\n addUnitsInProgress: boolean;\n}\n\nexport const initialState: State = {\n newBulkScopeInProgress: false,\n newBulkScopeInStatus: null,\n newBulkScopeInId: null,\n\n bulkScopeLoading: false,\n bulkScope: null,\n\n bulkScopeListLoading: false,\n bulkScopeList: [],\n\n updateBulkScopeInProgress: false,\n updateBulkScopeInStatus: null,\n\n allBidList: [],\n allBidListLoading: false,\n addUnitsInProgress: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n\n /**\n * Create new bulk scope\n */\n on(createNewBulkScope, (state, action) => ({\n ...state,\n newBulkScopeInProgress: true,\n newBulkScopeInStatus: UpdateStatus.UPDATE,\n newBulkScopeInId: null,\n })),\n on(createNewBulkScopeSuccess, (state, action) => ({\n ...state,\n newBulkScopeInProgress: false,\n newBulkScopeInStatus: UpdateStatus.OK,\n newBulkScopeInId: action.bulkScopeId,\n })),\n on(createNewBulkScopeFailed, (state, action) => ({\n ...state,\n newBulkScopeInProgress: false,\n newBulkScopeInStatus: UpdateStatus.ERROR,\n newBulkScopeInId: null,\n })),\n on(resetNewBulkScopeID, (state, action) => ({\n ...state,\n newBulkScopeInId: null,\n })),\n\n /**\n * get bulk scope\n */\n on(getBulkScope, (state, action) => ({\n ...state,\n bulkScopeLoading: true,\n })),\n on(getBulkScopeSuccess, (state, action) => ({\n ...state,\n bulkScope: action.bulkScope,\n bulkScopeLoading: false,\n })),\n on(getBulkScopeFailed, (state, action) => ({\n ...state,\n bulkScope: null,\n bulkScopeLoading: false,\n })),\n /**\n * get bulk scope list\n */\n on(getBulkScopeList, (state, action) => ({\n ...state,\n bulkScopeListLoading: true,\n })),\n on(getBulkScopeListSuccess, (state, action) => ({\n ...state,\n bulkScopeList: action.bulkList,\n bulkScopeListLoading: false,\n })),\n on(getBulkScopeListFailed, (state, action) => ({\n ...state,\n bulkScopeList: [],\n bulkScopeListLoading: false,\n })),\n\n /**\n * update bulk scope\n */\n on(updateBulkScope, (state, action) => ({\n ...state,\n updateBulkScopeInStatus: UpdateStatus.UPDATE,\n updateBulkScopeInProgress: true,\n })),\n on(updateBulkScopeSuccess, (state, action) => ({\n ...state,\n updateBulkScopeInStatus: UpdateStatus.OK,\n updateBulkScopeInProgress: false,\n })),\n on(updateBulkScopeFailed, (state, action) => ({\n ...state,\n updateBulkScopeInStatus: UpdateStatus.ERROR,\n updateBulkScopeInProgress: false,\n })),\n on(resetUpdateBulkScopeStatus, (state, action) => ({\n ...state,\n updateBulkScopeInStatus: null,\n })),\n\n /**\n * add units to bulk\n */\n on(addUnitsToBulk, (state, action) => ({\n ...state,\n addUnitsInProgress: true,\n })),\n on(addUnitsToBulkSuccess, updateBulkScopeFailed, (state, action) => ({\n ...state,\n addUnitsInProgress: false,\n }))\n);\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { KpiEffects } from '@dashboards/store/effects/kpi.effects';\nimport { AdministrationEffects } from '@main-application/administration/effects/administration.effects';\nimport * as fromAdministration from '@main-application/administration/reducers/administration.reducer';\nimport { SystemConfigurationEffects } from '@main-application/management/components/system-configuration/store/system-configuration.effects';\nimport * as fromSystemConfiguration from '@main-application/management/components/system-configuration/store/system-configuration.reducer';\nimport { TurnoverConfigurationStoreModule } from '@main-application/management/components/turnover-configuration/store/turnover-configuration-store.module';\nimport { BulkBidsEffects } from '@main-application/turnovers/effects/bulk-bids.effects';\nimport { PunchEffects } from '@main-application/turnovers/effects/punch.effects';\nimport { TurnoverBidsEffects } from '@main-application/turnovers/effects/turnover-bids.effects';\nimport { TurnoversEffects } from '@main-application/turnovers/effects/turnovers.effects';\nimport * as fromBulkBids from '@main-application/turnovers/reducers/bulk-bids.reducer';\nimport * as fromPunch from '@main-application/turnovers/reducers/punch.reducer';\nimport {\n turnoverBidsFeatureKey,\n turnoverBidsReducer,\n} from '@main-application/turnovers/reducers/turnover-bids.reducer';\nimport * as fromTurnovers from '@main-application/turnovers/reducers/turnovers.reducer';\nimport { PortfolioStoreModule } from '@portfolio/store/portfolio-store.module';\nimport { TemplateStoreModule } from '@template/store/template-store.module';\n\nimport { DashboardEffects } from './effects/dashboard.effects';\nimport * as fromDashboardFilterReducer from './reducers/dashboard-filter.reducer';\nimport { metaDashboardFilterReducers } from './reducers/dashboard-filter.reducer';\nimport * as fromDashboardsReducer from './reducers/dashboards.reducer';\nimport { metaDashboardReducers } from './reducers/dashboards.reducer';\nimport * as fromDashboardKpiReducer from './reducers/kpi.reducer';\nimport { metaDashboardKpiReducers } from './reducers/kpi.reducer';\n\nimport * as fromDashboardFilterTransient from '.';\n\n@NgModule({\n exports: [],\n imports: [\n PortfolioStoreModule,\n TurnoverConfigurationStoreModule,\n TemplateStoreModule,\n EffectsModule.forFeature([\n DashboardEffects,\n KpiEffects,\n AdministrationEffects,\n TurnoversEffects,\n BulkBidsEffects,\n PunchEffects,\n SystemConfigurationEffects,\n TurnoverBidsEffects,\n ]),\n StoreModule.forFeature(fromSystemConfiguration.systemConfigurationFeatureKey, fromSystemConfiguration.reducer),\n StoreModule.forFeature(fromDashboardsReducer.dashboardsFeatureKey, fromDashboardsReducer.reducer, {\n metaReducers: metaDashboardReducers,\n }),\n StoreModule.forFeature(fromDashboardKpiReducer.kpiFeatureKey, fromDashboardKpiReducer.reducer, {\n metaReducers: metaDashboardKpiReducers,\n }),\n StoreModule.forFeature(fromDashboardFilterReducer.dashboardFilterFeatureKey, fromDashboardFilterReducer.reducer, {\n metaReducers: metaDashboardFilterReducers,\n }),\n StoreModule.forFeature(fromAdministration.administrationFeatureKey, fromAdministration.reducer),\n StoreModule.forFeature(fromTurnovers.turnoversFeatureKey, fromTurnovers.reducer),\n StoreModule.forFeature(fromBulkBids.bulkBidsFeatureKey, fromBulkBids.reducer),\n StoreModule.forFeature(fromPunch.punchFeatureKey, fromPunch.reducer),\n StoreModule.forFeature(\n fromDashboardFilterTransient.dashboardFilterTransientFeatureKey,\n fromDashboardFilterTransient.reducer\n ),\n StoreModule.forFeature(turnoverBidsFeatureKey, turnoverBidsReducer),\n ],\n declarations: [],\n})\nexport class SharedStoreModule {}\n","import { NgModule } from '@angular/core';\nimport { OidcSecurityService } from 'angular-auth-oidc-client';\n\nimport { ScreenWiperService } from '@app/services/screen-wiper.service';\nimport { UnitsService } from '@app/services/units.service';\nimport { BoardService } from '@main-application/boards/services/board.service';\nimport { InspectionService } from '@main-application/inspections/services/inspection.service';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\n@NgModule({\n declarations: [],\n providers: [\n OidcSecurityService,\n ModalsService,\n BoardService,\n InspectionService,\n SnackbarService,\n UnitsService,\n ScreenWiperService,\n ],\n})\nexport class SingletonServicesModule {}\n","import { Injectable } from '@angular/core';\nimport * as signalR from '@microsoft/signalr';\nimport { HubConnection } from '@microsoft/signalr';\nimport { Store } from '@ngrx/store';\nimport { filter, firstValueFrom } from 'rxjs';\n\nimport { addLatestNotification } from '@main-application/notifications/actions/notifications.actions';\nimport { WebNotification } from '@shared/interfaces/notification.interface';\nimport { AuthService } from '@shared/services/auth.service';\nimport { environment } from 'src/environments/environment';\nimport { EnvironmentType } from 'src/environments/environment-config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationsService {\n hubConnection: HubConnection;\n\n constructor(private auth: AuthService, private store: Store<{}>) {}\n\n connect(): Promise {\n const tokenPromise = firstValueFrom(this.auth.watchForAccessToken().pipe(filter(Boolean)));\n\n if (!this.hubConnection) {\n this.hubConnection = new signalR.HubConnectionBuilder()\n .configureLogging(\n environment.type === EnvironmentType.Prod ? signalR.LogLevel.Critical : signalR.LogLevel.Information\n )\n\n .withUrl(environment.notificationsAllUrl, {\n transport: signalR.HttpTransportType.WebSockets,\n skipNegotiation: true,\n accessTokenFactory: () => tokenPromise,\n })\n .withAutomaticReconnect()\n .build();\n\n this.hubConnection.on('Notify', (notification: WebNotification) => {\n this.distributeNotifications(notification);\n });\n }\n\n return this.hubConnection.start().catch(err => {\n return err;\n });\n }\n\n close() {\n if (this.hubConnection) {\n this.hubConnection.stop().then();\n }\n }\n\n private distributeNotifications(notification: WebNotification) {\n this.store.dispatch(addLatestNotification({ notification }));\n }\n}\n","import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router, RoutesRecognized } from '@angular/router';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { OidcSecurityService } from 'angular-auth-oidc-client';\nimport { distinctUntilChanged, filter, first, map, pairwise, tap } from 'rxjs/operators';\n\nimport { AppVersionService } from '@app/services/app-version.service';\nimport { OidcStorageService } from '@app/services/oidc-storage.service';\nimport { selectedDashboardMode } from '@dashboards/store/actions/dashboard.actions';\nimport { NotificationsService } from '@main-application/notifications/services/notifications.service';\nimport { loadEnumerations } from '@shared/actions/enumerations.actions';\nimport { setPreviousRoute } from '@shared/actions/route-state.action';\nimport { loadTenantData, loadUserData, setAuthenticated } from '@shared/actions/user.actions';\nimport { setWindowWidth } from '@shared/actions/window-resize.actions';\nimport { getDashboardMode } from '@shared/functions/get-dashboard-mode.function';\nimport { TenantData } from '@shared/interfaces/tenant-data';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { selectTenantData, selectUserData } from '@shared/selectors/user.selectors';\nimport { AuthService } from '@shared/services/auth.service';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { environment } from 'src/environments/environment';\n\nimport { closeMenus } from './boards/store/boards.actions';\n\n@UntilDestroy()\n@Component({\n selector: 'app-main-application',\n templateUrl: './main-application.component.html',\n styleUrls: ['./main-application.component.scss'],\n})\nexport class MainApplicationComponent implements OnInit, OnDestroy {\n environment = environment;\n currentVersion = '';\n currentVersionTimeStamp = 0;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n private authService: AuthService,\n private router: Router,\n private oidcSecurityService: OidcSecurityService,\n private store: Store<{}>,\n private notificationsService: NotificationsService,\n private snackbarService: SnackbarService,\n private appVersionService: AppVersionService,\n private activatedRoute: ActivatedRoute,\n private oidcStorageService: OidcStorageService\n ) {}\n\n ngOnInit() {\n this.tokenRevoke();\n\n this.store.dispatch(setWindowWidth({ windowWidth: window.innerWidth }));\n this.authService.watchForAccessToken().pipe(untilDestroyed(this)).subscribe();\n\n this.appVersionService.version$\n .pipe(\n untilDestroyed(this),\n distinctUntilChanged(),\n filter(appVersion => appVersion.version_timestamp > 0),\n first(),\n tap(appVersion => {\n this.currentVersionTimeStamp = appVersion.version_timestamp;\n this.currentVersion = appVersion.version_number;\n })\n )\n .subscribe();\n\n this.router.events\n .pipe(\n untilDestroyed(this),\n filter(event => event instanceof NavigationEnd)\n )\n .subscribe(() => {\n this.checkSlackResponse();\n this.checkBuildiumResponse();\n this.cdr.detectChanges();\n });\n\n this.oidcSecurityService.isAuthenticated$\n .pipe(\n untilDestroyed(this),\n map(({ isAuthenticated }) => isAuthenticated),\n distinctUntilChanged()\n )\n .subscribe(isAuthenticated => {\n this.store.dispatch(setAuthenticated({ isAuthenticated }));\n\n if (!isAuthenticated) {\n this.notificationsService.close();\n return;\n }\n\n this.store.dispatch(loadTenantData());\n this.store.dispatch(loadUserData());\n this.store.dispatch(loadEnumerations());\n this.notificationsService.connect();\n });\n\n this.store\n .select(selectUserData)\n .pipe(\n untilDestroyed(this),\n filter((userData: UserData) => !!userData)\n )\n .subscribe((userData: UserData) =>\n this.store.dispatch(selectedDashboardMode({ dashboardMode: getDashboardMode(userData) }))\n );\n\n this.store\n .select(selectTenantData)\n .pipe(\n untilDestroyed(this),\n filter((tenantData: TenantData) => !!tenantData?.tenantId)\n )\n .subscribe((tenantData: TenantData) => {\n const { href, hostname } = window.location;\n if (hostname !== 'localhost' && !href.includes(tenantData.tenantUrl)) {\n setTimeout(() => {\n const url = new URL(tenantData.tenantUrl);\n url.searchParams.append('revoke-token', '1');\n window.location.href = url.toString();\n }, 0);\n }\n });\n\n this.router.events\n .pipe(\n untilDestroyed(this),\n filter(evt => evt instanceof RoutesRecognized),\n map(evt => evt as RoutesRecognized),\n pairwise()\n )\n .subscribe(([previousEvent, _event]) => {\n if (previousEvent?.state) {\n this.store.dispatch(setPreviousRoute({ previousRoute: previousEvent.urlAfterRedirects }));\n }\n });\n\n this.appVersionService.pull();\n }\n\n checkSlackResponse() {\n const { slackAdded } = this.activatedRoute.snapshot.queryParams;\n if (slackAdded === 'true') {\n this.removeQueryParam('slackAdded');\n setTimeout(() => {\n this.snackbarService.success(SnackbarErrorMessage.SlackAdded);\n }, 1000);\n }\n }\n\n checkBuildiumResponse() {\n const { buildium } = this.activatedRoute.snapshot.queryParams;\n if (buildium === 'true') {\n this.removeQueryParam('buildium');\n setTimeout(() => {\n this.snackbarService.success(SnackbarErrorMessage.BuildiumSetupCompleted);\n }, 1000);\n }\n if (buildium === 'false') {\n this.removeQueryParam('buildium');\n setTimeout(() => {\n this.snackbarService.error(SnackbarErrorMessage.BuildiumSetupIncompleted);\n }, 1000);\n }\n }\n\n private removeQueryParam(paramName: string) {\n this.router.navigate([], {\n queryParams: {\n [paramName]: null,\n },\n queryParamsHandling: 'merge',\n });\n }\n\n ngOnDestroy() {\n this.notificationsService.close();\n }\n\n @HostListener('window:click', ['$event'])\n @HostListener('window:contextmenu', ['$event'])\n onClick(event) {\n this.store.dispatch(closeMenus());\n }\n\n @HostListener('window:resize', ['$event'])\n onResize(event) {\n this.store.dispatch(setWindowWidth({ windowWidth: event.target.innerWidth }));\n }\n\n tokenRevoke() {\n const url = new URL(window.location.href);\n if (url.searchParams.has('revoke-token')) {\n this.oidcStorageService.clear();\n const url = new URL(window.location.href);\n url.searchParams.delete('revoke-token');\n window.location.href = url.toString();\n }\n }\n}\n","import { DashboardMode } from '@shared/enums/dashboard-mode';\nimport { UserData } from '@shared/interfaces/user-data';\n\nexport function getDashboardMode(userData: UserData): DashboardMode {\n // TODO Add Administrator general roles handling when available\n if (userData.generalRole === 'Asset Manager') {\n return DashboardMode.ASSET_MANAGER;\n }\n if (userData.generalRole === 'SuperUser') {\n // return DashboardMode.SUPER_USER;\n return DashboardMode.ASSET_MANAGER;\n }\n\n return DashboardMode.PROPERTY_MANAGER;\n}\n","\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { AutoLoginPartialRoutesGuard } from 'angular-auth-oidc-client';\n\nimport { RoutePath } from '@shared/enums/route-path.enum';\nimport { AuthGuard } from '@shared/guards/auth.guard';\nimport { ResidentGuard } from '@shared/guards/resident.guard';\n\nimport { MainApplicationComponent } from './main-application.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: MainApplicationComponent,\n children: [\n {\n path: RoutePath.RESIDENT,\n canActivate: [AutoLoginPartialRoutesGuard, AuthGuard],\n loadChildren: () => import('@main-application/resident/resident.module').then(m => m.ResidentModule),\n },\n {\n path: '',\n canActivate: [ResidentGuard],\n loadChildren: () =>\n import('@main-application/application-menu/application-menu.module').then(m => m.ApplicationMenuModule),\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MainApplicationRoutingModule {}\n","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions } from '@angular/material/tooltip';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreDevtoolsModule } from '@ngrx/store-devtools';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\nimport player from 'lottie-web';\nimport { LottieCacheModule, LottieModule } from 'ngx-lottie';\n\nimport { OidcStorageService } from '@app/services/oidc-storage.service';\nimport { SharedStoreModule } from '@dashboards/store/shared-store.module';\nimport { NotificationsModule } from '@main-application/notifications/notifications.module';\nimport { PortfolioStoreModule } from '@portfolio/store/portfolio-store.module';\nimport { ValueIfNonZeroPipe } from '@shared/pipes/valueIfNonZero.pipe';\nimport { ValueIfPositivePipe } from '@shared/pipes/valueIfPositive.pipe';\nimport { YesEmptyPipe } from '@shared/pipes/yesEmpty.pipe';\nimport { SharedModule } from '@shared/shared.module';\nimport { SingletonServicesModule } from '@shared/singleton-service.module';\nimport { ModalsModule } from '@ui-components/modals/modals.module';\nimport { environment } from 'src/environments/environment';\nimport { EnvironmentType } from 'src/environments/environment-config';\n\nimport { MainApplicationComponent } from './main-application.component';\nimport { MainApplicationRoutingModule } from './main-application.routing.module';\n\nexport function playerFactory() {\n return player;\n}\n\nexport const tooltipDefaults: MatTooltipDefaultOptions = {\n showDelay: 200,\n hideDelay: 0,\n touchendHideDelay: 1500,\n};\n\n@NgModule({\n declarations: [MainApplicationComponent],\n imports: [\n LottieModule.forRoot({ player: playerFactory }),\n LottieCacheModule.forRoot(),\n CommonModule,\n NotificationsModule, //ToDo: check what is it and where it should be registered\n\n EffectsModule.forRoot([]),\n StoreDevtoolsModule.instrument({ maxAge: 25, logOnly: environment.type === EnvironmentType.Prod }),\n PortfolioStoreModule,\n SharedStoreModule,\n\n SharedModule,\n SingletonServicesModule,\n\n ModalsModule,\n ScrollingModule,\n FormsModule,\n ReactiveFormsModule,\n\n MatDialogModule,\n MatSnackBarModule,\n\n MainApplicationRoutingModule,\n ],\n providers: [\n YesEmptyPipe,\n ValueIfPositivePipe,\n ValueIfNonZeroPipe,\n { provide: MAT_TOOLTIP_DEFAULT_OPTIONS, useValue: tooltipDefaults },\n { provide: AbstractSecurityStorage, useClass: OidcStorageService },\n ],\n})\nexport class MainApplicationModule {}\n","export enum CompanyForm {\n ID = 'id',\n DISPLAY_NAME = 'displayName',\n LEGAL_NAME = 'legalName',\n WEBSITE = 'website',\n CONTACT_PERSON_ID = 'contactPersonId',\n IS_ACTIVE = 'isActive',\n\n ADDRESS = 'address',\n\n ADDRESS_TYPE = 'addressType',\n TITLE = 'title',\n STREET1 = 'street1',\n STREET2 = 'street2',\n CITY = 'city',\n STATE = 'state',\n ZIP = 'zip',\n WHOLE_OBJECT = 'wholeObject',\n}\n","import { ChangeDetectorRef, Injectable } from '@angular/core';\n\nimport { CompanyForm } from '@companies/config/enums/company-form';\nimport { DashboardsAbstract } from '@dashboards/components/abstract/dashboards.abstract';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\n\n@Injectable()\nexport abstract class CompaniesAbstract extends DashboardsAbstract {\n isLoading = false;\n companyModel: RestCompanyModel;\n\n protected constructor(protected cdr: ChangeDetectorRef) {\n super(cdr);\n }\n\n get CompanyForm(): typeof CompanyForm {\n return CompanyForm;\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Store } from '@ngrx/store';\n\nimport { CompaniesAbstract } from '@companies/abstract/companies-abstract';\nimport { addCompany } from '@companies/store/companies.actions';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\n\n@Component({\n selector: 'app-add-new-company-modal',\n templateUrl: './add-new-company-modal.component.html',\n styleUrls: ['./add-new-company-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AddNewCompanyModalComponent extends CompaniesAbstract implements OnInit {\n form: UntypedFormGroup;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n private store: Store<{}>,\n private formBuilder: UntypedFormBuilder\n ) {\n super(cdr);\n }\n\n get displayName(): UntypedFormControl {\n return this.form.get(this.CompanyForm.DISPLAY_NAME) as UntypedFormControl;\n }\n\n get legalName(): UntypedFormControl {\n return this.form.get(this.CompanyForm.LEGAL_NAME) as UntypedFormControl;\n }\n\n ngOnInit(): void {\n this.initForm();\n }\n\n cancel() {\n this.dialogRef.close(null);\n }\n\n save() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const companyModel: RestCompanyModel = {\n id: 0,\n displayName: this.displayName.value,\n legalName: this.legalName.value,\n contactPersonId: 0,\n employees: [],\n addresses: [],\n };\n\n this.store.dispatch(addCompany({ companyModel }));\n this.dialogRef.close(null);\n }\n\n private initForm() {\n this.form = this.formBuilder.group({\n [this.CompanyForm.DISPLAY_NAME]: [null, [Validators.required]],\n [this.CompanyForm.LEGAL_NAME]: [null, [Validators.required]],\n });\n }\n}\n","
    \n

    Add new vendor

    \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n \n \n
    \n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestContractorModel } from '@shared/interfaces/contractors.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ContractorsService {\n constructor(private restApiService: RestapiService) {}\n\n getUnassignedContractorsList(): Observable {\n return this.restApiService.getData(`Contractors/unassigned`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map, mergeMap, switchMap } from 'rxjs/operators';\n\nimport { AdminPanelService } from '@app/services/admin-panel.service';\nimport { CompaniesService } from '@app/services/companies.service';\nimport { ContractorsService } from '@app/services/contractors.service';\nimport { UserService } from '@app/services/user.service';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n addAddressToCompany,\n addAddressToCompanyFailed,\n addAddressToCompanySuccess,\n addCompany,\n addCompanyFailed,\n addCompanySuccess,\n addCompanyWithOwner,\n addCompanyWithOwnerFailure,\n addCompanyWithOwnerSuccess,\n addEmployeeToCompany,\n addEmployeeToCompanyFailed,\n addEmployeeToCompanySuccess,\n deleteCompany,\n deleteCompanyFailed,\n deleteCompanySuccess,\n deleteEmployeeFromCompany,\n deleteEmployeeFromCompanyFailed,\n deleteEmployeeFromCompanySuccess,\n getCompaniesList,\n getCompaniesListFailed,\n getCompaniesListSuccess,\n getCompany,\n getCompanyFailed,\n getCompanySuccess,\n getContractorList,\n getContractorListFailed,\n getContractorListSuccess,\n updateAddressInCompany,\n updateAddressInCompanyFailed,\n updateAddressInCompanySuccess,\n updateCompany,\n updateCompanyFailed,\n updateCompanySuccess,\n} from './companies.actions';\n\n@Injectable()\nexport class CompaniesEffects {\n constructor(\n private actions$: Actions,\n private snackbarService: SnackbarService,\n private userService: UserService,\n private adminService: AdminPanelService,\n private companiesService: CompaniesService,\n private contractorsService: ContractorsService\n ) {}\n\n getCompaniesList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getCompaniesList),\n exhaustMap(action =>\n this.companiesService.getCompanyList().pipe(\n map(list => getCompaniesListSuccess({ companyList: list || [] })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingCompanyList);\n return of(getCompaniesListFailed());\n })\n )\n )\n )\n );\n\n getCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getCompany),\n switchMap(action =>\n this.companiesService.getCompany(action.companyId).pipe(\n map(companyModel => getCompanySuccess({ companyModel })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingCompanyData);\n return of(getCompanyFailed());\n })\n )\n )\n )\n );\n\n addCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addCompany),\n mergeMap(action =>\n this.companiesService.addNewCompany(action.companyModel).pipe(\n mergeMap(companyModel => [addCompanySuccess({ companyModel })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AddingNewVendor);\n return of(addCompanyFailed());\n })\n )\n )\n )\n );\n\n addCompanyWithOwner$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addCompanyWithOwner),\n mergeMap(action =>\n this.userService.inviteUser(action.user).pipe(\n mergeMap(user =>\n this.companiesService\n .addNewCompany({\n ...action.companyModel,\n contactPersonId: user.id,\n })\n .pipe(\n mergeMap(company =>\n this.companiesService\n .addEmployeeToCompany({ companyId: company.id, userIds: [user.id] })\n .pipe(map(() => company))\n ),\n mergeMap(company =>\n this.adminService\n .setUserToGeneralRole([{ roleId: action.roleId, userId: user.id }])\n .pipe(map(() => company))\n )\n )\n )\n )\n ),\n map(company => addCompanyWithOwnerSuccess({ company })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AddingNewVendor);\n return of(addCompanyWithOwnerFailure());\n })\n )\n );\n\n updateCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateCompany),\n mergeMap(action =>\n this.companiesService.updateCompany(action.companyModel).pipe(\n mergeMap(companyModel => [updateCompanySuccess({ companyModel })]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingVendor);\n return of(updateCompanyFailed());\n })\n )\n )\n )\n );\n\n deleteCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteCompany),\n mergeMap(action =>\n this.companiesService.deleteCompany(action.companyId).pipe(\n mergeMap(() => [deleteCompanySuccess(), getCompaniesList()]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingVendor);\n return of(deleteCompanyFailed());\n })\n )\n )\n )\n );\n\n addEmployeeToCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addEmployeeToCompany),\n mergeMap(action =>\n this.companiesService.addEmployeeToCompany(action.updateEmployeeItem).pipe(\n mergeMap(companyList => [\n addEmployeeToCompanySuccess(),\n getCompany({ companyId: action.updateEmployeeItem.companyId }),\n getContractorList(),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.AddingEmployee);\n return of(addEmployeeToCompanyFailed());\n })\n )\n )\n )\n );\n\n deleteEmployeeFromCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteEmployeeFromCompany),\n mergeMap(action =>\n this.companiesService.deleteEmployeeFromCompany(action.updateEmployeeItem).pipe(\n mergeMap(companyList => [\n deleteEmployeeFromCompanySuccess(),\n getCompany({ companyId: action.updateEmployeeItem.companyId }),\n getContractorList(),\n ]),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingEmployee);\n return of(deleteEmployeeFromCompanyFailed());\n })\n )\n )\n )\n );\n\n getContractorList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getContractorList),\n exhaustMap(() => {\n return this.contractorsService.getUnassignedContractorsList().pipe(\n map(contractors => getContractorListSuccess({ contractors })),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingVendors);\n return of(getContractorListFailed());\n })\n );\n })\n )\n );\n\n addAddressToCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addAddressToCompany),\n mergeMap(action => {\n return this.companiesService.addAddressToCompany(action.postCompanyAddressModel).pipe(\n mergeMap(contractors => [\n addAddressToCompanySuccess(),\n getCompany({ companyId: action.postCompanyAddressModel.companyId }),\n ]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.AddingAddress);\n return of(addAddressToCompanyFailed());\n })\n );\n })\n )\n );\n\n updateAddressInCompany$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateAddressInCompany),\n mergeMap(action => {\n return this.companiesService.updateAddressInCompany(action.restAddressModel, action.companyId).pipe(\n mergeMap(contractors => [updateAddressInCompanySuccess(), getCompany({ companyId: action.companyId })]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingAddress);\n return of(updateAddressInCompanyFailed());\n })\n );\n })\n )\n );\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { CompaniesEffects } from './companies.effects';\nimport * as fromCompanies from './companies.reducer';\n\n@NgModule({\n imports: [\n CommonModule,\n StoreModule.forFeature(fromCompanies.companiesFeatureKey, fromCompanies.reducer),\n EffectsModule.forFeature([CompaniesEffects]),\n ],\n})\nexport class CompaniesStoreModule {}\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestAddressModel } from '@shared/interfaces/address.interface';\nimport { PostCompanyAddressModel, RestCompanyModel, UpdateEmployeeItem } from '@shared/interfaces/companies.interface';\nimport { RestContractorModel } from '@shared/interfaces/contractors.interface';\nimport { InviteRestUserModel } from '@shared/interfaces/user.interface';\n\n/**\n * get companies list\n */\nexport const getCompaniesList = createAction('[Companies] get companies list');\nexport const getCompaniesListSuccess = createAction(\n '[Companies] get companies list success',\n props<{ companyList: RestCompanyModel[] }>()\n);\nexport const getCompaniesListFailed = createAction('[Companies] get companies list failed');\n\n/**\n * add company\n */\nexport const addCompany = createAction('[Companies] add company', props<{ companyModel: RestCompanyModel }>());\nexport const addCompanySuccess = createAction(\n '[Companies] add company success',\n props<{ companyModel: RestCompanyModel }>()\n);\nexport const addCompanyFailed = createAction('[Companies] add company failed');\n\nexport const addCompanyWithOwner = createAction(\n '[Companies] add company with owner',\n props<{ companyModel: RestCompanyModel; roleId: number; user: InviteRestUserModel }>()\n);\nexport const addCompanyWithOwnerSuccess = createAction(\n '[Companies] add company with assignee success',\n props<{ company: RestCompanyModel }>()\n);\nexport const addCompanyWithOwnerFailure = createAction('[Companies] add company with assignee failure');\n/**\n * get company\n */\nexport const getCompany = createAction('[Companies] get company', props<{ companyId: number }>());\nexport const getCompanySuccess = createAction(\n '[Companies] get company success',\n props<{ companyModel: RestCompanyModel }>()\n);\nexport const getCompanyFailed = createAction('[Companies] get company failed');\nexport const clearCompany = createAction('[Companies] clear company');\n\n/**\n * update company\n */\nexport const updateCompany = createAction('[Companies] update company', props<{ companyModel: RestCompanyModel }>());\nexport const updateCompanySuccess = createAction(\n '[Companies] update company success',\n props<{ companyModel: RestCompanyModel }>()\n);\nexport const updateCompanyFailed = createAction('[Companies] update company failed');\n\n/**\n * delete company\n */\nexport const deleteCompany = createAction('[Companies] delete company', props<{ companyId: number }>());\nexport const deleteCompanySuccess = createAction('[Companies] delete company success');\nexport const deleteCompanyFailed = createAction('[Companies] delete company failed');\n\n/**\n * add employee to company\n */\nexport const addEmployeeToCompany = createAction(\n '[Companies] add employee to company',\n props<{ updateEmployeeItem: UpdateEmployeeItem }>()\n);\nexport const addEmployeeToCompanySuccess = createAction('[Companies] add employee to company success');\nexport const addEmployeeToCompanyFailed = createAction('[Companies] add employee to company failed');\n\n/**\n * delete employee from company\n */\nexport const deleteEmployeeFromCompany = createAction(\n '[Companies] delete employee from company',\n props<{ updateEmployeeItem: UpdateEmployeeItem }>()\n);\nexport const deleteEmployeeFromCompanySuccess = createAction('[Companies] delete employee from company success');\nexport const deleteEmployeeFromCompanyFailed = createAction('[Companies] delete employee from company failed');\n\n/**\n * get contractor list\n */\nexport const getContractorList = createAction('[Companies] get contractor listy');\nexport const getContractorListSuccess = createAction(\n '[Companies] get contractor list success',\n props<{ contractors: RestContractorModel[] }>()\n);\nexport const getContractorListFailed = createAction('[Companies] get contractor list failed');\n\n/**\n * add address to company\n */\nexport const addAddressToCompany = createAction(\n '[Companies] add address to company',\n props<{ postCompanyAddressModel: PostCompanyAddressModel }>()\n);\nexport const addAddressToCompanySuccess = createAction('[Companies] add address to company success');\nexport const addAddressToCompanyFailed = createAction('[Companies] add address to company failed');\n\n/**\n * update address in company\n */\nexport const updateAddressInCompany = createAction(\n '[Companies] update address in company',\n props<{ restAddressModel: RestAddressModel; companyId: number }>()\n);\nexport const updateAddressInCompanySuccess = createAction('[Companies] update address in company success');\nexport const updateAddressInCompanyFailed = createAction('[Companies] update address in company failed');\n","import { createReducer, on } from '@ngrx/store';\n\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { RestContractorModel } from '@shared/interfaces/contractors.interface';\n\nimport {\n addAddressToCompany,\n addAddressToCompanyFailed,\n addAddressToCompanySuccess,\n addCompany,\n addCompanyFailed,\n addCompanySuccess,\n addCompanyWithOwner,\n addCompanyWithOwnerFailure,\n addCompanyWithOwnerSuccess,\n addEmployeeToCompany,\n addEmployeeToCompanyFailed,\n addEmployeeToCompanySuccess,\n clearCompany,\n deleteCompany,\n deleteCompanyFailed,\n deleteCompanySuccess,\n deleteEmployeeFromCompany,\n deleteEmployeeFromCompanyFailed,\n deleteEmployeeFromCompanySuccess,\n getCompaniesList,\n getCompaniesListFailed,\n getCompaniesListSuccess,\n getCompany,\n getCompanyFailed,\n getCompanySuccess,\n getContractorList,\n getContractorListFailed,\n getContractorListSuccess,\n updateAddressInCompany,\n updateAddressInCompanyFailed,\n updateAddressInCompanySuccess,\n updateCompany,\n updateCompanyFailed,\n updateCompanySuccess,\n} from './companies.actions';\n\nexport const companiesFeatureKey = 'companies';\n\nexport interface State {\n companyList: RestCompanyModel[];\n companyListLoading: boolean;\n companyAddLoading: boolean;\n companyModel: RestCompanyModel;\n companyModelLoading: boolean;\n addEmployeeToCompanyLoading: boolean;\n deleteEmployeeFromCompanyLoading: boolean;\n contractors: RestContractorModel[];\n contractorsLoading: boolean;\n companyUpdateLoading: boolean;\n companyDeleteLoading: boolean;\n addAddressToCompany: boolean;\n updateAddressInProgress: boolean;\n addCompanyWithOwnerInProgress: boolean;\n}\n\nexport const initialState: State = {\n companyList: [],\n companyListLoading: false,\n companyAddLoading: false,\n companyModel: null,\n companyModelLoading: false,\n addEmployeeToCompanyLoading: false,\n deleteEmployeeFromCompanyLoading: false,\n contractors: [],\n contractorsLoading: false,\n companyUpdateLoading: false,\n companyDeleteLoading: false,\n addAddressToCompany: false,\n updateAddressInProgress: false,\n addCompanyWithOwnerInProgress: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * get companies list\n */\n on(getCompaniesList, (state, action) => ({\n ...state,\n companyListLoading: true,\n })),\n on(getCompaniesListSuccess, (state, action) => ({\n ...state,\n companyListLoading: false,\n companyList: action.companyList,\n })),\n on(getCompaniesListFailed, (state, action) => ({\n ...state,\n companyListLoading: false,\n companyList: [],\n })),\n\n /**\n * add company\n */\n on(addCompany, (state, action) => ({\n ...state,\n companyAddLoading: true,\n })),\n on(addCompanySuccess, (state, action) => ({\n ...state,\n companyAddLoading: false,\n })),\n on(addCompanyFailed, (state, action) => ({\n ...state,\n companyAddLoading: false,\n })),\n\n /**\n * update company\n */\n on(updateCompany, (state, action) => ({\n ...state,\n companyUpdateLoading: true,\n })),\n on(updateCompanySuccess, (state, action) => ({\n ...state,\n companyUpdateLoading: false,\n companyModel: action.companyModel,\n })),\n on(updateCompanyFailed, (state, action) => ({\n ...state,\n companyUpdateLoading: false,\n })),\n\n /**\n * delete company\n */\n on(deleteCompany, (state, action) => ({\n ...state,\n companyDeleteLoading: true,\n })),\n on(deleteCompanySuccess, (state, action) => ({\n ...state,\n companyDeleteLoading: false,\n })),\n on(deleteCompanyFailed, (state, action) => ({\n ...state,\n companyDeleteLoading: false,\n })),\n\n /**\n * get company\n */\n on(getCompany, (state, action) => ({\n ...state,\n companyModelLoading: true,\n })),\n on(getCompanySuccess, (state, action) => ({\n ...state,\n companyModelLoading: false,\n companyModel: action.companyModel,\n })),\n on(getCompanyFailed, (state, action) => ({\n ...state,\n companyModelLoading: false,\n companyModel: null,\n })),\n on(clearCompany, (state, action) => ({\n ...state,\n companyModel: null,\n })),\n\n /**\n * add employee to company\n */\n on(addEmployeeToCompany, (state, action) => ({\n ...state,\n addEmployeeToCompanyLoading: true,\n })),\n on(addEmployeeToCompanySuccess, (state, action) => ({\n ...state,\n addEmployeeToCompanyLoading: false,\n })),\n on(addEmployeeToCompanyFailed, (state, action) => ({\n ...state,\n addEmployeeToCompanyLoading: false,\n })),\n\n /**\n * delete employee from company\n */\n on(deleteEmployeeFromCompany, (state, action) => ({\n ...state,\n deleteEmployeeFromCompanyLoading: true,\n })),\n on(deleteEmployeeFromCompanySuccess, (state, action) => ({\n ...state,\n deleteEmployeeFromCompanyLoading: false,\n })),\n on(deleteEmployeeFromCompanyFailed, (state, action) => ({\n ...state,\n deleteEmployeeFromCompanyLoading: false,\n })),\n\n /**\n * add employee to company\n */\n on(getContractorList, (state, action) => ({\n ...state,\n contractorsLoading: true,\n })),\n on(getContractorListSuccess, (state, action) => ({\n ...state,\n contractorsLoading: false,\n contractors: action.contractors,\n })),\n on(getContractorListFailed, (state, action) => ({\n ...state,\n contractorsLoading: false,\n contractors: [],\n })),\n\n /**\n * add address to company\n */\n on(addAddressToCompany, (state, action) => ({\n ...state,\n addAddressToCompany: true,\n })),\n on(addAddressToCompanySuccess, (state, action) => ({\n ...state,\n addAddressToCompany: false,\n })),\n on(addAddressToCompanyFailed, (state, action) => ({\n ...state,\n addAddressToCompany: false,\n })),\n /**\n * update address in company\n */\n on(updateAddressInCompany, (state, action) => ({\n ...state,\n updateAddressInProgress: true,\n })),\n on(updateAddressInCompanySuccess, (state, action) => ({\n ...state,\n updateAddressInProgress: false,\n })),\n on(updateAddressInCompanyFailed, (state, action) => ({\n ...state,\n updateAddressInProgress: false,\n })),\n\n on(addCompanyWithOwner, (state, action) => ({\n ...state,\n addCompanyWithOwnerInProgress: true,\n })),\n on(addCompanyWithOwnerSuccess, addCompanyWithOwnerFailure, (state, action) => ({\n ...state,\n addCompanyWithOwnerInProgress: false,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromCompanies from './companies.reducer';\n\nexport const selectCompaniesState = createFeatureSelector(fromCompanies.companiesFeatureKey);\n\n/**\n * company List\n */\nexport const selectCompanyList = createSelector(selectCompaniesState, companiesState => companiesState.companyList);\nexport const selectCompanyListLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.companyListLoading\n);\n\n/**\n * get company\n */\nexport const selectCompany = createSelector(selectCompaniesState, companiesState => companiesState.companyModel);\nexport const selectCompanyLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.companyModelLoading\n);\nexport const selectUpdateAddressInProgress = createSelector(\n selectCompaniesState,\n companiesState => companiesState.updateAddressInProgress\n);\n\n/**\n * add employee\n */\nexport const selectAddEmployeeToCompanyLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.addEmployeeToCompanyLoading\n);\n\n/**\n * update company\n */\nexport const selectCompanyUpdateLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.companyUpdateLoading\n);\n\n/**\n * delete employee\n */\nexport const selectDeleteEmployeeFromCompanyLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.deleteEmployeeFromCompanyLoading\n);\n\n/**\n * get contractor list\n */\nexport const selectContractorsLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.contractorsLoading\n);\nexport const selectContractors = createSelector(selectCompaniesState, companiesState => companiesState.contractors);\n\n/**\n * get addCompanyWithOwner\n */\nexport const selectAddCompanyWithOwnerLoading = createSelector(\n selectCompaniesState,\n companiesState => companiesState.addCompanyWithOwnerInProgress\n);\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { iif, of } from 'rxjs';\nimport { catchError, exhaustMap, map, mergeMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';\n\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport { PropertiesService } from '@app/services/properties.service';\nimport { RestapiService } from '@app/services/restapi.service';\nimport { UnitsService } from '@app/services/units.service';\nimport {\n loadAllUserProperties,\n loadAllUserPropertiesFailed,\n loadAllUserPropertiesSucceeded,\n} from '@shared/actions/user.actions';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { UnitAttachmentType } from '@shared/enums/attachment-type';\nimport { RestPortfolioModel, RestPropertyModel } from '@shared/interfaces/rest-portfolio-model.interface';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n addPropertyToPortfolio,\n changePropertyManagers,\n createNewPortfolio,\n deleteFileFromRepository,\n deleteFileFromRepositoryFailed,\n deleteFileFromRepositorySuccess,\n deletePortfolio,\n deleteUnitAttachment,\n deleteUnitAttachmentFailed,\n deleteUnitAttachmentSuccess,\n getPropertyUnits,\n getPropertyUnitsFailed,\n getPropertyUnitsSuccess,\n getUnitAttachments,\n getUnitAttachmentsSuccess,\n loadAllUserPortfolios,\n loadAllUserPortfoliosFailed,\n loadAllUserPortfoliosSuccess,\n loadAllUserUnassignedProperties,\n loadAllUserUnassignedPropertiesFailed,\n loadAllUserUnassignedPropertiesSucceeded,\n loadPortfolioDetails,\n loadPortfolioDetailsFailed,\n loadPortfolioDetailsSuccess,\n loadPropertyDetails,\n loadPropertyDetailsFailed,\n loadPropertyDetailsSuccess,\n loadPropertyManagers,\n loadPropertyManagersFailed,\n loadPropertyManagersForProperty,\n loadPropertyManagersForPropertyFailed,\n loadPropertyManagersForPropertySuccess,\n loadPropertyManagersSucceeded,\n removePropertyFromPortfolio,\n removePropertyManagers,\n removePropertyManagersFailed,\n removePropertyManagersSuccess,\n setPropertyManagers,\n setPropertyManagersFailed,\n setPropertyManagersSuccess,\n setUnitAttachment,\n setUnitAttachmentFail,\n setUnitAttachmentSuccess,\n updatePortfolioAutoAdd,\n updatePortfolioDetails,\n updatePortfolioDetailsFailed,\n updatePortfolioDetailsSuccess,\n updatePortfolioName,\n updateProperty,\n updatePropertyFailed,\n} from './portfolio.actions';\nimport { selectPortfolioDetails, selectPropertyDetails } from './portfolio.selectors';\n\n@Injectable()\nexport class PortfolioEffects {\n loadAllPortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllUserPortfolios),\n exhaustMap(() =>\n this.restApiService.getData(`portfolio`).pipe(\n map(result => loadAllUserPortfoliosSuccess({ portfolioItems: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingPortfoliosList);\n return of(loadAllUserPortfoliosFailed());\n })\n )\n )\n )\n );\n\n loadPortfolioDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPortfolioDetails),\n switchMap(action =>\n this.restApiService.getData(`portfolio/${action.portfolioId}`).pipe(\n map(result => loadPortfolioDetailsSuccess({ portfolioDetails: result })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingPortfolio);\n return of(loadPortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n loadPropertyDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPropertyDetails),\n switchMap(action =>\n this.restApiService.getData(`properties/${action.propertyId}`).pipe(\n map(result => loadPropertyDetailsSuccess({ propertyDetails: result || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingPropertyDetails);\n return of(loadPropertyDetailsFailed());\n })\n )\n )\n )\n );\n\n loadAllUserProperties$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllUserProperties),\n switchMap(() =>\n this.propertiesService.getAllUserProperties().pipe(\n map(properties => loadAllUserPropertiesSucceeded({ properties })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingAllUserProperties);\n return of(loadAllUserPropertiesFailed());\n })\n )\n )\n )\n );\n\n loadAllUserUnassignedProperties$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadAllUserUnassignedProperties),\n switchMap(() =>\n this.propertiesService.getAllUserUnassignedProperties().pipe(\n map(unassignedProperties => loadAllUserUnassignedPropertiesSucceeded({ unassignedProperties })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.LoadingUnassignedUserProperties);\n return of(loadAllUserUnassignedPropertiesFailed());\n })\n )\n )\n )\n );\n\n updatePortfolioName$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updatePortfolioName),\n mergeMap(action =>\n this.restApiService\n .update(`portfolio/${action.portfolioDetails.id}`, action.portfolioDetails)\n .pipe(\n withLatestFrom(this.store.select(selectPortfolioDetails)),\n mergeMap(([updatedPortfolioDetails, portfolioDetails]) => [\n loadPortfolioDetailsSuccess({\n portfolioDetails: {\n ...portfolioDetails,\n name: updatedPortfolioDetails.name,\n },\n }),\n loadAllUserPortfolios(),\n ]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpadtingPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n updatePortfolioDetails$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updatePortfolioDetails),\n mergeMap(action =>\n this.restApiService\n .update(`portfolio/${action.portfolioDetails.id}`, action.portfolioDetails)\n .pipe(\n mergeMap(portfolioDetails =>\n iif(\n () => action.doNotRefetchPortfolios,\n [updatePortfolioDetailsSuccess({ portfolioDetails })],\n [updatePortfolioDetailsSuccess({ portfolioDetails }), loadAllUserPortfolios()]\n )\n ),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpadtingPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n updatePortfolioAutoAdd$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updatePortfolioAutoAdd),\n mergeMap(action =>\n this.restApiService\n .update(`portfolio/${action.portfolioDetails.id}`, action.portfolioDetails)\n .pipe(\n withLatestFrom(this.store.select(selectPortfolioDetails)),\n mergeMap(([updatedPortfolioDetails, portfolioDetails]) => [\n loadPortfolioDetailsSuccess({\n portfolioDetails: {\n ...portfolioDetails,\n autoAddNewProperties: updatedPortfolioDetails.autoAddNewProperties,\n preleaseFilterMode: updatedPortfolioDetails.preleaseFilterMode,\n },\n }),\n ]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpadtingPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n addPropertyToPortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addPropertyToPortfolio),\n mergeMap(action =>\n this.restApiService\n .update(`Portfolio/${action.portfolioId}/AddProperties`, action.propertyIds)\n .pipe(\n mergeMap(portfolioDetails => {\n return [\n loadPortfolioDetails({\n portfolioId: action.portfolioId,\n }),\n loadAllUserUnassignedProperties(),\n loadAllUserProperties(),\n ];\n }),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileAddingNewPropertyToPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n removePropertyFromPortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removePropertyFromPortfolio),\n mergeMap(action =>\n this.restApiService\n .update(`Portfolio/${action.portfolioId}/RemoveProperties`, [action.propertyId])\n .pipe(\n mergeMap(() => {\n return [\n loadPortfolioDetails({\n portfolioId: action.portfolioId,\n }),\n loadAllUserUnassignedProperties(),\n loadAllUserProperties(),\n ];\n }),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileDeletingPropertyFromPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n createNewPortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(createNewPortfolio),\n mergeMap(action =>\n this.restApiService.create(`Portfolio`, action.portfolioDetails).pipe(\n tap(portfolioDetails => {\n this.router.navigate([AppRoutes.SETTINGS_PORTFOLIO, portfolioDetails.id]).then();\n }),\n mergeMap(portfolioDetails => [\n loadPortfolioDetailsSuccess({\n portfolioDetails,\n }),\n loadAllUserPortfolios(),\n ]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.WhileCreatingNewPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n loadPropertyManagers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPropertyManagers),\n exhaustMap(action =>\n this.propertiesService.getPropertyManagers().pipe(\n map(propertyManagers => loadPropertyManagersSucceeded({ propertyManagers })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingPropertyManagers);\n return of(loadPropertyManagersFailed());\n })\n )\n )\n )\n );\n\n loadPropertyManagersForProperty$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadPropertyManagersForProperty),\n switchMap(action =>\n this.propertiesService.getPropertyManagersForProperty(action.propertyId).pipe(\n map(managerList => loadPropertyManagersForPropertySuccess({ propertyManagers: managerList || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingPropertyManagersForProperty);\n return of(loadPropertyManagersForPropertyFailed());\n })\n )\n )\n )\n );\n\n updateProperty$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateProperty),\n mergeMap(action =>\n this.restApiService\n .update(`Properties/${action.propertyDetails.id}`, action.propertyDetails)\n .pipe(\n map(propertyDetails => loadPropertyDetailsSuccess({ propertyDetails })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingPropertyDetails);\n return of(updatePropertyFailed());\n })\n )\n )\n )\n );\n\n deletePortfolio$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deletePortfolio),\n mergeMap(action =>\n this.restApiService.delete(`Portfolio/${action.portfolioId}`).pipe(\n map(() => {\n this.snackbarService.success(`${action.portfolioName} deleted`);\n return loadAllUserPortfolios();\n }),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RemovingPortfolio);\n return of(updatePortfolioDetailsFailed());\n })\n )\n )\n )\n );\n\n removePropertyManagers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(removePropertyManagers),\n mergeMap(action =>\n this.propertiesService.removePropertyManagers(action.propertyManagerModels).pipe(\n map(() => removePropertyManagersSuccess()),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RemovingManagerFromProperty);\n return of(removePropertyManagersFailed());\n })\n )\n )\n )\n );\n\n setPropertyManagers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPropertyManagers),\n withLatestFrom(this.store.select(selectPropertyDetails)),\n mergeMap(([action, property]) =>\n this.propertiesService.setPropertyManagers(action.propertyManagerModels).pipe(\n mergeMap(() => [setPropertyManagersSuccess(), loadPropertyDetails({ propertyId: property.id })]),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.AssigningManagerToProperty);\n return of(setPropertyManagersFailed());\n })\n )\n )\n )\n );\n\n changePropertyManagers$ = createEffect(() =>\n this.actions$.pipe(\n ofType(changePropertyManagers),\n withLatestFrom(this.store.select(selectPropertyDetails)),\n mergeMap(([action, property]) =>\n this.propertiesService\n .removePropertyManagers(action.replacePropertyManagers.oldManager)\n .pipe(map(() => setPropertyManagers({ propertyManagerModels: action.replacePropertyManagers.newManager })))\n )\n )\n );\n\n getPropertyUnits$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getPropertyUnits),\n switchMap(action =>\n this.unitsService.getPropertyUnits(action.propertyId).pipe(\n map(propertyUnits => getPropertyUnitsSuccess({ propertyUnits })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingPropertyUnits);\n return of(getPropertyUnitsFailed());\n })\n )\n )\n )\n );\n\n getUnitAttachments$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getUnitAttachments),\n switchMap(action =>\n this.unitsService.getUnitAttachments(action.unitId).pipe(\n map(attachments => getUnitAttachmentsSuccess({ unitAttachments: attachments || [] })),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingUnitsAttachments);\n return of(getPropertyUnitsFailed());\n })\n )\n )\n )\n );\n\n setUnitAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setUnitAttachment),\n mergeMap(action =>\n this.unitsService.setAttachment(action.attachmentToEntity).pipe(\n mergeMap(() => [\n setUnitAttachmentSuccess(),\n getUnitAttachments({ unitId: action.attachmentToEntity.unitId }),\n ]),\n tap(() => {\n const attachmentType = action.attachmentToEntity?.attachmentType as UnitAttachmentType;\n let message = 'Attachment(s) uploaded';\n switch (attachmentType) {\n case UnitAttachmentType.Photo:\n {\n message = 'Photo(s) uploaded';\n }\n break;\n case UnitAttachmentType.FloorPlan:\n {\n message = 'Floorplan uploaded';\n }\n break;\n }\n }),\n catchError(err => {\n const attachmentType = action.attachmentToEntity?.attachmentType as UnitAttachmentType;\n let message = SnackbarErrorMessage.AddingAttachment;\n switch (attachmentType) {\n case UnitAttachmentType.Photo:\n {\n message = SnackbarErrorMessage.AddingPhoto;\n }\n break;\n case UnitAttachmentType.FloorPlan:\n {\n message = SnackbarErrorMessage.AddingFloorplan;\n }\n break;\n }\n\n this.snackbarService.error(message);\n return of(setUnitAttachmentFail());\n })\n )\n )\n )\n );\n\n deleteUnitAttachment$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteUnitAttachment),\n mergeMap(action =>\n this.unitsService.deleteUnitAttachment(action.unitId, action.attachment.id).pipe(\n switchMap(() =>\n iif(\n () => !!action.attachment?.fileUploadId,\n of(action.attachment?.fileUploadId).pipe(map((fileId: number) => deleteFileFromRepository({ fileId }))),\n of(null)\n )\n ),\n mergeMap(() => [deleteUnitAttachmentSuccess(), getUnitAttachments({ unitId: action.unitId })]),\n tap(() => {\n const attachmentType = action.attachment?.targetAttachmentType as UnitAttachmentType;\n let message = 'Attachment removed';\n switch (attachmentType) {\n case UnitAttachmentType.Photo:\n {\n message = 'Photo deleted';\n }\n break;\n case UnitAttachmentType.FloorPlan:\n {\n message = 'Floorplan deleted';\n }\n break;\n }\n }),\n catchError(() => {\n const attachmentType = action.attachment?.targetAttachmentType as UnitAttachmentType;\n let message = SnackbarErrorMessage.DeletingAttachment;\n switch (attachmentType) {\n case UnitAttachmentType.Photo:\n {\n message = SnackbarErrorMessage.DeletingPhoto;\n }\n break;\n case UnitAttachmentType.FloorPlan:\n {\n message = SnackbarErrorMessage.DeletingFloorplan;\n }\n break;\n }\n\n this.snackbarService.error(message);\n return of(deleteUnitAttachmentFailed());\n })\n )\n )\n )\n );\n\n deleteFileFromRepository$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteFileFromRepository),\n mergeMap(action =>\n this.fileUploadsService.removeFile(action.fileId).pipe(\n map(() => deleteFileFromRepositorySuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingFile);\n return of(deleteFileFromRepositoryFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private restApiService: RestapiService,\n private snackbarService: SnackbarService,\n private propertiesService: PropertiesService,\n private store: Store<{}>,\n private router: Router,\n private unitsService: UnitsService,\n private fileUploadsService: FileUploadsService\n ) {}\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { PortfolioEffects } from './portfolio.effects';\nimport * as fromPortfolioReducer from './portfolio.reducer';\n\n@NgModule({\n declarations: [],\n imports: [\n EffectsModule.forFeature([PortfolioEffects]),\n StoreModule.forFeature(fromPortfolioReducer.portfolioFeatureKey, fromPortfolioReducer.reducer),\n ],\n})\nexport class PortfolioStoreModule {}\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport {\n ReplacePropertyManagers,\n RestPortfolioModel,\n RestPropertyManagerAccessModel,\n RestPropertyModel,\n UpdatePropertyManagerModel,\n} from '@shared/interfaces/rest-portfolio-model.interface';\nimport { UpdateTypedAttachmentToEntityModel } from '@shared/interfaces/turnover.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/unit.interface';\n\n/* Portfolios List */\nexport const loadAllUserPortfolios = createAction('[Portfolio] Load all portfolio');\nexport const loadAllUserPortfoliosSuccess = createAction(\n '[Portfolio] All portfolio loaded successfully',\n props<{ portfolioItems: RestPortfolioModel[] }>()\n);\nexport const loadAllUserPortfoliosFailed = createAction('[Portfolio] All portfolio loading failed');\n\n/* Portfolio Details */\nexport const loadPortfolioDetails = createAction(\n '[Portfolio] Load portfolio details',\n props<{ portfolioId: string }>()\n);\nexport const loadPortfolioDetailsSuccess = createAction(\n '[Portfolio] portfolio details loaded successfully',\n props<{ portfolioDetails: RestPortfolioModel }>()\n);\nexport const loadPortfolioDetailsFailed = createAction('[Portfolio] portfolio details loading failed');\n\n/* Property Details */\nexport const loadPropertyDetails = createAction('[Portfolio] Load property details', props<{ propertyId: number }>());\nexport const loadPropertyDetailsSuccess = createAction(\n '[Portfolio] property details loaded successfully',\n props<{ propertyDetails: any }>()\n);\nexport const loadPropertyDetailsFailed = createAction('[Portfolio] property details loading failed');\n\n/* Update Property Details */\nexport const updatePortfolioName = createAction(\n '[Portfolio] Update property name',\n props<{ portfolioDetails: RestPortfolioModel }>()\n);\nexport const updatePortfolioAutoAdd = createAction(\n '[Portfolio] Update property auto add',\n props<{ portfolioDetails: RestPortfolioModel }>()\n);\n\nexport const updatePortfolioDetails = createAction(\n '[Portfolio] updatePortfolioDetails',\n props<{ portfolioDetails: RestPortfolioModel; doNotRefetchPortfolios?: boolean }>()\n);\nexport const updatePortfolioDetailsSuccess = createAction(\n '[Portfolio] Update property details finished successfully',\n props<{ portfolioDetails: RestPortfolioModel }>()\n);\nexport const updatePortfolioDetailsFailed = createAction('[Portfolio] Update property details failed');\n\n/* Add new property to portfolio */\nexport const addPropertyToPortfolio = createAction(\n '[Portfolio] Add new property to portfolio',\n props<{ portfolioId: string; propertyIds: number[] }>()\n);\n/* Remove property from portfolio */\nexport const removePropertyFromPortfolio = createAction(\n '[Portfolio] Remove property from portfolio',\n props<{ portfolioId: any; propertyId: string }>()\n);\n\n/* Add new portfolio */\nexport const createNewPortfolio = createAction('[Portfolio] Add new portfolio', props<{ portfolioDetails: any }>());\n/* Delete portfolio */\nexport const deletePortfolio = createAction(\n '[Portfolio] Remove portfolio',\n props<{ portfolioName: string; portfolioId: any }>()\n);\nexport const clearPortfolioData = createAction('[Portfolio] Clear portfolio data');\n\n/* Load Property Managers */\nexport const loadPropertyManagers = createAction('[Portfolio] Load property managers');\nexport const loadPropertyManagersSucceeded = createAction(\n '[Portfolio] Load property managers succeeded',\n props<{ propertyManagers: RestPropertyManagerAccessModel[] }>()\n);\nexport const loadPropertyManagersFailed = createAction('[Portfolio] Load property managers failed');\n\n/* Update property */\nexport const updateProperty = createAction('[Portfolio] Update property data', props<{ propertyDetails: any }>());\nexport const updatePropertyFailed = createAction('[Portfolio] Update property data failed');\n\n/* Load unassigned properties */\nexport const loadAllUserUnassignedProperties = createAction('[Portfolio] Load unassigned properties');\nexport const loadAllUserUnassignedPropertiesSucceeded = createAction(\n '[Portfolio] Load unassigned properties succeeded',\n props<{ unassignedProperties: RestPropertyModel[] }>()\n);\nexport const loadAllUserUnassignedPropertiesFailed = createAction('[Portfolio] Load unassigned properties failed');\n\n/* load Property Managers For Property */\nexport const loadPropertyManagersForProperty = createAction(\n '[Portfolio] load Property Managers For Property',\n props<{ propertyId: number }>()\n);\nexport const loadPropertyManagersForPropertySuccess = createAction(\n '[Portfolio] load Property Managers For Property success',\n props<{ propertyManagers: RestPropertyManagerAccessModel[] }>()\n);\nexport const loadPropertyManagersForPropertyFailed = createAction(\n '[Portfolio] load Property Managers For Property failed'\n);\n\n/**\n * remove property managers\n */\nexport const removePropertyManagers = createAction(\n '[Portfolio] remove property managers',\n props<{ propertyManagerModels: UpdatePropertyManagerModel[] }>()\n);\nexport const removePropertyManagersSuccess = createAction('[Portfolio] remove property managers success');\nexport const removePropertyManagersFailed = createAction('[Portfolio] remove property managers failed');\n\n/**\n * remove property managers\n */\nexport const setPropertyManagers = createAction(\n '[Portfolio] set property manager',\n props<{ propertyManagerModels: UpdatePropertyManagerModel[] }>()\n);\nexport const setPropertyManagersSuccess = createAction('[Portfolio] set property managers success');\nexport const setPropertyManagersFailed = createAction('[Portfolio] set property managers failed');\n\n/**\n * change property managers\n */\nexport const changePropertyManagers = createAction(\n '[Portfolio] change property manager',\n props<{ replacePropertyManagers: ReplacePropertyManagers }>()\n);\nexport const changePropertyManagersSuccess = createAction('[Portfolio] change property managers success');\nexport const changePropertyManagersFailed = createAction('[Portfolio] change property managers failed');\n\n/**\n * get Property Units\n */\nexport const getPropertyUnits = createAction('[Portfolio] get Property Units', props<{ propertyId: number }>());\nexport const getPropertyUnitsSuccess = createAction(\n '[Portfolio] get Property Units success',\n props<{ propertyUnits: RestUnitSummaryModel[] }>()\n);\nexport const getPropertyUnitsFailed = createAction('[Portfolio] get Property Units failed');\n\n/**\n * get unit attachments\n */\nexport const getUnitAttachments = createAction('[Portfolio] get unit attachments', props<{ unitId: number }>());\nexport const getUnitAttachmentsSuccess = createAction(\n '[Portfolio] get unit attachments success',\n props<{ unitAttachments: RestGenericTypedAttachment[] }>()\n);\nexport const getUnitAttachmentsFail = createAction('[Portfolio] get unit attachments failed');\n\n/**\n * set unit attachment\n */\nexport const setUnitAttachment = createAction(\n '[Portfolio] set unit attachment',\n props<{ attachmentToEntity: UpdateTypedAttachmentToEntityModel }>()\n);\nexport const setUnitAttachmentSuccess = createAction('[Portfolio] set unit attachment success');\nexport const setUnitAttachmentFail = createAction('[Portfolio] set unit attachment failed');\n\n/**\n * delete unit attachment\n */\nexport const deleteUnitAttachment = createAction(\n '[Portfolio] delete unit attachment',\n props<{ unitId: number; attachment: RestGenericTypedAttachment }>()\n);\nexport const deleteUnitAttachmentSuccess = createAction('[Portfolio] delete unit attachment success');\nexport const deleteUnitAttachmentFailed = createAction('[Portfolio] delete unit attachment error');\n\n/**\n * delete file from repository\n */\nexport const deleteFileFromRepository = createAction(\n '[Portfolio] delete file from repository',\n props<{ fileId: number }>()\n);\nexport const deleteFileFromRepositorySuccess = createAction('[Portfolio] delete file from repository success');\nexport const deleteFileFromRepositoryFailed = createAction('[Portfolio] delete file from repository failed');\n\n/**\n * clear Property Data\n */\nexport const clearPropertyData = createAction('[Portfolio] clear property data');\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n loadAllUserProperties,\n loadAllUserPropertiesFailed,\n loadAllUserPropertiesSucceeded,\n} from '@shared/actions/user.actions';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport {\n RestPortfolioModel,\n RestPropertyManagerAccessModel,\n RestPropertyModel,\n} from '@shared/interfaces/rest-portfolio-model.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/unit.interface';\n\nimport {\n addPropertyToPortfolio,\n clearPortfolioData,\n clearPropertyData,\n createNewPortfolio,\n deletePortfolio,\n deleteUnitAttachment,\n deleteUnitAttachmentFailed,\n deleteUnitAttachmentSuccess,\n getPropertyUnits,\n getPropertyUnitsFailed,\n getPropertyUnitsSuccess,\n getUnitAttachments,\n getUnitAttachmentsFail,\n getUnitAttachmentsSuccess,\n loadAllUserPortfolios,\n loadAllUserPortfoliosFailed,\n loadAllUserPortfoliosSuccess,\n loadAllUserUnassignedProperties,\n loadAllUserUnassignedPropertiesSucceeded,\n loadPortfolioDetails,\n loadPortfolioDetailsFailed,\n loadPortfolioDetailsSuccess,\n loadPropertyDetails,\n loadPropertyDetailsFailed,\n loadPropertyDetailsSuccess,\n loadPropertyManagers,\n loadPropertyManagersFailed,\n loadPropertyManagersForProperty,\n loadPropertyManagersForPropertyFailed,\n loadPropertyManagersForPropertySuccess,\n loadPropertyManagersSucceeded,\n removePropertyFromPortfolio,\n setUnitAttachment,\n setUnitAttachmentFail,\n setUnitAttachmentSuccess,\n updatePortfolioName,\n updateProperty,\n updatePropertyFailed,\n} from './portfolio.actions';\n\nexport const portfolioFeatureKey = 'portfolio';\n\nexport interface PortfolioState {\n portfolioItemsLoading?: boolean;\n portfolioItems?: RestPortfolioModel[];\n\n portfolioDetailsLoading?: boolean;\n portfolioDetails?: RestPortfolioModel;\n\n propertyDetailsLoading?: boolean;\n propertyDetails?: RestPropertyModel;\n\n userProperties?: RestPropertyModel[];\n userPropertiesLoading?: boolean;\n\n portfolioUpdateOngoing?: boolean;\n portfolioNewPropertyUpdateOngoing?: boolean;\n portfolioRemovePropertyUpdateOngoing?: boolean;\n\n propertyDetailsUpdateOngoing?: boolean;\n\n deletePortfolioOngoing?: boolean;\n\n unassignedProperties?: RestPropertyModel[];\n unassignedPropertiesLoading?: boolean;\n\n allPropertyManagers?: RestPropertyManagerAccessModel[];\n allPropertyManagersLoading?: boolean;\n\n propertyManagersForProperty?: RestPropertyManagerAccessModel[];\n propertyManagersForPropertyLoading?: boolean;\n\n propertyUnits?: RestUnitSummaryModel[];\n propertyUnitsLoading?: boolean;\n setUnitAttachmentInProgress?: boolean;\n\n unitAttachments?: RestGenericTypedAttachment[];\n unitAttachmentsLoading?: boolean;\n\n deleteUnitAttachmentInProgress?: boolean;\n deleteUnitAttachmentStatus?: UpdateStatus;\n}\n\nexport const initialState: PortfolioState = {\n portfolioItemsLoading: false,\n propertyManagersForPropertyLoading: false,\n allPropertyManagersLoading: false,\n unitAttachmentsLoading: false,\n deleteUnitAttachmentInProgress: false,\n deleteUnitAttachmentStatus: null,\n};\n\nexport const reducer = createReducer(\n initialState,\n /* Portfolios List */\n on(loadAllUserPortfolios, (state, action) => ({ ...state, portfolioItemsLoading: true })),\n on(loadAllUserPortfoliosSuccess, (state, action) => ({\n ...state,\n portfolioItemsLoading: false,\n portfolioItems: action.portfolioItems,\n deletePortfolioOngoing: false,\n })),\n on(loadAllUserPortfoliosFailed, (state, action) => ({\n ...state,\n portfolioItemsLoading: false,\n portfolioItems: [],\n deletePortfolioOngoing: false,\n })),\n\n /* Portfolio Details */\n on(loadPortfolioDetails, (state, action) => ({ ...state, portfolioDetailsLoading: true })),\n on(loadPortfolioDetailsSuccess, (state, action) => ({\n ...state,\n portfolioDetailsLoading: false,\n portfolioUpdateOngoing: false,\n portfolioNewPropertyUpdateOngoing: false,\n portfolioRemovePropertyUpdateOngoing: false,\n portfolioDetails: action.portfolioDetails,\n })),\n on(loadPortfolioDetailsFailed, (state, action) => ({\n ...state,\n portfolioDetailsLoading: false,\n portfolioDetails: null,\n })),\n\n /* Property Details */\n on(loadPropertyDetails, (state, action) => ({ ...state, propertyDetailsLoading: true })),\n on(loadPropertyDetailsSuccess, (state, action) => ({\n ...state,\n propertyDetailsLoading: false,\n propertyDetails: action.propertyDetails,\n propertyDetailsUpdateOngoing: false,\n })),\n on(loadPropertyDetailsFailed, (state, action) => ({\n ...state,\n propertyDetailsLoading: false,\n propertyDetails: null,\n })),\n\n /* All Properties */\n on(loadAllUserProperties, (state, action) => ({ ...state, userPropertiesLoading: true })),\n on(loadAllUserPropertiesSucceeded, (state, action) => ({\n ...state,\n userProperties: action.properties,\n userPropertiesLoading: false,\n })),\n on(loadAllUserPropertiesFailed, (state, action) => ({\n ...state,\n userProperties: [],\n userPropertiesLoading: false,\n })),\n\n on(updatePortfolioName, createNewPortfolio, (state, action) => ({ ...state, portfolioUpdateOngoing: true })),\n on(addPropertyToPortfolio, (state, action) => ({ ...state, portfolioNewPropertyUpdateOngoing: true })),\n on(removePropertyFromPortfolio, (state, action) => ({ ...state, portfolioRemovePropertyUpdateOngoing: true })),\n on(clearPortfolioData, (state, action) => ({\n ...state,\n portfolioDetailsLoading: false,\n portfolioUpdateOngoing: false,\n portfolioNewPropertyUpdateOngoing: false,\n portfolioRemovePropertyUpdateOngoing: false,\n portfolioDetails: null,\n })),\n\n on(updateProperty, (state, action) => ({ ...state, propertyDetailsUpdateOngoing: true })),\n on(updatePropertyFailed, (state, action) => ({ ...state, propertyDetailsUpdateOngoing: false })),\n on(deletePortfolio, (state, action) => ({ ...state, deletePortfolioOngoing: true })),\n\n on(loadAllUserUnassignedProperties, (state, action) => ({ ...state, unassignedPropertiesLoading: true })),\n on(loadAllUserUnassignedPropertiesSucceeded, (state, action) => ({\n ...state,\n unassignedProperties: action.unassignedProperties,\n unassignedPropertiesLoading: false,\n })),\n on(deletePortfolio, (state, action) => ({\n ...state,\n unassignedPropertiesLoading: false,\n unassignedProperties: [],\n })),\n\n on(loadPropertyManagers, (state, action) => ({ ...state, allPropertyManagersLoading: true })),\n on(loadPropertyManagersSucceeded, (state, action) => ({\n ...state,\n allPropertyManagers: action.propertyManagers,\n allPropertyManagersLoading: false,\n })),\n on(loadPropertyManagersFailed, (state, action) => ({\n ...state,\n allPropertyManagers: [],\n allPropertyManagersLoading: false,\n })),\n\n on(loadPropertyManagersForProperty, (state, action) => ({ ...state, propertyManagersForPropertyLoading: true })),\n on(loadPropertyManagersForPropertySuccess, (state, action) => ({\n ...state,\n propertyManagersForProperty: action.propertyManagers,\n propertyManagersForPropertyLoading: false,\n })),\n on(loadPropertyManagersForPropertyFailed, (state, action) => ({\n ...state,\n propertyManagersForProperty: [],\n propertyManagersForPropertyLoading: false,\n })),\n /**\n * get unit attachments\n */\n on(getUnitAttachments, (state, action) => ({ ...state, unitAttachmentsLoading: true })),\n on(getUnitAttachmentsSuccess, (state, action) => ({\n ...state,\n unitAttachments: action.unitAttachments,\n unitAttachmentsLoading: false,\n })),\n on(getUnitAttachmentsFail, (state, action) => ({\n ...state,\n unitAttachments: [],\n unitAttachmentsLoading: false,\n })),\n\n /**\n * get Property Units\n */\n on(getPropertyUnits, (state, action) => ({ ...state, propertyUnitsLoading: true })),\n on(getPropertyUnitsSuccess, (state, action) => ({\n ...state,\n propertyUnits: action.propertyUnits,\n propertyUnitsLoading: false,\n })),\n on(getPropertyUnitsFailed, (state, action) => ({\n ...state,\n propertyUnits: [],\n propertyUnitsLoading: false,\n })),\n\n /**\n * set unit attachment\n */\n on(setUnitAttachment, (state, action) => ({ ...state, setUnitAttachmentInProgress: true })),\n on(setUnitAttachmentSuccess, (state, action) => ({\n ...state,\n setUnitAttachmentInProgress: false,\n })),\n on(setUnitAttachmentFail, (state, action) => ({\n ...state,\n setUnitAttachmentInProgress: false,\n })),\n\n /**\n * delete unit attachment\n */\n on(deleteUnitAttachment, (state, action) => ({ ...state, deleteUnitAttachmentInProgress: true })),\n on(deleteUnitAttachmentSuccess, (state, action) => ({\n ...state,\n deleteUnitAttachmentInProgress: false,\n deleteUnitAttachmentStatus: UpdateStatus.DELETED,\n })),\n on(deleteUnitAttachmentFailed, (state, action) => ({\n ...state,\n deleteUnitAttachmentInProgress: false,\n deleteUnitAttachmentStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * get Property Units\n */\n on(clearPropertyData, (state, action) => ({\n ...state,\n propertyDetails: null,\n propertyDetailsLoading: false,\n propertyManagersForProperty: [],\n propertyManagersForPropertyLoading: false,\n propertyUnits: [],\n propertyUnitsLoading: false,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromPortfolio from './portfolio.reducer';\n\nexport const selectPortfolioState = createFeatureSelector(\n fromPortfolio.portfolioFeatureKey\n);\n\nexport const selectPortfolios = createSelector(selectPortfolioState, portfolioState => portfolioState.portfolioItems);\n\nexport const selectPortfoliosLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioItemsLoading\n);\n\nexport const selectPortfolioDetails = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioDetails\n);\nexport const selectPortfolioDetailsLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioDetailsLoading\n);\n\nexport const selectPropertyDetails = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyDetails\n);\nexport const selectPropertyDetailsLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyDetailsLoading\n);\nexport const selectPropertyDetailsUpdateOngoing = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyDetailsUpdateOngoing\n);\n\nexport const selectProperties = createSelector(selectPortfolioState, portfolioState => portfolioState.userProperties);\n\nexport const selectPropertiesLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.userPropertiesLoading\n);\n\nexport const selectPortfolioUpdate = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioUpdateOngoing\n);\n\nexport const selectPortfolioNewPropertyUpdateOngoing = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioNewPropertyUpdateOngoing\n);\nexport const selectPortfolioRemovePropertyUpdateOngoing = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.portfolioRemovePropertyUpdateOngoing\n);\n\nexport const selectPortfolioDeleteOngoing = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.deletePortfolioOngoing\n);\n\nexport const selectUnassignedProperties = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.unassignedProperties\n);\n\nexport const selectUnassignedPropertiesLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.unassignedPropertiesLoading\n);\n\nexport const selectAllPropertyManagers = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.allPropertyManagers\n);\n\nexport const selectAllPropertyManagersLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.allPropertyManagersLoading\n);\nexport const selectPropertyManagersForProperty = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyManagersForProperty\n);\n\nexport const selectPropertyManagersForPropertyLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyManagersForPropertyLoading\n);\nexport const selectPropertyUnits = createSelector(selectPortfolioState, portfolioState => portfolioState.propertyUnits);\n\nexport const selectPropertyUnitsLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.propertyUnitsLoading\n);\n\nexport const selectUnitAttachments = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.unitAttachments\n);\n\nexport const selectUnitAttachmentsLoading = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.unitAttachmentsLoading\n);\n\nexport const selectDeleteUnitAttachmentInProgress = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.deleteUnitAttachmentInProgress\n);\n\nexport const selectDeleteUnitAttachmentStatus = createSelector(\n selectPortfolioState,\n portfolioState => portfolioState.deleteUnitAttachmentStatus\n);\n","import { createAction, props } from '@ngrx/store';\n\nimport { PmsCredentialModel } from '@shared/interfaces/pms-credential-model.interface';\nimport { RestChatHooksChannel } from '@shared/interfaces/rest-chat-hooks-channel';\nimport { RestTimerReport } from '@shared/interfaces/rest-timer-report';\n\n/**\n * get System Config\n */\nexport const getSystemConfig = createAction('[System Config] get System Config');\nexport const getSystemConfigSuccess = createAction(\n '[System Config] get System Config success',\n props<{ systemConfig: PmsCredentialModel[] }>()\n);\nexport const getSystemConfigError = createAction('[System Config] get System Config error');\n\n/**\n * update System Config\n */\nexport const updateSystemConfig = createAction(\n '[System Config] update System Config',\n props<{ pmsCredential: PmsCredentialModel }>()\n);\nexport const deleteSystemConfig = createAction('[System Config] delete System Config', props<{ id: number }>());\nexport const updateSystemConfigSuccess = createAction('[System Config] update System Config success');\nexport const updateSystemConfigError = createAction('[System Config] update System Config error');\n\n/**\n * Timer Report\n */\n\nexport const getTimerReport = createAction('[System Config] getTimerReport');\nexport const getTimerReportSuccess = createAction(\n '[System Config] getTimerReportSuccess',\n props<{ timerReport: RestTimerReport[] }>()\n);\nexport const getTimerReportError = createAction('[System Config] getTimerReportError');\n\n/**\n * chat hooks\n */\n\nexport const getChatChannels = createAction('[System Config] getChatChannels');\nexport const getChatChannelsSuccess = createAction(\n '[System Config] getChatChannelsSuccess',\n props<{ channels: RestChatHooksChannel[] }>()\n);\nexport const getChatChannelsError = createAction('[System Config] getChatChannelsError');\n\nexport const setPropertyChatChannels = createAction(\n '[System Config] setPropertyChatChannels',\n props<{ channelIds: string[]; propertyId: number }>()\n);\nexport const setPropertyChatChannelsSuccess = createAction('[System Config] setPropertyChatChannelsSuccess');\nexport const setPropertyChatChannelsError = createAction('[System Config] setPropertyChatChannelsError');\n\nexport const setSystemSectionExpanded = createAction(\n '[System Config] setSystemSectionExpanded',\n props<{ section: 'API' | 'Hooks' | 'DateTime' | 'TimerReport'; state: boolean }>()\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { PmsCredentialModel } from '@shared/interfaces/pms-credential-model.interface';\nimport { RestChatHooksChannel } from '@shared/interfaces/rest-chat-hooks-channel';\nimport { RestTimerReport } from '@shared/interfaces/rest-timer-report';\n\nimport {\n getChatChannelsSuccess,\n getSystemConfig,\n getSystemConfigError,\n getSystemConfigSuccess,\n getTimerReport,\n getTimerReportError,\n getTimerReportSuccess,\n setSystemSectionExpanded,\n updateSystemConfig,\n updateSystemConfigError,\n updateSystemConfigSuccess,\n} from './system-configuration.actions';\n\nexport const systemConfigurationFeatureKey = 'systemConfiguration';\n\nexport interface State {\n systemConfig: PmsCredentialModel[];\n systemConfigLoading: boolean;\n timerReportLoading: boolean;\n timerReport: RestTimerReport[];\n updateSystemStatus: UpdateStatus;\n updateSystemInProgress: boolean;\n chatHooksChannels: RestChatHooksChannel[];\n expandedSections: {\n API: boolean;\n Hooks: boolean;\n DateTime: boolean;\n TimerReport: boolean;\n };\n}\n\nexport const initialState: State = {\n systemConfig: null,\n systemConfigLoading: false,\n timerReportLoading: false,\n timerReport: null,\n updateSystemStatus: null,\n updateSystemInProgress: false,\n chatHooksChannels: [],\n expandedSections: {\n API: true,\n Hooks: false,\n DateTime: false,\n TimerReport: false,\n },\n};\n\nexport const reducer = createReducer(\n initialState,\n on(getSystemConfig, (state, action) => ({ ...state, systemConfigLoading: false })),\n on(getSystemConfigSuccess, (state, action) => ({\n ...state,\n systemConfigLoading: false,\n systemConfig: action.systemConfig,\n })),\n on(getSystemConfigError, (state, action) => ({\n ...state,\n systemConfigLoading: false,\n systemConfig: null,\n })),\n on(getTimerReport, (state, action) => ({ ...state, timerReportLoading: false })),\n on(getTimerReportSuccess, (state, action) => ({\n ...state,\n timerReportLoading: false,\n timerReport: action.timerReport,\n })),\n on(getTimerReportError, (state, action) => ({\n ...state,\n timerReportLoading: false,\n timerReport: null,\n })),\n\n on(updateSystemConfig, (state, action) => ({\n ...state,\n\n updateSystemStatus: UpdateStatus.IN_PROGRESS,\n updateSystemInProgress: true,\n })),\n on(updateSystemConfigSuccess, (state, action) => ({\n ...state,\n updateSystemStatus: UpdateStatus.UPDATED,\n updateSystemInProgress: false,\n })),\n on(updateSystemConfigError, (state, action) => ({\n ...state,\n updateSystemStatus: UpdateStatus.ERROR,\n updateSystemInProgress: false,\n })),\n on(getChatChannelsSuccess, (state, action) => ({\n ...state,\n chatHooksChannels: action.channels,\n })),\n on(setSystemSectionExpanded, (state, action) => ({\n ...state,\n expandedSections: {\n ...state.expandedSections,\n [action.section]: action.state,\n },\n }))\n);\n","import { createAction, props } from '@ngrx/store';\n\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestThresholdsConfiguration } from '@shared/interfaces/thresholds-configuration.interface';\nimport { TurnoverConfigSection } from '@shared/interfaces/turnover-config.interface';\n\n/**\n * get turnover configuration list\n */\nexport const getTurnoverConfigurationList = createAction('[Management] get turnover configuration list');\nexport const getTurnoverConfigurationListSuccess = createAction(\n '[Management] get turnover configuration list success',\n props<{ turnoverConfig: TurnoverConfigSection[] }>()\n);\nexport const getTurnoverConfigurationListFailure = createAction('[Management] get turnover configuration list failure');\n\n/**\n * get turnover configuration by workflow type\n */\nexport const getTurnoverConfigurationByWorkflowStep = createAction(\n '[Management] get turnover configuration by workflow type',\n props<{ workflowStep: WorkflowStepEnumType }>()\n);\nexport const getTurnoverConfigurationByWorkflowStepSuccess = createAction(\n '[Management] get turnover configuration by workflow type success',\n props<{ turnoverConfig: TurnoverConfigSection }>()\n);\nexport const getTurnoverConfigurationByWorkflowStepFailure = createAction(\n '[Management] get turnover configuration by workflow type failure'\n);\n\n/**\n * update turnover field configuration\n */\nexport const updateTurnoverFieldConfiguration = createAction(\n '[Management] update turnover field configuration',\n props<{ turnoverConfig: TurnoverConfigSection }>()\n);\nexport const updateTurnoverFieldConfigurationSuccess = createAction(\n '[Management] update turnover field configuration success'\n);\nexport const updateTurnoverFieldConfigurationFailure = createAction(\n '[Management] update turnover field configuration failure'\n);\n\n/**\n * get elapsed days thresholds\n */\nexport const getElapsedDaysThresholds = createAction('[Management] get elapsed days thresholds');\nexport const getElapsedDaysThresholdsSuccess = createAction(\n '[Management] get elapsed days thresholds success',\n props<{ thresholdsConfiguration: RestThresholdsConfiguration }>()\n);\nexport const getElapsedDaysThresholdsFailure = createAction('[Management] get elapsed days thresholds failure');\n\n/**\n * update elapsed days thresholds\n */\nexport const updateElapsedDaysThresholds = createAction(\n '[Management] update elapsed days thresholds',\n props<{ thresholdsConfiguration: RestThresholdsConfiguration }>()\n);\nexport const updateElapsedDaysThresholdsSuccess = createAction('[Management] update elapsed days thresholds success');\nexport const updateElapsedDaysThresholdsFailure = createAction('[Management] update elapsed days thresholds failure');\n\nexport const loadFinish = createAction('[Management] load finish');\nexport const loadFinishSucceded = createAction('[Management] load finish succeeded', props<{ finishTypes: any }>());\nexport const loadFinishFailed = createAction('[Management] load finish failed');\n\nexport const addFinish = createAction('[Management] add finish', props<{ finish: string }>());\nexport const addFinishSuccess = createAction('[Management] add finish success');\nexport const addFinishFailure = createAction('[Management] add finish failure');\n\nexport const updateFinish = createAction('[Management] update finish', props<{ id: number; name: string }>());\nexport const updateFinishSuccess = createAction('[Management] update finish success');\nexport const updateFinishFailure = createAction('[Management] update finish failure');\n\nexport const deleteFinish = createAction('[Management] delete finish', props<{ id: number }>());\nexport const deleteFinishSuccess = createAction('[Management] delete finish success');\nexport const deleteFinishFailure = createAction('[Management] delete finish failure');\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport {\n RestPortfolioWorkflowStepAssignmentModel,\n RestWorkflowPortfolioStepAssignmentModel,\n RestWorkflowStepAssignmentModel,\n} from '@shared/interfaces/rest-workflow-step-assignment-model.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TurnoverConfigurationStepAssigneesService {\n constructor(private restApiService: RestapiService) {}\n\n getDefaultAssigneesForPortfolio(portfolioId: number): Observable {\n return this.restApiService.getData(\n `PorfolioDefaultAssignments/${portfolioId}`\n );\n }\n\n updateDefaultAssigneesForPortfolio(\n portfolioId: number,\n items: RestWorkflowPortfolioStepAssignmentModel[]\n ): Observable {\n return this.restApiService.create(`PorfolioDefaultAssignments/${portfolioId}`, items);\n }\n\n deleteDefaultAssigneesForPortfolio(portfolioId: number, stepId: WorkflowStepEnumType): Observable {\n return this.restApiService.delete(`PorfolioDefaultAssignments/${portfolioId}/${stepId}`);\n }\n\n getResponsiblePartiesByPortfolioId(portfolioId: number): Observable {\n return this.restApiService.getData(\n `workflowassignments/portfolio/${portfolioId}`\n );\n }\n\n getResponsiblePartiesOverrideByPortfolioId(portfolioId: number): Observable {\n return this.restApiService.getData(\n `workflowassignments/portfolio/overrides/${portfolioId}`\n );\n }\n\n getResponsiblePartiesByPropertyId(propertyId: number): Observable {\n return this.restApiService.getData(`workflowassignments/property/${propertyId}`);\n }\n\n getWorkflowAssignmentsByStepId(\n propertyId: number,\n stepId: WorkflowStepEnumType\n ): Observable {\n return this.restApiService.getData(\n `workflowassignments/property/${propertyId}/${stepId}`\n );\n }\n\n createResponsibleParties(\n workflowList: RestWorkflowStepAssignmentModel[]\n ): Observable {\n return this.restApiService.create(`workflowassignments`, workflowList);\n }\n\n updateResponsibleParties(\n workflowList: RestWorkflowStepAssignmentModel[]\n ): Observable {\n return this.restApiService.update(`workflowassignments`, workflowList);\n }\n\n deleteResponsibleParties(\n propertyId: number,\n workflowStepType?: WorkflowStepEnumType\n ): Observable {\n let uri = `workflowassignments/property/${propertyId}`;\n if (workflowStepType) {\n uri += `?workflowStepType=${workflowStepType}`;\n }\n return this.restApiService.delete(uri);\n }\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { RestThresholdsConfiguration } from '@shared/interfaces/thresholds-configuration.interface';\nimport { TurnoverConfigSection } from '@shared/interfaces/turnover-config.interface';\n\nimport {\n addFinish,\n addFinishFailure,\n addFinishSuccess,\n deleteFinish,\n deleteFinishFailure,\n deleteFinishSuccess,\n getElapsedDaysThresholds,\n getElapsedDaysThresholdsFailure,\n getElapsedDaysThresholdsSuccess,\n getTurnoverConfigurationByWorkflowStep,\n getTurnoverConfigurationByWorkflowStepFailure,\n getTurnoverConfigurationByWorkflowStepSuccess,\n getTurnoverConfigurationList,\n getTurnoverConfigurationListFailure,\n getTurnoverConfigurationListSuccess,\n loadFinishSucceded,\n updateElapsedDaysThresholds,\n updateFinish,\n updateFinishFailure,\n updateFinishSuccess,\n updateTurnoverFieldConfiguration,\n updateTurnoverFieldConfigurationFailure,\n updateTurnoverFieldConfigurationSuccess,\n} from '../actions/turnover-configuration.actions';\nimport { RestFinishType } from '../components/turnover-custom-fields/turnover-custom-fields.component';\n\nexport const turnoverConfigurationFeatureKey = 'turnoverConfiguration';\n\nexport interface TurnoverConfigurationState {\n isLoading: boolean;\n turnoverConfig: TurnoverConfigSection[];\n turnoverConfigLoading: boolean;\n turnoverConfigUpdateInProgress: boolean;\n\n turnoverStepConfigLoading: boolean;\n turnoverStepConfig: TurnoverConfigSection;\n\n thresholdsConfiguration: RestThresholdsConfiguration;\n thresholdsConfigurationLoading: boolean;\n\n thresholdsConfigurationUpdate: UpdateStatus;\n thresholdsConfigurationUpdateInProgress: boolean;\n\n finishTypes: RestFinishType[];\n finishInProgress: boolean;\n}\n\nexport const initialState: TurnoverConfigurationState = {\n isLoading: false,\n turnoverConfig: [],\n turnoverConfigLoading: false,\n turnoverConfigUpdateInProgress: false,\n\n turnoverStepConfigLoading: false,\n turnoverStepConfig: null,\n\n thresholdsConfiguration: null,\n thresholdsConfigurationLoading: false,\n\n thresholdsConfigurationUpdate: null,\n thresholdsConfigurationUpdateInProgress: false,\n\n finishTypes: [],\n finishInProgress: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n\n /**\n * get turnover configuration list\n */\n on(getTurnoverConfigurationList, (state, action) => ({ ...state, turnoverConfigLoading: true })),\n on(getTurnoverConfigurationListSuccess, (state, action) => ({\n ...state,\n turnoverConfigLoading: false,\n turnoverConfig: action.turnoverConfig,\n })),\n on(getTurnoverConfigurationListFailure, (state, action) => ({\n ...state,\n turnoverConfigLoading: false,\n turnoverConfig: [],\n })),\n\n /**\n *\n */\n on(getTurnoverConfigurationByWorkflowStep, (state, action) => ({ ...state, turnoverStepConfigLoading: true })),\n on(getTurnoverConfigurationByWorkflowStepSuccess, (state, action) => ({\n ...state,\n turnoverStepConfigLoading: false,\n turnoverStepConfig: action.turnoverConfig,\n })),\n on(getTurnoverConfigurationByWorkflowStepFailure, (state, action) => ({\n ...state,\n turnoverStepConfigLoading: false,\n turnoverStepConfig: null,\n })),\n\n /**\n * update turnover field configuration\n */\n on(updateTurnoverFieldConfiguration, (state, action) => ({ ...state, turnoverConfigUpdateInProgress: true })),\n on(updateTurnoverFieldConfigurationSuccess, (state, action) => ({\n ...state,\n turnoverConfigUpdateInProgress: false,\n })),\n on(updateTurnoverFieldConfigurationFailure, (state, action) => ({\n ...state,\n turnoverConfigUpdateInProgress: false,\n })),\n\n /**\n * get elapsed days thresholds\n */\n on(getElapsedDaysThresholds, (state, action) => ({\n ...state,\n thresholdsConfigurationLoading: true,\n })),\n on(getElapsedDaysThresholdsSuccess, (state, action) => ({\n ...state,\n thresholdsConfiguration: action.thresholdsConfiguration,\n thresholdsConfigurationLoading: false,\n })),\n on(getElapsedDaysThresholdsFailure, (state, action) => ({\n ...state,\n thresholdsConfiguration: null,\n thresholdsConfigurationLoading: false,\n })),\n\n /**\n * update elapsed days thresholds\n */\n on(updateElapsedDaysThresholds, (state, action) => ({\n ...state,\n thresholdsConfigurationUpdate: UpdateStatus.IN_PROGRESS,\n thresholdsConfigurationUpdateInProgress: true,\n })),\n on(getElapsedDaysThresholdsSuccess, (state, action) => ({\n ...state,\n thresholdsConfigurationUpdate: UpdateStatus.UPDATED,\n thresholdsConfigurationUpdateInProgress: false,\n })),\n on(getElapsedDaysThresholdsFailure, (state, action) => ({\n ...state,\n thresholdsConfigurationUpdate: UpdateStatus.ERROR,\n thresholdsConfigurationUpdateInProgress: false,\n })),\n\n on(loadFinishSucceded, (state, action) => ({\n ...state,\n finishTypes: action.finishTypes,\n })),\n on(addFinish, updateFinish, deleteFinish, (state, action) => ({\n ...state,\n finishInProgress: true,\n })),\n on(\n addFinishSuccess,\n addFinishFailure,\n updateFinishSuccess,\n updateFinishFailure,\n deleteFinishSuccess,\n deleteFinishFailure,\n (state, action) => ({\n ...state,\n finishInProgress: false,\n })\n )\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromTurnoverConfiguration from '../reducers';\n\nexport const selectTurnoverConfigurationState =\n createFeatureSelector(\n fromTurnoverConfiguration.turnoverConfigurationFeatureKey\n );\n\n/**\n * get turnover configuration list\n */\nexport const selectTurnoverConfig = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.turnoverConfig\n);\nexport const selectTurnoverConfigLoading = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.turnoverConfigLoading\n);\nexport const selectTurnoverConfigUpdateInProgress = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.turnoverConfigUpdateInProgress\n);\n\nexport const selectTurnoverStepConfigLoading = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.turnoverStepConfigLoading\n);\n\nexport const selectTurnoverStepConfig = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.turnoverStepConfig\n);\n\n/**\n * get elapsed days thresholds\n */\n\nexport const selectThresholdsConfigurationLoading = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.thresholdsConfigurationLoading\n);\n\nexport const selectThresholdsConfiguration = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.thresholdsConfiguration\n);\n\n/**\n * update elapsed days thresholds\n */\n\nexport const selectThresholdsConfigurationUpdate = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.thresholdsConfigurationUpdate\n);\n\nexport const selectThresholdsConfigurationUpdateInProgress = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.thresholdsConfigurationUpdateInProgress\n);\n\nexport const selectFinishes = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.finishTypes\n);\n\nexport const selectFinishInProgress = createSelector(\n selectTurnoverConfigurationState,\n turnoverConfigState => turnoverConfigState.finishInProgress\n);\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { catchError, exhaustMap, map, mergeMap, of, switchMap } from 'rxjs';\n\nimport { TurnoverConfigService } from '@app/services/turnover-config.service';\nimport { loadEnumerations } from '@shared/actions/enumerations.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n addFinish,\n addFinishFailure,\n addFinishSuccess,\n deleteFinish,\n deleteFinishFailure,\n deleteFinishSuccess,\n getElapsedDaysThresholds,\n getElapsedDaysThresholdsFailure,\n getElapsedDaysThresholdsSuccess,\n getTurnoverConfigurationByWorkflowStep,\n getTurnoverConfigurationByWorkflowStepFailure,\n getTurnoverConfigurationByWorkflowStepSuccess,\n getTurnoverConfigurationList,\n getTurnoverConfigurationListFailure,\n getTurnoverConfigurationListSuccess,\n loadFinish,\n loadFinishFailed,\n loadFinishSucceded,\n updateElapsedDaysThresholds,\n updateElapsedDaysThresholdsFailure,\n updateElapsedDaysThresholdsSuccess,\n updateFinish,\n updateFinishFailure,\n updateFinishSuccess,\n updateTurnoverFieldConfiguration,\n updateTurnoverFieldConfigurationFailure,\n updateTurnoverFieldConfigurationSuccess,\n} from '../actions/turnover-configuration.actions';\n\n@Injectable()\nexport class TurnoverConfigurationEffects {\n getTurnoverConfigurationList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTurnoverConfigurationList),\n exhaustMap(action =>\n this.turnoverConfigService.getTurnoverConfigList().pipe(\n map(turnoverConfig => getTurnoverConfigurationListSuccess({ turnoverConfig })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverConfigurationList);\n return of(getTurnoverConfigurationListFailure());\n })\n )\n )\n )\n );\n\n getTurnoverConfigListByWorkflowStep$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getTurnoverConfigurationByWorkflowStep),\n switchMap(action =>\n this.turnoverConfigService.getTurnoverConfigListByWorkflowType(action.workflowStep).pipe(\n map(turnoverConfig => getTurnoverConfigurationByWorkflowStepSuccess({ turnoverConfig })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTurnoverConfigurationElement);\n return of(getTurnoverConfigurationByWorkflowStepFailure());\n })\n )\n )\n )\n );\n\n updateTurnoverFieldConfiguration$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateTurnoverFieldConfiguration),\n mergeMap(action =>\n this.turnoverConfigService.updateTurnoverFieldConfiguration(action.turnoverConfig).pipe(\n map(() => updateTurnoverFieldConfigurationSuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingTurnoverFieldConfiguration);\n return of(updateTurnoverFieldConfigurationFailure());\n })\n )\n )\n )\n );\n\n getElapsedDaysThresholds$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getElapsedDaysThresholds),\n switchMap(action =>\n this.turnoverConfigService.getElapsedDaysThresholds().pipe(\n map(thresholdsConfiguration => getElapsedDaysThresholdsSuccess({ thresholdsConfiguration })),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorRetrievingElapsedDaysThresholds);\n return of(getElapsedDaysThresholdsFailure());\n })\n )\n )\n )\n );\n\n updateElapsedDaysThresholds$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateElapsedDaysThresholds),\n mergeMap(action =>\n this.turnoverConfigService.updateElapsedDaysThresholds(action.thresholdsConfiguration).pipe(\n map(() => updateElapsedDaysThresholdsSuccess()),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingElapsedDaysThresholds);\n return of(updateElapsedDaysThresholdsFailure());\n })\n )\n )\n )\n );\n\n loadFinish$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadFinish),\n mergeMap(action => {\n return this.turnoverConfigService.getFinishTypes().pipe(\n map(finishTypes => loadFinishSucceded({ finishTypes })),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorLoadingFinish);\n return of(loadFinishFailed());\n })\n );\n })\n )\n );\n\n addFinish$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addFinish),\n mergeMap(action => {\n return this.turnoverConfigService.addFinishType({ name: action.finish }).pipe(\n mergeMap(finishTypes => [addFinishSuccess(), loadFinish(), loadEnumerations()]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorAddingFinish);\n return of(addFinishFailure());\n })\n );\n })\n )\n );\n\n updateFinish$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateFinish),\n mergeMap(action => {\n return this.turnoverConfigService.updateFinishType({ id: action.id, name: action.name }).pipe(\n mergeMap(finishTypes => [updateFinishSuccess(), loadFinish(), loadEnumerations()]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingFinish);\n return of(updateFinishFailure());\n })\n );\n })\n )\n );\n\n deleteFinish$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteFinish),\n mergeMap(action => {\n return this.turnoverConfigService.deleteFinishType(action.id).pipe(\n mergeMap(finishTypes => [deleteFinishSuccess(), loadFinish(), loadEnumerations()]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorDeletingFinish);\n return of(deleteFinishFailure());\n })\n );\n })\n )\n );\n\n constructor(\n private actions$: Actions,\n private turnoverConfigService: TurnoverConfigService,\n private snackbarService: SnackbarService\n ) {}\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { TurnoverConfigurationEffects } from '../effects/turnover-configuration.effects';\nimport * as fromTurnoverConfiguration from '../reducers';\n\n@NgModule({\n declarations: [],\n imports: [\n StoreModule.forFeature(\n fromTurnoverConfiguration.turnoverConfigurationFeatureKey,\n fromTurnoverConfiguration.reducer\n ),\n EffectsModule.forFeature([TurnoverConfigurationEffects]),\n ],\n})\nexport class TurnoverConfigurationStoreModule {}\n","import { createAction, props } from '@ngrx/store';\n\nimport { BaseNotificationBody, WebNotification } from '@shared/interfaces/notification.interface';\n\n/**\n * Clear Notifications store\n */\nexport const clearNotificationsStore = createAction('[Notifications] Clear Notifications store');\n\n/**\n * add latest notification\n */\nexport const addLatestNotification = createAction(\n '[Notifications] add latest Notification',\n props<{ notification: WebNotification }>()\n);\n/**\n * add latest notification of any user any event\n */\nexport const addLatestAnyNotification = createAction(\n '[Notifications] add latest any Notification',\n props<{ notification: WebNotification }>()\n);\n/**\n * mark last notification of any user any event\n */\nexport const markAnyNotificationsAsRead = createAction(\n '[Notifications] mark all turnovers of any notifications as read',\n props<{ turnoverId: number }>()\n);\n/**\n * clear list of any notification\n */\nexport const clearAnyNotifications = createAction('[Notifications] clear list of any notifications');\n/**\n * clear list of any notification\n */\nexport const updateAnyNotifications = createAction(\n '[Notifications] update list of any notifications',\n props<{ list: WebNotification[] }>()\n);\n\n/**\n * get last notification list\n */\nexport const getLastNotificationList = createAction('[Notifications] get last notification list');\nexport const getLastNotificationListSuccess = createAction(\n '[Notifications] get last notification list success',\n props<{ lastNotificationList: WebNotification[] }>()\n);\nexport const getLastNotificationListFailed = createAction('[Notifications] get last notification list failed');\n\n/**\n * mark all as read\n */\nexport const markAllAsRead = createAction('[Notifications] set all as read');\nexport const markAllAsReadSuccess = createAction('[Notifications] set all as read success');\nexport const markAllAsReadFailed = createAction('[Notifications] set mark all as read failed');\n\n/**\n * mark selected as read\n */\nexport const markAsRead = createAction(\n '[Notifications] set mark all as read',\n props<{ baseNotificationBody: BaseNotificationBody }>()\n);\nexport const markAsReadSuccess = createAction('[Notifications] set mark all as read success');\nexport const markAsReadFailed = createAction('[Notifications] set mark all as read failed');\n\n/**\n * delete notification\n */\nexport const deleteNotification = createAction(\n '[Notifications] delete notification',\n props<{ baseNotificationBody: BaseNotificationBody }>()\n);\nexport const deleteNotificationSuccess = createAction('[Notifications] delete notification success');\nexport const deleteNotificationFailed = createAction('[Notifications] delete notification failed');\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { ConnectionConfig } from '@shared/interfaces/connection-config.interface';\nimport { BaseNotificationBody, WebNotification } from '@shared/interfaces/notification.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationRestService {\n constructor(private restApiService: RestapiService) {}\n\n getNotifications(): Observable {\n return this.restApiService.getData(`notification`);\n }\n\n markAllAsRead(): Observable {\n return this.restApiService.customPatchData(`notification/markallasread`, null);\n }\n\n markAsRead(baseNotificationBody: BaseNotificationBody): Observable {\n return this.restApiService.customPatchData(`notification/markasread`, baseNotificationBody);\n }\n\n delete(baseNotificationBody: BaseNotificationBody): Observable {\n return this.restApiService.delete(\n `notification?NotificationIds=${baseNotificationBody.notificationIds}`\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { first, orderBy } from 'lodash';\nimport * as moment from 'moment';\nimport { of } from 'rxjs';\nimport { catchError, map, mergeMap, switchMap, take, withLatestFrom } from 'rxjs/operators';\n\nimport { NotificationRestService } from '@app/services/notification-rest.service';\nimport {\n deleteNotification,\n deleteNotificationFailed,\n deleteNotificationSuccess,\n getLastNotificationList,\n getLastNotificationListFailed,\n getLastNotificationListSuccess,\n markAllAsRead,\n markAllAsReadFailed,\n markAllAsReadSuccess,\n markAnyNotificationsAsRead,\n markAsRead,\n markAsReadFailed,\n markAsReadSuccess,\n updateAnyNotifications,\n} from '@main-application/notifications/actions/notifications.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport { selectLastAnyNotificationList, selectLastNotificationList } from '../selectors/notifications.selectors';\n\n@Injectable()\nexport class NotificationsEffects {\n /**\n * get last notification list\n */\n getLastNotificationList$ = createEffect(() =>\n this.actions$.pipe(\n ofType(getLastNotificationList),\n switchMap(action =>\n this.notificationRestService.getNotifications().pipe(\n map(list => {\n const sortedList = orderBy(list || [], item => moment(item.timestamp).valueOf(), 'desc');\n return getLastNotificationListSuccess({ lastNotificationList: sortedList });\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingNotificationList);\n return of(getLastNotificationListFailed());\n })\n )\n )\n )\n );\n\n /**\n * mark last notification of any user any event\n */\n setAnyNotificationAsRead$ = createEffect(() =>\n this.actions$.pipe(\n ofType(markAnyNotificationsAsRead),\n mergeMap(action =>\n this.store.select(selectLastAnyNotificationList).pipe(\n take(1),\n mergeMap(notifications => {\n const readNotifications = notifications.map(e => ({\n ...e,\n wasRead: e.wasRead || e.additionalData.turnoverIds.includes(action.turnoverId),\n }));\n return [updateAnyNotifications({ list: readNotifications })];\n })\n )\n )\n )\n );\n\n /**\n * set all as read\n */\n setAllAsRead$ = createEffect(() =>\n this.actions$.pipe(\n ofType(markAllAsRead),\n mergeMap(action =>\n this.notificationRestService.markAllAsRead().pipe(\n withLatestFrom(this.store.select(selectLastNotificationList)),\n mergeMap(([, notifications]) => {\n const lastNotificationList = notifications.map(notification => ({ ...notification, wasRead: true }));\n return [markAllAsReadSuccess(), getLastNotificationListSuccess({ lastNotificationList })];\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.MarkingAllNotificationsAsRead);\n return of(markAllAsReadFailed());\n })\n )\n )\n )\n );\n\n /**\n * mark selected as read\n */\n markAsRead$ = createEffect(() =>\n this.actions$.pipe(\n ofType(markAsRead),\n mergeMap(action =>\n this.notificationRestService.markAsRead(action.baseNotificationBody).pipe(\n withLatestFrom(this.store.select(selectLastNotificationList)),\n mergeMap(([, notifications]) => {\n const lastNotificationList = notifications.map(item =>\n item.notificationId === first(action.baseNotificationBody.notificationIds)\n ? { ...item, wasRead: true }\n : item\n );\n return [markAsReadSuccess(), getLastNotificationListSuccess({ lastNotificationList })];\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.MarkingNotificationAsRead);\n return of(markAsReadFailed());\n })\n )\n )\n )\n );\n /**\n * delete notification\n */\n deleteNotification$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteNotification),\n mergeMap(action =>\n this.notificationRestService.delete(action.baseNotificationBody).pipe(\n withLatestFrom(this.store.select(selectLastNotificationList)),\n mergeMap(([, notifications]) => {\n const lastNotificationList = notifications.filter(\n item => item.notificationId !== first(action.baseNotificationBody.notificationIds)\n );\n\n return [deleteNotificationSuccess(), getLastNotificationListSuccess({ lastNotificationList })];\n }),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingNotification);\n return of(deleteNotificationFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private snackbarService: SnackbarService,\n private store: Store<{}>,\n private notificationRestService: NotificationRestService\n ) {}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { NotificationsEffects } from '@main-application/notifications/effects/notifications.effects';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport * as fromNotifications from './reducers/notifications.reducer';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponent,\n StoreModule.forFeature(fromNotifications.notificationsFeatureKey, fromNotifications.reducer),\n EffectsModule.forFeature([NotificationsEffects]),\n ],\n})\nexport class NotificationsModule {}\n","import { createReducer, on } from '@ngrx/store';\nimport { first } from 'lodash';\n\nimport {\n addLatestAnyNotification,\n addLatestNotification,\n clearAnyNotifications,\n clearNotificationsStore,\n deleteNotification,\n deleteNotificationFailed,\n deleteNotificationSuccess,\n getLastNotificationList,\n getLastNotificationListFailed,\n getLastNotificationListSuccess,\n markAllAsRead,\n markAllAsReadFailed,\n markAllAsReadSuccess,\n markAsRead,\n markAsReadFailed,\n markAsReadSuccess,\n updateAnyNotifications,\n} from '@main-application/notifications/actions/notifications.actions';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { WebNotification } from '@shared/interfaces/notification.interface';\n\nexport const notificationsFeatureKey = 'notifications';\n\nexport interface State {\n bidNotification: WebNotification;\n ticketNotification: WebNotification;\n turnoverNotification: WebNotification;\n lastAnyNotificationList: WebNotification[];\n lastNotificationList: WebNotification[];\n lastNotificationListLoading: boolean;\n markAllAsReadInProgress: boolean;\n markAllAsReadStatus: UpdateStatus;\n markAsReadInProgress: boolean;\n markAsReadStatus: UpdateStatus;\n markAsReadId: string;\n deleteNotificationInProgress: boolean;\n}\n\nexport const initialState: State = {\n bidNotification: null,\n ticketNotification: null,\n turnoverNotification: null,\n lastAnyNotificationList: [],\n lastNotificationList: [],\n lastNotificationListLoading: false,\n markAllAsReadInProgress: false,\n markAllAsReadStatus: null,\n markAsReadInProgress: false,\n markAsReadStatus: null,\n markAsReadId: null,\n deleteNotificationInProgress: false,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * Clear Notifications store\n */\n on(clearNotificationsStore, (state, action) => ({\n ...state,\n ...initialState,\n })),\n\n /**\n * get last notification list\n */\n on(getLastNotificationList, (state, action) => ({\n ...state,\n lastNotificationListLoading: true,\n })),\n on(getLastNotificationListSuccess, (state, action) => ({\n ...state,\n lastNotificationList: action.lastNotificationList,\n lastNotificationListLoading: false,\n })),\n on(getLastNotificationListFailed, (state, action) => ({\n ...state,\n lastNotificationList: [],\n lastNotificationListLoading: false,\n })),\n\n on(addLatestNotification, (state, action) => ({\n ...state,\n lastNotificationList: [action.notification, ...state.lastNotificationList],\n })),\n\n on(addLatestAnyNotification, (state, action) => ({\n ...state,\n lastAnyNotificationList: [action.notification, ...state.lastAnyNotificationList],\n })),\n\n on(clearAnyNotifications, (state, action) => ({\n ...state,\n lastAnyNotificationList: [],\n })),\n\n on(updateAnyNotifications, (state, action) => ({\n ...state,\n lastAnyNotificationList: [...action.list],\n })),\n\n /**\n * mark all as read\n */\n on(markAllAsRead, (state, action) => ({\n ...state,\n markAllAsReadInProgress: true,\n markAllAsReadStatus: null,\n })),\n on(markAllAsReadSuccess, (state, action) => ({\n ...state,\n markAllAsReadInProgress: false,\n markAllAsReadStatus: UpdateStatus.UPDATE,\n })),\n on(markAllAsReadFailed, (state, action) => ({\n ...state,\n markAllAsReadInProgress: false,\n markAllAsReadStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * mark selected as read\n */\n on(markAsRead, (state, action) => ({\n ...state,\n markAsReadInProgress: true,\n markAsReadStatus: null,\n markAsReadId: first(action.baseNotificationBody?.notificationIds),\n })),\n on(markAsReadSuccess, (state, action) => ({\n ...state,\n markAsReadInProgress: false,\n markAsReadStatus: UpdateStatus.UPDATE,\n })),\n on(markAsReadFailed, (state, action) => ({\n ...state,\n markAsReadInProgress: false,\n markAsReadStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * delete notification\n */\n on(deleteNotification, (state, action) => ({\n ...state,\n deleteNotificationInProgress: true,\n })),\n on(deleteNotificationSuccess, (state, action) => ({\n ...state,\n deleteNotificationInProgress: false,\n })),\n on(deleteNotificationFailed, (state, action) => ({\n ...state,\n deleteNotificationInProgress: false,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromNotifications from '@main-application/notifications/reducers/notifications.reducer';\n\nexport const selectNotificationsState = createFeatureSelector(\n fromNotifications.notificationsFeatureKey\n);\n\n/**\n * get last notification list\n */\nexport const selectLastNotificationList = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.lastNotificationList\n);\nexport const selectLastNotificationListLoading = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.lastNotificationListLoading\n);\n\n/**\n * get last any notification\n */\nexport const selectLastAnyNotificationList = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.lastAnyNotificationList\n);\n\n/**\n * mark selected as read\n */\nexport const selectMarkAsReadInProgress = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.markAsReadInProgress\n);\nexport const selectMarkAsReadStatus = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.markAsReadStatus\n);\nexport const selectMarkAsReadId = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.markAsReadId\n);\n\n/**\n * delete notification\n */\nexport const selectDeleteNotificationInProgress = createSelector(\n selectNotificationsState,\n notificationsState => notificationsState.deleteNotificationInProgress\n);\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestSurveyTemplate } from '@main-application/survey-creator/interfaces/survey-template';\nimport { RestTemplateAreaModel } from '@template/models/rest-template-model.interface';\n\n/* Survey template */\nexport const loadSurveyTemplates = createAction('[Surveys] loadSurveyTemplates');\nexport const saveSurveyTemplate = createAction(\n '[Surveys] saveSurveyTemplate',\n props<{ id: number; template: string }>()\n);\n\nexport const saveSurveyTemplateSuccess = createAction(\n '[Surveys] saveSurveyTemplateSuccess',\n props<{ templates: RestSurveyTemplate[] }>()\n);\n\nexport const saveSurveyTemplateFailure = createAction('[Surveys] saveSurveyTemplateFailure', props<{ error: any }>());\n\nexport const loadSurveyTemplatesSuccess = createAction(\n '[Surveys] loadSurveyTemplatesSuccess',\n props<{ templates: RestSurveyTemplate[] }>()\n);\n\nexport const loadSurveyTemplatesFailure = createAction('[Surveys] loadSurveyTemplatesFailure', props<{ error: any }>());\n\n/* Inspection survey template */\nexport const addInspectionSurveyTemplate = createAction(\n '[Surveys] addInspectionSurveyTemplate',\n props<{ survey: RestTemplateAreaModel }>()\n);\n\nexport const updateInspectionSurveyTemplate = createAction(\n '[Surveys] updateInspectionSurveyTemplate',\n props<{ survey: RestTemplateAreaModel }>()\n);\n\nexport const saveInspectionSurveyTemplateSuccess = createAction(\n '[Surveys] saveInspectionSurveyTemplateSuccess',\n props<{ surveyId: number }>()\n);\n\nexport const saveInspectionSurveyTemplateFailure = createAction(\n '[Surveys] saveInspectionSurveyTemplateFailure',\n props<{ error: any }>()\n);\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, map, mergeMap, switchMap, tap } from 'rxjs/operators';\n\nimport { SurveysService } from '@app/services/surveys.service';\nimport {\n addInspectionSurveyTemplate,\n loadSurveyTemplates,\n loadSurveyTemplatesFailure,\n loadSurveyTemplatesSuccess,\n saveInspectionSurveyTemplateFailure,\n saveInspectionSurveyTemplateSuccess,\n saveSurveyTemplate,\n saveSurveyTemplateFailure,\n saveSurveyTemplateSuccess,\n updateInspectionSurveyTemplate,\n} from '@main-application/survey-creator/actions/surveys.actions';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { TEMPLATE_VIEWS } from '@template/models/template-views';\nimport { loadAllUserTemplates } from '@template/store/template.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@Injectable()\nexport class SurveysEffects {\n loadSurveyTemplates$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadSurveyTemplates),\n switchMap(() =>\n this.surveysService.getSurveyTemplates().pipe(\n map(templates => {\n return loadSurveyTemplatesSuccess({ templates });\n }),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorSurveysTemplates);\n return of(loadSurveyTemplatesFailure({ error }));\n })\n )\n )\n )\n );\n\n saveSurveyTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(saveSurveyTemplate),\n switchMap(action =>\n this.surveysService.saveTemplate(action.id, action.template).pipe(\n map(templates => {\n this.snackbarService.success(SnackbarErrorMessage.SuccessSavingSurveyTemplate);\n return saveSurveyTemplateSuccess({ templates });\n }),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorSavingSurveyTemplate);\n return of(saveSurveyTemplateFailure({ error }));\n })\n )\n )\n )\n );\n\n addInspectionSurveyTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(addInspectionSurveyTemplate),\n switchMap(action =>\n this.surveysService.add(action.survey).pipe(\n tap(id => {\n this.router\n .navigate([AppRoutes.SETTINGS_TEMPLATE, action.survey.inspectionTemplateId, TEMPLATE_VIEWS.AREA, id], {\n queryParamsHandling: 'preserve',\n })\n .then();\n }),\n map(id => {\n this.snackbarService.success(SnackbarErrorMessage.SuccessSavingSurveyTemplate);\n return saveInspectionSurveyTemplateSuccess({ surveyId: id });\n }),\n mergeMap(() => [loadAllUserTemplates()]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorSavingSurveyTemplate);\n return of(saveInspectionSurveyTemplateFailure({ error }));\n })\n )\n )\n )\n );\n\n updateInspectionSurveyTemplate$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateInspectionSurveyTemplate),\n switchMap(action =>\n this.surveysService.update(action.survey).pipe(\n map(() => {\n this.snackbarService.success(SnackbarErrorMessage.SuccessSavingSurveyTemplate);\n return saveInspectionSurveyTemplateSuccess({ surveyId: action.survey.id });\n }),\n mergeMap(() => [loadAllUserTemplates()]),\n catchError(error => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorSavingSurveyTemplate);\n return of(saveInspectionSurveyTemplateFailure({ error }));\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private router: Router,\n private surveysService: SurveysService,\n private snackbarService: SnackbarService\n ) {}\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { loadSurveyTemplatesSuccess } from '@main-application/survey-creator/actions/surveys.actions';\nimport { RestSurveyTemplate } from '@main-application/survey-creator/interfaces/survey-template';\n\nexport const surveysFeatureKey = 'surveys';\n\nexport interface State {\n surveyTemplates: RestSurveyTemplate[];\n}\n\nexport const initialState: State = {\n surveyTemplates: [],\n};\n\nexport const reducer = createReducer(\n initialState,\n on(loadSurveyTemplatesSuccess, (state, action) => ({\n ...state,\n surveyTemplates: action.templates,\n }))\n);\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestBulkScopeAndBidModel } from '@shared/interfaces/rest-bulk-scope-and-bid-model';\nimport { UpdateTypedAttachmentToEntityModel } from '@shared/interfaces/turnover.interface';\n\n/**\n * get bulk scope list\n */\nexport const getBulkScopeList = createAction('[Turnover] get bulk scope list', props<{ propertyId: number }>());\nexport const getBulkScopeListSuccess = createAction(\n '[Turnover] get bulk scope list success',\n props<{ bulkList: RestBulkScopeAndBidModel[] }>()\n);\nexport const getBulkScopeListFailed = createAction('[Turnover] get bulk scope list failed');\n\n/**\n * get bulk scope\n */\nexport const getBulkScope = createAction('[Turnover] get bulk scope', props<{ bulkScopeId: number }>());\nexport const getBulkScopeSuccess = createAction(\n '[Turnover] get bulk scope success',\n props<{ bulkScope: RestBulkScopeAndBidModel }>()\n);\nexport const getBulkScopeFailed = createAction('[Turnover] get bulk scope failed');\n\n/**\n * update bulk scope\n */\nexport const updateBulkScope = createAction(\n '[Turnover] update bulk scope',\n props<{ bulkScope: RestBulkScopeAndBidModel }>()\n);\nexport const updateBulkScopeSuccess = createAction('[Turnover] update bulk scope success');\nexport const updateBulkScopeFailed = createAction('[Turnover] update bulk scope failed');\nexport const resetUpdateBulkScopeStatus = createAction('[Turnover] reset Update Bulk Scope Status');\n\n/**\n * Create new bulk scope\n */\nexport const createNewBulkScope = createAction(\n '[Turnover] Create new bulk scope',\n props<{ bulkScope: RestBulkScopeAndBidModel }>()\n);\nexport const createNewBulkScopeSuccess = createAction(\n '[Turnover] Create new bulk scope success',\n props<{ bulkScopeId: number }>()\n);\nexport const createNewBulkScopeFailed = createAction('[Turnover] Create new bulk scope failed');\nexport const resetNewBulkScopeID = createAction('[Turnover] reset new bulk scope id');\n\n/**\n * Add units to bulk\n */\nexport const addUnitsToBulk = createAction(\n '[Turnover] add units to bulk',\n props<{ bulkScope: RestBulkScopeAndBidModel }>()\n);\nexport const addUnitsToBulkSuccess = createAction('[Turnover] add units to bulk success');\nexport const addUnitsToBulkFailed = createAction('[Turnover] add units to bulk failed');\n\n/**\n * Add bulk attachments\n */\nexport const addBulkTurnoversAttachment = createAction(\n '[Turnover] add bulk turnover attachment',\n props<{ attachment: UpdateTypedAttachmentToEntityModel }>()\n);\nexport const addBulkTurnoversAttachmentSuccess = createAction('[Turnover] add bulk turnover attachment success');\nexport const addBulkTurnoversAttachmentFailed = createAction('[Turnover] add bulk turnover attachment failed');\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestTicketModel } from '@shared/interfaces/turnover.interface';\n\n/* GET punch by id */\nexport const loadPunchById = createAction('[Punch] Load Punch by id', props<{ punchId: number }>());\nexport const loadPunchByIdFinished = createAction(\n '[Punch] Load Punch by id finished',\n props<{ punch: RestTicketModel }>()\n);\nexport const loadPunchByIdFailed = createAction('[Punch] Load Punch by id failed');\nexport const clearSelectedPunch = createAction('[Punch] Clear selected punch');\n\n/* GET punch by turnoverId */\nexport const loadPunchesByTurnoverId = createAction(\n '[Punch] Load Punchesby turnoverId',\n props<{ turnoverId: number }>()\n);\nexport const loadPunchesByTurnoverIdFinished = createAction(\n '[Punch] Load Punches by turnoverId finished',\n props<{ result: RestTicketModel[] }>()\n);\nexport const loadPunchesByTurnoverIdFailed = createAction('[Punch] Load Punches by turnoverId failed');\nexport const clearPunchesByTurnoverId = createAction('[Punch] Clear Punches by turnoverId');\n\n/* send punch */\nexport const sendPunch = createAction('[Punch] send Punch', props<{ punch: RestTicketModel }>());\nexport const sendPunchFinished = createAction('[Punch] send Punch finished', props<{ punch: RestTicketModel }>());\nexport const sendPunchFailed = createAction('[Punch] send Punch failed');\n","import { createAction, props } from '@ngrx/store';\n\nimport {\n AddUpdateTurnoverBid,\n RestTurnoverBid,\n RestTurnoverBidCategory,\n} from '@shared/interfaces/turnover-bids.interface';\n\nexport const loadTurnoverBids = createAction('[Turnover] loadTurnoverBids', props<{ turnoverId: number }>());\nexport const loadTurnoverBidsSuccess = createAction(\n '[Turnover] createTurnoverBidSuccess',\n props<{ bids: RestTurnoverBid[] }>()\n);\nexport const loadTurnoverBidsFailed = createAction('[Turnover] loadTurnoverBidsFailed');\n\nexport const createTurnoverBid = createAction('[Turnover] createTurnoverBid', props<{ bid: AddUpdateTurnoverBid }>());\nexport const createTurnoverBidSuccess = createAction(\n '[Turnover] createTurnoverBidSuccess success',\n props<{ bidId: number; turnoverId: number }>()\n);\nexport const createTurnoverBidFailed = createAction('[Turnover] createTurnoverBidFailed');\n\nexport const acceptTurnoverBid = createAction(\n '[Turnover] acceptTurnoverBid',\n props<{ bidId: number; turnoverId: number }>()\n);\nexport const acceptTurnoverBidSuccess = createAction('[Turnover] acceptTurnoverBidSuccess');\nexport const acceptTurnoverBidFailed = createAction('[Turnover] acceptTurnoverBidFailed');\n\nexport const rejectTurnoverBid = createAction(\n '[Turnover] rejectTurnoverBid',\n props<{ bidId: number; turnoverId: number; reason: string }>()\n);\nexport const rejectTurnoverBidSuccess = createAction('[Turnover] rejectTurnoverBidSuccess');\nexport const rejectTurnoverBidFailed = createAction('[Turnover] rejectTurnoverBidFailed');\n\nexport const uploadTurnoverBidInvoice = createAction(\n '[Turnover] uploadTurnoverBidInvoice',\n props<{ bid: RestTurnoverBid; file: File }>()\n);\nexport const uploadTurnoverBidInvoiceSuccess = createAction('[Turnover] uploadTurnoverBidInvoiceSuccess');\nexport const uploadTurnoverBidInvoiceFailed = createAction('[Turnover] uploadTurnoverBidInvoiceFailed');\n\nexport const updateTurnoverBid = createAction('[Turnover] updateTurnoverBid', props<{ bid: AddUpdateTurnoverBid }>());\nexport const updateTurnoverBidSuccess = createAction(\n '[Turnover] updateTurnoverBidSuccess',\n props<{ bid: AddUpdateTurnoverBid }>()\n);\nexport const updateTurnoverBidFailed = createAction('[Turnover] updateTurnoverBidFailed');\n\nexport const removeTurnoverBid = createAction(\n '[Turnover] removeTurnoverBid',\n props<{ bidId: number; turnoverId: number }>()\n);\nexport const removeTurnoverBidSuccess = createAction('[Turnover] removeTurnoverBidSuccess');\nexport const removeTurnoverBidFailed = createAction('[Turnover] removeTurnoverBidFailed');\n\nexport const loadTurnoverBidCategories = createAction('[Turnover] loadTurnoverBidCategories');\nexport const loadTurnoverBidCategoriesSuccess = createAction(\n '[Turnover] loadTurnoverBidCategoriesSuccess',\n props<{ categories: RestTurnoverBidCategory[] }>()\n);\nexport const loadTurnoverBidCategoriesFailed = createAction('[Turnover] loadTurnoverBidCategoriesFailed');\n\nexport const addTurnoverBidCategory = createAction('[Turnover] addTurnoverBidCategory', props<{ name: string }>());\nexport const addTurnoverBidCategorySuccess = createAction(\n '[Turnover] addTurnoverBidCategorySuccess',\n props<{ categoryId: number }>()\n);\nexport const addTurnoverBidCategoryFailed = createAction('[Turnover] addTurnoverBidCategoryFailed');\n\nexport const approveTurnoverBid = createAction(\n '[Turnover] approveTurnoverBid',\n props<{ bidId: number; turnoverId: number; approved: boolean | null; denyReason?: string }>()\n);\nexport const approveTurnoverBidSuccess = createAction('[Turnover] approveTurnoverBidSuccess');\nexport const approveTurnoverBidFailed = createAction('[Turnover] approveTurnoverBidFailed');\n","import { createAction, props } from '@ngrx/store';\n\nimport { TurnoverStepTimer } from '@main-application/turnovers/interfaces/timers.interface';\nimport { ValidationParams } from '@main-application/turnovers/interfaces/validation-params.interface';\nimport { TicketType } from '@shared/enums/ticket-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestApplianceModel } from '@shared/interfaces/appliance.interface';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { RestBidModel, RestTypedBidAttachment } from '@shared/interfaces/bid.interface';\nimport { RestWorkflowStepCommentModel } from '@shared/interfaces/comments.interface';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { KanbanListItem } from '@shared/interfaces/kanban-list-item.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestWorkflowStepAssignmentModel } from '@shared/interfaces/rest-workflow-step-assignment-model.interface';\nimport {\n PostTurnoverModel,\n RestTicketModel,\n RestTurnoverDataModel,\n RestTypedTicketAttachment,\n RestTypedTurnoverAttachment,\n RestWorkflowInstanceModel,\n TurnoverStepInfo,\n UpdateTypedAttachmentToEntityModel,\n} from '@shared/interfaces/turnover.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { WorkflowAction } from '@shared/interfaces/workflow-action.interface';\n\n/**\n * Create new Turnover\n */\nexport const createNewTurnover = createAction(\n '[Turnover] Create new Turnover',\n props<{ postTurnoverModel: PostTurnoverModel }>()\n);\nexport const createNewTurnoverSuccess = createAction(\n '[Turnover] Create new Turnover success',\n props<{ turnoverData: RestTurnoverDataModel }>()\n);\nexport const createNewTurnoverFailed = createAction('[Turnover] Create new Turnover failed');\nexport const resetCreateNewTurnover = createAction('[Turnover] Reset create new Turnover');\n\n/**\n * Get Turnover Data\n */\nexport const clearTurnoverData = createAction('[Turnover] clear turnover data');\nexport const getTurnoverData = createAction('[Turnover] get turnover data', props<{ turnoverId: number }>());\nexport const getTurnoverDataSuccess = createAction(\n '[Turnover] get turnover data success',\n props<{ turnoverData: RestTurnoverDataModel }>()\n);\nexport const getTurnoverDataFailed = createAction('[Turnover] get turnover data failed');\n\n/**\n * set current workflow step\n */\nexport const setCurrentWorkflowStep = createAction(\n '[Turnover] set current workflow step',\n props<{ currentWorkflowStep: WorkflowStepEnumType }>()\n);\n\nexport const setCurrentWorkflowStepModel = createAction(\n '[Turnover] set current workflow step model',\n props<{ currentWorkflowStepModel: RestWorkflowInstanceModel }>()\n);\n\nexport const resetWorkflowStepStatus = createAction('[Turnover] set current workflow step');\n\n/**\n * Get Turnover Data\n */\nexport const setTurnoverData = createAction(\n '[Turnover] set turnover data',\n props<{ turnoverData: RestTurnoverDataModel }>()\n);\nexport const setTurnoverDataSuccess = createAction('[Turnover] set turnover data success');\nexport const setTurnoverDataFailed = createAction('[Turnover] set turnover data failed');\n\n/**\n * Set workflow step\n */\nexport const setWorkflowStepSuccess = createAction(\n '[Turnover] set workflow step success',\n props<{ turnoverId: number; nextWorkflowStep: WorkflowStepEnumType }>()\n);\n/**\n * set appliance type list\n */\nexport const setApplianceTypeList = createAction(\n '[Turnover] set appliance type list',\n props<{ applianceTypeList: IRadioButtonOption[] }>()\n);\n\n/**\n * set color type list\n */\nexport const setColorTypeList = createAction(\n '[Turnover] set color type list',\n props<{ colorTypeList: IRadioButtonOption[] }>()\n);\n\n/**\n * set user list\n */\nexport const setUserList = createAction(\n '[Turnover] set user list',\n props<{ userList: IRadioButtonOption[] }>()\n);\n\nexport const setUserListModel = createAction(\n '[Turnover] set user list model',\n props<{ userListModel: RestUserModel[] }>()\n);\n\n/**\n * set all user list\n */\nexport const setAllUserRadioList = createAction(\n '[Turnover] set All User Radio List',\n props<{ allUserRadioList: IRadioButtonOption[] }>()\n);\nexport const setAllUserList = createAction('[Turnover] set All User List', props<{ allUserList: RestUserModel[] }>());\n\n/**\n * set company radio list\n */\nexport const setCompanyRadioList = createAction(\n '[Turnover] set company radio List',\n props<{ companyRadioList: IRadioButtonOption[] }>()\n);\n\nexport const setCompanyNameRadioList = createAction(\n '[Turnover] set company name radio List',\n props<{ companyNameRadioList: IRadioButtonOption[] }>()\n);\n\nexport const setCompanyEmailRadioList = createAction(\n '[Turnover] set company email radio List',\n props<{ companyEmailRadioList: IRadioButtonOption[] }>()\n);\n\n/**\n * set attachment to turnover\n */\nexport const setAttachmentToTurnover = createAction(\n '[Turnover] attachment to turnover',\n props<{ attachmentToEntity: UpdateTypedAttachmentToEntityModel; preventReloadList?: boolean }>()\n);\nexport const setAttachmentToTurnoverSuccess = createAction(\n '[Turnover] attachment to turnover Success',\n props<{ addedAttachment: RestGenericTypedAttachment }>()\n);\nexport const setAttachmentToTurnoverFailed = createAction('[Turnover] attachment to turnover Failed');\nexport const clearAddedAttachment = createAction('[Turnover] clear Added Attachment');\n\n/**\n * update turnover attachment\n */\nexport const updateTurnoverAttachment = createAction(\n '[Turnover] update turnover attachment',\n props<{ attachmentToEntity: UpdateTypedAttachmentToEntityModel }>()\n);\nexport const updateTurnoverAttachmentSuccess = createAction('[Turnover] update turnover attachment Success');\nexport const updateTurnoverAttachmentFailed = createAction('[Turnover] update turnover attachment Failed');\n\n/**\n * get turnover tickets\n */\nexport const getTurnoverTickets = createAction('[Turnover] get turnover tickets', props<{ turnoverId: number }>());\nexport const getTurnoverTicketsSuccess = createAction(\n '[Turnover] get turnover tickets success',\n props<{ turnoverTicketList: RestTicketModel[] }>()\n);\nexport const getTurnoverTicketsFailed = createAction('[Turnover] get turnover tickets error');\n\n/**\n * add new turnover ticket\n */\nexport const addNewTurnoverTicket = createAction(\n '[Turnover] add new turnover tickets',\n props<{ turnoverTicket: RestTicketModel }>()\n);\nexport const addNewTurnoverTicketSuccess = createAction(\n '[Turnover] add new turnover tickets success',\n props<{ newTurnoverTicket: RestTicketModel }>()\n);\nexport const addNewTurnoverTicketFailed = createAction('[Turnover] add new turnover tickets error');\nexport const resetNewTurnoverTicket = createAction('[Turnover] reset new turnover ticket');\n\n/**\n * update turnover ticket\n */\nexport const updateTurnoverTicket = createAction(\n '[Turnover] update turnover tickets',\n props<{ turnoverTicket: RestTicketModel }>()\n);\nexport const updateTurnoverTicketSuccess = createAction(\n '[Turnover] update turnover tickets success',\n props<{ editedTicket: RestTicketModel }>()\n);\nexport const updateTurnoverTicketFailed = createAction('[Turnover] update turnover tickets error');\n\n/**\n * update ticket preview\n */\nexport const updateTicketPreview = createAction(\n '[Turnover] update turnover preview',\n props<{ turnoverTicket: RestTicketModel }>()\n);\nexport const updateTicketPreviewSuccess = createAction(\n '[Turnover] update turnover preview success',\n props<{ editedTicket: RestTicketModel }>()\n);\nexport const updateTicketPreviewFailed = createAction('[Turnover] update turnover preview error');\n\n/**\n * get selected ticket\n */\nexport const getSelectedTicket = createAction('[Turnover] get selected ticket', props<{ ticketId: number }>());\nexport const getSelectedTicketSuccess = createAction(\n '[Turnover] get selected ticket success',\n props<{ ticket: RestTicketModel }>()\n);\nexport const getSelectedTicketFailed = createAction('[Turnover] get selected ticket error');\n\n/**\n * delete turnover ticket\n */\nexport const deleteTurnoverTicket = createAction('[Turnover] delete turnover tickets', props<{ ticketId: number }>());\nexport const deleteTurnoverTicketSuccess = createAction('[Turnover] delete turnover ticket success');\nexport const deleteTurnoverTicketFailed = createAction('[Turnover] delete turnover ticket error');\n\n/**\n * delete turnover ticket attachment\n */\nexport const deleteTurnoverTicketAttachment = createAction(\n '[Turnover] delete turnover tickets attachment',\n props<{ ticketId: number; attachment: RestGenericTypedAttachment; ticketType: TicketType }>()\n);\nexport const deleteTurnoverTicketAttachmentSuccess = createAction(\n '[Turnover] delete turnover ticket attachment success'\n);\nexport const deleteTurnoverTicketAttachmentFailed = createAction('[Turnover] delete turnover ticket attachment error');\n\n/**\n * set turnover attachment\n */\nexport const setTicketAttachment = createAction(\n '[Turnover] set ticket attachment',\n props<{ ticketType: TicketType; attachmentToEntity: UpdateTypedAttachmentToEntityModel }>()\n);\nexport const setTicketAttachmentSuccess = createAction(\n '[Turnover] set ticket attachment success',\n props<{ addedTicketAttachment: RestTypedTicketAttachment }>()\n);\nexport const setTicketAttachmentFail = createAction('[Turnover] set ticket attachment fail');\nexport const clearAddedTicketAttachment = createAction('[Turnover] clear Added ticket Attachment');\n\n/**\n * get company list\n */\nexport const getCompanyList = createAction('[Turnover] get company list');\nexport const getCompanyListSuccess = createAction(\n '[Turnover] get company list success',\n props<{ companyList: RestCompanyModel[] }>()\n);\nexport const getCompanyListFail = createAction('[Turnover] get company list fail');\n\n/**\n * BIDS\n */\n\n/**\n * get bid turnover list\n */\nexport const getBidTurnoverList = createAction('[Turnover] get bid turnover list', props<{ turnoverId: number }>());\nexport const getBidTurnoverListSuccess = createAction(\n '[Turnover] get bid turnover list success',\n props<{ bidList: RestBidModel[] }>()\n);\nexport const getBidTurnoverListFail = createAction('[Turnover] get bid turnover list fail');\n\n/**\n * get bid company list\n */\nexport const getBidCompanyList = createAction('[Turnover] get bid Company list', props<{ companyId: number }>());\nexport const getBidCompanyListSuccess = createAction(\n '[Turnover] get bid Company list success',\n props<{ bidList: RestBidModel[] }>()\n);\nexport const getBidCompanyListFail = createAction('[Turnover] get bid Company list fail');\n\n/**\n * get all bid list\n */\nexport const getAllBidList = createAction('[Turnover] get all bid list');\nexport const getAllBidListSuccess = createAction(\n '[Turnover] get all bid list success',\n props<{ bidList: RestBidModel[] }>()\n);\nexport const getAllBidListFail = createAction('[Turnover] get all bid list fail');\n\n/**\n * get bid\n */\nexport const getBid = createAction('[Turnover] get bid', props<{ bidId: number }>());\nexport const clearBid = createAction('[Turnover] clear bid');\nexport const getBidSuccess = createAction('[Turnover] get bid success', props<{ bid: RestBidModel }>());\nexport const getBidFail = createAction('[Turnover] get bid fail');\n\n/**\n * add new bid\n */\nexport const addNewBid = createAction('[Turnover] add new bid', props<{ bidList: RestBidModel[] }>());\nexport const addNewBidSuccess = createAction('[Turnover] add new bid success', props<{ newBidList: RestBidModel[] }>());\nexport const addNewBidFail = createAction('[Turnover] add new bid fail');\nexport const clearNewBidList = createAction('[Turnover] clear New Bid List');\nexport const newBidInProgress = createAction(\n '[Turnover] new Bid In Progress',\n props<{ newBidListInProgress: boolean }>()\n);\n\n/**\n * update bid\n */\nexport const updateBid = createAction('[Turnover] update bid', props<{ bid: RestBidModel }>());\nexport const updateBidSuccess = createAction('[Turnover] update bid success', props<{ updatedBid: RestBidModel }>());\nexport const updateBidFail = createAction('[Turnover] update bid fail');\nexport const clearUpdatedBid = createAction('[Turnover] clear updated bid');\n\n/**\n * reject bid\n */\nexport const rejectBid = createAction('[Turnover] reject bid', props<{ id: number }>());\nexport const rejectBidSuccess = createAction('[Turnover] reject bid success', props<{ updatedBid: RestBidModel }>());\nexport const rejectBidFail = createAction('[Turnover] reject bid fail');\n\n/**\n * update bid comment\n */\nexport const updateBidComment = createAction('[Turnover] update bid comment', props<{ bid: RestBidModel }>());\nexport const updateBidCommentSuccess = createAction(\n '[Turnover] update bid comment success',\n props<{ updatedBid: RestBidModel }>()\n);\nexport const updateBidCommentFail = createAction('[Turnover] update bid comment fail');\n\n/**\n * set bid attachment\n */\nexport const setBidAttachment = createAction(\n '[Turnover] set bid attachment',\n props<{ attachmentToEntity: UpdateTypedAttachmentToEntityModel }>()\n);\nexport const setBidAttachmentSuccess = createAction(\n '[Turnover] set bid attachment success',\n props<{ addedBidAttachment: RestTypedBidAttachment }>()\n);\nexport const setBidAttachmentFail = createAction('[Turnover] set bid attachment fail');\nexport const clearAddedBidAttachment = createAction('[Turnover] clear Added bid Attachment');\n\n/**\n * delete bid attachment\n */\nexport const deleteBidAttachment = createAction(\n '[Turnover] delete bid attachment',\n props<{ bidId: number; attachment: RestTypedBidAttachment }>()\n);\nexport const deleteBidAttachmentSuccess = createAction('[Turnover] delete bid attachment success');\nexport const deleteBidAttachmentFailed = createAction('[Turnover] delete bid attachment error');\n\n/**\n * get bid attachment list\n */\nexport const getBidAttachmentList = createAction('[Turnover] get bid attachment list', props<{ bidId: number }>());\nexport const getBidAttachmentListSuccess = createAction(\n '[Turnover] get bid attachment list success',\n props<{ allAttachments: RestTypedBidAttachment[] }>()\n);\nexport const getBidAttachmentListFailed = createAction('[Turnover] get bid attachment list error');\n\n/**\n * get appliance\n */\nexport const getAppliance = createAction('[Turnover] get appliance', props<{ applianceId: number }>());\nexport const getApplianceSuccess = createAction(\n '[Turnover] get appliance success',\n props<{ appliance: RestApplianceModel }>()\n);\nexport const getApplianceFailed = createAction('[Turnover] get appliance failed');\n\n/**\n * get workflow step comment list\n */\nexport const getWorkflowStepCommentList = createAction(\n '[Turnover] get workflow step comment list',\n props<{ turnoverId: number }>()\n);\nexport const clearWorkflowStepCommentList = createAction('[Turnover] clear workflow step comment list');\nexport const getWorkflowStepCommentListSuccess = createAction(\n '[Turnover] get workflow step comment list success',\n props<{ workflowStepCommentList: RestWorkflowStepCommentModel[] }>()\n);\nexport const getWorkflowStepCommentListFailed = createAction('[Turnover] get workflow step comment list failed');\n\n/**\n * add workflow step comment\n */\nexport const addWorkflowStepComment = createAction(\n '[Turnover] add workflow step comment',\n props<{ commentItem: RestWorkflowStepCommentModel }>()\n);\nexport const addWorkflowStepCommentSuccess = createAction(\n '[Turnover] add workflow step comment success',\n props<{ commentItem: RestWorkflowStepCommentModel }>()\n);\nexport const addWorkflowStepCommentFailed = createAction('[Turnover] add workflow step comment failed');\n\n/**\n * update workflow step comment\n */\nexport const updateWorkflowStepComment = createAction(\n '[Turnover] update workflow step comment',\n props<{ commentItem: RestWorkflowStepCommentModel }>()\n);\nexport const updateWorkflowStepCommentSuccess = createAction(\n '[Turnover] update workflow step comment success',\n props<{ commentItem: RestWorkflowStepCommentModel }>()\n);\nexport const updateWorkflowStepCommentFailed = createAction('[Turnover] update workflow step comment failed');\n\n/**\n * delete workflow step comment\n */\nexport const deleteWorkflowStepComment = createAction(\n '[Turnover] delete workflow step comment',\n props<{ commentItem: RestWorkflowStepCommentModel }>()\n);\nexport const deleteWorkflowStepCommentSuccess = createAction('[Turnover] delete workflow step comment success');\nexport const deleteWorkflowStepCommentFailed = createAction('[Turnover] delete workflow step comment failed');\n\n/**\n * delete turnover\n */\nexport const deleteTurnover = createAction('[Turnover] delete turnover', props<{ turnoverId: number }>());\nexport const deleteTurnoverSuccess = createAction('[Turnover] delete turnover success');\nexport const deleteTurnoverFailed = createAction('[Turnover] delete turnover failed');\n\n/**\n * delete turnover attachment\n */\nexport const deleteTurnoverAttachment = createAction(\n '[Turnover] delete turnover attachment',\n props<{ attachment: RestTypedTurnoverAttachment }>()\n);\nexport const deleteTurnoverAttachmentSuccess = createAction('[Turnover] delete turnover attachment success');\nexport const deleteTurnoverAttachmentFailed = createAction('[Turnover] delete turnover attachment failed');\n\n/**\n * delete file from repository\n */\nexport const deleteFileFromRepository = createAction(\n '[Turnover] delete file from repository',\n props<{ fileId: number }>()\n);\nexport const deleteFileFromRepositorySuccess = createAction('[Turnover] delete file from repository success');\nexport const deleteFileFromRepositoryFailed = createAction('[Turnover] delete file from repository failed');\n\n/**\n * get turnover attachments\n */\nexport const getTurnoverAttachments = createAction(\n '[Turnover] get turnover attachments',\n props<{ turnoverId: number }>()\n);\nexport const getTurnoverAttachmentsSuccess = createAction(\n '[Turnover] get turnover attachments success',\n props<{ allAttachments: RestTypedTurnoverAttachment[] }>()\n);\nexport const getTurnoverAttachmentsFailed = createAction('[Turnover] get turnover attachments failed');\nexport const clearTurnoverAttachments = createAction('[Turnover] clear turnover attachments');\n\n/**\n * get ticket\n */\nexport const getTicket = createAction('[Turnover] get ticket', props<{ ticketId: number }>());\nexport const getTicketSuccess = createAction(\n '[Turnover] get ticket success',\n props<{ restTicketModel: RestTicketModel }>()\n);\nexport const getTicketFailed = createAction('[Turnover] get ticket failed');\n\n/**\n * get ticket attachments\n */\nexport const getTicketAttachments = createAction('[Turnover] get ticket attachments', props<{ ticketId: number }>());\nexport const getTicketAttachmentsSuccess = createAction(\n '[Turnover] get ticket attachments success',\n props<{ ticketAttachments: RestTypedTicketAttachment[] }>()\n);\nexport const getTicketAttachmentsFailed = createAction('[Turnover] get ticket attachments failed');\n\n/**\n * clear ticket preview\n */\nexport const clearTicketPreview = createAction('[Turnover] clear ticket preview');\n\n/**\n * set step Info\n */\nexport const setStepInfo = createAction('[Turnover] set step Info', props<{ stepInfo: TurnoverStepInfo }>());\n\n/**\n * clean store\n */\nexport const cleanTurnoverStore = createAction('[Turnover] clean store');\n\n// export const loadWorkflowAssignmentsByPropertyAndStepId = createAction(\n// '[Turnover] get workflow assigments by propertyId and stepId',\n// props<{ stepId: WorkflowStepEnumType; propertyId: number }>()\n// );\n\nexport const workflowAssignmentsByPropertyAndStepIdSucceded = createAction(\n '[Turnover] loaded workflow assigments by propertyId and stepId succeeded',\n props<{ workflowStepAssigneeId: number }>()\n);\nexport const workflowAssignmentsByPropertyAndStepIdFailure = createAction(\n '[Turnover] loaded workflow assigments by propertyId and stepId failure'\n);\n\n/**\n * assign default Workflow Step Assignee\n */\nexport const assignDefaultWorkflowStepAssignee = createAction(\n '[Turnover] assign default Workflow Step Assignee',\n props<{ turnoverData: RestTurnoverDataModel; workflowStep: WorkflowStepEnumType; propertyId: number }>()\n);\nexport const assignDefaultWorkflowStepAssigneeSuccess = createAction(\n '[Turnover] assign default Workflow Step Responsible Party success',\n props<{ turnoverData: RestTurnoverDataModel }>()\n);\nexport const assignDefaultWorkflowStepAssigneeFailed = createAction(\n '[Turnover] assign default Workflow Step Responsible Party failed'\n);\n\nexport const reloadAppliancesNeeded = createAction('[Turnover] reload appliances needed');\n\nexport const reloadAppliancesNeededEnd = createAction('[Turnover] reload appliances needed end');\nexport const emptyAction = createAction('[Turnover] empty action');\n\nexport const inspectTurnover = createAction('[Turnover] inspect Turnover', props<{ inspectTurnoverId: number }>());\n\nexport const updateValidationParams = createAction(\n '[Turnover] update Validation Params',\n props<{ validationParams: ValidationParams }>()\n);\n\n/**\n * set step assignee\n */\nexport const setStepAssignee = createAction(\n '[Turnover] set step assignee',\n props<{ workflowAction: WorkflowAction }>()\n);\nexport const setStepAssigneeSuccess = createAction('[Turnover] set step assignee success');\nexport const setStepAssigneeFailed = createAction('[Turnover] set step assignee failed');\n\n/**\n * get default turnovers assignees\n */\nexport const getDefaultTurnoversAssignees = createAction(\n '[Turnover] get default turnovers assignees',\n props<{ propertyId: number }>()\n);\nexport const getDefaultTurnoversAssigneesSuccess = createAction(\n '[Turnover] get default turnovers assignees success',\n props<{ defaultTurnoversAssignees: RestWorkflowStepAssignmentModel[] }>()\n);\nexport const getDefaultTurnoversAssigneesFailed = createAction('[Turnover] get default turnovers assignees failed');\n\n/**\n * counters\n */\nexport const resetKanbanCounters = createAction('[Turnover] reset Kanban Counters');\n\nexport const setAllPropertyIds = createAction('[Turnover] set All Property Ids', props<{ allPropertyIds: number[] }>());\n\nexport const toggleAllSections = createAction('[Turnover] toggle All Sections', props<{ active: boolean }>());\n\nexport const toggleSingleSection = createAction(\n '[Turnover] toggle Single Section',\n props<{ propertyId: number; active: boolean }>()\n);\n\nexport const setActiveSections = createAction(\n '[Turnover] set active Sections',\n props<{ activePropertyIds: number[] }>()\n);\n\nexport const toggleInactiveFilteredSingleSection = createAction(\n '[Turnover] toggle Filtered Single Section',\n props<{ propertyId: number; active: boolean }>()\n);\n\nexport const setInactiveFilteredSections = createAction(\n '[Turnover] set filtered inactive Sections',\n props<{ inactiveFilteredPropertyIds: number[] }>()\n);\n\nexport const setDisplayedPropertyList = createAction(\n '[Turnover] set Displayed Property List',\n props<{ displayedPropertyList: KanbanListItem[] }>()\n);\n\nexport const setSectionLostRevenue = createAction(\n '[Turnover] set section lost revenue',\n props<{ propertyId: number; lostRevenue: number }>()\n);\n\nexport const loadTurnoverTimers = createAction('[Turnover] load timers', props<{ turnoverId: number }>());\nexport const clearTurnoverTimers = createAction('[Turnover] clear timers');\nexport const turnoverTimersLoaded = createAction(\n '[Turnover] timers loaded',\n props<{ turnoverId: number; timers: TurnoverStepTimer[] }>()\n);\nexport const setTurnoverTimers = createAction(\n '[Turnover] set timers',\n props<{ turnoverId: number; timers: TurnoverStepTimer[] }>()\n);\nexport const setTurnoverTimersSuccess = createAction('[Turnover] setTurnoverTimers success');\nexport const setTurnoverTimersFailed = createAction('[Turnover] setTurnoverTimers failed');\n\nexport const setWorkflowStepAssignee = createAction(\n '[Turnover] setWorkflowStepAssignee',\n props<{ turnoverId: number; step: WorkflowStepEnumType; assigneeId: number }>()\n);\nexport const setEmptyWorkflowStepAssignee = createAction(\n '[Turnover] setEmptyWorkflowStepAssignee',\n props<{ turnoverId: number; step: WorkflowStepEnumType; assigneeId: number; rememberIt: boolean }>()\n);\n\nexport const setWorkflowStepAssigneeSuccess = createAction('[Turnover] setWorkflowStepAssigneeSuccess');\nexport const setWorkflowStepAssigneeFailed = createAction('[Turnover] setWorkflowStepAssigneeFailed');\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { DateDropdownModule } from '@ui-components/components/date-dropdown/date-dropdown.module';\nimport { InputErrorModule } from '@ui-components/components/input-error/input-error.module';\n\nimport { TurnoverDateRangeComponent } from './turnover-date-range.component';\n\n@NgModule({\n declarations: [TurnoverDateRangeComponent],\n imports: [CommonModule, InputErrorModule, DateDropdownModule, ReactiveFormsModule],\n exports: [TurnoverDateRangeComponent],\n})\nexport class TurnoverDateRangeModule {}\n","export enum VacancyLossAttrType {\n Gross,\n Unit,\n Turn,\n}\n","import { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\nexport enum VacancyLostThreshold {\n None,\n Medium,\n High,\n}\nexport const VacancyLostThresholdList: IRadioButtonOption[] = [\n {\n label: 'None',\n value: VacancyLostThreshold.None,\n },\n {\n label: 'Medium',\n value: VacancyLostThreshold.Medium,\n },\n {\n label: 'High',\n value: VacancyLostThreshold.High,\n },\n];\n","import { createReducer, on } from '@ngrx/store';\n\nimport { RestTicketModel } from '@shared/interfaces/turnover.interface';\n\nimport {\n clearPunchesByTurnoverId,\n clearSelectedPunch,\n loadPunchByIdFinished,\n loadPunchesByTurnoverId,\n loadPunchesByTurnoverIdFinished,\n} from '../actions/punch.actions';\n\nexport const punchFeatureKey = 'punch';\n\nexport interface PunchState {\n punchesByTurnoverId?: RestTicketModel[];\n punchesByTurnoverIdLoading?: boolean;\n selectedPunch?: RestTicketModel;\n}\n\nexport const initialState: PunchState = {};\n\nexport const reducer = createReducer(\n initialState,\n on(loadPunchesByTurnoverId, (state, action) => ({ ...state, punchesByTurnoverIdLoading: true })),\n on(loadPunchesByTurnoverIdFinished, (state, action) => ({\n ...state,\n punchesByTurnoverIdLoading: false,\n punchesByTurnoverId: action.result,\n })),\n on(clearPunchesByTurnoverId, (state, action) => ({\n ...state,\n punchesByTurnoverIdLoading: false,\n punchesByTurnoverId: null,\n })),\n on(loadPunchByIdFinished, (state, action) => ({ ...state, selectedPunch: action.punch })),\n on(clearSelectedPunch, (state, action) => ({ ...state, selectedPunch: null }))\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n createTurnoverBid,\n createTurnoverBidFailed,\n createTurnoverBidSuccess,\n loadTurnoverBidCategoriesSuccess,\n loadTurnoverBids,\n loadTurnoverBidsFailed,\n loadTurnoverBidsSuccess,\n} from '@main-application/turnovers/actions/turnover-bids.actions';\nimport { RestTurnoverBid, RestTurnoverBidCategory } from '@shared/interfaces/turnover-bids.interface';\n\nexport const turnoverBidsFeatureKey = 'turnover-bids';\n\nexport interface TurnoverBidsState {\n bidsLoading: boolean;\n bids: RestTurnoverBid[];\n bidCategories: RestTurnoverBidCategory[];\n bidAdding: boolean;\n}\n\nexport const initialState: TurnoverBidsState = {\n bidsLoading: false,\n bids: [],\n bidCategories: [],\n bidAdding: false,\n};\n\nexport const turnoverBidsReducer = createReducer(\n initialState,\n\n // load\n on(loadTurnoverBids, state => ({\n ...state,\n bidsLoading: true,\n })),\n on(loadTurnoverBidsSuccess, (state, action) => ({\n ...state,\n bids: action.bids,\n bidsLoading: false,\n })),\n on(loadTurnoverBidsFailed, state => ({\n ...state,\n bids: [],\n bidsLoading: false,\n })),\n\n // create\n on(createTurnoverBid, state => ({\n ...state,\n bidAdding: true,\n })),\n on(createTurnoverBidSuccess, state => ({\n ...state,\n bidAdding: false,\n })),\n on(createTurnoverBidFailed, state => ({\n ...state,\n bidAdding: false,\n })),\n on(loadTurnoverBidCategoriesSuccess, (state, action) => ({\n ...state,\n bidCategories: action.categories,\n }))\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n addNewBid,\n addNewBidFail,\n addNewBidSuccess,\n addNewTurnoverTicket,\n addNewTurnoverTicketFailed,\n addNewTurnoverTicketSuccess,\n addWorkflowStepComment,\n addWorkflowStepCommentFailed,\n addWorkflowStepCommentSuccess,\n cleanTurnoverStore,\n clearAddedAttachment,\n clearAddedBidAttachment,\n clearAddedTicketAttachment,\n clearBid,\n clearNewBidList,\n clearTicketPreview,\n clearTurnoverAttachments,\n clearTurnoverData,\n clearTurnoverTimers,\n clearUpdatedBid,\n clearWorkflowStepCommentList,\n createNewTurnover,\n createNewTurnoverFailed,\n createNewTurnoverSuccess,\n deleteBidAttachment,\n deleteBidAttachmentFailed,\n deleteBidAttachmentSuccess,\n deleteFileFromRepositoryFailed,\n deleteFileFromRepositorySuccess,\n deleteTurnover,\n deleteTurnoverAttachment,\n deleteTurnoverAttachmentFailed,\n deleteTurnoverAttachmentSuccess,\n deleteTurnoverFailed,\n deleteTurnoverSuccess,\n deleteTurnoverTicket,\n deleteTurnoverTicketFailed,\n deleteTurnoverTicketSuccess,\n deleteWorkflowStepComment,\n deleteWorkflowStepCommentFailed,\n deleteWorkflowStepCommentSuccess,\n getAllBidList,\n getAllBidListFail,\n getAllBidListSuccess,\n getAppliance,\n getApplianceFailed,\n getApplianceSuccess,\n getBid,\n getBidAttachmentList,\n getBidAttachmentListFailed,\n getBidAttachmentListSuccess,\n getBidCompanyList,\n getBidCompanyListFail,\n getBidCompanyListSuccess,\n getBidFail,\n getBidSuccess,\n getBidTurnoverList,\n getBidTurnoverListFail,\n getBidTurnoverListSuccess,\n getCompanyList,\n getCompanyListFail,\n getCompanyListSuccess,\n getDefaultTurnoversAssignees,\n getDefaultTurnoversAssigneesFailed,\n getDefaultTurnoversAssigneesSuccess,\n getSelectedTicket,\n getSelectedTicketFailed,\n getSelectedTicketSuccess,\n getTicket,\n getTicketAttachments,\n getTicketAttachmentsFailed,\n getTicketAttachmentsSuccess,\n getTicketFailed,\n getTicketSuccess,\n getTurnoverAttachments,\n getTurnoverAttachmentsFailed,\n getTurnoverAttachmentsSuccess,\n getTurnoverData,\n getTurnoverDataFailed,\n getTurnoverDataSuccess,\n getTurnoverTickets,\n getTurnoverTicketsFailed,\n getTurnoverTicketsSuccess,\n getWorkflowStepCommentList,\n getWorkflowStepCommentListFailed,\n getWorkflowStepCommentListSuccess,\n inspectTurnover,\n newBidInProgress,\n rejectBid,\n rejectBidFail,\n rejectBidSuccess,\n reloadAppliancesNeeded,\n reloadAppliancesNeededEnd,\n resetCreateNewTurnover,\n resetKanbanCounters,\n resetNewTurnoverTicket,\n resetWorkflowStepStatus,\n setActiveSections,\n setAllPropertyIds,\n setAllUserList,\n setAllUserRadioList,\n setApplianceTypeList,\n setAttachmentToTurnover,\n setAttachmentToTurnoverFailed,\n setAttachmentToTurnoverSuccess,\n setBidAttachment,\n setBidAttachmentFail,\n setBidAttachmentSuccess,\n setColorTypeList,\n setCompanyEmailRadioList,\n setCompanyNameRadioList,\n setCompanyRadioList,\n setCurrentWorkflowStep,\n setCurrentWorkflowStepModel,\n setDisplayedPropertyList,\n setInactiveFilteredSections,\n setSectionLostRevenue,\n setStepAssignee,\n setStepAssigneeFailed,\n setStepAssigneeSuccess,\n setStepInfo,\n setTicketAttachment,\n setTicketAttachmentFail,\n setTicketAttachmentSuccess,\n setUserList,\n setUserListModel,\n setWorkflowStepSuccess,\n turnoverTimersLoaded,\n updateBid,\n updateBidComment,\n updateBidCommentFail,\n updateBidCommentSuccess,\n updateBidFail,\n updateBidSuccess,\n updateTicketPreview,\n updateTicketPreviewFailed,\n updateTicketPreviewSuccess,\n updateTurnoverAttachment,\n updateTurnoverAttachmentFailed,\n updateTurnoverAttachmentSuccess,\n updateTurnoverTicket,\n updateTurnoverTicketFailed,\n updateTurnoverTicketSuccess,\n updateValidationParams,\n updateWorkflowStepComment,\n updateWorkflowStepCommentFailed,\n updateWorkflowStepCommentSuccess,\n workflowAssignmentsByPropertyAndStepIdSucceded,\n} from '@main-application/turnovers/actions/turnovers.actions';\nimport { TurnoverStepTimer } from '@main-application/turnovers/interfaces/timers.interface';\nimport { ValidationParams } from '@main-application/turnovers/interfaces/validation-params.interface';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestApplianceModel } from '@shared/interfaces/appliance.interface';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { RestBidModel, RestTypedBidAttachment } from '@shared/interfaces/bid.interface';\nimport { RestCommentModel, RestWorkflowStepCommentModel } from '@shared/interfaces/comments.interface';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { KanbanListItem } from '@shared/interfaces/kanban-list-item.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestWorkflowStepAssignmentModel } from '@shared/interfaces/rest-workflow-step-assignment-model.interface';\nimport {\n RestTicketModel,\n RestTurnoverDataModel,\n RestTypedTicketAttachment,\n RestTypedTurnoverAttachment,\n RestWorkflowInstanceModel,\n TurnoverStepInfo,\n UpdateTypedAttachmentToEntityModel,\n} from '@shared/interfaces/turnover.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\nexport const turnoversFeatureKey = 'turnovers';\n\nexport interface State {\n turnoverData: RestTurnoverDataModel;\n updatedTurnoverData: RestTurnoverDataModel;\n emptyTurnoverData: boolean;\n createTurnoverLoading: boolean;\n createdTurnover: RestTurnoverDataModel;\n turnoverDataLoading: boolean;\n commentItem: RestCommentModel;\n setWorkflowStepStatus: UpdateStatus;\n nextWorkflowStep: WorkflowStepEnumType;\n setWorkflowStepLoading: boolean;\n currentWorkflowStep: WorkflowStepEnumType;\n currentWorkflowStepModel: RestWorkflowInstanceModel;\n applianceTypeList: IRadioButtonOption[];\n colorTypeList: IRadioButtonOption[];\n userList: IRadioButtonOption[];\n userListModel: RestUserModel[];\n companyRadioList: IRadioButtonOption[];\n companyNameRadioList: IRadioButtonOption[];\n companyEmailRadioList: IRadioButtonOption[];\n attachmentToEntity: UpdateTypedAttachmentToEntityModel;\n addBidAttachmentInProgress: boolean;\n addBidAttachmentStatus: UpdateStatus;\n addedAttachment: RestGenericTypedAttachment;\n addedBidAttachment: RestTypedBidAttachment;\n addedTicketAttachment: RestTypedTicketAttachment;\n turnoverTicketList: RestTicketModel[];\n turnoverTicketListLoading: boolean;\n newTurnoverTicket: RestTicketModel;\n newTurnoverTicketLoading: boolean;\n editedTicket: RestTicketModel;\n selectedTicket: RestTicketModel;\n selectedTicketLoading: boolean;\n addNewApplianceNeededLoading: boolean;\n isNewApplianceNeededAdd: boolean;\n markApplianceAsDoneLoading: boolean;\n isMarkApplianceAsDone: boolean;\n companyList: RestCompanyModel[];\n companyListLoading: boolean;\n newBidList: RestBidModel[];\n newBidListInProgress: boolean;\n bidTurnoverList: RestBidModel[];\n bidTurnoverListLoading: boolean;\n bidCompanyList: RestBidModel[];\n bidCompanyListLoading: boolean;\n bid: RestBidModel;\n editedBid: RestBidModel;\n bidLoading: boolean;\n updatedBid: RestBidModel;\n updatedBidLoading: boolean;\n updatedBidCommentLoading: boolean;\n appliance: RestApplianceModel;\n applianceLoading: boolean;\n workflowStepCommentList: RestWorkflowStepCommentModel[];\n workflowStepCommentListLoading: boolean;\n workflowStepCommentUpdateLoading: boolean;\n workflowStepAssigneeId: number;\n workflowStepAssignmentLoading: boolean;\n reloadAppliancesNeeded: boolean;\n deleteTurnoverInProgress: boolean;\n turnoverDeleteStatus: UpdateStatus;\n deleteTurnoverAttachmentInProgress: boolean;\n turnoverDeleteAttachmentStatus: UpdateStatus;\n addTurnoverAttachmentInProgress: boolean;\n addTurnoverAttachmentStatus: UpdateStatus;\n stepInfo: TurnoverStepInfo;\n allAttachments: RestTypedTurnoverAttachment[];\n allAttachmentsLoading: boolean;\n deleteBidAttachmentInProgress: boolean;\n deleteBidAttachmentStatus: UpdateStatus;\n bidAttachments: RestTypedBidAttachment[];\n bidAttachmentsLoading: boolean;\n updateTicketInProgress: boolean;\n updateTurnoverAttachmentInProgress: boolean;\n updateTurnoverAttachmentStatus: UpdateStatus;\n\n allBidList: RestBidModel[];\n allBidListLoading: boolean;\n\n ticket: RestTicketModel;\n ticketLoading: boolean;\n\n ticketAttachments: RestTypedTicketAttachment[];\n ticketAttachmentsLoading: boolean;\n\n ticketUpdateInProgress: boolean;\n ticketUpdateInProgressStatus: UpdateStatus;\n\n inspectTurnoverId: number;\n\n validationParams: ValidationParams;\n\n allPropertyIds: number[];\n activePropertyIds: number[];\n inactiveFilteredPropertyIds: number[];\n\n updateStepAssigneeInProgress: boolean;\n updateStepAssigneeStatus: UpdateStatus;\n\n defaultTurnoversAssignees: RestWorkflowStepAssignmentModel[];\n defaultTurnoversAssigneesLoading: boolean;\n\n allUserRadioList: IRadioButtonOption[];\n allUserList: RestUserModel[];\n displayedPropertyList: KanbanListItem[];\n sectionsLostRevenue: { [key: number]: number };\n rejectBidLoading: boolean;\n\n timers: TurnoverStepTimer[];\n}\n\nexport const initialState: State = {\n turnoverData: null,\n updatedTurnoverData: null,\n emptyTurnoverData: false,\n createTurnoverLoading: false,\n createdTurnover: null,\n turnoverDataLoading: false,\n commentItem: null,\n setWorkflowStepStatus: null,\n nextWorkflowStep: null,\n setWorkflowStepLoading: false,\n currentWorkflowStep: null,\n currentWorkflowStepModel: null,\n applianceTypeList: [],\n colorTypeList: [],\n userList: [],\n userListModel: [],\n companyRadioList: [],\n companyNameRadioList: [],\n companyEmailRadioList: [],\n attachmentToEntity: null,\n addBidAttachmentInProgress: false,\n addBidAttachmentStatus: null,\n addedAttachment: null,\n addedBidAttachment: null,\n addedTicketAttachment: null,\n turnoverTicketList: [],\n turnoverTicketListLoading: false,\n newTurnoverTicket: null,\n newTurnoverTicketLoading: false,\n editedTicket: null,\n selectedTicket: null,\n selectedTicketLoading: false,\n addNewApplianceNeededLoading: false,\n isNewApplianceNeededAdd: false,\n markApplianceAsDoneLoading: false,\n isMarkApplianceAsDone: false,\n companyList: [],\n companyListLoading: false,\n newBidList: [],\n newBidListInProgress: false,\n bidTurnoverList: [],\n bidTurnoverListLoading: false,\n bidCompanyList: [],\n bidCompanyListLoading: false,\n bid: null,\n editedBid: null,\n bidLoading: false,\n updatedBid: null,\n updatedBidLoading: false,\n updatedBidCommentLoading: false,\n appliance: null,\n applianceLoading: false,\n workflowStepCommentList: [],\n workflowStepCommentListLoading: false,\n workflowStepCommentUpdateLoading: false,\n workflowStepAssigneeId: null,\n workflowStepAssignmentLoading: false,\n reloadAppliancesNeeded: false,\n deleteTurnoverInProgress: false,\n turnoverDeleteStatus: null,\n deleteTurnoverAttachmentInProgress: false,\n turnoverDeleteAttachmentStatus: null,\n addTurnoverAttachmentInProgress: false,\n addTurnoverAttachmentStatus: null,\n stepInfo: null,\n allAttachments: [],\n allAttachmentsLoading: false,\n deleteBidAttachmentInProgress: false,\n deleteBidAttachmentStatus: null,\n bidAttachments: [],\n bidAttachmentsLoading: false,\n updateTicketInProgress: false,\n updateTurnoverAttachmentInProgress: false,\n updateTurnoverAttachmentStatus: null,\n\n allBidList: [],\n allBidListLoading: false,\n\n ticket: null,\n ticketLoading: false,\n\n ticketAttachments: [],\n ticketAttachmentsLoading: false,\n\n ticketUpdateInProgress: false,\n ticketUpdateInProgressStatus: null,\n\n inspectTurnoverId: null,\n\n validationParams: {},\n\n allPropertyIds: [],\n activePropertyIds: [],\n inactiveFilteredPropertyIds: [],\n\n updateStepAssigneeInProgress: false,\n updateStepAssigneeStatus: null,\n\n defaultTurnoversAssignees: [],\n defaultTurnoversAssigneesLoading: false,\n\n allUserRadioList: [],\n allUserList: [],\n\n displayedPropertyList: [],\n sectionsLostRevenue: {},\n rejectBidLoading: false,\n\n timers: null,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * Create new Turnover\n */\n on(createNewTurnover, (state, action) => ({\n ...state,\n createTurnoverLoading: true,\n })),\n on(createNewTurnoverSuccess, (state, action) => ({\n ...state,\n createTurnoverLoading: false,\n createdTurnover: action.turnoverData,\n })),\n on(resetCreateNewTurnover, createNewTurnoverFailed, (state, action) => ({\n ...state,\n createTurnoverLoading: false,\n createdTurnover: null,\n })),\n\n /**\n * Get turnover data\n */\n on(clearTurnoverData, state => ({\n ...state,\n turnoverDataLoading: false,\n emptyTurnoverData: false,\n turnoverData: null,\n })),\n on(getTurnoverData, (state, action) => ({\n ...state,\n turnoverDataLoading: true,\n emptyTurnoverData: false,\n })),\n on(getTurnoverDataSuccess, (state, action) => ({\n ...state,\n turnoverData: action.turnoverData,\n turnoverDataLoading: false,\n emptyTurnoverData: false,\n })),\n on(getTurnoverDataFailed, (state, action) => ({\n ...state,\n turnoverData: null,\n turnoverDataLoading: false,\n emptyTurnoverData: true,\n })),\n /**\n * Set workflow step\n */\n on(setWorkflowStepSuccess, (state, action) => ({\n ...state,\n setWorkflowStepStatus: UpdateStatus.OK,\n nextWorkflowStep: action.nextWorkflowStep,\n setWorkflowStepLoading: false,\n })),\n on(resetWorkflowStepStatus, (state, action) => ({\n ...state,\n setWorkflowStepStatus: null,\n nextWorkflowStep: null,\n })),\n\n /**\n * set current workflow step\n */\n on(setCurrentWorkflowStep, (state, action) => ({\n ...state,\n currentWorkflowStep: action.currentWorkflowStep,\n })),\n\n on(setCurrentWorkflowStepModel, (state, action) => ({\n ...state,\n currentWorkflowStepModel: action.currentWorkflowStepModel,\n })),\n\n /**\n * set attachment to turnover\n */\n on(setAttachmentToTurnover, (state, action) => ({\n ...state,\n attachmentToEntity: action.attachmentToEntity,\n addedAttachment: null,\n addTurnoverAttachmentInProgress: true,\n addTurnoverAttachmentStatus: null,\n })),\n on(setAttachmentToTurnoverSuccess, (state, action) => ({\n ...state,\n addedAttachment: action.addedAttachment,\n addTurnoverAttachmentInProgress: false,\n addTurnoverAttachmentStatus: UpdateStatus.OK,\n })),\n on(setAttachmentToTurnoverFailed, (state, action) => ({\n ...state,\n addedAttachment: null,\n addTurnoverAttachmentInProgress: false,\n addTurnoverAttachmentStatus: UpdateStatus.ERROR,\n })),\n on(clearAddedAttachment, (state, action) => ({\n ...state,\n addedAttachment: null,\n })),\n\n /**\n * update turnover attachment\n */\n on(updateTurnoverAttachment, (state, action) => ({\n ...state,\n updateTurnoverAttachmentInProgress: true,\n updateTurnoverAttachmentStatus: UpdateStatus.UPDATE,\n })),\n on(updateTurnoverAttachmentSuccess, (state, action) => ({\n ...state,\n updateTurnoverAttachmentInProgress: false,\n updateTurnoverAttachmentStatus: UpdateStatus.OK,\n })),\n on(updateTurnoverAttachmentFailed, (state, action) => ({\n ...state,\n updateTurnoverAttachmentInProgress: false,\n updateTurnoverAttachmentStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * get turnover tickets\n */\n on(getTurnoverTickets, (state, action) => ({\n ...state,\n turnoverTicketListLoading: true,\n })),\n on(getTurnoverTicketsSuccess, (state, action) => ({\n ...state,\n turnoverTicketList: action.turnoverTicketList,\n turnoverTicketListLoading: false,\n })),\n on(getTurnoverTicketsFailed, (state, action) => ({\n ...state,\n turnoverTicketList: [],\n turnoverTicketListLoading: false,\n })),\n\n /**\n * add new turnover ticket\n */\n on(addNewTurnoverTicket, (state, action) => ({\n ...state,\n newTurnoverTicket: null,\n newTurnoverTicketLoading: true,\n })),\n on(addNewTurnoverTicketSuccess, (state, action) => ({\n ...state,\n newTurnoverTicket: action.newTurnoverTicket,\n newTurnoverTicketLoading: false,\n })),\n on(addNewTurnoverTicketFailed, (state, action) => ({\n ...state,\n newTurnoverTicket: null,\n newTurnoverTicketLoading: false,\n })),\n on(resetNewTurnoverTicket, (state, action) => ({\n ...state,\n newTurnoverTicket: null,\n })),\n\n /**\n * update turnover tickets\n */\n on(updateTurnoverTicket, (state, action) => ({\n ...state,\n editedTicket: null,\n updateTicketInProgress: true,\n })),\n on(updateTurnoverTicketSuccess, (state, action) => ({\n ...state,\n editedTicket: action.editedTicket,\n updateTicketInProgress: false,\n })),\n on(updateTurnoverTicketFailed, (state, action) => ({\n ...state,\n editedTicket: null,\n updateTicketInProgress: false,\n })),\n\n /**\n * update ticket preview\n */\n on(updateTicketPreview, (state, action) => ({\n ...state,\n ticketUpdateInProgress: true,\n ticketUpdateInProgressStatus: UpdateStatus.UPDATE,\n })),\n on(updateTicketPreviewSuccess, (state, action) => ({\n ...state,\n ticketUpdateInProgress: false,\n ticketUpdateInProgressStatus: UpdateStatus.OK,\n })),\n on(updateTicketPreviewFailed, (state, action) => ({\n ...state,\n ticketUpdateInProgress: false,\n ticketUpdateInProgressStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * update turnover tickets\n */\n on(getSelectedTicket, (state, action) => ({\n ...state,\n selectedTicket: null,\n selectedTicketLoading: true,\n })),\n on(getSelectedTicketSuccess, (state, action) => ({\n ...state,\n selectedTicket: action.ticket,\n selectedTicketLoading: false,\n })),\n on(getSelectedTicketFailed, (state, action) => ({\n ...state,\n selectedTicket: null,\n selectedTicketLoading: false,\n })),\n\n /**\n * delete turnover tickets\n */\n on(deleteTurnoverTicket, (state, action) => ({\n ...state,\n turnoverTicketListLoading: true,\n })),\n on(deleteTurnoverTicketSuccess, (state, action) => ({\n ...state,\n turnoverTicketListLoading: false,\n })),\n on(deleteTurnoverTicketFailed, (state, action) => ({\n ...state,\n turnoverTicketListLoading: false,\n })),\n\n /**\n * delete bid attachment\n */\n on(deleteBidAttachment, (state, action) => ({\n ...state,\n deleteBidAttachmentInProgress: true,\n deleteBidAttachmentStatus: null,\n })),\n on(deleteBidAttachmentSuccess, (state, action) => ({\n ...state,\n deleteBidAttachmentInProgress: false,\n deleteBidAttachmentStatus: UpdateStatus.DELETED,\n })),\n on(deleteBidAttachmentFailed, (state, action) => ({\n ...state,\n deleteBidAttachmentInProgress: false,\n deleteBidAttachmentStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * bid attachment list\n */\n on(getBidAttachmentList, (state, action) => ({\n ...state,\n bidAttachmentsLoading: true,\n })),\n on(getBidAttachmentListSuccess, (state, action) => ({\n ...state,\n bidAttachments: action.allAttachments,\n bidAttachmentsLoading: false,\n })),\n on(getBidAttachmentListFailed, (state, action) => ({\n ...state,\n bidAttachments: [],\n bidAttachmentsLoading: false,\n })),\n\n /**\n * set ticket attachment\n */\n on(setTicketAttachment, (state, action) => ({\n ...state,\n attachmentToEntity: action.attachmentToEntity,\n })),\n on(setTicketAttachmentSuccess, (state, action) => ({\n ...state,\n addedTicketAttachment: action.addedTicketAttachment,\n })),\n on(setTicketAttachmentFail, (state, action) => ({\n ...state,\n addedTicketAttachment: null,\n })),\n on(clearAddedTicketAttachment, (state, action) => ({\n ...state,\n addedTicketAttachment: null,\n })),\n\n /**\n * get company list\n */\n on(getCompanyList, (state, action) => ({\n ...state,\n companyListLoading: true,\n })),\n on(getCompanyListSuccess, (state, action) => ({\n ...state,\n companyListLoading: false,\n companyList: action.companyList,\n })),\n on(getCompanyListFail, (state, action) => ({\n ...state,\n companyListLoading: false,\n companyList: [],\n })),\n\n /**\n * get Bid Turnover List\n */\n on(getBidTurnoverList, (state, action) => ({\n ...state,\n bidTurnoverListLoading: true,\n })),\n on(getBidTurnoverListSuccess, (state, action) => ({\n ...state,\n bidTurnoverListLoading: false,\n bidTurnoverList: action.bidList,\n })),\n on(getBidTurnoverListFail, (state, action) => ({\n ...state,\n bidTurnoverListLoading: false,\n bidTurnoverList: [],\n })),\n\n /**\n * get bid company list\n */\n on(getBidCompanyList, (state, action) => ({\n ...state,\n bidCompanyListLoading: true,\n })),\n on(getBidCompanyListSuccess, (state, action) => ({\n ...state,\n bidCompanyListLoading: false,\n bidCompanyList: action.bidList,\n })),\n on(getBidCompanyListFail, (state, action) => ({\n ...state,\n bidCompanyListLoading: false,\n bidCompanyList: [],\n })),\n\n /**\n * bid super admin list\n */\n on(getAllBidList, (state, action) => ({\n ...state,\n allBidListLoading: true,\n })),\n on(getAllBidListSuccess, (state, action) => ({\n ...state,\n allBidListLoading: false,\n allBidList: action.bidList,\n })),\n on(getAllBidListFail, (state, action) => ({\n ...state,\n allBidListLoading: false,\n allBidList: [],\n })),\n\n /**\n * get bid\n */\n on(clearBid, state => ({\n ...state,\n bidLoading: false,\n bid: null,\n })),\n on(getBid, (state, action) => ({\n ...state,\n bidLoading: true,\n })),\n on(getBidSuccess, (state, action) => ({\n ...state,\n bidLoading: false,\n bid: action.bid,\n })),\n on(getBidFail, (state, action) => ({\n ...state,\n bidLoading: false,\n bid: null,\n })),\n\n /**\n * add new bid\n */\n on(addNewBid, (state, action) => ({\n ...state,\n newBidList: [],\n newBidListInProgress: true,\n })),\n on(addNewBidSuccess, (state, action) => ({\n ...state,\n newBidList: action.newBidList,\n })),\n on(addNewBidFail, (state, action) => ({\n ...state,\n newBidList: [],\n newBidListInProgress: false,\n })),\n on(clearNewBidList, (state, action) => ({\n ...state,\n newBidList: [],\n })),\n on(newBidInProgress, (state, action) => ({\n ...state,\n newBidListInProgress: action.newBidListInProgress,\n })),\n\n /**\n * update bid\n */\n on(updateBid, (state, action) => ({\n ...state,\n updatedBidLoading: true,\n updatedBid: null,\n })),\n on(updateBidSuccess, (state, action) => ({\n ...state,\n updatedBidLoading: false,\n bid: action.updatedBid,\n updatedBid: action.updatedBid,\n })),\n on(updateBidFail, (state, action) => ({\n ...state,\n updatedBidLoading: false,\n updatedBid: null,\n })),\n on(rejectBid, (state, action) => ({\n ...state,\n rejectBidLoading: true,\n })),\n on(rejectBidSuccess, rejectBidFail, (state, action) => ({\n ...state,\n rejectBidLoading: false,\n })),\n on(clearUpdatedBid, (state, action) => ({\n ...state,\n updatedBid: null,\n })),\n\n /**\n * update bid comment\n */\n on(updateBidComment, (state, action) => ({\n ...state,\n updatedBidCommentLoading: true,\n })),\n on(updateBidCommentSuccess, (state, action) => ({\n ...state,\n updatedBidCommentLoading: false,\n bid: action.updatedBid,\n })),\n on(updateBidCommentFail, (state, action) => ({\n ...state,\n updatedBidCommentLoading: false,\n })),\n\n /**\n * set bid attachment\n */\n on(setBidAttachment, (state, action) => ({\n ...state,\n attachmentToEntity: action.attachmentToEntity,\n addBidAttachmentInProgress: true,\n addBidAttachmentStatus: null,\n })),\n on(setBidAttachmentSuccess, (state, action) => ({\n ...state,\n addedBidAttachment: action.addedBidAttachment,\n addBidAttachmentInProgress: false,\n addBidAttachmentStatus: UpdateStatus.OK,\n })),\n on(setBidAttachmentFail, (state, action) => ({\n ...state,\n addedBidAttachment: null,\n addBidAttachmentInProgress: false,\n addBidAttachmentStatus: UpdateStatus.ERROR,\n })),\n on(clearAddedBidAttachment, (state, action) => ({\n ...state,\n addedBidAttachment: null,\n bidAttachments: [],\n })),\n\n /**\n * get appliance\n */\n on(getAppliance, (state, action) => ({\n ...state,\n applianceLoading: true,\n emptyTurnoverData: false,\n })),\n on(getApplianceSuccess, (state, action) => ({\n ...state,\n appliance: action.appliance,\n applianceLoading: false,\n emptyTurnoverData: false,\n })),\n on(getApplianceFailed, (state, action) => ({\n ...state,\n appliance: null,\n applianceLoading: false,\n emptyTurnoverData: true,\n })),\n\n /**\n * get workflow step comment list\n */\n on(getWorkflowStepCommentList, (state, action) => ({\n ...state,\n workflowStepCommentListLoading: true,\n })),\n on(clearWorkflowStepCommentList, state => ({\n ...state,\n workflowStepCommentList: null,\n workflowStepCommentListLoading: false,\n })),\n on(getWorkflowStepCommentListSuccess, (state, action) => ({\n ...state,\n workflowStepCommentList: action.workflowStepCommentList,\n workflowStepCommentListLoading: false,\n })),\n on(getWorkflowStepCommentListFailed, (state, action) => ({\n ...state,\n workflowStepCommentList: [],\n workflowStepCommentListLoading: false,\n })),\n\n /**\n * add workflow step comment\n */\n on(addWorkflowStepComment, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: true,\n })),\n on(addWorkflowStepCommentSuccess, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n on(addWorkflowStepCommentFailed, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n\n /**\n * update workflow step comment\n */\n on(updateWorkflowStepComment, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: true,\n })),\n on(updateWorkflowStepCommentSuccess, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n on(updateWorkflowStepCommentFailed, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n\n /**\n * delete turnover\n */\n on(deleteTurnover, (state, action) => ({\n ...state,\n deleteTurnoverInProgress: true,\n turnoverDeleteStatus: null,\n })),\n on(deleteTurnoverSuccess, (state, action) => ({\n ...state,\n deleteTurnoverInProgress: false,\n turnoverDeleteStatus: UpdateStatus.DELETED,\n })),\n on(deleteTurnoverFailed, (state, action) => ({\n ...state,\n deleteTurnoverInProgress: false,\n turnoverDeleteStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * delete turnover attachment\n */\n on(deleteTurnoverAttachment, (state, action) => ({\n ...state,\n deleteTurnoverAttachmentInProgress: true,\n turnoverDeleteAttachmentStatus: null,\n })),\n on(deleteTurnoverAttachmentSuccess, (state, action) => ({\n ...state,\n deleteTurnoverAttachmentInProgress: false,\n turnoverDeleteAttachmentStatus: UpdateStatus.DELETED,\n })),\n on(deleteTurnoverAttachmentFailed, (state, action) => ({\n ...state,\n deleteTurnoverAttachmentInProgress: false,\n turnoverDeleteAttachmentStatus: UpdateStatus.ERROR,\n })),\n\n /**\n * delete file from repository\n */\n on(deleteFileFromRepositorySuccess, (state, action) => ({\n ...state,\n deleteTurnoverAttachmentInProgress: false,\n })),\n on(deleteFileFromRepositoryFailed, (state, action) => ({\n ...state,\n deleteTurnoverAttachmentInProgress: false,\n })),\n\n /**\n * delete workflow step comment\n */\n on(deleteWorkflowStepComment, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: true,\n })),\n on(deleteWorkflowStepCommentSuccess, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n on(deleteWorkflowStepCommentFailed, (state, action) => ({\n ...state,\n workflowStepCommentUpdateLoading: false,\n })),\n\n /**\n * get turnover attachments\n */\n on(getTurnoverAttachments, (state, action) => ({\n ...state,\n allAttachmentsLoading: true,\n })),\n on(getTurnoverAttachmentsSuccess, (state, action) => ({\n ...state,\n allAttachments: action.allAttachments,\n allAttachmentsLoading: false,\n })),\n on(getTurnoverAttachmentsFailed, clearTurnoverAttachments, (state, action) => ({\n ...state,\n allAttachments: [],\n allAttachmentsLoading: false,\n })),\n /**\n * get ticket\n */\n on(getTicket, (state, action) => ({\n ...state,\n ticketLoading: true,\n })),\n on(getTicketSuccess, (state, action) => ({\n ...state,\n ticket: action.restTicketModel,\n ticketLoading: false,\n })),\n on(getTicketFailed, (state, action) => ({\n ...state,\n ticket: null,\n ticketLoading: false,\n })),\n on(getTicketFailed, (state, action) => ({\n ...state,\n ticket: null,\n ticketLoading: false,\n })),\n\n /**\n * get ticket attachments\n */\n on(getTicketAttachments, (state, action) => ({\n ...state,\n ticketAttachmentsLoading: true,\n })),\n on(getTicketAttachmentsSuccess, (state, action) => ({\n ...state,\n ticketAttachments: action.ticketAttachments,\n ticketAttachmentsLoading: false,\n })),\n on(getTicketAttachmentsFailed, (state, action) => ({\n ...state,\n ticketAttachments: [],\n ticketAttachmentsLoading: false,\n })),\n\n /**\n * clear ticket preview\n */\n on(clearTicketPreview, (state, action) => ({\n ...state,\n ticketAttachments: [],\n ticket: null,\n newTurnoverTicket: null,\n })),\n\n /**\n * RADIO BUTTON DROPDOWN LISTS\n */\n on(setCompanyRadioList, (state, action) => ({\n ...state,\n companyRadioList: action.companyRadioList,\n })),\n on(setCompanyNameRadioList, (state, action) => ({\n ...state,\n companyNameRadioList: action.companyNameRadioList,\n })),\n on(setCompanyEmailRadioList, (state, action) => ({\n ...state,\n companyEmailRadioList: action.companyEmailRadioList,\n })),\n on(setApplianceTypeList, (state, action) => ({\n ...state,\n applianceTypeList: action.applianceTypeList,\n })),\n\n on(setColorTypeList, (state, action) => ({\n ...state,\n colorTypeList: action.colorTypeList,\n })),\n\n on(setUserList, (state, action) => ({\n ...state,\n userList: action.userList,\n })),\n\n on(setUserListModel, (state, action) => ({\n ...state,\n userListModel: action.userListModel,\n })),\n\n on(setAllUserRadioList, (state, action) => ({\n ...state,\n allUserRadioList: action.allUserRadioList,\n })),\n on(setAllUserList, (state, action) => ({\n ...state,\n allUserList: action.allUserList,\n })),\n\n on(cleanTurnoverStore, state => ({\n ...state,\n ...initialState,\n })),\n // on(loadWorkflowAssignmentsByPropertyAndStepId, (state, action) => ({\n // ...state,\n // workflowStepAssignmentLoading: true,\n // })),\n on(workflowAssignmentsByPropertyAndStepIdSucceded, (state, action) => ({\n ...state,\n workflowStepAssigneeId: action.workflowStepAssigneeId,\n workflowStepAssignmentLoading: false,\n })),\n on(reloadAppliancesNeeded, (state, action) => ({\n ...state,\n reloadAppliancesNeeded: true,\n })),\n on(reloadAppliancesNeededEnd, (state, action) => ({\n ...state,\n reloadAppliancesNeeded: false,\n })),\n on(setStepInfo, (state, action) => ({\n ...state,\n stepInfo: action.stepInfo,\n })),\n on(inspectTurnover, (state, action) => ({\n ...state,\n inspectTurnoverId: action.inspectTurnoverId,\n })),\n\n on(updateValidationParams, (state, action) => ({\n ...state,\n validationParams: { ...state.validationParams, ...action.validationParams },\n })),\n on(resetKanbanCounters, (state, action) => ({\n ...state,\n allPropertyIds: [],\n })),\n on(setAllPropertyIds, (state, action) => ({\n ...state,\n allPropertyIds: action.allPropertyIds,\n })),\n on(setActiveSections, (state, action) => ({\n ...state,\n activePropertyIds: action.activePropertyIds,\n })),\n\n on(setInactiveFilteredSections, (state, action) => ({\n ...state,\n inactiveFilteredPropertyIds: action.inactiveFilteredPropertyIds,\n })),\n\n on(setStepAssignee, (state, action) => ({\n ...state,\n updateStepAssigneeInProgress: true,\n updateStepAssigneeStatus: UpdateStatus.UPDATE,\n })),\n on(setStepAssigneeSuccess, (state, action) => ({\n ...state,\n updateStepAssigneeInProgress: false,\n updateStepAssigneeStatus: UpdateStatus.OK,\n })),\n on(setStepAssigneeFailed, (state, action) => ({\n ...state,\n updateStepAssigneeInProgress: false,\n updateStepAssigneeStatus: UpdateStatus.ERROR,\n })),\n\n on(getDefaultTurnoversAssignees, (state, action) => ({\n ...state,\n defaultTurnoversAssigneesLoading: true,\n })),\n on(getDefaultTurnoversAssigneesSuccess, (state, action) => ({\n ...state,\n defaultTurnoversAssignees: action.defaultTurnoversAssignees,\n defaultTurnoversAssigneesLoading: false,\n })),\n on(getDefaultTurnoversAssigneesFailed, (state, action) => ({\n ...state,\n defaultTurnoversAssignees: [],\n defaultTurnoversAssigneesLoading: false,\n })),\n on(setDisplayedPropertyList, (state, action) => ({\n ...state,\n displayedPropertyList: action.displayedPropertyList,\n })),\n on(setSectionLostRevenue, (state, action) => ({\n ...state,\n sectionsLostRevenue: {\n ...state.sectionsLostRevenue,\n [action.propertyId]: action.lostRevenue,\n },\n })),\n on(clearTurnoverTimers, state => ({\n ...state,\n timers: [],\n })),\n on(turnoverTimersLoaded, (state, action) => ({\n ...state,\n timers: action.timers,\n }))\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromPunchReducer from '../reducers/punch.reducer';\n\nconst selectPunchState = createFeatureSelector(fromPunchReducer.punchFeatureKey);\n\nexport const selectPunchesByTurnoverId = createSelector(selectPunchState, state => state.punchesByTurnoverId);\nexport const selectPunchesByTurnoverIdLoading = createSelector(\n selectPunchState,\n state => state.punchesByTurnoverIdLoading\n);\n\nexport const selectSelectedPunch = createSelector(selectPunchState, state => state.selectedPunch);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { TurnoverBidsState, turnoverBidsFeatureKey } from '@main-application/turnovers/reducers/turnover-bids.reducer';\n\nconst selectTurnoverBidsState = createFeatureSelector(turnoverBidsFeatureKey);\n\nexport const selectTurnoverBids = createSelector(selectTurnoverBidsState, state => state.bids);\n\nexport const selectTurnoverBidCategories = createSelector(selectTurnoverBidsState, state => state.bidCategories);\n\nexport const selectTurnoverBidAdding = createSelector(selectTurnoverBidsState, state => state.bidAdding);\n\nexport const selectTurnoverBidsLoading = createSelector(selectTurnoverBidsState, state => state.bidsLoading);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport * as fromTurnovers from '@main-application/turnovers/reducers/turnovers.reducer';\n\nexport const selectTurnoversState = createFeatureSelector(fromTurnovers.turnoversFeatureKey);\n\n/**\n * get created turnover id\n */\nexport const selectCreatedTurnover = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.createdTurnover\n);\nexport const selectCreateTurnoverLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.createTurnoverLoading\n);\n\n/**\n * get turnover data\n */\nexport const selectTurnoverData = createSelector(selectTurnoversState, turnoversState => turnoversState.turnoverData);\nexport const selectTurnoverUnitName = createSelector(selectTurnoverData, turnoverData => turnoverData?.unitName);\nexport const selectTurnoverDataId = createSelector(selectTurnoverData, turnoverData => turnoverData?.id);\nexport const selectUpdatedTurnoverData = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updatedTurnoverData\n);\nexport const selectTurnoverDataLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.turnoverDataLoading\n);\nexport const selectEmptyTurnoverData = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.emptyTurnoverData\n);\n\n/**\n * Set workflow step\n */\nexport const selectSetWorkflowStepLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.setWorkflowStepLoading\n);\nexport const selectSetWorkflowStepStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.setWorkflowStepStatus\n);\nexport const selectNextWorkflowStep = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.nextWorkflowStep\n);\n\n/**\n * get current workflow step\n */\n\nexport const selectCurrentWorkflowStep = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.currentWorkflowStep\n);\n/**\n * get current workflow step model\n */\n\nexport const selectCurrentWorkflowStepModel = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.currentWorkflowStepModel\n);\n\n/**\n * get appliance type list\n */\nexport const selectApplianceTypeList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.applianceTypeList\n);\n\n/**\n * get color type list\n */\nexport const selectColorTypeList = createSelector(selectTurnoversState, turnoversState => turnoversState.colorTypeList);\n\n/**\n * select NewApplianceNeededLoading\n */\n\nexport const selectIsNewApplianceNeededAdd = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.isNewApplianceNeededAdd\n);\n\nexport const selectAddNewApplianceNeededLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addNewApplianceNeededLoading\n);\n\n/**\n * get user list\n */\nexport const selectUserList = createSelector(selectTurnoversState, turnoversState => turnoversState.userList);\n\nexport const selectAllUserRadioList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.allUserRadioList\n);\n\nexport const selectAllUserList = createSelector(selectTurnoversState, turnoversState => turnoversState.allUserList);\n\nexport const selectListModel = createSelector(selectTurnoversState, turnoversState => turnoversState.userListModel);\n\n/**\n * get company radio list\n */\nexport const selectCompanyRadioList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.companyRadioList\n);\nexport const selectCompanyNameRadioList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.companyNameRadioList\n);\nexport const selectCompanyEmailRadioList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.companyEmailRadioList\n);\n\n/**\n * select Added Attachment\n */\nexport const selectAddedAttachment = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addedAttachment\n);\n\nexport const selectAddedBidAttachment = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addedBidAttachment\n);\n\nexport const selectAddBidAttachmentInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addBidAttachmentInProgress\n);\n\nexport const selectAddBidAttachmentStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addBidAttachmentStatus\n);\n\nexport const selectAddedTicketAttachment = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addedTicketAttachment\n);\n\nexport const selectAddTurnoverAttachmentStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addTurnoverAttachmentStatus\n);\n\nexport const selectAddTurnoverAttachmentInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.addTurnoverAttachmentInProgress\n);\n/**\n * select update attachment\n */\n\nexport const selectUpdateTurnoverAttachmentInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updateTurnoverAttachmentInProgress\n);\n\nexport const selectUpdateTurnoverAttachmentStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updateTurnoverAttachmentStatus\n);\n\n/**\n * select remove attachment\n */\n\nexport const selectDeleteTurnoverAttachmentInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.deleteTurnoverAttachmentInProgress\n);\n\n/**\n * Is new bid added\n */\nexport const selectNewBidList = createSelector(selectTurnoversState, turnoversState => turnoversState.newBidList);\nexport const selectNewBidListInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.newBidListInProgress\n);\n\n/**\n * turnover ticket\n */\nexport const selectTurnoverTicketList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.turnoverTicketList\n);\n\nexport const selectTurnoverTicketListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.turnoverTicketListLoading\n);\n\nexport const selectUpdateTicketInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updateTicketInProgress\n);\n\n/**\n * select newTurnoverTicket\n */\nexport const selectNewTurnoverTicket = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.newTurnoverTicket\n);\nexport const selectNewTurnoverTicketLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.newTurnoverTicketLoading\n);\n\n/**\n * select updated Turnover Ticket\n */\nexport const selectUpdatedTurnoverTicket = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.editedTicket\n);\nexport const selectSelectedTicket = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.selectedTicket\n);\nexport const selectSelectedTicketLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.selectedTicketLoading\n);\n\n/**\n * get company list\n */\nexport const selectCompanyList = createSelector(selectTurnoversState, turnoversState => turnoversState.companyList);\nexport const selectCompanyListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.companyListLoading\n);\n\n/**\n * get bid turnover list\n */\nexport const selectBidTurnoverList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidTurnoverList\n);\nexport const selectBidTurnoverListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidTurnoverListLoading\n);\n\n/**\n * get bid turnover list\n */\nexport const selectAllBidList = createSelector(selectTurnoversState, turnoversState => turnoversState.allBidList);\nexport const selectAllBidListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.allBidListLoading\n);\n\n/**\n * get bid company list\n */\nexport const selectBidCompanyList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidCompanyList\n);\nexport const selectBidCompanyListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidCompanyListLoading\n);\n\n/**\n * get turnover attachments\n */\nexport const selectAllAttachments = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.allAttachments\n);\nexport const selectAllAttachmentsLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.allAttachmentsLoading\n);\n\n/**\n * get bid\n */\nexport const selectBid = createSelector(selectTurnoversState, turnoversState => turnoversState.bid);\nexport const selectBidLoading = createSelector(selectTurnoversState, turnoversState => turnoversState.bidLoading);\nexport const selectUpdatedBid = createSelector(selectTurnoversState, turnoversState => turnoversState.updatedBid);\nexport const selectUpdatedBidLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updatedBidLoading\n);\nexport const selectUpdatedBidCommentLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updatedBidCommentLoading\n);\n\nexport const selectRejectBidLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.rejectBidLoading\n);\n\n/**\n * delete bid attachment\n */\nexport const selectDeleteBidAttachmentInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.deleteBidAttachmentInProgress\n);\nexport const selectDeleteBidAttachmentStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.deleteBidAttachmentStatus\n);\n\n/**\n * select bid attachment list\n */\nexport const selectBidAttachments = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidAttachments\n);\nexport const selectBidAttachmentsLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.bidAttachmentsLoading\n);\n\n/**\n * get appliance\n */\nexport const selectAppliance = createSelector(selectTurnoversState, turnoversState => turnoversState.appliance);\nexport const selectApplianceLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.applianceLoading\n);\n\n/**\n * get workflow step comment\n */\nexport const selectWorkflowStepCommentList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.workflowStepCommentList\n);\nexport const selectWorkflowStepCommentListLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.workflowStepCommentListLoading\n);\nexport const selectWorkflowStepCommentUpdateLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.workflowStepCommentUpdateLoading\n);\n\n/* get worflow assignment responsible part id */\nexport const selectWorkflowAssignmentAssigneeId = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.workflowStepAssigneeId\n);\nexport const selectWorkflowAssignmentLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.workflowStepAssignmentLoading\n);\n\nexport const selectReloadAppliancesNeeded = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.reloadAppliancesNeeded\n);\n\n/**\n * delete turnover\n */\n\nexport const selectDeleteTurnoverInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.deleteTurnoverInProgress\n);\n\nexport const selectTurnoverDeleteStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.turnoverDeleteStatus\n);\n\nexport const selectStepInfo = createSelector(selectTurnoversState, turnoversState => turnoversState.stepInfo);\n\n/**\n * get ticket\n */\nexport const selectTicket = createSelector(selectTurnoversState, turnoversState => turnoversState.ticket);\nexport const selectTicketLoading = createSelector(selectTurnoversState, turnoversState => turnoversState.ticketLoading);\n\n/**\n * get ticket attachments\n */\nexport const selectTicketAttachments = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.ticketAttachments\n);\nexport const selectTicketAttachmentsLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.ticketAttachmentsLoading\n);\n\n/**\n * update ticket preview\n */\nexport const selectTicketUpdateInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.ticketUpdateInProgress\n);\nexport const selectTicketUpdateInProgressStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.ticketUpdateInProgressStatus\n);\n\nexport const selectInspectTurnoverId = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.inspectTurnoverId\n);\n\nexport const selectValidationParams = createSelector(selectTurnoversState, turnoversState => ({\n lockFields: turnoversState.validationParams.lockFields,\n nextStepAvailable: turnoversState.validationParams.nextStepAvailable && turnoversState.validationParams.saveAvailable,\n nextStepChecking: turnoversState.validationParams.nextStepChecking,\n saveAvailable: turnoversState.validationParams.saveAvailable,\n customMessage: turnoversState.validationParams.customMessage,\n}));\n\n/**\n * counters\n */\n\nexport const selectAllPropertyIds = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.allPropertyIds\n);\n\nexport const selectActivePropertyIds = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.activePropertyIds\n);\n\nexport const selectIsActiveSection = propertyId =>\n createSelector(selectActivePropertyIds, activePropertyIds => activePropertyIds.includes(propertyId));\n\nexport const selectInactiveFilteredPropertyIds = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.inactiveFilteredPropertyIds\n);\n\nexport const selectIsInactiveFilteredSection = propertyId =>\n createSelector(selectInactiveFilteredPropertyIds, inactiveFilteredPropertyIds =>\n inactiveFilteredPropertyIds.includes(propertyId)\n );\n\n/**\n * update step assignee\n */\nexport const selectUpdateStepAssigneeInProgress = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updateStepAssigneeInProgress\n);\n\nexport const selectUpdateStepAssigneeStatus = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.updateStepAssigneeStatus\n);\n\n/**\n * default Turnovers Assignees\n */\nexport const selectDefaultTurnoversAssignees = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.defaultTurnoversAssignees\n);\n\nexport const selectDefaultTurnoversAssigneesLoading = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.defaultTurnoversAssigneesLoading\n);\n\nexport const selectDisplayedPropertyList = createSelector(\n selectTurnoversState,\n turnoversState => turnoversState.displayedPropertyList\n);\n\nexport const selectSectionsLostRevenue = createSelector(\n selectTurnoversState,\n turnoverState => turnoverState.sectionsLostRevenue\n);\n\nexport const selectTurnoverTimers = createSelector(selectTurnoversState, turnoverState => turnoverState.timers);\n","import { createAction, props } from '@ngrx/store';\n\nimport { EnumerationConfig } from '@shared/interfaces/enumeration-config';\n\nexport const loadEnumerations = createAction('[Dashboard] Load enumerations');\nexport const loadEnumerationsSuccess = createAction(\n '[Dashboard] Enumerations loaded successfully',\n props<{ enumerations: EnumerationConfig }>()\n);\nexport const loadEnumerationsFailed = createAction('[Dashboard] Enumerations loading failed');\n","import { createAction, props } from '@ngrx/store';\n\nimport { AttachmentSection } from '@shared/enums/attachment-section';\nimport { UploadedFileItem } from '@shared/interfaces/uploaded-file-item.interface';\n\nexport const loadFileUploads = createAction('[FileUpload] Load FileUploads');\n\n/**\n * upload file\n */\nexport const uploadFile = createAction(\n '[FileUpload] upload file',\n props<{ file: File; attachmentSection: AttachmentSection }>()\n);\nexport const uploadFileSuccess = createAction(\n '[FileUpload] upload file success',\n props<{ uploadedFileItem: UploadedFileItem }>()\n);\nexport const clearUploadedFile = createAction('[FileUpload] clear uploaded file');\nexport const uploadFileFail = createAction('[FileUpload] upload file fail');\n\n/**\n * delete file\n */\nexport const deleteFile = createAction('[FileUpload] delete file', props<{ fileId: number }>());\nexport const deleteFileSuccess = createAction('[FileUpload] delete file success');\nexport const deleteFileFailed = createAction('[FileUpload] delete file failed');\n","import { createAction, props } from '@ngrx/store';\n\nexport const setPreviousRoute = createAction('[App][Core] set previous route', props<{ previousRoute: string }>());\n","import { createAction, props } from '@ngrx/store';\n\nimport { RestPropertyModel } from '@shared/interfaces/rest-portfolio-model.interface';\nimport { TenantData } from '@shared/interfaces/tenant-data';\nimport { UserData } from '@shared/interfaces/user-data';\n\nexport const loadTenantData = createAction('[App][Core] Load tenant data');\nexport const loadUserTenantSucceeded = createAction('[App][Core] Load tenant data succeeded', props());\nexport const loadUserTenantFailed = createAction('[App][Core] Load tenant data failed');\n\nexport const loadUserData = createAction('[App][Core] Load user data');\nexport const loadUserDataSucceded = createAction('[App][Core] Load user data succeeded', props());\nexport const loadUserDataFailed = createAction('[App][Core] Load user data failed');\n\nexport const loadUserById = createAction('[App][Core] Load user by id', props<{ userId: number }>());\nexport const loadUserByIdSucceded = createAction('[App][Core] Load user by id succeded', props());\nexport const loadUserByIdFailed = createAction('[App][Core] Load user by id failed');\n\nexport const setUserGeneralRole = createAction('[App][Core] User general role update', props<{ roleName: string }>());\nexport const setAuthenticated = createAction('[App][Core] set authenticated', props<{ isAuthenticated: boolean }>());\n\nexport const loadAllUserProperties = createAction('[App][Core] Load all user properties');\nexport const loadAllUserPropertiesSucceeded = createAction(\n '[App][Core] Load all user properties succeeded',\n props<{ properties: RestPropertyModel[] }>()\n);\nexport const loadAllUserPropertiesFailed = createAction('[App][Core] Load all user properties failed');\n","import { createAction, props } from '@ngrx/store';\n\n/**\n * set window width\n */\nexport const setWindowWidth = createAction('[window-resize] set window width', props<{ windowWidth: number }>());\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n forwardRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[contenteditable][formControlName], [contenteditable][formControl], [contenteditable][ngModel]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ContentEditableDirective),\n multi: true,\n },\n ],\n})\nexport class ContentEditableDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {\n private onTouched = () => {};\n\n private onChange = (_value: string) => {};\n\n private observer: MutationObserver;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef,\n @Inject(Renderer2) private readonly renderer: Renderer2\n ) {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', 'true');\n }\n\n ngAfterViewInit() {\n this.observer = new MutationObserver(() => {\n this.onChange(this.elementRef.nativeElement.innerHTML);\n });\n\n this.observer.observe(this.elementRef.nativeElement, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n ngOnDestroy() {\n this.observer.disconnect();\n }\n\n @HostListener('input')\n onInput() {\n this.observer.disconnect();\n this.onChange(this.elementRef.nativeElement.innerHTML);\n }\n\n @HostListener('blur')\n onBlur() {\n this.onTouched();\n }\n\n writeValue(value: string) {\n this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', value || '');\n }\n\n registerOnChange(onChange: (value: string) => void) {\n this.onChange = onChange;\n }\n\n registerOnTouched(onTouched: () => void) {\n this.onTouched = onTouched;\n }\n\n setDisabledState(disabled: boolean): void {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'contenteditable', String(!disabled));\n }\n}\n","
    \n \n
    {{ text }}
    \n
    \n \n
    \n","import { ChangeDetectionStrategy, Component, Input, OnInit, TemplateRef } from '@angular/core';\n\n@Component({\n selector: 'app-custom-tooltip',\n templateUrl: './custom-tooltip.component.html',\n styleUrls: ['./custom-tooltip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CustomTooltipComponent implements OnInit {\n @Input() text: string;\n @Input() contentTemplate: TemplateRef;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n TemplateRef,\n} from '@angular/core';\n\nimport { CustomTooltipComponent } from '@ui-components/components/custom-tooltip/custom-tooltip.component';\n\n@Directive({\n selector: '[appCustomTooltip]',\n})\nexport class CustomTooltipDirective implements OnInit, OnDestroy {\n @Input('customToolTip') text: string;\n @Input() contentTemplate: TemplateRef;\n\n @Input() set showToolTip(showToolTip: boolean) {\n if (!showToolTip) {\n return;\n }\n\n const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 5,\n },\n ]);\n\n this.overlayRef = this.overlay.create({ positionStrategy });\n }\n\n private overlayRef: OverlayRef;\n\n constructor(\n private overlay: Overlay,\n private overlayPositionBuilder: OverlayPositionBuilder,\n private elementRef: ElementRef\n ) {}\n\n ngOnInit() {}\n\n @HostListener('mouseenter')\n show() {\n if (this.overlayRef && !this.overlayRef.hasAttached()) {\n const tooltipRef: ComponentRef = this.overlayRef.attach(\n new ComponentPortal(CustomTooltipComponent)\n );\n tooltipRef.instance.text = this.text;\n tooltipRef.instance.contentTemplate = this.contentTemplate;\n }\n }\n\n @HostListener('mouseleave')\n hide() {\n this.closeToolTip();\n }\n\n ngOnDestroy() {\n this.closeToolTip();\n }\n\n private closeToolTip() {\n if (this.overlayRef) {\n this.overlayRef.detach();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CustomTooltipComponent } from './custom-tooltip.component';\n\n@NgModule({\n declarations: [CustomTooltipComponent],\n imports: [CommonModule],\n exports: [CustomTooltipComponent],\n})\nexport class CustomTooltipModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { ContentEditableDirective } from '@shared/directives/content-editable.directive';\nimport { DropZoneDirective } from '@shared/directives/drop-zone.directive';\nimport { HavePermissionDirective } from '@shared/directives/have-permission.directive';\nimport { CustomTooltipModule } from '@ui-components/components/custom-tooltip/custom-tooltip.module';\n\nimport { CustomTooltipDirective } from './custom-tooltip.directive';\nimport { LastElementDirective } from './last-element.directive';\nimport { SortHeaderDirective } from './sort-header.directive';\n\nconst DIRECTIVES = [\n HavePermissionDirective,\n SortHeaderDirective,\n LastElementDirective,\n CustomTooltipDirective,\n ContentEditableDirective,\n DropZoneDirective,\n];\n\n@NgModule({\n imports: [CommonModule, CustomTooltipModule, ReactiveFormsModule],\n declarations: [...DIRECTIVES],\n exports: [...DIRECTIVES],\n})\nexport class DirectivesModule {}\n","import { Directive, EventEmitter, HostBinding, HostListener, Input, Output } from '@angular/core';\n\n@Directive({\n selector: '[appDropZone]',\n})\nexport class DropZoneDirective {\n // The directive emits a `fileDrop` event\n // with the list of files dropped on the element\n // as an JS array of `File` objects.\n @Output('appDropZone') fileDrop = new EventEmitter>();\n\n // Disable dropping on the body of the document.\n // This prevents the browser from loading the dropped files\n // using it's default behaviour if the user misses the drop zone.\n // Set this input to false if you want the browser default behaviour.\n @Input() preventBodyDrop = true;\n\n // The `drop-zone-active` class is applied to the host\n // element when a drag is currently over the target.\n @HostBinding('class.drop-zone-active')\n active = false;\n\n @HostListener('drop', ['$event'])\n onDrop(event: DragEvent) {\n event.preventDefault();\n this.active = false;\n\n const { dataTransfer } = event;\n\n if (dataTransfer.items) {\n const files = [];\n for (let i = 0; i < dataTransfer.items.length; i++) {\n // If dropped items aren't files, reject them\n if (dataTransfer.items[i].kind === 'file') {\n files.push(dataTransfer.items[i].getAsFile());\n }\n }\n dataTransfer.items.clear();\n this.fileDrop.emit(files);\n } else {\n const files = dataTransfer.files;\n dataTransfer.clearData();\n this.fileDrop.emit(Array.from(files));\n }\n }\n\n @HostListener('dragover', ['$event'])\n onDragOver(event: DragEvent) {\n event.stopPropagation();\n event.preventDefault();\n this.active = true;\n }\n\n @HostListener('dragleave', ['$event'])\n onDragLeave(event: DragEvent) {\n this.active = false;\n }\n\n @HostListener('body:dragover', ['$event'])\n onBodyDragOver(event: DragEvent) {\n if (this.preventBodyDrop) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n @HostListener('body:drop', ['$event'])\n onBodyDrop(event: DragEvent) {\n if (this.preventBodyDrop) {\n event.preventDefault();\n }\n }\n}\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { filter, tap } from 'rxjs/operators';\n\nimport { PermissionLevelType } from '@shared/enums/permission-level.enum';\nimport { checkPermissionLevel } from '@shared/functions/check-permission-level.function';\nimport { selectUserPermissionLevel } from '@shared/selectors/user.selectors';\n\n@Directive({\n selector: '[appHavePermission]',\n})\n@UntilDestroy()\nexport class HavePermissionDirective implements OnInit, OnDestroy {\n permissionList: PermissionLevelType[] = [];\n permissionLevel: PermissionLevelType | PermissionLevelType[];\n\n constructor(\n private templateRef: TemplateRef,\n private viewContainer: ViewContainerRef,\n private store: Store<{}>\n ) {}\n\n @Input() set appHavePermission(permissionLevel: PermissionLevelType | PermissionLevelType[]) {\n this.permissionLevel = permissionLevel;\n this.checkPermission();\n }\n\n ngOnInit(): void {\n this.store\n .select(selectUserPermissionLevel)\n .pipe(\n untilDestroyed(this),\n filter((permissionList: PermissionLevelType[]) => !!permissionList),\n tap((permissionList: PermissionLevelType[]) => {\n this.permissionList = permissionList;\n this.checkPermission();\n })\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {}\n\n private checkPermission() {\n const hasPermission = checkPermissionLevel(this.permissionList, this.permissionLevel);\n this.viewContainer.clear();\n if (hasPermission) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n }\n }\n}\n","import { Directive, EventEmitter, Input, Output } from '@angular/core';\n\nimport { LastItemParam } from '@shared/interfaces/last-item-param';\n\n@Directive({\n selector: '[appLastElement]',\n})\nexport class LastElementDirective {\n @Output() lastElementLoaded = new EventEmitter();\n\n @Input() set isLastElement(lastItemParam: LastItemParam) {\n if (lastItemParam.value && lastItemParam.itemsCount) {\n this.lastElementLoaded.emit();\n }\n }\n\n constructor() {}\n}\n","import { Directive, ElementRef, EventEmitter, HostListener, Input, Output, Renderer2 } from '@angular/core';\nimport { SortDirection } from '@angular/material/sort';\n\nimport { SortItem } from '@shared/interfaces/sort-item';\n\n@Directive({\n selector: '[appSortHeader]',\n})\nexport class SortHeaderDirective {\n currentDirection: SortDirection = '';\n ariaDirection = 'none';\n\n @Input() fieldName = '';\n @Output() sortEvent: EventEmitter = new EventEmitter();\n\n @HostListener('click', ['$event']) onClick() {\n this.changeDirection();\n this.sortAction();\n }\n\n constructor(private elementRef: ElementRef, private renderer: Renderer2) {\n this.renderer.addClass(this.elementRef.nativeElement, 'app-sort-header');\n this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-sort', this.ariaDirection);\n }\n\n private changeDirection() {\n switch (this.currentDirection) {\n case '':\n {\n this.currentDirection = 'asc';\n this.ariaDirection = 'ascending';\n }\n break;\n case 'asc':\n {\n this.currentDirection = 'desc';\n this.ariaDirection = 'descending';\n }\n break;\n case 'desc':\n {\n this.currentDirection = '';\n this.ariaDirection = 'none';\n }\n break;\n }\n this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-sort', this.ariaDirection);\n }\n\n private sortAction() {\n if (this.fieldName) {\n this.sortEvent.emit({\n field: this.fieldName,\n direction: this.currentDirection,\n });\n }\n }\n}\n","export enum PortfolioAttachmentType {\n None = 'None',\n PrimaryPhoto = 'PrimaryPhoto',\n Photo = 'Photo',\n Avatar = 'Avatar',\n ArticlesOfIncorporation = 'ArticlesOfIncorporation',\n Prospectus = 'Prospectus',\n Brochure = 'Brochure',\n}\n\nexport enum PropertyAttachmentType {\n None = 'None',\n PrimaryPhoto = 'PrimaryPhoto',\n Photo = 'Photo',\n Avatar = 'Avatar',\n RentalApplication = 'RentalApplication',\n LeaseAgreement = 'LeaseAgreement',\n}\n\nexport enum UnitAttachmentType {\n None,\n PrimaryPhoto,\n Photo,\n CurrentLease,\n FloorPlan,\n}\n\nexport enum TurnoverAttachmentType {\n None,\n Summary,\n ScopeOfWork,\n Photo,\n Other,\n InspectionReport,\n}\n\nexport enum ApplianceAttachmentType {\n None = 'None',\n Order = 'Order',\n Warranty = 'Warranty',\n Manual = 'Manual',\n InstallationGuide = 'InstallationGuide',\n}\n\nexport enum BidAttachmentType {\n None,\n FilledScopeOfWork,\n Photo,\n}\n\nexport enum TicketAttachmentType {\n None,\n Attachment,\n}\n","export enum DashboardMode {\n SUPER_USER = 'SUPER_USER',\n PROPERTY_MANAGER = 'PROPERTY_MANAGER',\n ASSET_MANAGER = 'ASSET_MANAGER',\n CONSTRUCTION_MANAGER = 'CONSTRUCTION_MANAGER',\n ADMINISTRATOR_LEVEL_ONE = 'ADMINISTRATOR_LEVEL_ONE',\n ADMINISTRATOR_LEVEL_TWO = 'ADMINISTRATOR_LEVEL_TWO',\n}\n","export enum EnumerationItemFields {\n enumerationValue = 'enumerationValue',\n enumerationGroup = 'enumerationGroup',\n simpleText = 'simpleText',\n displayText = 'displayText',\n fullDescription = 'fullDescription',\n fullyqualifiedUrn = 'fullyqualifiedUrn',\n}\n","export enum KpiType {\n Inventory,\n Time = 1,\n All = 2,\n}\n","export enum KpiWindowType {\n OpenTurns = 1,\n Days30 = 30,\n Days60 = 60,\n Days90 = 90,\n Months6 = 6,\n Months12 = 12,\n}\n","export enum TicketType {\n Ticket = 1,\n Punch = 2,\n}\n","import { PermissionLevelType } from '@shared/enums/permission-level.enum';\n\nexport function checkPermissionLevel(\n permissionList: PermissionLevelType[],\n permissionLevel: PermissionLevelType | PermissionLevelType[],\n check: 'all' | 'any' = 'all'\n): boolean {\n if (!permissionList?.length) {\n return false;\n }\n\n if (!permissionLevel) {\n return true;\n }\n\n if (!Array.isArray(permissionLevel)) {\n permissionLevel = [permissionLevel];\n }\n\n /**\n * Check if superuser\n */\n if (permissionList.filter(value => value === PermissionLevelType.AllPermissions).length) {\n return true;\n }\n\n if (check == 'any') {\n return permissionLevel.some(v => permissionList.includes(v));\n }\n return !permissionLevel.some(v => !permissionList.includes(v));\n}\n","import { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestTurnoverBidCategory } from '@shared/interfaces/turnover-bids.interface';\n\nexport function getBidCategoriesRadioList(categories: RestTurnoverBidCategory[]): IRadioButtonOption[] {\n return categories.map>(item => {\n return {\n value: item.id,\n label: `${item.name}`,\n };\n });\n}\n","import { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\nexport function getCompanyRadioList(companyList: RestCompanyModel[]): IRadioButtonOption[] {\n return (companyList || [])\n .filter(item => item.isActive)\n .map>(item => {\n return {\n value: item.id,\n label: `${item.displayName}`,\n };\n });\n}\n","import { getUtc } from '@shared/functions/get-utc.function';\n\nexport function getDateObjectFunction(date: Date | string): Date {\n return date ? getUtc(date) : null;\n}\n","import { EnumerationItemFields } from '@shared/enums/enumeration-item-fields';\nimport { EnumerationItem } from '@shared/interfaces/enumeration-item';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\nexport function getEnumerationRadioListFunction(\n enumerationItems: EnumerationItem[],\n nullValueLabel = 'All',\n withNullValue = true,\n valueKey = EnumerationItemFields.enumerationValue\n): IRadioButtonOption[] {\n const list: IRadioButtonOption[] = [];\n\n if (withNullValue) {\n list.push({\n label: nullValueLabel,\n value: null,\n });\n }\n\n (enumerationItems || []).forEach(item => {\n list.push({\n value: item[valueKey] as T,\n label: item.displayText,\n });\n });\n\n return list;\n}\n","import { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestPropertyModel } from '@shared/interfaces/rest-portfolio-model.interface';\n\nexport function getPortfolioProperties(userProperties: RestPropertyModel[]): IRadioButtonOption[] {\n return userProperties\n .map>(item => {\n return {\n value: item.id,\n label: item.name,\n };\n })\n .sort((a, b) => a.label.localeCompare(b.label));\n}\n","import { UserType } from '@shared/enums/user-type';\nimport {\n IRadioButtonOption,\n ITooltipRadioButtonOption,\n IUserRadioButtonOption,\n} from '@shared/interfaces/radio-button-option.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\nexport function getUserList(users: RestUserModel[]): IUserRadioButtonOption[] {\n const map: any = {};\n return users\n .filter(item => !!item.id)\n .map(item => {\n let defaultLabel = `${item.firstName} ${item.lastName}`;\n if (!item.firstName && !item.lastName) {\n defaultLabel = item.email;\n }\n\n let label = '';\n if (item.firstName && item.lastName) {\n let charAmount = 1;\n label = `${item.firstName} ${item.lastName.substring(0, charAmount).toUpperCase()}`;\n while (map[label]) {\n charAmount++;\n label = (\n item.lastName.length >= charAmount\n ? `${item.firstName} ${item.lastName.substring(0, charAmount)}`\n : `${item.firstName} ${item.lastName} ${item.lastName.length - charAmount + 1}`\n ).trim();\n }\n }\n\n if (!label) {\n label = defaultLabel;\n } else if (map[label]) {\n label = defaultLabel;\n }\n map[label] = true;\n return {\n value: item.id,\n label,\n tooltip: defaultLabel,\n userGroupType: item.userGroupType,\n };\n });\n}\n\nexport function getUserOrVendorList(users: RestUserModel[]): IRadioButtonOption[] {\n return users\n .filter(item => !!item.id)\n .map>(item => {\n return item.userGroupType === UserType.Contractor\n ? {\n value: item.id,\n label: item.companyName,\n }\n : {\n value: item.id,\n label: `${item.firstName} ${item.lastName}`,\n };\n });\n}\n\nexport function getUserOrVendorItems(users: RestUserModel[]): IRadioButtonOption[] {\n return users\n .filter(item => !!item.id)\n .map>(item => {\n return item.userGroupType === UserType.Contractor\n ? {\n value: item,\n label: item.companyName,\n }\n : {\n value: item,\n label: `${item.firstName} ${item.lastName}`,\n };\n });\n}\n\nexport function getUserItems(users: RestUserModel[]): IRadioButtonOption[] {\n return users\n .filter(item => !!item.id)\n .map>(item => {\n return {\n value: item,\n label: `${item.firstName} ${item.lastName}`,\n };\n });\n}\n\nexport function getInternalUserList(users: RestUserModel[]): IRadioButtonOption[] {\n return users\n .filter(item => !!item.id && item.userGroupType === UserType.Employee)\n .map>(item => {\n return {\n value: item.id,\n label: `${item.firstName} ${item.lastName}`,\n };\n });\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';\nimport { OidcSecurityService } from 'angular-auth-oidc-client';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { AppRoutes } from '@shared/constants/app-routes.const';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard implements CanActivate {\n isOidcModuleReady = false;\n public onOidcModuleSetup: Observable;\n\n constructor(private oidcSecurityService: OidcSecurityService, private router: Router) {}\n\n canActivate(route: ActivatedRouteSnapshot): boolean | Observable {\n return this.oidcSecurityService.isAuthenticated$.pipe(\n map(isAuthorized => {\n if (!isAuthorized.isAuthenticated) {\n this.router\n .navigate([AppRoutes.LOGIN], {\n queryParams: {\n returnUrl: window.location.href,\n },\n })\n .then();\n }\n return isAuthorized.isAuthenticated;\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, UrlTree } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { UserService } from '@app/services/user.service';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { UserType } from '@shared/enums/user-type';\nimport { UserData } from '@shared/interfaces/user-data';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResidentGuard implements CanActivate {\n constructor(private userService: UserService, private router: Router) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable {\n return this.userService.getCashedUserData().pipe(\n filter((userData: UserData) => !!userData),\n map((userData: UserData) => {\n if (userData.userType !== UserType.Resident) {\n return true;\n }\n return this.router.createUrlTree([AppRoutes.RESIDENT]);\n })\n );\n }\n}\n","import { RestTurnStepScheduleModel } from '@main-application/boards/interfaces/board';\nimport { BoardProgressType, BoardSourceType } from '@main-application/boards/interfaces/board.enums';\nimport { TicketAttachmentType, TurnoverAttachmentType } from '@shared/enums/attachment-type';\nimport { MoveOutType } from '@shared/enums/move-out-type.enum';\nimport { PreleaseAmountPaidType } from '@shared/enums/prelease-amount-paid-type';\nimport { PriorityType } from '@shared/enums/priority-type';\nimport { TicketStatusType } from '@shared/enums/ticket-status-type';\nimport { TicketType } from '@shared/enums/ticket-type';\nimport { UnitConditionType } from '@shared/enums/unit-condition.enum';\nimport { UserType } from '@shared/enums/user-type';\nimport { WorkflowPhaseType } from '@shared/enums/workflow-phase-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { RestBidModel } from '@shared/interfaces/bid.interface';\nimport { RestWorkflowStepCommentModel } from '@shared/interfaces/comments.interface';\nimport { RestListingPlatformModel } from '@shared/interfaces/listing-platform.interface';\nimport { RestPortfolioModel, RestPropertyModel } from '@shared/interfaces/property.interface';\nimport { RestTimerInstanceModel } from '@shared/interfaces/rest-timer-instance-model';\nimport { RestUnitModel } from '@shared/interfaces/unit.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { AttachmentType } from '@shared/types/attachment-type.type';\n\nexport interface TurnoverHeaderData {\n turnoverId: number;\n propertyName: string;\n unitName: string;\n currentTurnoverStep: WorkflowStepEnumType;\n moveOutType: MoveOutType;\n}\n\nexport interface RestAddressModel {\n propertyToAddressLinkId: number;\n Id: number;\n addressType: number;\n addressTypeUrn: string;\n title: string;\n street1: string;\n street2: string;\n city: string;\n state: string;\n zip: string;\n url: string;\n}\n\nexport interface RestWorkflowInstanceModel {\n id: number;\n turnoverId?: number;\n templateId?: number;\n isActive: boolean;\n isCompleted: boolean;\n completedUserId?: number;\n dateStarted?: Date;\n dateCompleted?: string;\n parentStepId?: number;\n workflowStepTemplateType: number;\n workflowStepEnumType: WorkflowStepEnumType;\n //int AssignmentRuleId: number // 0: N/A, 1: individual, 2: role: 3: creator\n //int? AssignmentObjectId?: number\n name: string;\n fullyQualifiedUrn: string;\n sortOrder: number;\n responsiblePartyId: number;\n responsiblePartyType: UserType;\n dueDate?: string;\n priority?: PriorityType;\n}\n\nexport interface RestMailingAddressModel {\n id: number;\n mailAddress: string;\n companyId: number;\n}\n\nexport interface RestTypedTurnoverAttachment {\n id: number;\n dateCreated?: string;\n dateUpdated?: string;\n isActive?: boolean;\n fileUploadId?: number;\n internalName?: string;\n originalFileName?: string;\n size?: number;\n url?: string;\n attachmentTypeUrn?: string;\n title?: string;\n description?: string;\n turnoverAttachmentType?: TurnoverAttachmentType;\n externalUrl?: string;\n}\n\nexport interface RestTurnoverAttachmentList {\n summary: RestTypedTurnoverAttachment;\n scopeOfWork: RestTypedTurnoverAttachment;\n photo: RestTypedTurnoverAttachment;\n other: RestTypedTurnoverAttachment;\n none: RestTypedTurnoverAttachment[];\n}\n\nexport interface TurnoverStepInfo {\n isStepNotAvailable: boolean;\n isStepCompleted: boolean;\n isTurnoverDeleted: boolean;\n isTurnoverComplete: boolean;\n turnoverDateDeleted?: Date | string;\n turnoverDateCompleted?: Date | string;\n}\n\nexport function isRestTurnoverDataModel(object: any): object is RestTurnoverDataModel {\n return (\n typeof object === 'object' &&\n typeof object.id === 'number' &&\n typeof object.unitId === 'number' &&\n typeof object.unitName === 'string'\n );\n}\n\nexport interface RestTurnoverDataModel {\n id: number;\n unitId: number;\n createdById: number;\n activeWorkflowStepId: number;\n propertyManagerId: number;\n propertyManager: RestUserModel;\n bulkScopeAndBidId: number;\n turnoverPriorityType: PriorityType;\n unitName: string;\n activeWorkflowStepType: WorkflowStepEnumType;\n constructionCost?: number;\n newRent?: number;\n newRentOverride?: number;\n oldRent?: number;\n oldRentOverride?: number;\n advertisedRent?: number;\n advertisedRentOverride?: number;\n marketRent?: number;\n marketRentOverride?: number;\n additionalData?: any;\n\n dateCreated: Date | string;\n dateUpdated: Date | string;\n dateCompleted: Date | string;\n dateCanceled: Date | string;\n dateMoveOut: Date;\n pmsMoveOutDate: Date | string;\n dateMoveIn: Date;\n dateShowable: Date | string;\n turnoverStartDate: Date | string;\n turnoverEndDate: Date | string;\n lastRentDate: Date | string;\n\n isCompleted: boolean;\n isCanceled: boolean;\n isMoveOutCompleted: boolean;\n isMoveInCompleted: boolean;\n isAutoCreated: boolean;\n\n // MOVE OUT\n isOccupiedInspected: boolean;\n isVacantInspected: boolean;\n dateOccupiedInspected: Date | string;\n dateVacantInspected: Date | string;\n moveOutType: MoveOutType;\n unitConditionType: UnitConditionType;\n\n // MAKE READY\n // BID\n finish: number;\n newFinish: number;\n oldFinish: number;\n sendingType: number;\n mailingTemplateBody: string;\n dateOffersSentOut: Date | string;\n dateOfferExpires: Date | string;\n\n // RENO\n // PUNCH\n // APPROVAL\n\n // MARKETING\n listingDescription: string;\n arePhotosNeeded: boolean;\n rentRate: number;\n securityDeposit: number;\n dateAvailable: Date | string;\n isSecurityDepositNegotiable: boolean;\n\n // LEASE UP\n leaseExecutionDate: Date | string;\n\n // MOVE IN\n isRentPaid: boolean;\n areKeysExchanged: boolean;\n isDepositPaid: boolean;\n isDocumentationAddedToExternalSystem: boolean;\n firstMonthRent: Date | string;\n additionalRentOrFees: string;\n\n // additional fields\n propertyAddress: string;\n state: string;\n postalCode: string;\n\n preleaseTenantEmail: string;\n preleaseTenantFirstName: string;\n preleaseTenantSurname: string;\n\n createdBy: RestUserModel;\n unit: RestUnitModel;\n property: RestPropertyModel;\n portfolio: RestPortfolioModel;\n workflow: RestWorkflowInstanceModel[];\n workflowStepComments: RestWorkflowStepCommentModel[];\n tickets: RestTicketModel[];\n listingPlatforms: RestListingPlatformModel[];\n bids: RestBidModel[];\n mailingList: RestMailingAddressModel[];\n attachments: RestTurnoverAttachmentList;\n allAttachments: RestGenericTypedAttachment[];\n timerInstance: RestTimerInstanceModel;\n turnStepSchedules: RestTurnStepScheduleModel[];\n\n ticketsAllCount: number;\n ticketsInProgressCount: number;\n totalTimeElapsed: string;\n\n hasMoveOutLabel: boolean;\n hasMoveInLabel: boolean;\n hasOccupiedLabel: boolean;\n hasAvailableOnLabel: boolean;\n hasEvictLabel: boolean;\n\n moveOutCountdown: number;\n moveInCountdown: number;\n occupiedCountdown: number;\n evictCountDown: number;\n availableOnCountdown: number;\n\n boardConnections: BoardConnection[];\n inspectionSummary: InspectionSummary;\n}\n\nexport enum PreleaseFilterMode {\n Not,\n Kinda,\n Strict,\n}\n\nexport interface InspectionSummary {\n id: number;\n inspectionId: number;\n lastCompletedAreaName: string;\n lastCompletedAreaAt: Date;\n completedAreas: number;\n completedAt: Date;\n deletedAt: Date;\n isCompleted: false;\n isDeleted: false;\n totalNumberOfAreas: number;\n turnoverId: number;\n}\n\nexport interface BoardConnection {\n boardDataSource: BoardSourceType;\n boardProgressType: BoardProgressType;\n boardId: number;\n boardName: string;\n completedStepSchedules: number;\n isCompleted: boolean;\n stepSchedulesTotal: number;\n lastCompletedScheduleDate: string;\n lastCompletedScheduleName: string;\n nextScheduleDate: string;\n nextScheduleName: string;\n}\n\nexport interface PostTurnoverModel {\n unitId: number;\n propertyId?: number;\n turnoverStartDate?: Date;\n turnoverEndDate?: Date;\n dateMoveOut?: Date;\n startWorkflowStepType: WorkflowStepEnumType;\n}\n\nexport interface NonPmsModelModel {\n id?: number;\n propertyId?: number;\n name: string;\n}\n\nexport interface RestTicketModel {\n id: number;\n workflowPhaseType?: WorkflowPhaseType;\n workflowStepEnumType?: WorkflowStepEnumType;\n ticketStatusType?: TicketStatusType;\n ticketPriorityType?: PriorityType;\n name?: string;\n detailedInformation?: string;\n partyName?: string; // Company name if Assignee.UserType == Contractor\n dueDate?: Date | string;\n dateCreated?: Date | string;\n dateUpdated?: Date | string;\n dateCompleted?: Date | string;\n startDate?: Date | string;\n endDate?: Date | string;\n createdById?: number;\n createdBy?: RestUserModel;\n assigneeId?: number; // aka ResponsiblePartyId\n assignee?: RestUserModel; // aka ResponsibleParty\n turnoverId?: number;\n turnoverData?: RestTurnoverDataModel;\n attachments?: RestTicketAttachmentList;\n allAttachments?: RestGenericTypedAttachment[];\n unitName?: string;\n unitId?: number;\n ticketType?: TicketType;\n propertyName?: string;\n\n permission?: string;\n //description?: string; // is it clientFeedbackComment?\n ticketCategoryId: number;\n ticketCategory?: RestTicketCategoryModel;\n ticketTopicId: number;\n ticketTopic?: RestTicketSubCategoryModel;\n\n clientFeedbackRating: number;\n clientFeedbackSubmittedOn: Date;\n clientFeedbackRequestdOn: Date;\n clientFeedbackComment: string; //8142 - max\n clientFeedbackRequestReminderSent: number;\n}\n\nexport class RestTicketCategoryModel {\n id: number;\n name: string;\n isResidentPortalEnabled: boolean;\n topics: RestTicketSubCategoryModel[];\n}\n\nexport class RestTicketSubCategoryModel {\n id: number;\n name: string;\n ticketCategoryId: number;\n}\n\nexport interface TicketListItem extends RestTicketModel {\n ableToResolve?: boolean;\n}\n\nexport interface RestTicketAttachmentList {\n ticketCustomCategory: RestTypedTicketAttachment;\n Uncategorized: RestTypedTicketAttachment[];\n}\n\nexport interface RestTypedTicketAttachment {\n id: number;\n dateCreated?: string;\n dateUpdated?: string;\n isActive?: true;\n fileUploadId?: number;\n internalName?: string;\n originalFileName?: string;\n size?: number;\n url?: string;\n attachmentTypeUrn?: string;\n title?: string;\n description?: string;\n ticketAttachmentType?: TicketAttachmentType;\n}\n\nexport interface UpdateTypedAttachmentToEntityModel {\n attachmentId?: number;\n unitId?: number;\n propertyId?: number;\n portfolioId?: number;\n turnoverIds?: number[];\n applianceId?: number;\n bidId?: number;\n ticketId?: number;\n attachmentType?: AttachmentType;\n fileUploadId?: number;\n title: string;\n description: string;\n externalUrl: string;\n}\n\nexport interface RestTurnoverTaskModel {\n id?: number;\n portfolioId?: number;\n turnoverDataId?: number;\n turnoverData?: RestTurnoverDataModel;\n priority?: PriorityType;\n dueDate?: string;\n workflowPhaseType?: WorkflowPhaseType;\n unitName?: string;\n propertyName?: string;\n propertyId?: number;\n assigneeId?: number;\n phasePriority?: PriorityType;\n vacancyLoss: number;\n moveInCalendarPosition: number;\n moveOutCalendarPosition: number;\n isNonPms?: boolean; //ToDo: remove it, temporary field until non-PMS is not moved to unit\n isNew?: boolean; //FE field - flag for detecting just adding turns\n}\n\nexport function isRestTurnoverTaskModel(object: any): object is RestTurnoverTaskModel {\n return typeof object === 'object' && typeof object.id === 'number' && isRestTurnoverDataModel(object.turnoverData);\n}\n\nexport interface RestWorkflowTemplate {\n id: number;\n name: string;\n fullyQualifiedUrn: string;\n sortOrder: number;\n workflowStepEnumType: WorkflowStepEnumType;\n}\n\nexport interface RestArchivedTurnover {\n id: number;\n newFinish: number;\n oldFinish?: number;\n propertyName: string;\n propertyId: number;\n turnoverEndDate: string | Date;\n turnoverStartDate: string | Date;\n unitName: string;\n unitId: number;\n unitType: string;\n workflow: RestWorkflowInstanceModel[];\n}\n\nexport interface MarkAsPreLEasedFormValue {\n responsibleParty: number;\n moveInDate: Date;\n rentAmount: number;\n securityDeposit: number;\n amountPaid: number;\n paymentMethod: PreleaseAmountPaidType;\n paymentDate: Date;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport {\n clearUploadedFile,\n deleteFile,\n deleteFileFailed,\n deleteFileSuccess,\n uploadFile,\n uploadFileFail,\n uploadFileSuccess,\n} from '@shared/actions/file-upload.actions';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { UploadedFileItem } from '@shared/interfaces/uploaded-file-item.interface';\n\nexport const fileUploadFeatureKey = 'fileUpload';\n\nexport interface State {\n fileToUpload: File;\n fileToUploadLoading: boolean;\n uploadedFileItem: UploadedFileItem;\n deleteInProgress: boolean;\n deleteStatus: UpdateStatus;\n}\n\nexport const initialState: State = {\n fileToUpload: null,\n fileToUploadLoading: false,\n uploadedFileItem: null,\n deleteInProgress: false,\n deleteStatus: null,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * upload file\n */\n on(uploadFile, (state, action) => ({\n ...state,\n fileToUpload: action.file,\n fileToUploadLoading: true,\n })),\n on(uploadFileSuccess, (state, action) => ({\n ...state,\n uploadedFileItem: action.uploadedFileItem,\n fileToUploadLoading: false,\n })),\n on(uploadFileFail, (state, action) => ({\n ...state,\n uploadedFileItem: null,\n fileToUploadLoading: false,\n })),\n on(clearUploadedFile, (state, action) => ({\n ...state,\n fileToUpload: null,\n fileToUploadLoading: false,\n uploadedFileItem: null,\n })),\n\n /**\n * delete file\n */\n on(deleteFile, (state, action) => ({\n ...state,\n deleteInProgress: true,\n deleteStatus: UpdateStatus.UPDATE,\n })),\n on(deleteFileSuccess, (state, action) => ({\n ...state,\n deleteInProgress: false,\n deleteStatus: UpdateStatus.DELETED,\n })),\n on(deleteFileFailed, (state, action) => ({\n ...state,\n deleteInProgress: false,\n deleteStatus: UpdateStatus.ERROR,\n }))\n);\n","import { ActionReducer } from '@ngrx/store';\n\nexport const pathInitialValue = (initialState: T, key: string): T => {\n const storageValue = localStorage.getItem(key);\n if (storageValue) {\n try {\n const parsedValue = JSON.parse(storageValue);\n return { ...initialState, ...parsedValue };\n } catch {\n localStorage.removeItem(key);\n return initialState;\n }\n }\n return initialState;\n};\n\nexport const hydrationMetaReducer =\n (featureKey: string) =>\n (reducer: ActionReducer): ActionReducer => {\n return (state, action) => {\n const nextState = reducer(state, action);\n localStorage.setItem(featureKey, JSON.stringify(nextState));\n return nextState;\n };\n };\n","import { createReducer, on } from '@ngrx/store';\n\nimport { EnumerationConfig } from '@shared/interfaces/enumeration-config';\n\nimport { loadEnumerations, loadEnumerationsFailed, loadEnumerationsSuccess } from '../actions/enumerations.actions';\n\nexport const enumerationFeatureKey = 'enumeration';\n\nexport interface State {\n enumerationsLoading?: boolean;\n enumerations?: EnumerationConfig;\n}\n\nexport const initialState: State = {};\n\nexport const reducer = createReducer(\n initialState,\n on(loadEnumerations, (state, action) => ({ ...state, enumerationsLoading: true })),\n on(loadEnumerationsSuccess, (state, action) => ({\n ...state,\n enumerationsLoading: false,\n enumerations: action.enumerations,\n })),\n on(loadEnumerationsFailed, (state, action) => ({\n ...state,\n enumerationsLoading: false,\n enumerations: null,\n }))\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport { TenantData } from '@shared/interfaces/tenant-data';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\nimport {\n loadUserById,\n loadUserByIdFailed,\n loadUserByIdSucceded,\n loadUserDataSucceded,\n loadUserTenantSucceeded,\n setAuthenticated,\n setUserGeneralRole,\n} from '../actions/user.actions';\n\nexport const userFeatureKey = 'user';\n\nexport interface UserState {\n tenantData?: TenantData;\n userData?: UserData;\n isAuthenticated?: boolean;\n selectedUser?: RestUserModel;\n selectedUserLoading?: boolean;\n}\n\nexport const initialState = {\n isAuthenticated: false,\n userData: {},\n tenantData: {},\n};\n\nexport const reducer = createReducer(\n initialState,\n on(loadUserDataSucceded, (state, action) => ({\n ...state,\n userData: action,\n })),\n\n on(loadUserTenantSucceeded, (state, action) => ({\n ...state,\n tenantData: action,\n })),\n\n on(setUserGeneralRole, (state, action) => ({\n ...state,\n userData: {\n ...state.userData,\n generalRole: action.roleName,\n },\n })),\n\n on(setAuthenticated, (state, action) => ({\n ...state,\n isAuthenticated: action.isAuthenticated,\n })),\n on(loadUserById, state => ({\n ...state,\n selectedUserLoading: true,\n })),\n on(loadUserByIdSucceded, (state, action) => ({\n ...state,\n selectedUser: action,\n selectedUserLoading: false,\n })),\n on(loadUserByIdFailed, (state, action) => ({\n ...state,\n selectedUserLoading: false,\n }))\n);\n","import * as fromEnumerationReducer from './enumeration.reducer';\nimport * as fromFileUploadReducer from './file-upload.reducer';\nimport { RouteState, reducer as RouteStateReducer, routeStateFeatureKey } from './route.reducer';\nimport * as fromUserReducer from './user.reducer';\nimport * as fromWindowResizeReducer from './window-resize.reducer';\n\nexport const CORE_FEATURE_KEY = 'coreModule';\n\nexport interface CoreModuleState {\n [fromUserReducer.userFeatureKey]: fromUserReducer.UserState;\n [fromEnumerationReducer.enumerationFeatureKey]: fromEnumerationReducer.State;\n [fromFileUploadReducer.fileUploadFeatureKey]: fromFileUploadReducer.State;\n [fromWindowResizeReducer.windowResizeFeatureKey]: fromWindowResizeReducer.State;\n [routeStateFeatureKey]: RouteState;\n}\n\nexport const reducers = {\n [fromUserReducer.userFeatureKey]: fromUserReducer.reducer,\n [fromEnumerationReducer.enumerationFeatureKey]: fromEnumerationReducer.reducer,\n [fromFileUploadReducer.fileUploadFeatureKey]: fromFileUploadReducer.reducer,\n [fromWindowResizeReducer.windowResizeFeatureKey]: fromWindowResizeReducer.reducer,\n [routeStateFeatureKey]: RouteStateReducer,\n};\n","import { createReducer, on } from '@ngrx/store';\n\nimport { setPreviousRoute } from '@shared/actions/route-state.action';\n\nexport const routeStateFeatureKey = 'routeState';\n\nexport interface RouteState {\n previousRoute?: string;\n}\n\nexport const initialState: RouteState = {\n previousRoute: undefined,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * set previous route\n */\n on(setPreviousRoute, (state, action) => ({\n ...state,\n previousRoute: action.previousRoute,\n }))\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport { setWindowWidth } from '@shared/actions/window-resize.actions';\n\nexport const windowResizeFeatureKey = 'windowResize';\n\nexport interface State {\n windowWidth: number;\n}\n\nexport const initialState: State = {\n windowWidth: null,\n};\n\nexport const reducer = createReducer(\n initialState,\n /**\n * set window width\n */\n on(setWindowWidth, (state, action) => ({\n ...state,\n windowWidth: action.windowWidth,\n }))\n);\n","import { createFeatureSelector } from '@ngrx/store';\n\nimport { CORE_FEATURE_KEY, CoreModuleState } from '../reducers';\n\nexport const selectCoreModule = createFeatureSelector(CORE_FEATURE_KEY);\n","import { createSelector } from '@ngrx/store';\n\nimport { selectCoreModule } from './core.selector';\n\nconst selectEnumerationState = createSelector(selectCoreModule, coreState => coreState.enumeration);\nexport const selectLoadEnumerations = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations\n);\n\nexport const selectLoadEnumerationsLoading = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerationsLoading\n);\n\nexport const selectDashboardViewType = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations?.dashboardViewType\n);\nexport const selectWorkflowPhasesEnumeration = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations?.workflowPhases\n);\n\nexport const selectDelinquencyResultsEnumeration = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations?.delinquencyResultTypes\n);\nexport const selectWorkflowStepsEnumeration = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations?.workflowSteps\n);\n\nexport const selectRenewalResultTypesEnumeration = createSelector(\n selectEnumerationState,\n enumerationState => enumerationState.enumerations?.renewalResultTypes\n);\n\n// getEnumerationRadioListFunction\nexport const selectFinishTypesEnumeration = createSelector(\n selectLoadEnumerations,\n enumerationState => enumerationState?.finishType\n);\n\nexport const selectTimerTypesEnumeration = createSelector(\n selectLoadEnumerations,\n enumerationState => enumerationState?.timerTypes\n);\n\nexport const selectPmsTypesEnumeration = createSelector(\n selectLoadEnumerations,\n enumerationState => enumerationState?.pmsTypes\n);\n\nexport const selectNativeLanguagesEnumeration = createSelector(\n selectLoadEnumerations,\n enumerationState => enumerationState?.nativeLanguage\n);\n","import { createSelector } from '@ngrx/store';\n\nimport { selectCoreModule } from './core.selector';\n\nconst selectUserState = createSelector(selectCoreModule, coreState => coreState.user);\nexport const selectUserData = createSelector(selectUserState, userState => userState.userData);\nexport const selectUserId = createSelector(selectUserData, userData => userData.id);\nexport const selectUserName = createSelector(selectUserData, userData => userData.name);\nexport const selectUserGeneralRole = createSelector(selectUserData, userData => userData.generalRole);\nexport const selectUserPermissionLevel = createSelector(\n selectUserState,\n userState => userState.userData?.permissionLevel\n);\nexport const selectIsAuthenticated = createSelector(selectUserState, userState => userState.isAuthenticated);\n\nexport const selectSelectedUser = createSelector(selectUserState, userState => userState.selectedUser);\nexport const selectSelectedUserLoading = createSelector(selectUserState, userState => userState.selectedUserLoading);\n\nexport const selectTenantData = createSelector(selectUserState, userState => userState.tenantData);\n","import { Injectable } from '@angular/core';\nimport { Actions } from '@ngrx/effects';\n\n@Injectable()\nexport class WindowResizeEffects {\n constructor(private actions$: Actions) {}\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map } from 'rxjs/operators';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { EnumerationConfig } from '@shared/interfaces/enumeration-config';\n\nimport { loadEnumerations, loadEnumerationsFailed, loadEnumerationsSuccess } from '../actions/enumerations.actions';\n\n@Injectable()\nexport class EnumerationEffects {\n loadEnumerations$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadEnumerations),\n exhaustMap(() =>\n this.restApiService.getData(`Enumerations`).pipe(\n map(result => loadEnumerationsSuccess({ enumerations: result })),\n catchError(err => of(loadEnumerationsFailed()))\n )\n )\n )\n );\n\n constructor(private actions$: Actions, private restApiService: RestapiService, private store: Store<{}>) {}\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { of } from 'rxjs';\nimport { catchError, map, mergeMap } from 'rxjs/operators';\n\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport {\n deleteFile,\n deleteFileFailed,\n deleteFileSuccess,\n uploadFile,\n uploadFileFail,\n uploadFileSuccess,\n} from '@shared/actions/file-upload.actions';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@Injectable()\nexport class FileUploadEffects {\n constructor(\n private actions$: Actions,\n private store: Store<{}>,\n private snackbarService: SnackbarService,\n private fileUploadsService: FileUploadsService\n ) {}\n\n uploadFile$ = createEffect(() =>\n this.actions$.pipe(\n ofType(uploadFile),\n mergeMap(action =>\n this.fileUploadsService.uploadFile(action.file).pipe(\n map(uploadedFile =>\n uploadFileSuccess({\n uploadedFileItem: {\n uploadedFile,\n attachmentSection: action.attachmentSection,\n },\n })\n ),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.UploadingFile);\n return of(uploadFileFail());\n })\n )\n )\n )\n );\n\n deleteFile$ = createEffect(() =>\n this.actions$.pipe(\n ofType(deleteFile),\n mergeMap(action =>\n this.fileUploadsService.removeFile(action.fileId).pipe(\n map(uploadedFile => deleteFileSuccess()),\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.DeletingFile);\n return of(deleteFileFailed());\n })\n )\n )\n )\n );\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { TenantData } from '@shared/interfaces/tenant-data';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TenantService {\n constructor(private restApiService: RestapiService) {}\n\n getTenant(): Observable {\n return this.restApiService.getData('system/tenantInfo');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport { catchError, exhaustMap, map } from 'rxjs/operators';\n\nimport { TenantService } from '@app/services/tenant.service';\nimport { UserService } from '@app/services/user.service';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport {\n loadTenantData,\n loadUserById,\n loadUserByIdFailed,\n loadUserByIdSucceded,\n loadUserData,\n loadUserDataFailed,\n loadUserDataSucceded,\n loadUserTenantFailed,\n loadUserTenantSucceeded,\n} from '../actions/user.actions';\n\n@Injectable()\nexport class UserEffects {\n loadUserData$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUserData),\n exhaustMap(action =>\n this.userService.getCashedUserData().pipe(\n map(userData => loadUserDataSucceded(userData)),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingUserData);\n return of(loadUserDataFailed());\n })\n )\n )\n )\n );\n\n loadTenantData$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadTenantData),\n exhaustMap(action =>\n this.tenantService.getTenant().pipe(\n map(tenantData => loadUserTenantSucceeded(tenantData)),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingTenantData);\n return of(loadUserTenantFailed());\n })\n )\n )\n )\n );\n\n loadUserDataById$ = createEffect(() =>\n this.actions$.pipe(\n ofType(loadUserById),\n exhaustMap(action =>\n this.userService.getUserById(action.userId).pipe(\n map(userData => loadUserByIdSucceded(userData)),\n catchError(() => {\n this.snackbarService.error(SnackbarErrorMessage.RetrievingUser);\n return of(loadUserByIdFailed());\n })\n )\n )\n )\n );\n\n constructor(\n private actions$: Actions,\n private userService: UserService,\n private snackbarService: SnackbarService,\n private tenantService: TenantService\n ) {}\n}\n","import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { JwtHelperService } from '@auth0/angular-jwt';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DashboardEffects } from '@dashboards/store/effects/dashboard.effects';\nimport { WindowResizeEffects } from '@shared/effects/window-resize.effects';\n\nimport { EnumerationEffects } from './effects/enumeration.effects';\nimport { FileUploadEffects } from './effects/file-upload.effects';\nimport { UserEffects } from './effects/user.effects';\nimport { TokenInterceptor } from './interceptors/token.interceptor';\nimport { CORE_FEATURE_KEY, reducers } from './reducers';\n\n@NgModule({\n imports: [\n HttpClientModule,\n EffectsModule.forFeature([\n UserEffects,\n EnumerationEffects,\n DashboardEffects,\n FileUploadEffects,\n WindowResizeEffects,\n ]),\n StoreModule.forFeature(CORE_FEATURE_KEY, reducers),\n ],\n declarations: [],\n providers: [\n JwtHelperService,\n {\n provide: HTTP_INTERCEPTORS,\n useClass: TokenInterceptor,\n multi: true,\n },\n ],\n})\nexport class SharedModule {}\n","
    \n \n \n
    \n\n\n
    \n
    \n \n \n \n \n {{\n attachmentItem?.originalFileName ||\n attachmentItem?.title ||\n newAttachmentItem.upload?.originalFileName ||\n newAttachmentItem.upload?.internalName ||\n ''\n }}\n
    \n
    \n
    \n
    {{ attachmentItem?.size || newAttachmentItem.upload?.size | fileSize }}
    \n \n
    \n \n
    \n\n\n
    \n
    \n \n \n \n \n
    \n \n
    \n
    \n\n\n \n \n \n\n\n\n \n {{ attachmentItem?.externalUrl || newAttachmentItem?.link || '' }}\n \n\n
    \n {{ attachmentItem?.externalUrl || newAttachmentItem?.link || '' }}\n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { UntilDestroy } from '@ngneat/until-destroy';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport { copyToClipboard } from '@shared/functions/copy-to-clipboard.function';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport { SnackbarErrorMessage } from '../customized-snackbar/snackbar-message.enum';\n\n@UntilDestroy()\n@Component({\n selector: 'app-attachment-item',\n templateUrl: './attachment-item.component.html',\n styleUrls: ['./attachment-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AttachmentItemComponent extends ComponentAbstract implements OnInit, OnDestroy {\n @Input() containerCss = '';\n @Input() attachmentItem: RestGenericTypedAttachment;\n @Input() newAttachmentItem: AttachmentItem;\n @Input() showDeleteBtn = true;\n @Input() trimLink = true;\n @Input() lockFields = false;\n @Input() lockDelete = false;\n @Input() labelCss = 'body-small';\n @Input() showFileSize = true;\n @Input() showFileName = true;\n @Output() deleteEvent: EventEmitter = new EventEmitter();\n\n constructor(\n protected cdr: ChangeDetectorRef,\n private snackbarService: SnackbarService,\n private fileUploadService: FileUploadsService\n ) {\n super(cdr);\n }\n\n ngOnInit(): void {}\n\n deleteConfirmation() {\n this.deleteEvent.emit();\n }\n\n copyLink(event: Event) {\n event.stopPropagation();\n const result = copyToClipboard(this.attachmentItem?.externalUrl || this.newAttachmentItem?.link);\n if (result) {\n this.snackbarService.success(SnackbarErrorMessage.WebsiteAddressCopied);\n } else {\n this.snackbarService.error(SnackbarErrorMessage.CopyingWebsiteAddress);\n }\n }\n\n download(event: Event) {\n event.stopPropagation();\n if (this.attachmentItem) {\n this.fileUploadService.download(this.attachmentItem.fileUploadId);\n } else if (this.newAttachmentItem) {\n this.fileUploadService.download(this.newAttachmentItem.upload.id);\n }\n }\n\n getLink() {\n const link = this.attachmentItem?.externalUrl || this.newAttachmentItem?.link || '';\n return link.startsWith('http') ? link : `http://${link}`;\n }\n\n ngOnDestroy(): void {}\n}\n","/**\n * Copies passed string to clipboard\n * @param value string to copy\n */\nexport function copyToClipboard(value: string): boolean {\n const selBox = document.createElement('textarea');\n selBox.style.position = 'fixed';\n selBox.style.left = '0';\n selBox.style.top = '0';\n selBox.style.opacity = '0';\n selBox.value = value;\n document.body.appendChild(selBox);\n selBox.focus();\n selBox.select();\n const result = document.execCommand('copy');\n document.body.removeChild(selBox);\n return result;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { AttachmentItemComponent } from './attachment-item.component';\n\n@NgModule({\n declarations: [AttachmentItemComponent],\n imports: [CommonModule, MatButtonModule, IconComponent, MatTooltipModule, PipesModule, PipesModule],\n exports: [AttachmentItemComponent],\n})\nexport class AttachmentItemModule {}\n","
    \n \n
    \n \n \n \n \n
    \n \n
    \n
    \n
    \n\n\n \n\n\n\n
    \n
    \n
    \n \n
    Uploading file...
    \n
    {{ (uploadingFile$ | async).name }}
    \n
    \n
    \n
    \n\n\n
    \n
    \n \n
    Drag & Drop
    \n
    \n
    or
    \n \n
    \n
    \n\n\n
    \n
    \n
    \n \n
    File uploaded
    \n
    {{ control.value.originalFileName }}
    \n
    \n
    \n
    \n","import { HttpEventType, HttpResponse } from '@angular/common/http';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, ValidationErrors } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { BehaviorSubject } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\nimport { FileUploadsService } from '@app/services/file-uploads.service';\nimport { checkSupportedFormatFunction } from '@shared/functions/check-supported-format.function';\nimport { Upload } from '@shared/interfaces/upload';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@UntilDestroy()\n@Component({\n selector: 'app-input-file',\n templateUrl: './input-file.component.html',\n styleUrls: ['./input-file.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputFileComponent extends CustomControlAbstract implements OnInit, OnDestroy, ControlValueAccessor {\n errors: ValidationErrors;\n invalid = false;\n disabled = false;\n\n @Input() label = '';\n @Input() labelRequired = false;\n @Input() labelCss = 'nowrap body-small-bold';\n @Input() contentCss = 'display-flex align-items-start';\n @Input() containerCss = 'display-flex flex-column';\n @Input() inputCss = '';\n @Input() multiselect = false;\n @Input() acceptedFormats = ['application/pdf'];\n @Input() attrPlaceholder = 'Upload a file';\n @Input() uploadSelection = false;\n @Input() attrDisable = false;\n\n @Input() set value(value: string) {\n this.control.setValue(value);\n }\n\n @Output() clearEvent: EventEmitter = new EventEmitter();\n @Output() selectFilesEvent: EventEmitter = new EventEmitter();\n\n @ViewChild('fileUpload', { static: true }) input: ElementRef;\n\n uploadingFile$ = new BehaviorSubject(null);\n uploadingProgress$ = new BehaviorSubject(0);\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective,\n private fileUploadsService: FileUploadsService,\n private snackbarService: SnackbarService\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n ngOnInit(): void {\n this.control.valueChanges\n .pipe(\n untilDestroyed(this),\n tap(value => {\n this.onChanged(value);\n this.onTouched();\n if (!value) {\n this.uploadingFile$.next(null);\n }\n })\n )\n .subscribe();\n\n if (this.ngControl && this.ngControl.control) {\n if (this.ngControl.control.errors) {\n this.errors = { ...this.ngControl.control.errors };\n }\n if (this.ngControl.control.touched) {\n this.control.markAsTouched();\n }\n this.invalid = this.ngControl.control.invalid;\n this.ngControl.control.statusChanges\n .pipe(untilDestroyed(this))\n .subscribe(status => this.checkControlStatus(status));\n }\n }\n\n ngOnDestroy(): void {}\n\n writeValue(value: any): void {\n this.control.setValue(value);\n }\n\n browseFile() {\n this.input.nativeElement.value = '';\n this.input.nativeElement.click();\n }\n\n clear($event: Event) {\n $event.stopPropagation();\n this.control.reset();\n this.clearEvent.emit();\n this.cdr.detectChanges();\n }\n\n filesDropped(files: File[]) {\n if (this.uploadSelection) {\n this.uploadFile(files);\n } else {\n this.emitEvents(files);\n }\n }\n\n inputFileChanged($event: Event) {\n const files: FileList = ($event.target as HTMLInputElement).files;\n const filesList = Object.entries(files).map(([key, file]) => file);\n if (this.uploadSelection) {\n this.uploadFile(filesList);\n } else {\n this.emitEvents(filesList);\n }\n }\n\n private emitEvents(files: File[]) {\n if (files && files.length) {\n this.selectFilesEvent.emit(files);\n this.control.setValue(files);\n this.cdr.detectChanges();\n }\n }\n\n private uploadFile(files: File[]) {\n const file = files[0];\n if (checkSupportedFormatFunction(file.type, this.acceptedFormats)) {\n this.uploadingFile$.next(file);\n this.uploadingProgress$.next(0);\n this.fileUploadsService.uploadFileProgress(file).subscribe({\n next: (event: any) => {\n if (event.type === HttpEventType.UploadProgress) {\n const progress = Math.round((100 * event.loaded) / event.total);\n this.uploadingProgress$.next(progress);\n this.cdr.detectChanges();\n } else if (event instanceof HttpResponse) {\n const upload = event.body as Upload;\n this.control.setValue(upload);\n this.uploadingProgress$.next(100);\n this.cdr.detectChanges();\n }\n },\n error: () => {\n this.snackbarService.error(SnackbarErrorMessage.UploadingFile);\n this.uploadingProgress$.next(0);\n },\n });\n } else {\n this.snackbarService.error(SnackbarErrorMessage.UnsupportedFileType);\n }\n }\n}\n","export function checkSupportedFormatFunction(type: string, acceptedFormatList: string[]): boolean {\n return acceptedFormatList?.length ? acceptedFormatList?.includes(type) || true : true;\n}\n","
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n \n \n \n\n\n\n \n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { debounceTime, filter, tap } from 'rxjs/operators';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { AttachmentComponentType } from '@shared/enums/attachment-component-type.enum';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { Upload } from '@shared/interfaces/upload';\n\nenum AttachmentComponentForm {\n AttachmentType = 'attachmentType',\n File = 'file',\n Link = 'link',\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-attachment',\n templateUrl: './attachment.component.html',\n styleUrls: ['./attachment.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AttachmentComponent extends ComponentAbstract implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n _attachmentItem: AttachmentItem;\n currentLink = null;\n urlRegex = /^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$/;\n fileUploadLoading = false;\n\n @Input() label = '';\n @Input() lockFields = false;\n @Input() linkContentCss = 'display-flex flex-column align-items-start flex-1';\n @Input() inputFileCss = 'flex-1';\n @Input() attrLabel = 'Attachment';\n @Input() containerCss = 'grid-gap-8';\n @Input() labelRequired = false;\n @Input() isEmpty = false;\n @Input() uploadInProgress = false;\n @Input() allowLink = true;\n @Input() keepSelection = false;\n @Input() acceptedFormats: string[];\n @Input() cleanInputAttachment: EventEmitter;\n @Output() attachmentItemEvent: EventEmitter = new EventEmitter();\n\n constructor(protected cdr: ChangeDetectorRef, private formBuilder: UntypedFormBuilder) {\n super(cdr);\n }\n\n get attachmentType(): UntypedFormControl {\n return this.form.get(AttachmentComponentForm.AttachmentType) as UntypedFormControl;\n }\n\n get file(): UntypedFormControl {\n return this.form.get(AttachmentComponentForm.File) as UntypedFormControl;\n }\n\n get link(): UntypedFormControl {\n return this.form.get(AttachmentComponentForm.Link) as UntypedFormControl;\n }\n\n setIsTouched() {\n this.showValidationError = true;\n }\n\n ngOnInit(): void {\n this.cleanInputAttachment\n ?.pipe(\n untilDestroyed(this),\n tap(() => {\n this.file.reset();\n this.link.reset();\n this._attachmentItem = {};\n this.currentLink = '';\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.initForm();\n\n this.file.valueChanges\n .pipe(\n untilDestroyed(this),\n filter((upload: Upload) => !!upload),\n tap((upload: Upload) => {\n this.attachmentItemEvent.emit({ upload });\n if (!this.keepSelection) {\n this.file.reset();\n }\n })\n )\n .subscribe();\n\n this.link.valueChanges\n .pipe(\n untilDestroyed(this),\n debounceTime(300),\n filter((link: string) => !!link && this.link.valid && link !== this.currentLink),\n tap((link: string) => {\n this.currentLink = link;\n })\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {}\n\n private initForm() {\n this.form = this.formBuilder.group({\n [AttachmentComponentForm.AttachmentType]: [AttachmentComponentType.File],\n [AttachmentComponentForm.Link]: [null, [Validators.pattern(this.urlRegex)]],\n [AttachmentComponentForm.File]: [null, [Validators.required]],\n });\n }\n\n submitLink() {\n if (this.link.valid) {\n this.attachmentItemEvent.emit({ link: this.link.value });\n if (!this.keepSelection) {\n this.link.reset();\n }\n }\n }\n\n clearUploadedFile() {\n this.attachmentItemEvent.emit(null);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { InputModule } from '@app/modules/ui-components/components/input/input.module';\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { InputFileModule } from '@app/modules/ui-components/components/input-file/input-file.module';\nimport { RadioButtonModule } from '@app/modules/ui-components/components/radio-button/radio-button.module';\nimport { AttachmentItemModule } from '@ui-components/components/attachment-item/attachment-item.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { AttachmentComponent } from './attachment.component';\n\n@NgModule({\n declarations: [AttachmentComponent],\n exports: [AttachmentComponent],\n imports: [\n CommonModule,\n RadioButtonModule,\n ReactiveFormsModule,\n InputFileModule,\n InputModule,\n MatButtonModule,\n IconComponent,\n InputErrorModule,\n MatTooltipModule,\n AttachmentItemModule,\n MatProgressSpinnerModule,\n ],\n})\nexport class AttachmentModule {}\n","
    \n
    \n \n
    \n
    \n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { RestTypedTurnoverAttachment } from '@shared/interfaces/turnover.interface';\n\n@Component({\n selector: 'app-attachments-list',\n templateUrl: './attachments-list.component.html',\n styleUrls: ['./attachments-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AttachmentsListComponent implements OnInit {\n @Input() showEmpty = false;\n @Input() attachments: RestTypedTurnoverAttachment[];\n @Input() lockFields: boolean;\n @Output() removeAttachment = new EventEmitter();\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AttachmentsListComponent } from './attachments-list.component';\nimport { AttachmentItemModule } from '../attachment-item/attachment-item.module';\n\n@NgModule({\n declarations: [AttachmentsListComponent],\n imports: [CommonModule, AttachmentItemModule],\n exports: [AttachmentsListComponent],\n})\nexport class AttachmentsListModule {}\n","
    \n \n \n \n \n \n
    \n\n\n \n \n \n\n\n \n \n \n\n\n \n \n \n\n\n\n
    \n {{ buttonLabel }}\n \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { ButtonType } from '@shared/enums/button-type';\n\n@Component({\n selector: 'app-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent extends ComponentAbstract implements OnInit {\n @Input() buttonType = ButtonType.DEFAULT;\n @Input() buttonColor: ThemePalette = 'primary';\n @Input() buttonLabel = '';\n @Input() buttonLabelCss = 'letter-spacing';\n @Input() buttonCss = 'step-button';\n @Input() attrDisabled = false;\n @Input() isLoading = false;\n @Input() type: 'button' | 'reset' | 'submit';\n\n @Output() clickEvent: EventEmitter = new EventEmitter();\n\n constructor(protected cdr: ChangeDetectorRef) {\n super(cdr);\n }\n\n ngOnInit(): void {}\n\n buttonClick() {\n this.clickEvent.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { ButtonComponent } from './button.component';\n\n@NgModule({\n declarations: [ButtonComponent],\n imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule],\n exports: [ButtonComponent],\n})\nexport class ButtonModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n Optional,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { DateAdapter, MAT_DATE_FORMATS, MatDateFormats } from '@angular/material/core';\nimport { MatCalendar, MatDatepickerIntl } from '@angular/material/datepicker';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { tap } from 'rxjs/operators';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\n\n@UntilDestroy()\n@Component({\n selector: 'app-calendar-header',\n templateUrl: './calendar-header.component.html',\n styleUrls: ['./calendar-header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CalendarHeaderComponent extends ComponentAbstract implements OnInit, OnDestroy {\n constructor(\n private _intl: MatDatepickerIntl,\n @Inject(forwardRef(() => MatCalendar)) public calendar: MatCalendar,\n @Optional() private _dateAdapter: DateAdapter,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n protected cdr: ChangeDetectorRef\n ) {\n super(cdr);\n }\n\n ngOnInit(): void {\n this.calendar.stateChanges\n .pipe(\n untilDestroyed(this),\n tap(() => this.cdr.markForCheck())\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {}\n\n get periodLabel() {\n return this._dateAdapter.format(this.calendar.activeDate, this._dateFormats.display.monthYearA11yLabel);\n }\n\n previousClicked() {\n this.calendar.activeDate = this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1);\n }\n\n nextClicked() {\n this.calendar.activeDate = this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1);\n }\n}\n","
    \n \n
    {{ periodLabel }}
    \n \n
    \n","
    \n \n \n
    \n \n\n \n\n
    \n \n \n \n
    \n\n \n {{ isExpanded ? 'arrow_drop_up' : 'arrow_drop_down' }}\n \n \n \n\n \n
    \n \n \n
    \n \n
    \n\n \n
    \n \n
    \n
    \n\n \n\n\n\n \n
    \n {{ control?.value || '' | date: displayMask }}\n
    \n
    \n
    \n\n\n \n
    {{ attrPlaceholder }}
    \n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n {{ label }}\n
    \n
    \n","import { DatePipe } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n LOCALE_ID,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormGroupDirective,\n NgControl,\n UntypedFormControl,\n ValidationErrors,\n} from '@angular/forms';\nimport {\n DateRange,\n DefaultMatCalendarRangeStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatCalendar,\n MatCalendarCellCssClasses,\n} from '@angular/material/datepicker';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport * as moment from 'moment';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\nimport { CalendarHeaderComponent } from '@app/modules/ui-components/components/calendar-header/calendar-header.component';\nimport { TimezoneService } from '@main-application/management/components/system-configuration/components/date-time-configuration/timezone.service';\n\nimport { SnackbarService } from '../customized-snackbar/snackbar.service';\n\n@UntilDestroy()\n@Component({\n selector: 'app-date-dropdown',\n templateUrl: './date-dropdown.component.html',\n styleUrls: ['./date-dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n useClass: DefaultMatCalendarRangeStrategy,\n },\n ],\n})\nexport class DateDropdownComponent\n extends CustomControlAbstract\n implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit\n{\n maskControl = new UntypedFormControl('');\n invalid = false;\n isDisabled = false;\n errors: ValidationErrors;\n dateRangeConfig: DateRange;\n header = CalendarHeaderComponent;\n isOpened = false;\n\n @ViewChild(MatCalendar) calendar: MatCalendar;\n\n @Input() label = '';\n @Input() labelTooltip: string;\n @Input() labelRequired: boolean;\n @Input() labelInside = false;\n private readonly labelInsideDefaultCss = 'nowrap pre-title';\n private readonly labelOutsideDefaultCss = 'nowrap body-small-bold';\n _labelCss = '';\n @Input() set labelCss(value: string) {\n this._labelCss = value;\n }\n get labelCss(): string {\n if (this._labelCss) return this._labelCss;\n return this.labelInside ? this.labelInsideDefaultCss : this.labelOutsideDefaultCss;\n }\n\n @Input() attrPlaceholder = '';\n @Input() buttonCss = 'date-dropdown-button';\n @Input() containerCss = 'display-flex align-items-center';\n @Input() valueCss = 'body-small text-color dark';\n @Input() placeholderCss = 'placeholder';\n @Input() errorSection = true;\n @Input() markAsInvalid = false;\n @Input() displayMask = 'MM/dd/yyyy';\n @Input() attrClickableDisable = false;\n @Input() max: Date;\n @Input() min: Date;\n @Input() clearable = false;\n @Input() editable = false;\n @Input() errorDisabledText: string;\n\n @Input() set attrDisable(attrDisable: boolean) {\n if (attrDisable) {\n this.control.disable({ emitEvent: false });\n } else {\n this.control.enable({ emitEvent: false });\n }\n this.isDisabled = attrDisable;\n this.cdr.markForCheck();\n }\n\n @Output() disabledClickEvent = new EventEmitter();\n @Output() selectedRangeEvent: EventEmitter = new EventEmitter();\n\n @ViewChild('dateMenuTrigger') dateMenuTrigger: MatMenuTrigger;\n\n private readonly today = this.timezoneService.getCurrentDateOnly();\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective,\n private timezoneService: TimezoneService,\n private snackbarService: SnackbarService,\n @Inject(LOCALE_ID) private locale: string\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n ngOnInit(): void {\n this.initControlBase();\n }\n\n ngAfterViewInit() {\n if (this.control.value) {\n this.calendar.activeDate = this.control.value;\n this.dateRangeConfig = new DateRange(this.control.value, this.control.value);\n this.cdr.markForCheck();\n }\n this.control.valueChanges.pipe(untilDestroyed(this), distinctUntilChanged()).subscribe(value => {\n if (this.attrClickableDisable && this.isOpened) {\n this.disabledClickEvent.emit();\n this.dateMenuTrigger.closeMenu();\n } else {\n this.dateMenuTrigger.closeMenu();\n this.onTouched();\n }\n this.cdr.markForCheck();\n });\n }\n\n valueTyped(value: string) {\n if (value) {\n const split = value.split('/');\n if (split[2] && split[2].length === 2) {\n split[2] = '20' + split[2];\n }\n const preparedValue = split.join('/');\n const dt = moment(preparedValue, 'MM/DD/YYYY');\n if (dt.isValid()) {\n this.setValue(dt.toDate());\n } else {\n this.setValue(null);\n this.snackbarService.error(`Invalid date: ${value}`);\n }\n } else {\n this.setValue(null);\n }\n }\n\n updateCursor(input: HTMLInputElement) {\n setTimeout(() => {\n input.selectionStart = input.value.length ?? 0;\n });\n }\n\n clickEvent($event: MouseEvent) {\n if (!this.isDisabled) return;\n\n this.disabledClickEvent.emit($event);\n }\n\n ngOnDestroy(): void {}\n\n dateClass() {\n return (date: Date): MatCalendarCellCssClasses => {\n if (date.getTime() === this.today.getTime()) {\n return 'special-date-today';\n }\n return;\n };\n }\n\n onSelect(date: Date) {\n if (this.dateRangeConfig?.start && date > this.dateRangeConfig.start && !this.dateRangeConfig.end) {\n this.dateRangeConfig = new DateRange(this.dateRangeConfig.start, date);\n } else {\n this.dateRangeConfig = new DateRange(date, null);\n }\n }\n\n onSelectSingleDate(date: Date) {\n this.dateRangeConfig = new DateRange(date, date);\n this.setValue(date);\n }\n\n selectRange() {\n if (this.control.value) {\n this.selectedRangeEvent.emit(this.control.value);\n }\n this.cdr.detectChanges();\n }\n\n writeValue(value: Date): void {\n this.maskControl.setValue(value ? new DatePipe(this.locale).transform(value, this.displayMask) : '');\n if (value) {\n this.dateRangeConfig = new DateRange(value, value);\n if (this.calendar) {\n this.calendar.activeDate = value;\n }\n }\n }\n\n setValue(date: Date) {\n if (this.ngControl.control.disabled) {\n return;\n }\n this.writeValue(date);\n if (this.control.value?.getTime() !== date?.getTime()) {\n this.onChanged(date);\n this.onTouched();\n }\n }\n\n dateToggleMenu(menuExpanded: boolean) {\n if (menuExpanded) {\n this.isOpened = true;\n }\n super.toggleMenu(menuExpanded);\n }\n\n openDateMenu(event: MouseEvent) {\n event.preventDefault();\n if (this.errorDisabledText) {\n this.snackbarService.error(this.errorDisabledText);\n return;\n }\n setTimeout(() => {\n this.dateMenuTrigger.openMenu();\n }, 1);\n }\n\n clear(event) {\n event.stopPropagation();\n this.onSelectSingleDate(null);\n this.cdr.markForCheck();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxMaskModule } from 'ngx-mask';\n\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { DateDropdownComponent } from './date-dropdown.component';\n\n@NgModule({\n declarations: [DateDropdownComponent],\n imports: [\n CommonModule,\n InputErrorModule,\n IconComponent,\n MatMenuModule,\n MatDatepickerModule,\n MatButtonModule,\n NgxMaskModule,\n ReactiveFormsModule,\n MatTooltipModule,\n MatIconModule,\n ],\n exports: [DateDropdownComponent],\n})\nexport class DateDropdownModule {}\n","\n
    \n \n {{ text }}\n \n
    \n
    \n\n\n \n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-divider',\n templateUrl: './divider.component.html',\n styleUrls: ['./divider.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DividerComponent implements OnInit {\n @Input() text: string;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatDividerModule } from '@angular/material/divider';\n\nimport { DividerComponent } from './divider.component';\n\n@NgModule({\n declarations: [DividerComponent],\n exports: [DividerComponent],\n imports: [CommonModule, MatDividerModule],\n})\nexport class DividerModule {}\n","import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\n\n@Directive({\n selector: '[appAutoresize]',\n})\nexport class AutoresizeDirective implements AfterViewInit {\n @Input() maxHeight: number;\n @Input() appAutoresize: boolean;\n @Input() formControl: UntypedFormControl;\n\n constructor(private elementRef: ElementRef) {}\n\n ngAfterViewInit(): void {\n this.resize();\n\n this.formControl.valueChanges.subscribe(() => {\n this.resize();\n });\n }\n\n resize() {\n if (!this.appAutoresize) return;\n\n const textArea = this.elementRef.nativeElement;\n let newHeight;\n\n textArea.style.height = 'auto';\n if (this.maxHeight) {\n newHeight = Math.min(textArea.scrollHeight, this.maxHeight);\n } else {\n newHeight = textArea.scrollHeight;\n }\n textArea.style.height = newHeight + 4 + 'px';\n }\n}\n","
    \n \n
    \n maxCounter)\n ? 'invalid'\n : '',\n errors ? 'error-section' : '',\n control.value ? 'filled' : ''\n ]\"\n [formControl]=\"control\"\n [placeholder]=\"attrPlaceholder\"\n [name]=\"attrName\"\n [attr.aria-invalid]=\"invalid && showValidationErrorOrSubmitted\"\n (blur)=\"onBlur()\"\n >\n
    \n maxCounter ? 'red3' : ''\"\n >\n [{{ control?.value?.length || 0 }}/{{ maxCounter }}]\n
    \n
    \n \n
    \n\n\n\n
    \n
    ctr/cmd + enter: new line
    \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, ValidationErrors } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\n\n@UntilDestroy()\n@Component({\n selector: 'app-input-area',\n templateUrl: './input-area.component.html',\n styleUrls: ['./input-area.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputAreaComponent\n extends CustomControlAbstract\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n errors: ValidationErrors;\n invalid = false;\n disabled = false;\n\n @Input() autoresize = false;\n @Input() maxHeight: number;\n @Input() displayNewLineHint = false;\n @Input() attrPlaceholder = '';\n @Input() attrName: string;\n @Input() label: string;\n @Input() labelCss = 'nowrap body-small-bold';\n @Input() containerCss = '';\n @Input() inputCss = '';\n @Input() errorSection = true;\n @Input() markAsInvalid = false;\n @Input() displayCounter = false;\n @Input() maxCounter: number;\n @Output() keydownEnterEvent = new EventEmitter();\n @Output() blurEvent = new EventEmitter();\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n @Input() set attrDisable(attrDisable: boolean) {\n if (attrDisable) {\n this.control.disable();\n } else {\n this.control.enable();\n }\n this.disabled = attrDisable;\n this.cdr.detectChanges();\n }\n\n @Input() set value(value: string) {\n this.control.setValue(value);\n }\n\n ngOnInit(): void {\n this.initControlBase();\n\n this.control.valueChanges.pipe(untilDestroyed(this), distinctUntilChanged()).subscribe(value => {\n this.onChanged(value);\n this.onTouched();\n });\n }\n\n ngOnDestroy(): void {}\n\n writeValue(value: string): void {\n this.control.setValue(value);\n }\n\n onBlur() {\n this.blurEvent.emit();\n }\n\n enter($event) {\n if (this.keydownEnterEvent.observed) {\n this.keydownEnterEvent.emit();\n $event.preventDefault();\n }\n }\n\n insertNewline($event) {\n const newValue = `${this.control?.value || ''}\\n`;\n this.control.setValue(newValue);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { DirectivesModule } from '@shared/directives/directives.module';\nimport { AutoresizeModule } from '@ui-components/directives/autoresize/autoresize.module';\n\nimport { InputAreaComponent } from './input-area.component';\n\n@NgModule({\n declarations: [InputAreaComponent],\n imports: [CommonModule, InputErrorModule, ReactiveFormsModule, AutoresizeModule, DirectivesModule, MatInputModule],\n exports: [InputAreaComponent],\n})\nexport class InputAreaModule {}\n","
    \n \n
    \n\n\n
    \n {{ itemMessage }}\n
    \n
    \n\n\n
    \n {{ message }}\n
    \n
    \n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { ValidationErrors } from '@angular/forms';\n\nimport { InputErrorService } from '@app/modules/ui-components/components/input-error/services/input-error.service';\n\n@Component({\n selector: 'app-input-error',\n templateUrl: './input-error.component.html',\n styleUrls: ['./input-error.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputErrorComponent implements OnInit {\n @Input() errors: ValidationErrors;\n @Input() visible = false;\n @Input() message = '';\n @Input() containerCss = '';\n\n constructor(private inputErrorService: InputErrorService) {}\n\n ngOnInit(): void {}\n\n get validationMessages(): string[] {\n return this.visible && this.errors\n ? (Object.entries(this.errors) || [])\n .filter(([key, errorParams]) => !!errorParams)\n .map(([key, errorParams]) => {\n return this.inputErrorService.getValidationMessage(key, errorParams);\n })\n : [];\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { InputErrorService } from '@app/modules/ui-components/components/input-error/services/input-error.service';\n\nimport { InputErrorComponent } from './input-error.component';\n\n@NgModule({\n declarations: [InputErrorComponent],\n providers: [InputErrorService],\n exports: [InputErrorComponent],\n imports: [CommonModule],\n})\nexport class InputErrorModule {}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class InputErrorService {\n constructor() {}\n\n getValidationMessage(validator: string, errorParams: unknown): string {\n switch (validator) {\n case 'dateRangeError': {\n return 'Wrong date range';\n }\n case 'numberRangeError': {\n return 'Wrong number range';\n }\n case 'regexpError': {\n return 'Wrong format';\n }\n case 'max': {\n return 'Value too large';\n }\n case 'min': {\n return 'Value too small';\n }\n case 'digitsPositive': {\n return 'Only positive digits are allowed';\n }\n case 'digits': {\n return 'Only digits are allowed';\n }\n case 'required': {\n return '* required field';\n }\n case 'atLeastOnePhotoRequired': {\n return 'At least one photo is required';\n }\n case 'maxlength': {\n const error = errorParams as { actualLength: number; requiredLength: number };\n return `Max text length is ${error.requiredLength}`;\n }\n case 'minlength': {\n const error = errorParams as { actualLength: number; requiredLength: number };\n return `Minimum text length is ${error.requiredLength}`;\n }\n case 'kpiTaskRange': {\n return 'Wrong data range';\n }\n case 'laterThanToday': {\n return 'Due date must be later than today date ';\n }\n case 'urlGoogleDrive': {\n return 'Incorrect Google Drive URL';\n }\n case 'email': {\n return 'Incorrect email address';\n }\n case 'atLeastOneItemRequired': {\n return 'At least one item is required';\n }\n case 'url': {\n return 'Incorrect URL address';\n }\n\n case 'stepBeforeEnd': {\n return '\"Due date\" must be earlier than turnover end date';\n }\n\n case 'stepAfterStart': {\n return '\"Due date\" must be later than turnover start date';\n }\n\n case 'duplicatedRole': {\n return 'A role with the given name already exists';\n }\n\n case 'duplicatedFinish': {\n return 'A finish with the given name already exists';\n }\n\n case 'userAlreadyExists': {\n return 'User already exists';\n }\n case 'userInactive': {\n return \"User with provided email was recently removed and can't be used again\";\n }\n\n case 'elapsedDaysRangeEmpty': {\n return 'Empty range';\n }\n\n case 'elapsedDaysRangeEmptyLow': {\n return 'Empty low priority value';\n }\n\n case 'elapsedDaysRangeEmptyHigh': {\n return 'Empty high priority value';\n }\n\n case 'elapsedDaysRangeHigh': {\n return \"Value in 'high priority' field must be lover, than 'low priority' field\";\n }\n\n case 'elapsedDaysRangeLow': {\n return \"Value in 'low priority' field must be lover, than 'high priority' field\";\n }\n\n case 'customError': {\n if (typeof errorParams === 'string') {\n return errorParams;\n }\n return '';\n }\n\n default: {\n return '';\n }\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxMaskModule } from 'ngx-mask';\n\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { DirectivesModule } from '@shared/directives/directives.module';\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { InputFileComponent } from './input-file.component';\n\n@NgModule({\n declarations: [InputFileComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n NgxMaskModule,\n IconComponent,\n InputErrorModule,\n MatButtonModule,\n PipesModule,\n MatTooltipModule,\n DirectivesModule,\n ],\n exports: [InputFileComponent],\n})\nexport class InputFileModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxMaskModule } from 'ngx-mask';\n\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { InputTypeFileComponent } from './input-type-file.component';\n\n@NgModule({\n declarations: [InputTypeFileComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n NgxMaskModule,\n IconComponent,\n InputErrorModule,\n MatButtonModule,\n PipesModule,\n MatTooltipModule,\n ],\n exports: [InputTypeFileComponent],\n})\nexport class InputTypeFileModule {}\n","
    \n
    \n
    \n
    \n
    \n maxCounter)\n ? 'invalid'\n : '',\n errors ? 'error-section' : '',\n control.value || control.value === 0 ? 'filled' : '',\n disabled ? 'disabled' : ''\n ]\"\n [attr.aria-invalid]=\"errors && showValidationErrorOrSubmitted\"\n >\n maxCounter)\n ? 'invalid'\n : '',\n errors ? 'error-section' : '',\n control.value || control.value === 0 ? 'filled' : '',\n disabled ? 'disabled' : ''\n ]\"\n matInput\n [type]=\"attrType\"\n [formControl]=\"control\"\n [placeholder]=\"attrPlaceholder\"\n [name]=\"attrName\"\n [autocomplete]=\"attrAutocomplete ? 'on' : 'off'\"\n [mask]=\"attrMask\"\n [readonly]=\"readonly\"\n [thousandSeparator]=\"attrThousandSeparator\"\n [dropSpecialCharacters]=\"attrDropSpecialCharacters\"\n [validation]=\"true\"\n [attr.aria-invalid]=\"(errors && showValidationErrorOrSubmitted) || markAsInvalid\"\n (blur)=\"onBlur($event)\"\n (keydown.enter)=\"keydownEnter($event)\"\n />\n {{ prefix }}\n \n
    \n maxCounter ? 'red3' : ''\"\n >\n [{{ control?.value?.length || 0 }}/{{ maxCounter }}]\n
    \n \n
    \n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl } from '@angular/forms';\nimport { UntilDestroy } from '@ngneat/until-destroy';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\n\n@UntilDestroy()\n@Component({\n selector: 'app-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputComponent extends CustomControlAbstract implements OnInit, OnDestroy, ControlValueAccessor {\n disabled = false;\n\n @Input() prefix: string;\n @Input() attrPlaceholder: string;\n @Input() attrName: string;\n @Input() attrLabel: string;\n @Input() infoTooltip: string;\n @Input() attrType = 'text';\n @Input() labelCss = 'label-input body-small-bold';\n @Input() contentCss = 'display-flex align-items-start flex-column';\n @Input() containerCss = 'display-flex flex-column';\n @Input() inputCss = 'display-flex align-items-center';\n @Input() attrAutocomplete = false;\n @Input() attrMask = '';\n @Input() attrThousandSeparator = '';\n @Input() attrDropSpecialCharacters = null;\n @Input() errorSection = true;\n @Input() markAsInvalid = false;\n @Input() labelRequired: boolean;\n @Input() displayCounter = false;\n @Input() maxCounter = 100;\n @Input() readonly = false;\n\n @Output() blurEvent = new EventEmitter();\n @Output() keydownEnterEvent = new EventEmitter();\n @ViewChild('inputControl', { read: ElementRef }) inputControl: ElementRef;\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n @Input() set attrDisable(attrDisable: boolean) {\n if (attrDisable) {\n this.control.disable();\n } else {\n this.control.enable();\n }\n this.control.markAsUntouched();\n this.control.markAsPristine();\n this.disabled = attrDisable;\n this.cdr.detectChanges();\n }\n\n ngOnInit(): void {\n this.initControlBase();\n\n setTimeout(() => this.cdr.detectChanges());\n }\n\n ngOnDestroy(): void {}\n\n writeValue(value: any): void {\n if (value != this.control.value) {\n this.control.setValue(value);\n }\n }\n\n onBlur($event: FocusEvent) {\n this.blurEvent.emit($event);\n this.onTouched();\n }\n\n focus() {\n this.inputControl?.nativeElement.focus();\n }\n\n keydownEnter($event: Event) {\n if (this.control.value) {\n $event.stopPropagation();\n $event.preventDefault();\n this.keydownEnterEvent.emit($event);\n }\n }\n\n removeFocus() {\n this.inputControl.nativeElement.blur();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxMaskModule } from 'ngx-mask';\n\nimport { InputComponent } from './input.component';\nimport { IconComponent } from '../icon/icon.component';\nimport { InputErrorModule } from '../input-error/input-error.module';\n\n@NgModule({\n declarations: [InputComponent],\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n NgxMaskModule.forRoot(),\n IconComponent,\n InputErrorModule,\n MatIconModule,\n MatTooltipModule,\n ],\n exports: [InputComponent],\n})\nexport class InputModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\nimport { InputAreaModule } from '@ui-components/components/input-area/input-area.module';\n\nimport { PictureComponent } from './picture.component';\n\n@NgModule({\n declarations: [PictureComponent],\n imports: [\n CommonModule,\n MatButtonModule,\n MatTooltipModule,\n IconComponent,\n PipesModule,\n InputAreaModule,\n ReactiveFormsModule,\n MatIconModule,\n ],\n exports: [PictureComponent],\n})\nexport class PictureModule {}\n","
    \n \n \n \n \n \n \n \n
    \n Select All\n   \n Clear All\n
    \n
    \n
    \n\n \n \n {{ addNewLabel }}\n \n \n\n \n
    \n {{ displayValue | escapeHtml }}\n
    \n
    \n\n \n
    \n {{ displayValue }}\n
    \n
    \n\n \n\n \n \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n\n \n \n \n \n \n \n
    \n \n\n\n\n
    \n \n {{ label }}\n \n \n
    \n
    \n\n\n \n\n","import {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl } from '@angular/forms';\nimport { NgSelectComponent } from '@ng-select/ng-select';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { find, isEmpty, isNil, isUndefined, sortBy } from 'lodash';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\nimport { EIcon } from '@shared/enums/icon.enum';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { ValueLabelPair } from '@shared/interfaces/value-label-pair.interface';\n\n@UntilDestroy()\n@Component({\n selector: 'app-radio-button-dropdown',\n templateUrl: './radio-button-dropdown.component.html',\n styleUrls: ['./radio-button-dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RadioButtonDropdownComponent\n extends CustomControlAbstract\n implements OnInit, DoCheck, OnDestroy, ControlValueAccessor, AfterContentChecked\n{\n displayValue = '';\n private readonly labelInsideDefaultCss = 'nowrap pre-title';\n private readonly labelOutsideDefaultCss = 'nowrap body-small-bold';\n controlItems: IRadioButtonOption[] = [];\n controlSectionItems: IRadioButtonOption[][] = [];\n transformValueList: IRadioButtonOption[] = [];\n hasValue = false;\n\n @Input() selectCss = 'body-small text-color dark';\n @Input() set labelCss(value: string) {\n this._labelCss = value;\n }\n get labelCss(): string {\n if (this._labelCss) return this._labelCss;\n\n return this.labelInside ? this.labelInsideDefaultCss : this.labelOutsideDefaultCss;\n }\n\n private _valueCss: string;\n @Input() set valueCss(value) {\n this._valueCss = value;\n }\n get valueCss() {\n if (this._valueCss) {\n return this._valueCss;\n }\n return 'ellipsis text-color dark ' + (this.labelInside ? '' : 'body-small');\n }\n\n private _optionCss: string;\n @Input() set optionCss(value) {\n this._optionCss = value;\n }\n get optionCss() {\n if (this._optionCss) {\n return this._optionCss;\n }\n return 'fade-truncate w-100 text-color dark ' + (this.labelInside ? 'pre-option' : 'body-small');\n }\n\n @Input() containerWidthCss = '';\n @Input() containerCss = '';\n @Input() label = '';\n @Input() labelTooltip = '';\n @Input() icon: EIcon;\n @Input() iconCss = 'dropdown-icon';\n @Input() iconTooltip = '';\n @Input() attrPlaceholder = '';\n @Input() onSelectValueContent: ValueLabelPair;\n // temporary for deprecated values (see MoveOutType)\n @Input() unsupportedValueLabel = 'select value';\n /*\n * issue available https://github.com/ng-select/ng-select/issues/2055\n * known workaround - https://github.com/Kyotu-Technology/noetic-frontend/pull/455\n */\n @Input() highlightWhenActive = false;\n @Input() attrAppendTo = '';\n @Input() allowSelectAll = false;\n @Input() multiSelect = false;\n @Input() attrDisable = false;\n @Input() labelInside = false;\n @Input() markAsInvalid = false;\n @Input() allowClear = true;\n @Input() allowSearch = true;\n @Input() displayLabelAsValue = true;\n @Input() labelRequired: boolean;\n @Input() showEmptyValue = false;\n @Input() activeOnFocus = false;\n @Input() errorSection = true;\n // TODO: move autoSortList to setter\n // otherwise parameters order matters\n @Input() autoSortList = true;\n\n @Input() set items(items: IRadioButtonOption[] | IRadioButtonOption[][]) {\n this.controlSectionItems = [];\n this.controlItems = [];\n this.transformValueList = [];\n\n if (Array.isArray(items?.[0])) {\n this.controlSectionItems = (items as IRadioButtonOption[][]).map(section => this.sortSection(section));\n this.transformValueList = this.controlSectionItems.flat();\n } else {\n this.controlItems = this.sortSection(items as IRadioButtonOption[]);\n this.transformValueList = [...this.controlItems];\n }\n this.transformValue();\n }\n @Input() set listLoading(listLoading: boolean) {\n this._listLoading = listLoading;\n this.cdr.markForCheck();\n }\n @Input() customListItemTemplate: TemplateRef;\n\n @Input() allowAddNew = false;\n @Input() addNewLabel = '+ Add new item';\n @Output() addNewClicked = new EventEmitter();\n\n _labelCss = '';\n _listLoading = false;\n labelWidth: string;\n _labelElement: ElementRef;\n _focused = false;\n\n @ViewChild(NgSelectComponent) ngSelect: NgSelectComponent;\n @ViewChild('labelElement', { static: false }) set content(value: ElementRef) {\n if (!value) return;\n\n this._labelElement = value;\n this.labelWidth = `${value?.nativeElement?.clientWidth}px`;\n this.cdr.detectChanges();\n }\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n ngDoCheck(): void {\n //It's obligatory as we can change reactive control that is binding with this control\n if (this.ngControl?.control && this.control !== this.ngControl.control) {\n this.initControl();\n }\n }\n\n ngAfterContentChecked(): void {\n if (!this.labelInside || !this._labelElement) return;\n\n this.labelWidth = `${this._labelElement?.nativeElement?.clientWidth}px`;\n this.cdr.detectChanges();\n }\n\n ngOnInit(): void {\n this.initControl();\n }\n\n private sortSection(items: IRadioButtonOption[]) {\n return items?.length\n ? this.autoSortList\n ? sortBy(items as IRadioButtonOption[], [item => item.sort, item => item.label?.toLowerCase()])\n : (items as IRadioButtonOption[]) || []\n : [];\n }\n\n private initControl() {\n this.initControlBase();\n\n this.transformValue();\n this.control.valueChanges\n .pipe(untilDestroyed(this), distinctUntilChanged())\n .subscribe(value => this.transformValue());\n }\n\n searchFunction(term: string, value: T): boolean {\n term = term.toLowerCase();\n const item = find(this.transformValueList, { value }) as IRadioButtonOption;\n return item?.label?.toLowerCase()?.indexOf(term) > -1;\n }\n\n writeValue(value: any): void {\n if (value != this.control.value) {\n this.control.setValue(value);\n }\n this.transformValue();\n }\n\n valueChange(value: T) {\n this.onChanged(value);\n }\n\n ngOnDestroy(): void {}\n\n private transformValue() {\n const value = this.control?.value;\n const hasValue = Array.isArray(value) ? !isEmpty(value) : !isNil(value);\n if (hasValue || this.showEmptyValue) {\n this.hasValue = true;\n if (Array.isArray(value)) {\n if (value.length > 1) {\n this.displayValue = this.onSelectValueContent\n ? this.getCustomTransformValue(value.length)\n : `${value.length} item${value.length > 1 ? 's' : '' + ''}`;\n } else {\n const displayValue = this.transformValueList?.find(item => item.value === value[0])?.label;\n this.displayValue = isUndefined(displayValue) ? this.unsupportedValueLabel : displayValue;\n }\n } else if (this.displayLabelAsValue) {\n const valueStr = JSON.stringify(value);\n const displayValue = this.transformValueList?.find(\n item => item.value === value || JSON.stringify(item.value) === valueStr\n )?.label;\n this.displayValue = isUndefined(displayValue) ? this.unsupportedValueLabel : displayValue;\n } else {\n this.displayValue = value;\n }\n } else {\n this.hasValue = false;\n }\n\n this.cdr.detectChanges();\n }\n\n private getCustomTransformValue(count: number): string {\n if (!count) {\n return '';\n }\n\n return (count > 1 ? this.onSelectValueContent.multiple : this.onSelectValueContent.single).replace(\n this.onSelectValueContent.mask,\n `${count}`\n );\n }\n\n onSelectAll() {\n this.control.patchValue(this.controlItems.map(t => t.value));\n this.cdr.detectChanges();\n }\n\n onClearAll() {\n this.control.patchValue([]);\n this.cdr.detectChanges();\n }\n\n onAddNew() {\n this.addNewClicked.emit();\n this.ngSelect.close();\n this.cdr.detectChanges();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgSelectModule } from '@ng-select/ng-select';\n\nimport { InputModule } from '@app/modules/ui-components/components/input/input.module';\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { InputErrorModule } from '@ui-components/components/input-error/input-error.module';\n\nimport { RadioButtonDropdownComponent } from './radio-button-dropdown.component';\nimport { IconComponent } from '../icon/icon.component';\nimport { RadioButtonModule } from '../radio-button/radio-button.module';\n\n@NgModule({\n declarations: [RadioButtonDropdownComponent],\n imports: [\n CommonModule,\n MatMenuModule,\n RadioButtonModule,\n ReactiveFormsModule,\n IconComponent,\n MatButtonModule,\n InputModule,\n NgSelectModule,\n PipesModule,\n InputErrorModule,\n MatTooltipModule,\n MatProgressSpinnerModule,\n MatDividerModule,\n ],\n exports: [RadioButtonDropdownComponent],\n})\nexport class RadioButtonDropdownModule {}\n","
    \n \n \n \n
    \n
    \n
    \n \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormControlStatus, FormGroupDirective, NgControl } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { isNil } from 'lodash';\nimport { tap } from 'rxjs/operators';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\nimport { getActiveValidationErrorFunction } from '@shared/functions/get-active-validation-error.function';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\n\n@UntilDestroy()\n@Component({\n selector: 'app-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RadioButtonComponent\n extends CustomControlAbstract\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n disabled = false;\n\n @Input() label = '';\n @Input() labelCss = 'nowrap body-small-bold';\n @Input() items: IRadioButtonOption[] = [];\n @Input() labelRequired = false;\n @Input() radioGroupClass = 'display-flex';\n @Input() errorSection = true;\n @Input() markAsInvalid = false;\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n @Input() set attrDisable(attrDisable: boolean) {\n if (attrDisable) {\n this.control.disable();\n } else {\n this.control.enable();\n }\n this.disabled = attrDisable;\n this.cdr.detectChanges();\n }\n\n ngOnInit(): void {\n this.checkIfEmpty();\n this.control.valueChanges\n .pipe(\n untilDestroyed(this),\n tap((value: any) => {\n this.setValue(value);\n this.checkIfEmpty();\n })\n )\n .subscribe();\n\n this.control.statusChanges\n .pipe(\n untilDestroyed(this),\n tap(status => this.checkControlStatus(status))\n )\n .subscribe();\n\n if (this.ngControl?.control) {\n if (this.ngControl.control.errors) {\n this.errors = { ...this.ngControl.control.errors };\n }\n this.checkStatus();\n this.ngControl.control.statusChanges\n .pipe(\n untilDestroyed(this),\n tap(status => this.checkControlStatus(status))\n )\n .subscribe();\n }\n }\n\n writeValue(value: any): void {\n this.control.setValue(value);\n }\n\n setValue(value: unknown) {\n if (this.ngControl.control.disabled) {\n return;\n }\n this.onChanged(value);\n this.onTouched();\n }\n\n ngOnDestroy(): void {}\n\n protected checkControlStatus(status: FormControlStatus) {\n super.checkControlStatus(status);\n this.checkIfEmpty();\n }\n\n /**\n *\n * @private\n * This method checks empty value if labelRequired params is set as true.\n * Its only visual designation - does not change the status of the control as valid or invalid\n */\n\n private checkIfEmpty() {\n const isEmpty = isNil(this.control?.value);\n this.isEmptyValue = this.labelRequired ? isEmpty : false;\n this.errors = getActiveValidationErrorFunction({\n ...this.ngControl?.control?.errors,\n ...{ required: this.isEmptyValue },\n });\n this.cdr.detectChanges();\n }\n}\n","import { ValidationErrors } from '@angular/forms';\nimport { isEmpty } from 'lodash';\n\nexport function getActiveValidationErrorFunction(errors: ValidationErrors): ValidationErrors {\n const activeErrors: ValidationErrors = {};\n (Object.entries(errors) || [])\n .filter(([key, errorParams]) => !!errorParams)\n .forEach(([key, errorParams]) => {\n activeErrors[key] = errorParams;\n });\n return isEmpty(activeErrors) ? null : activeErrors;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatRadioModule } from '@angular/material/radio';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { InputErrorModule } from '@ui-components/components/input-error/input-error.module';\n\nimport { RadioButtonComponent } from './radio-button.component';\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [CommonModule, MatRadioModule, ReactiveFormsModule, PipesModule, InputErrorModule],\n exports: [RadioButtonComponent],\n})\nexport class RadioButtonModule {}\n","
    \n \n
    \n \n
    \n
    \n\n\n
    \n {{ value || emptyValue }}\n
    \n
    \n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, TemplateRef } from '@angular/core';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\n\n@Component({\n selector: 'app-read-only-field',\n templateUrl: './read-only-field.component.html',\n styleUrls: ['./read-only-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ReadOnlyFieldComponent extends ComponentAbstract implements OnInit {\n @Input() containerCss = 'display-flex flex-column';\n @Input() label = '';\n @Input() labelCss = 'nowrap body-small-bold';\n @Input() value: unknown;\n @Input() emptyValue = '–';\n @Input() valueContainerCss = 'value-container h-40';\n @Input() valueCss = 'ellipsis body-small text-color dark';\n @Input() customValue: TemplateRef;\n\n constructor(protected cdr: ChangeDetectorRef) {\n super(cdr);\n }\n\n ngOnInit(): void {}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ReadOnlyFieldComponent } from './read-only-field.component';\n\n@NgModule({\n declarations: [ReadOnlyFieldComponent],\n imports: [CommonModule],\n exports: [ReadOnlyFieldComponent],\n})\nexport class ReadOnlyFieldModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { TreeModule } from '@circlon/angular-tree-component';\n\nimport { InputErrorModule } from '@app/modules/ui-components/components/input-error/input-error.module';\nimport { SelectTreeComponent } from '@app/modules/ui-components/components/select-tree/select-tree.component';\n\nimport { IconComponent } from '../icon/icon.component';\n\n@NgModule({\n declarations: [SelectTreeComponent],\n imports: [CommonModule, TreeModule, InputErrorModule, MatMenuModule, MatInputModule, IconComponent],\n exports: [SelectTreeComponent],\n})\nexport class SelectTreeModule {}\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, NgModel, ReactiveFormsModule } from '@angular/forms';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\n\n@UntilDestroy()\n@Component({\n selector: 'app-slide-toggle',\n templateUrl: './slide-toggle.component.html',\n styleUrls: ['./slide-toggle.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [CommonModule, MatSlideToggleModule, ReactiveFormsModule, MatTooltipModule],\n})\nexport class SlideToggleComponent\n extends CustomControlAbstract\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n @Input() attrRightLabel: string;\n @Input() attrLeftLabel: string;\n @Input() labelCss = 'body-small';\n @Input() containerCss = 'display-flex grid-gap-8 align-items-center';\n @Input() activeBold = false;\n @Input() tooltip: string;\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n ngOnInit(): void {\n this.initControlBase();\n\n if (this.ngControl instanceof NgModel) {\n this.control.valueChanges.pipe(untilDestroyed(this)).subscribe(value => {\n if ((this.ngControl.control as unknown as { _pendingChange: boolean })._pendingChange) {\n this.ngControl.viewToModelUpdate(value);\n }\n });\n }\n }\n\n ngOnDestroy(): void {}\n\n writeValue(value: boolean): void {\n if (value != this.control.value) {\n this.control.setValue(value);\n }\n }\n\n valueChange(value: boolean) {\n this.onChanged(value);\n }\n\n setValue(value: boolean) {\n if (this.ngControl?.control?.disabled) {\n return;\n }\n this.onChanged(value);\n this.onTouched();\n }\n}\n","
    \n \n \n
    \n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TableEmptyContentComponent } from './table-empty-content.component';\n\n@NgModule({\n declarations: [TableEmptyContentComponent],\n exports: [TableEmptyContentComponent],\n imports: [CommonModule],\n})\nexport class TableEmptyContentModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\n\nimport { TableStatusToggleComponent } from './table-status-toggle.component';\n\n@NgModule({\n declarations: [TableStatusToggleComponent],\n exports: [TableStatusToggleComponent],\n imports: [CommonModule, IconComponent, MatButtonModule, MatCheckboxModule, ReactiveFormsModule],\n})\nexport class TableStatusToggleModule {}\n","
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    --- vendors ---
    \n
    \n \n \n \n\n \n
    \n {{ displayValue | escapeHtml }}\n
    \n
    \n \n
    \n \n\n \n
    \n {{ label }}\n
    \n
    \n\n \n
    \n
    \n \n
    \n\n","import {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { find } from 'lodash';\nimport { distinctUntilChanged } from 'rxjs';\n\nimport { CustomControlAbstract } from '@app/components/abstract/custom-control.abstract';\nimport { getUserList } from '@shared/functions/get-user-list.function';\nimport {\n IRadioButtonOption,\n ITooltipRadioButtonOption,\n IUserRadioButtonOption,\n} from '@shared/interfaces/radio-button-option.interface';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { EnumerationValuePipe } from '@shared/pipes/enumeration-value.pipe';\n\n@UntilDestroy()\n@Component({\n selector: 'app-user-select-dropdown',\n templateUrl: './user-select-dropdown.component.html',\n styleUrls: ['./user-select-dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class UserSelectDropdownComponent\n extends CustomControlAbstract\n implements OnInit, OnDestroy, ControlValueAccessor, AfterContentChecked\n{\n displayValue = '';\n userList: IUserRadioButtonOption[] = [];\n vendorList: IUserRadioButtonOption[] = [];\n hasValue = false;\n readonly labelInsideDefaultCss = 'nowrap pre-title';\n readonly labelOutsideDefaultCss = 'nowrap body-small-bold';\n\n @Input() selectCss = 'body-small text-color dark';\n @Input() containerWidthCss = '';\n @Input() showChevron = true;\n\n _labelCss = '';\n @Input() set labelCss(value: string) {\n this._labelCss = value;\n }\n get labelCss(): string {\n if (this._labelCss) return this._labelCss;\n\n return this.labelInside ? this.labelInsideDefaultCss : this.labelOutsideDefaultCss;\n }\n\n @Input() containerCss = 'display-flex align-items-center';\n @Input() label = '';\n @Input() attrPlaceholder = '';\n @Input() allowClear = true;\n @Input() allowSearch = true;\n @Input() highlightWhenActive = false;\n @Input() attrDisable = false;\n @Input() labelInside = false;\n @Input() labelRequired: boolean;\n @Input() errorSection = true;\n @Input() markAsInvalid = false;\n @Input() userData: UserData;\n @Input() showMyOption = false;\n @Input() showAllOption = false;\n @Input() myLabel = 'My Tasks';\n @Input() allLabel = 'All Tasks';\n /*\n * issue available https://github.com/ng-select/ng-select/issues/2055\n * known workaround - https://github.com/Kyotu-Technology/noetic-frontend/pull/455\n */\n @Input() attrAppendTo = '';\n\n private _valueCss: string;\n @Input() set valueCss(value) {\n this._valueCss = value;\n }\n get valueCss() {\n if (this._valueCss) {\n return this._valueCss;\n }\n return 'ellipsis text-color dark ' + (this.labelInside ? '' : 'body-small');\n }\n\n private _optionCss: string;\n @Input() set optionCss(value) {\n this._optionCss = value;\n }\n get optionCss() {\n if (this._optionCss) {\n return this._optionCss;\n }\n return 'ellipsis text-color dark ' + (this.labelInside ? 'pre-option' : 'body-small');\n }\n\n @Input() set users(users: RestUserModel[]) {\n if (!!users) {\n this.prepareUsersList(users);\n }\n }\n\n _listLoading = false;\n @Input() set listLoading(listLoading: boolean) {\n this._listLoading = listLoading;\n this.cdr.detectChanges();\n }\n\n get myOptionItem(): IRadioButtonOption | null {\n if (!this.showMyOption || !this.userData || this.userData.id === this.control.value) {\n return null;\n }\n\n return {\n value: this.userData?.id,\n label: this.myLabel,\n };\n }\n\n get allOptionItem(): IRadioButtonOption | null {\n if (!this.showAllOption || !this.control.value) {\n return null;\n }\n\n return {\n value: -1,\n label: this.allLabel,\n };\n }\n\n labelWidth = '';\n _labelElement: ElementRef;\n\n @ViewChild('labelElement', { static: false }) set content(value: ElementRef) {\n if (!value) return;\n\n this._labelElement = value;\n this.labelWidth = `${value?.nativeElement?.clientWidth}px`;\n this.cdr.detectChanges();\n }\n\n constructor(\n @Self() @Optional() protected ngControl: NgControl,\n protected cdr: ChangeDetectorRef,\n private enumerationValuePipe: EnumerationValuePipe,\n @Optional() formDirective: FormGroupDirective\n ) {\n super(ngControl, cdr, formDirective);\n }\n\n ngAfterContentChecked(): void {\n if (!this.labelInside || !this._labelElement) return;\n\n this.labelWidth = `${this._labelElement?.nativeElement?.clientWidth}px`;\n this.cdr.detectChanges();\n }\n\n ngOnInit(): void {\n this.initControlBase();\n\n this.transformValue(this.control?.value);\n this.control.valueChanges\n .pipe(untilDestroyed(this), distinctUntilChanged())\n .subscribe(value => this.transformValue(value));\n }\n\n searchFunction(term: string, value: number): boolean {\n term = term.toLowerCase();\n const bothLists = this.userList.concat(this.vendorList);\n const item = find(bothLists, { value });\n return item?.label?.toLowerCase()?.indexOf(term) > -1;\n }\n\n ngOnDestroy(): void {}\n\n writeValue(value: number): void {\n this.transformValue(value);\n if (value != this.control.value) {\n this.control.setValue(value);\n }\n }\n\n private prepareUsersList(users: RestUserModel[]) {\n this.userList = [];\n this.vendorList = [];\n\n const preparedUsers = getUserList(users);\n\n const userListRaw = [];\n const vendorListRaw = [];\n\n preparedUsers.forEach(user => {\n switch (user.userGroupType) {\n case this.UserType.Employee:\n {\n userListRaw.push(user);\n }\n break;\n case this.UserType.Contractor:\n {\n vendorListRaw.push(user);\n }\n break;\n }\n });\n\n this.userList = userListRaw.sort((a, b) => a.label.localeCompare(b.label));\n this.vendorList = vendorListRaw.sort((a, b) => a.label.localeCompare(b.label));\n this.transformValue(this.control.value);\n }\n\n private transformValue(value: number) {\n if (value === -1) {\n this.displayValue = this.allLabel;\n } else if (this.userData?.id === value) {\n this.displayValue = this.myLabel;\n } else {\n this.hasValue = !!value;\n if (this.userList.length || this.vendorList.length) {\n const userName = `${this.enumerationValuePipe.transform(value, this.userList, true)}`;\n const vendorName = `${this.enumerationValuePipe.transform(value, this.vendorList, true)}`;\n\n this.displayValue = userName || vendorName || '';\n }\n }\n this.cdr.detectChanges();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { NgSelectModule } from '@ng-select/ng-select';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\nimport { InputErrorModule } from '@ui-components/components/input-error/input-error.module';\n\nimport { UserSelectDropdownComponent } from './user-select-dropdown.component';\n\n@NgModule({\n declarations: [UserSelectDropdownComponent],\n exports: [UserSelectDropdownComponent],\n imports: [\n CommonModule,\n NgSelectModule,\n ReactiveFormsModule,\n IconComponent,\n PipesModule,\n InputErrorModule,\n MatProgressSpinnerModule,\n ],\n})\nexport class UserSelectDropdownModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AutoresizeDirective } from './autoresize.directive';\n\n@NgModule({\n declarations: [AutoresizeDirective],\n imports: [CommonModule],\n exports: [AutoresizeDirective],\n})\nexport class AutoresizeModule {}\n","import { MatDialogConfig } from '@angular/material/dialog';\n\nexport const DefaultModalConfigConstant: MatDialogConfig = {\n autoFocus: false,\n width: '618px',\n};\n","export enum DialogResult {\n Fail,\n Success,\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { RadioButtonModule } from '@ui-components/components/radio-button/radio-button.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { SelectTreeModule } from '@ui-components/components/select-tree/select-tree.module';\n\nimport { AddVendorUserModalComponent } from './add-vendor-user-modal.component';\n\n@NgModule({\n declarations: [AddVendorUserModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n InputModule,\n RadioButtonDropdownModule,\n SelectTreeModule,\n RadioButtonModule,\n ],\n})\nexport class AddVendorUserModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\nimport { PictureModule } from '@ui-components/components/picture/picture.module';\n\nimport { GalleryModalComponent } from './gallery-modal.component';\n\n@NgModule({\n declarations: [GalleryModalComponent],\n imports: [CommonModule, MatDialogModule, MatButtonModule, PictureModule, IconComponent, MatTooltipModule],\n})\nexport class GalleryModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { InfoModalComponent } from './info-modal.component';\n\n@NgModule({\n declarations: [InfoModalComponent],\n imports: [CommonModule, MatDialogModule, MatButtonModule],\n exports: [InfoModalComponent],\n})\nexport class InfoModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\n\nimport { NewBulkScopeComponent } from './new-bulk-scope.component';\n\n@NgModule({\n declarations: [NewBulkScopeComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n InputModule,\n ReactiveFormsModule,\n IconComponent,\n MatProgressSpinnerModule,\n RadioButtonDropdownModule,\n ],\n})\nexport class NewBulkScopeModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { RouterModule } from '@angular/router';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { ReadOnlyFieldModule } from '@ui-components/components/read-only-field/read-only-field.module';\nimport { UserSelectDropdownModule } from '@ui-components/components/user-select-dropdown/user-select-dropdown.module';\n\nimport { NextStepAssigneeModalComponent } from './next-step-assignee-modal.component';\n\n@NgModule({\n declarations: [NextStepAssigneeModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n PipesModule,\n ReadOnlyFieldModule,\n UserSelectDropdownModule,\n ReactiveFormsModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n RouterModule,\n FormsModule,\n ],\n})\nexport class NextStepAssigneeModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { InputModule } from '@ui-components/components/input/input.module';\n\nimport { PromptModalComponent } from './prompt-modal.component';\n\n@NgModule({\n declarations: [PromptModalComponent],\n imports: [CommonModule, MatDialogModule, MatButtonModule, ReactiveFormsModule, InputModule],\n})\nexport class PromptModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { AttachmentModule } from '@ui-components/components/attachment/attachment.module';\nimport { AttachmentItemModule } from '@ui-components/components/attachment-item/attachment-item.module';\nimport { AttachmentsListModule } from '@ui-components/components/attachments-list/attachments-list.module';\nimport { DateDropdownModule } from '@ui-components/components/date-dropdown/date-dropdown.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { InputAreaModule } from '@ui-components/components/input-area/input-area.module';\nimport { InputErrorModule } from '@ui-components/components/input-error/input-error.module';\nimport { PictureModule } from '@ui-components/components/picture/picture.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { TableStatusToggleModule } from '@ui-components/components/table-status-toggle/table-status-toggle.module';\nimport { UserSelectDropdownModule } from '@ui-components/components/user-select-dropdown/user-select-dropdown.module';\n\nimport { TicketPreviewModalComponent } from './ticket-preview-modal.component';\n\n@NgModule({\n declarations: [TicketPreviewModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n ReactiveFormsModule,\n InputModule,\n RadioButtonDropdownModule,\n InputErrorModule,\n DateDropdownModule,\n AttachmentItemModule,\n AttachmentModule,\n TableStatusToggleModule,\n MatButtonModule,\n PictureModule,\n MatProgressSpinnerModule,\n UserSelectDropdownModule,\n InputAreaModule,\n AttachmentsListModule,\n ],\n})\nexport class TicketPreviewModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { CompaniesStoreModule } from '@companies/store/companies-store.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { RadioButtonModule } from '@ui-components/components/radio-button/radio-button.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { SelectTreeModule } from '@ui-components/components/select-tree/select-tree.module';\n\nimport { UserPreviewModalComponent } from './user-preview-modal.component';\n\n@NgModule({\n declarations: [UserPreviewModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n InputModule,\n RadioButtonDropdownModule,\n SelectTreeModule,\n RadioButtonModule,\n CompaniesStoreModule,\n ],\n})\nexport class UserPreviewModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { DividerModule } from '@ui-components/components/divider/divider.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\n\nimport { AddVendorModalComponent } from './add-vendor-modal.component';\n\n@NgModule({\n declarations: [AddVendorModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n InputModule,\n ReactiveFormsModule,\n RadioButtonDropdownModule,\n MatProgressSpinnerModule,\n MatDividerModule,\n DividerModule,\n ],\n exports: [AddVendorModalComponent],\n})\nexport class AddVendorModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { CommentTooLongModalComponent } from './comment-too-long-modal.component';\n\n@NgModule({\n declarations: [CommentTooLongModalComponent],\n imports: [CommonModule, MatDialogModule, MatButtonModule],\n exports: [CommentTooLongModalComponent],\n})\nexport class CommentTooLongModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\n\nimport { ConfirmationModalComponent } from './confirmation-modal.component';\n\n@NgModule({\n declarations: [ConfirmationModalComponent],\n imports: [CommonModule, MatDialogModule, MatButtonModule, MatCheckboxModule, ReactiveFormsModule],\n exports: [ConfirmationModalComponent],\n})\nexport class ConfirmationModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { SpaceTemplateStoreModule } from '@main-application/inspections/pages/space-template/store/space-template-store.module';\nimport { IconComponent } from '@ui-components/components/icon/icon.component';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { RadioButtonModule } from '@ui-components/components/radio-button/radio-button.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { SelectTreeModule } from '@ui-components/components/select-tree/select-tree.module';\nimport { TableEmptyContentModule } from '@ui-components/components/table-empty-content/table-empty-content.module';\n\nimport { SpaceTemplateModalComponent } from './space-template-modal.component';\n\n@NgModule({\n declarations: [SpaceTemplateModalComponent],\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n MatTableModule,\n MatSortModule,\n ReactiveFormsModule,\n InputModule,\n RadioButtonDropdownModule,\n TableEmptyContentModule,\n SelectTreeModule,\n RadioButtonModule,\n SpaceTemplateStoreModule,\n IconComponent,\n ],\n})\nexport class SpaceTemplateModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { PipesModule } from '@shared/pipes/pipes.module';\nimport { AttachmentModule } from '@ui-components/components/attachment/attachment.module';\nimport { AttachmentItemModule } from '@ui-components/components/attachment-item/attachment-item.module';\nimport { AttachmentsListModule } from '@ui-components/components/attachments-list/attachments-list.module';\nimport { ButtonModule } from '@ui-components/components/button/button.module';\nimport { DateDropdownModule } from '@ui-components/components/date-dropdown/date-dropdown.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { InputAreaModule } from '@ui-components/components/input-area/input-area.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { UserSelectDropdownModule } from '@ui-components/components/user-select-dropdown/user-select-dropdown.module';\n\nimport { TurnoverPunchModalComponent } from './turnover-punch-modal.component';\n\n@NgModule({\n declarations: [TurnoverPunchModalComponent],\n imports: [\n CommonModule,\n AttachmentItemModule,\n AttachmentModule,\n InputAreaModule,\n InputModule,\n DateDropdownModule,\n RadioButtonDropdownModule,\n UserSelectDropdownModule,\n MatDialogModule,\n ButtonModule,\n MatButtonModule,\n ReactiveFormsModule,\n AttachmentsListModule,\n AttachmentItemModule,\n PipesModule,\n MatProgressSpinnerModule,\n ],\n})\nexport class TurnoverPunchModalModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { NgxMaskModule } from 'ngx-mask';\n\nimport { ModalsService } from '@app/modules/ui-components/modals/modals.service';\nimport { NewTurnoverModalModule } from '@app/modules/ui-components/modals/new-turnover-modal/new-turnover-modal.module';\nimport { WorkflowActionsService } from '@app/services/workflow-actions.service';\nimport { AttachmentModule } from '@ui-components/components/attachment/attachment.module';\nimport { DateDropdownModule } from '@ui-components/components/date-dropdown/date-dropdown.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { InputFileModule } from '@ui-components/components/input-file/input-file.module';\nimport { InputTypeFileModule } from '@ui-components/components/input-type-file/input-type-file.module';\nimport { RadioButtonDropdownModule } from '@ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { AddVendorUserModalModule } from '@ui-components/modals/add-vendor-user-modal/add-vendor-user-modal.module';\nimport { GalleryModalModule } from '@ui-components/modals/gallery-modal/gallery-modal.module';\nimport { InfoModalModule } from '@ui-components/modals/info-modal/info-modal.module';\nimport { NewBulkScopeModule } from '@ui-components/modals/new-bulk-scope/new-bulk-scope.module';\nimport { NextStepAssigneeModalModule } from '@ui-components/modals/next-step-assignee-modal/next-step-assignee-modal.module';\nimport { PromptModalModule } from '@ui-components/modals/prompt-modal/prompt-modal.module';\nimport { TicketPreviewModalModule } from '@ui-components/modals/ticket-preview-modal/ticket-preview-modal.module';\nimport { UserPreviewModalModule } from '@ui-components/modals/user-preview-modal/user-preview-modal.module';\n\nimport { AddBidModalComponent } from './add-bid-modal/add-bid-modal.component';\nimport { AddVendorModalModule } from './add-vendor-modal/add-vendor-modal.module';\nimport { CommentTooLongModalModule } from './comment-too-long-modal/comment-too-long-modal.module';\nimport { ConfirmationModalModule } from './confirmation-modal/confirmation-modal.module';\nimport { SpaceTemplateModalModule } from './space-template-modal/space-template-modal.module';\nimport { TurnoverPunchModalModule } from './turnover-punch-modal/turnover-punch-modal.module';\n\n@NgModule({\n declarations: [AddBidModalComponent],\n providers: [ModalsService, WorkflowActionsService],\n imports: [\n CommonModule,\n NewTurnoverModalModule,\n GalleryModalModule,\n NewBulkScopeModule,\n TicketPreviewModalModule,\n CommentTooLongModalModule,\n TurnoverPunchModalModule,\n InfoModalModule,\n NextStepAssigneeModalModule,\n UserPreviewModalModule,\n SpaceTemplateModalModule,\n AddVendorModalModule,\n ConfirmationModalModule,\n AddVendorUserModalModule,\n MatDialogModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n FormsModule,\n RadioButtonDropdownModule,\n ReactiveFormsModule,\n DateDropdownModule,\n MatTooltipModule,\n InputModule,\n MatInputModule,\n NgxMaskModule,\n InputFileModule,\n InputTypeFileModule,\n PromptModalModule,\n AttachmentModule,\n ],\n})\nexport class ModalsModule {}\n","
    \n

    \n {{ data.showDoNotShowAgain ? 'Save template?' : 'Save template' }}\n

    \n \n
    \n You have changed this template. If you do NOT save, your changes will affect only this cell. If you DO save it\n will affect all unstarted inspections in this column.\n
    \n \n\n
    \n \n Don't save\n \n \n \n \n\n \n Save template\n \n \n \n \n
    \n\n Don't show for this column again\n \n
    \n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport {\n RestCustomInspectionContentItemModel,\n RestCustomInspectionModel,\n} from '@main-application/boards/interfaces/custom-inspection';\nimport { CustomInspectionService } from '@main-application/boards/services/custom-inpection.service';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { InputComponent } from '@ui-components/components/input/input.component';\n\nexport interface CustomInspectionSaveTemplateDialogData {\n inspectionTemplate: RestCustomInspectionModel;\n inspectionTemplateContent: RestCustomInspectionContentItemModel[];\n showDoNotShowAgain?: boolean;\n}\n\nexport interface CustomInspectionSaveTemplateDialogResult {\n doNotShowAgain?: boolean;\n}\n\n@Component({\n selector: 'app-schedule-save-template-dialog',\n templateUrl: './custom-inspection-save-template-dialog.component.html',\n styleUrls: ['./custom-inspection-save-template-dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CustomInspectionSaveTemplateDialogComponent implements AfterViewInit {\n form = this.formBuilder.group({\n name: [this.data?.inspectionTemplate.inspectionName, [Validators.required]],\n });\n\n @ViewChild(InputComponent) templateInput: InputComponent;\n\n doNotShowAgain = false;\n\n constructor(\n public dialogRef: MatDialogRef<\n CustomInspectionSaveTemplateDialogComponent,\n CustomInspectionSaveTemplateDialogResult\n >,\n protected store: Store<{}>,\n protected cdr: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private customInspectionService: CustomInspectionService,\n private snackbarService: SnackbarService,\n @Inject(MAT_DIALOG_DATA) protected data: CustomInspectionSaveTemplateDialogData\n ) {}\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.templateInput?.inputControl.nativeElement.focus();\n }, 0);\n }\n\n cancel() {\n this.dialogRef.close({ doNotShowAgain: this.doNotShowAgain });\n }\n\n save() {\n if (this.form.valid) {\n const saveObservable =\n this.form.value.name === this.data.inspectionTemplate.inspectionName\n ? this.customInspectionService.updateCustomInspectionTemplateContent(\n this.data.inspectionTemplate.id,\n this.data.inspectionTemplateContent\n )\n : this.customInspectionService.addCustomInspectionTemplateWithItems(\n {\n inspectionName: this.form.value.name,\n isRequired: this.data.inspectionTemplate.isRequired,\n },\n this.data.inspectionTemplateContent\n );\n (\n saveObservable as Observable<\n [number, RestCustomInspectionContentItemModel[]] | RestCustomInspectionContentItemModel[]\n >\n ).subscribe(() => {\n this.snackbarService.success(`${this.form.value.name} saved`);\n });\n this.cancel();\n } else {\n this.form.markAllAsTouched();\n }\n }\n}\n","
    \n
    Add bid
    \n
    \n\n
    \n \n\n
    \n \n \n
    \n
    \n \n \n
    \n \n
    \n\n
    \n \n \n
    \n
    \n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';\nimport { FormGroup, UntypedFormControl, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Actions, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { Observable, filter, first, take } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport {\n addTurnoverBidCategory,\n addTurnoverBidCategorySuccess,\n createTurnoverBid,\n createTurnoverBidSuccess,\n} from '@main-application/turnovers/actions/turnover-bids.actions';\nimport { getCompanyList } from '@main-application/turnovers/actions/turnovers.actions';\nimport {\n selectTurnoverBidAdding,\n selectTurnoverBidCategories,\n} from '@main-application/turnovers/selectors/turnover-bids.selectors';\nimport { selectCompanyList } from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { getBidCategoriesRadioList } from '@shared/functions/get-bid-categories-radio-list.function';\nimport { getCompanyRadioList } from '@shared/functions/get-company-radio-list.function';\nimport { Upload } from '@shared/interfaces';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { AddUpdateTurnoverBid } from '@shared/interfaces/turnover-bids.interface';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\nexport interface AddBidModalResult {\n bid: AddUpdateTurnoverBid;\n}\n\nexport interface AddBidModalData {\n turnoverId: number;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-add-bid-modal',\n templateUrl: './add-bid-modal.component.html',\n styleUrls: ['./add-bid-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AddBidModalComponent implements OnInit {\n inProgress$: Observable;\n formSubmitted = false;\n vendorList: IRadioButtonOption[] = [];\n categoryList: IRadioButtonOption[] = [];\n today = new Date();\n form = new FormGroup({\n file: new UntypedFormControl(null as Upload, [Validators.required]),\n bidAmount: new UntypedFormControl(null, [Validators.required]),\n vendorId: new UntypedFormControl(null, [Validators.required]),\n categoryId: new UntypedFormControl(null, [Validators.required]),\n bidDate: new UntypedFormControl(this.today, [Validators.required]),\n });\n\n constructor(\n private cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: AddBidModalData,\n private store: Store<{}>,\n private modalsService: ModalsService,\n private actions$: Actions\n ) {}\n\n ngOnInit(): void {\n this.inProgress$ = this.store.select(selectTurnoverBidAdding);\n\n this.store\n .select(selectCompanyList)\n .pipe(\n untilDestroyed(this),\n filter((companyList: RestCompanyModel[]) => !!companyList),\n tap((companyList: RestCompanyModel[]) => {\n this.vendorList = getCompanyRadioList(companyList);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectTurnoverBidCategories)\n .pipe(\n untilDestroyed(this),\n tap(categories => {\n this.categoryList = getBidCategoriesRadioList(categories);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n }\n\n fileUploaded(item: AttachmentItem) {\n this.form.controls.file.setValue(item?.upload);\n this.cdr.detectChanges();\n }\n\n save() {\n this.formSubmitted = true;\n if (this.form.invalid) {\n this.form.markAsTouched();\n this.cdr.detectChanges();\n return;\n }\n const { file, bidAmount, bidDate, vendorId, categoryId } = this.form.value;\n const result = {\n bid: {\n bidAmount,\n bidDate,\n vendorId,\n turnoverId: this.data.turnoverId,\n status: 0,\n draftInvoiceFileUploadId: file.id,\n turnoverDataBidCategoryId: categoryId,\n },\n };\n\n this.store.dispatch(createTurnoverBid(result));\n\n this.actions$\n .pipe(\n ofType(createTurnoverBidSuccess),\n take(1),\n tap(action => {\n this.dialogRef.close(result);\n })\n )\n .subscribe();\n }\n\n close() {\n this.dialogRef.close();\n }\n\n addNewVendor() {\n this.modalsService\n .openNewVendorModal({})\n .afterClosed()\n .pipe(\n tap(company => {\n if (company) {\n this.form.controls.vendorId.setValue(company.id);\n this.store.dispatch(getCompanyList());\n this.cdr.detectChanges();\n }\n })\n )\n .subscribe();\n }\n\n addNewCategory() {\n this.modalsService\n .openPrompt({\n title: 'Add new category',\n fieldName: 'Name',\n })\n .afterClosed()\n .pipe(\n filter(Boolean),\n tap(result => {\n if (result.value) {\n this.actions$\n .pipe(\n ofType(addTurnoverBidCategorySuccess),\n first(),\n tap(({ categoryId }) => {\n this.form.controls.categoryId.setValue(categoryId);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n this.store.dispatch(addTurnoverBidCategory({ name: result.value }));\n }\n })\n )\n .subscribe();\n }\n}\n","import { every, filter, find, first, map, size, some } from 'lodash';\n\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithProperties } from '@shared/interfaces/user-with-properties';\n\nexport function combineUserWithProperties(\n userId: number,\n allProperties: PropertyBasicInfo[],\n propertyMapping: UserToPropertyMapping[]\n) {\n const userPropertiesMappings = filter(propertyMapping, { userId });\n const userMappedProperties = map(userPropertiesMappings, mapping => {\n return find(allProperties, { id: mapping.propertyId });\n });\n return filter(userMappedProperties, userProperty => !!userProperty);\n}\n\nexport function compareAllUsersProperties(users: UserWithProperties[]) {\n const firstUser = first(users);\n return every(users, user => {\n return (\n !!user.userProperties === !!firstUser.userProperties &&\n size(user.userProperties) === size(firstUser.userProperties) &&\n every(user.userProperties, property => some(firstUser.userProperties, { id: property.id }))\n );\n });\n}\n","import { cloneDeep, forEach, reduce } from 'lodash';\n\nimport { PropertyBasicInfo, PropertyBasicInfoNode } from '@shared/interfaces/propertyBasicInfo';\n\nexport function formatPropertyStructureToTree(allProperties: PropertyBasicInfo[]) {\n const root = {\n children: [],\n name: 'All',\n id: -1,\n } as unknown as PropertyBasicInfoNode;\n const properties: PropertyBasicInfoNode[] = cloneDeep(allProperties);\n const propertiesIndexMap = reduce(\n properties,\n (result, singleProperty, index) => {\n result[singleProperty.id] = index;\n return result;\n },\n {}\n );\n\n forEach(properties, singleProperty => {\n if (!singleProperty.parentId) {\n singleProperty.parent = root;\n root.children = [...root.children, singleProperty];\n return;\n }\n\n const parentIndex = propertiesIndexMap[singleProperty.parentId];\n const parent = properties[parentIndex];\n if (parent === undefined) {\n console.warn(\n \"couldn't find parent for element \",\n singleProperty.id,\n ' with parentId = ',\n singleProperty.parentId\n );\n return;\n }\n singleProperty.parent = parent;\n parent.children = [...(parent.children || []), singleProperty];\n });\n\n return [root];\n}\n","import { UserType } from '@shared/enums/user-type';\n\nexport enum UserPreviewFields {\n FirstName = 'firstName',\n LastName = 'lastName',\n Email = 'email',\n RoleId = 'roleId',\n UserGroupType = 'userGroupType',\n CompanyId = 'companyId',\n PhoneNumber = 'phoneNumber',\n NativeLanguage = 'nativeLanguage',\n}\n\nexport interface UserPreview {\n [UserPreviewFields.FirstName]: string;\n [UserPreviewFields.LastName]: string;\n [UserPreviewFields.Email]: string;\n [UserPreviewFields.RoleId]: number;\n [UserPreviewFields.UserGroupType]: UserType;\n [UserPreviewFields.CompanyId]: number;\n [UserPreviewFields.PhoneNumber]: string;\n [UserPreviewFields.NativeLanguage]: number;\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport const UserExistsValidator = (emailAddressList: string[]): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: boolean } => {\n if (!control.value || !emailAddressList?.length) {\n return null;\n }\n\n if (emailAddressList.includes(control.value)) {\n return {\n userAlreadyExists: true,\n };\n }\n return null;\n };\n};\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport const UserInactiveValidator = (emailAddressList: string[]): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: boolean } => {\n if (!control.value || !emailAddressList?.length) {\n return null;\n }\n\n if (emailAddressList.includes(control.value)) {\n return {\n userInactive: true,\n };\n }\n return null;\n };\n};\n","export enum PropertyType {\n None = 0,\n Portfolio = 1,\n Property = 2,\n Building = 3,\n Unit = 4,\n}\n","import { TreeModel, TreeNode } from '@circlon/angular-tree-component';\n\n// built-in function had deffects (highly affecting tests)\n// https://github.com/CirclonGroup/angular-tree-component/issues/928\n//\nexport function doForAllTreeNodes(treeModel: TreeModel, callback: (node: TreeNode) => void) {\n treeModel.roots.forEach(node => doForAllNodes(node, callback));\n}\n\nfunction doForAllNodes(node: TreeNode, callback: (node: TreeNode) => void) {\n if (!node) return;\n\n callback(node);\n if (node.children) {\n node.children.forEach(child => doForAllNodes(child, callback));\n }\n}\n","
    \n \n
    \n \n \n \n
    \n \n
    \n\n \n
    \n \n \n
    \n \n
    \n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { IActionMapping, ITreeOptions, TreeComponent, TreeModel, TreeNode } from '@circlon/angular-tree-component';\nimport { IDTypeDictionary } from '@circlon/angular-tree-component/lib/defs/api';\nimport { each, every, find, isEmpty, reduce, some, toLower } from 'lodash';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { PropertyType } from '@shared/enums/property-type.enum';\nimport { PropertyBasicInfo, PropertyBasicInfoNode } from '@shared/interfaces/propertyBasicInfo';\n\nimport { doForAllTreeNodes } from './functions/tree-utils';\n\n@Component({\n selector: 'app-select-tree',\n templateUrl: './select-tree.component.html',\n styleUrls: ['./select-tree.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SelectTreeComponent extends ComponentAbstract {\n @Input() containerCss = 'display-flex flex-column';\n @Input() label = '';\n @Input() labelCss = 'body-small-bold nowrap';\n @Input() nodes;\n @Input() selectedNodes: PropertyBasicInfoNode[];\n @Input() warningMessage: string;\n @Input() labelRequired = false;\n @Input() selectAllEvent = new EventEmitter();\n @Output() selectedRoots = new EventEmitter();\n @Output() clearAll = new EventEmitter();\n @ViewChild(TreeComponent) tree: TreeComponent;\n filterString = '';\n placeholder = 'select property';\n\n actionMapping: IActionMapping = {\n mouse: {\n checkboxClick: this.checkboxClick.bind(this),\n },\n };\n\n options: ITreeOptions = {\n useCheckbox: true,\n useVirtualScroll: true,\n nodeHeight: 23,\n actionMapping: this.actionMapping,\n };\n\n constructor(protected cdr: ChangeDetectorRef) {\n super(cdr);\n this.updatePlaceholderAndEmit = this.updatePlaceholderAndEmit.bind(this);\n }\n\n treeInitialized() {\n this.selectNodes(this.selectedNodes);\n }\n\n clearSelection() {\n this.tree.treeModel.selectedLeafNodeIds = {};\n this.updatePlaceholderAndEmit({});\n this.clearAll.emit();\n }\n\n hasNodesSelected(): boolean {\n if (!this.tree || !this.tree.treeModel) {\n return false;\n }\n const selectionObject = this.tree.treeModel.selectedLeafNodeIds;\n return some(Object.values(selectionObject), value => value);\n }\n\n selectNodes(propertiesToSelect: PropertyBasicInfo[]) {\n if (!this.tree) {\n console.error('missing tree, return ');\n return;\n }\n\n doForAllTreeNodes(this.tree.treeModel, treeNode => {\n const shouldSelectNode = find(propertiesToSelect, property => treeNode.data.id === property.id);\n if (shouldSelectNode) {\n this.setValue(this.tree.treeModel, treeNode, true);\n }\n });\n }\n\n filterTree(event: Event) {\n const text = (event.target as HTMLInputElement).value;\n this.tree.treeModel.filterNodes(node => {\n const allParentsName = this.getAncestorsName(node.data);\n return toLower(allParentsName).includes(toLower(text));\n });\n\n if (isEmpty(text)) {\n this.collapseAll();\n this.expandRoot();\n return;\n }\n }\n\n expandRoot() {\n const firstRoot = this.tree.treeModel.roots[0];\n firstRoot.expand();\n }\n\n getAncestorsName(node: PropertyBasicInfoNode) {\n if (node.parent) {\n return this.getAncestorsName(node.parent) + node.name;\n }\n\n return node.name;\n }\n\n toggleMenu(menuExpanded: boolean) {\n this.isExpanded = menuExpanded;\n\n if (this.isExpanded) {\n this.onListOpen();\n } else {\n this.onListClose();\n }\n\n this.cdr.detectChanges();\n }\n\n setValue(tree: TreeModel, node: TreeNode, selectionValue) {\n const selectedLeafNodeIds = tree.selectedLeafNodeIds;\n toggleNodeSelection(node, selectionValue, selectedLeafNodeIds);\n tree.selectedLeafNodeIds = Object.assign({}, selectedLeafNodeIds, { [node.id]: selectionValue });\n\n this.updatePlaceholderAndEmit(selectedLeafNodeIds);\n }\n\n checkboxClick(tree: TreeModel, node: TreeNode, $event: any) {\n if (!node) {\n return;\n }\n\n const selectionValue = !node.isSelected;\n const selectedLeafNodeIds = tree.selectedLeafNodeIds;\n toggleNodeSelection(node, selectionValue, selectedLeafNodeIds);\n tree.selectedLeafNodeIds = Object.assign({}, selectedLeafNodeIds, { [node.id]: selectionValue });\n\n this.updatePlaceholderAndEmit(selectedLeafNodeIds);\n }\n\n updatePlaceholderAndEmit(selectedNodeIds: IDTypeDictionary) {\n const { selectedLeaves, selectedRoots, isRootSelected } = this.getSelectedNodes(selectedNodeIds);\n this.selectedRoots.emit(selectedRoots);\n if (!isEmpty(selectedLeaves)) {\n this.placeholder = isRootSelected\n ? 'All'\n : selectedLeaves.length === 1\n ? `Selected: ${selectedLeaves.length} Unit`\n : `Selected: ${selectedLeaves.length} Units`;\n } else {\n this.placeholder = 'Select property';\n }\n }\n\n collapseAll() {\n this.tree.treeModel.expandedNodeIds = {};\n }\n\n expanderClick(tree: TreeModel, node: TreeNode, $event: any) {\n if (!node || !node.hasChildren) {\n return;\n }\n const value = !node.isExpanded;\n if (node.hasChildren) {\n tree.expandedNodeIds = Object.assign({}, tree.expandedNodeIds, { [node.id]: value });\n }\n }\n\n getSelectedNodes(selectedNodeIds: IDTypeDictionary) {\n const entries = Object.entries(selectedNodeIds);\n let isRootSelected = false;\n\n const onlySelectedNodes = reduce(\n entries,\n (acc, [id, isChecked]) => {\n if (isChecked) {\n if (id === '-1') {\n isRootSelected = true;\n }\n acc.push(id);\n }\n return acc;\n },\n []\n );\n\n const selectedRoots = this.getSelectedRootsRecursive([], this.nodes[0], onlySelectedNodes);\n const selectedLeaves = this.getSelectedLeavesRecursive([], this.nodes[0], onlySelectedNodes);\n\n return { selectedRoots, selectedLeaves, isRootSelected };\n }\n\n private getSelectedLeavesRecursive(acc, node: PropertyBasicInfoNode, selectedNodeIds: string[]) {\n if (!node.children && selectedNodeIds.includes(node.id.toString()) && node.propertyType === PropertyType.Unit) {\n acc.push(node);\n return acc;\n }\n\n if (node.children) {\n each(node.children, childNode => this.getSelectedLeavesRecursive(acc, childNode, selectedNodeIds));\n }\n return acc;\n }\n\n private getSelectedRootsRecursive(acc, node: PropertyBasicInfoNode, selectedNodeIds: string[]) {\n if (node.parent && selectedNodeIds.includes(node.id.toString())) {\n acc.push(node);\n return acc;\n }\n\n if (node.children) {\n each(node.children, childNode => this.getSelectedRootsRecursive(acc, childNode, selectedNodeIds));\n }\n return acc;\n }\n\n private onListOpen() {\n this.tree.treeModel.clearFilter();\n this.collapseAll();\n this.expandRoot();\n this.tree.sizeChanged();\n }\n\n private onListClose(): void {\n this.filterString = '';\n }\n}\n\nfunction toggleNodeSelection(node: TreeNode, selectionValue, selectedLeafNodeIds) {\n selectedLeafNodeIds[node.id] = selectionValue;\n\n if (selectionValue) {\n selectParentIfNeeded(node.parent, selectedLeafNodeIds);\n }\n\n if (!selectionValue) {\n deselectAncestorsIfNeeded(node.parent, selectedLeafNodeIds);\n }\n\n if (!isEmpty(node.children)) {\n node.children.forEach(childNode => toggleNodeSelection(childNode, selectionValue, selectedLeafNodeIds));\n }\n}\n\nfunction isNodeSelected(nodeToCheck: TreeNode, selectedLeafNodeIds) {\n return selectedLeafNodeIds[nodeToCheck.id];\n}\n\nfunction selectParentIfNeeded(parentNode: TreeNode, selectedLeafNodeIds) {\n if (every(parentNode.children, (childNode: TreeNode) => isNodeSelected(childNode, selectedLeafNodeIds))) {\n selectedLeafNodeIds[parentNode.id] = true;\n if (parentNode.parent) {\n selectParentIfNeeded(parentNode.parent, selectedLeafNodeIds);\n }\n }\n}\n\nfunction deselectAncestorsIfNeeded(parentNode: TreeNode, selectedLeafNodeIds) {\n if (\n isNodeSelected(parentNode, selectedLeafNodeIds) &&\n some(parentNode.children, (childNode: TreeNode) => !isNodeSelected(childNode, selectedLeafNodeIds))\n ) {\n selectedLeafNodeIds[parentNode.id] = false;\n if (parentNode.parent) {\n deselectAncestorsIfNeeded(parentNode.parent, selectedLeafNodeIds);\n }\n }\n}\n","
    \n
    \n
    {{ header }}
    \n
    \n\n \n
    \n
    \n
    \n \n \n
    \n \n\n
    \n \n \n
    \n\n \n
    \n
    \n
    \n \n \n \n \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, FormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { some } from 'lodash';\nimport { Observable, combineLatest } from 'rxjs';\nimport { distinctUntilChanged, filter, map, tap } from 'rxjs/operators';\n\nimport { AdministrationAbstract } from '@main-application/administration/abstract/administration-abstract';\nimport {\n clearUserPreviewData,\n inviteNewUser,\n loadAllGeneralRoles,\n} from '@main-application/administration/actions/administration.actions';\nimport { VENDOR_ROLE_NAME } from '@main-application/administration/constants/vendor-role-name.constant';\nimport { combineUserWithProperties } from '@main-application/administration/functions/combineUserWithProperties';\nimport { formatPropertyStructureToTree } from '@main-application/administration/functions/propertyStructureToTree';\nimport {\n selectAllGeneralRoles,\n selectAllPropertiesStructure,\n selectAllUserToPropertyMappings,\n selectAllUsersWithGeneralRoles,\n selectAssignUserIntoPropertyInProgress,\n selectAssignUserIntoPropertyStatus,\n selectInactiveUsers,\n selectSaveUserToGeneralRoleInProgress,\n selectSaveUserToGeneralRoleStatus,\n selectUserInviteInProgress,\n selectUserInviteStatus,\n selectUserInvited,\n} from '@main-application/administration/selectors/administration.selectors';\nimport { UserPreview, UserPreviewFields } from '@main-application/administration/users/config/enums/user-preview';\nimport { getCompanyList } from '@main-application/turnovers/actions/turnovers.actions';\nimport { selectCompanyList, selectCompanyListLoading } from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { UserType } from '@shared/enums/user-type';\nimport { getCompanyRadioList } from '@shared/functions/get-company-radio-list.function';\nimport { getEnumerationRadioListFunction } from '@shared/functions/get-enumeration-radio-list.function';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { InviteRestUserModel, RestUserModel } from '@shared/interfaces/user.interface';\nimport { selectNativeLanguagesEnumeration } from '@shared/selectors/enumeration.selectors';\nimport { selectUserData } from '@shared/selectors/user.selectors';\nimport { UserExistsValidator } from '@shared/validators/user-exists.validator';\nimport { UserInactiveValidator } from '@shared/validators/user-inactive.validator';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { DialogResult } from '@ui-components/modals/config/dialog-result.enum';\nimport { EmailPatternValidator } from '@ui-components/validators/email.validator';\n\nexport interface AddVendorUserModalData {\n vendorId?: number;\n header?: string;\n}\n\nexport interface AddVendorUserModalResult {\n invitedUser: RestUserModel;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-add-vendor-user-modal',\n templateUrl: './add-vendor-user-modal.component.html',\n styleUrls: ['./add-vendor-user-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AddVendorUserModalComponent extends AdministrationAbstract implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n selectedProperties: PropertyBasicInfo[] = [];\n propertiesToSelect: PropertyBasicInfo[] = [];\n arePropertiesChanged = false;\n root = [];\n warningMessage = '';\n companyRadioList: IRadioButtonOption[] = [];\n nativeLanguages: IRadioButtonOption[] = [];\n companyListLoading$: Observable;\n userToPropertyMapping: UserToPropertyMapping[];\n vendorRoleId: number;\n header: string;\n saveButtonText: string;\n formSubmitted = false;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n protected store: Store<{}>,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: AddVendorUserModalData,\n private formBuilder: FormBuilder,\n private snackbarService: SnackbarService\n ) {\n super(cdr, store);\n\n this.header = data.header;\n this.saveButtonText = data.vendorId ? 'Add and Assign' : 'Send invitation';\n }\n\n get firstName(): FormControl {\n return this.form.get(UserPreviewFields.FirstName) as FormControl;\n }\n\n get lastName(): FormControl {\n return this.form.get(UserPreviewFields.LastName) as FormControl;\n }\n\n get email(): FormControl {\n return this.form.get(UserPreviewFields.Email) as FormControl;\n }\n\n get companyId(): FormControl {\n return this.form.get(UserPreviewFields.CompanyId) as FormControl;\n }\n\n get phoneNumber(): FormControl {\n return this.form.get(UserPreviewFields.PhoneNumber) as FormControl;\n }\n\n get nativeLanguage(): FormControl {\n return this.form.get(UserPreviewFields.NativeLanguage) as FormControl;\n }\n\n ngOnInit(): void {\n this.initForm();\n this.store.dispatch(getCompanyList());\n this.store.dispatch(loadAllGeneralRoles());\n this.companyListLoading$ = this.store.select(selectCompanyListLoading);\n\n this.store\n .select(selectAllGeneralRoles)\n .pipe(untilDestroyed(this), filter(Boolean))\n .subscribe(allRoles => (this.vendorRoleId = allRoles.find(e => e.roleName == VENDOR_ROLE_NAME)?.id));\n\n this.store\n .select(selectNativeLanguagesEnumeration)\n .pipe(\n untilDestroyed(this),\n tap(values => {\n this.nativeLanguages = getEnumerationRadioListFunction(values, null, false);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectCompanyList)\n .pipe(\n untilDestroyed(this),\n filter((companyList: RestCompanyModel[]) => !!companyList),\n tap((companyList: RestCompanyModel[]) => {\n this.companyRadioList = getCompanyRadioList(companyList);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectUserData)\n .pipe(\n untilDestroyed(this),\n filter((userData: UserData) => !!userData),\n tap((userData: UserData) => {\n this.userData = userData;\n })\n )\n .subscribe();\n\n combineLatest([this.store.select(selectAllUsersWithGeneralRoles), this.store.select(selectInactiveUsers)])\n .pipe(\n untilDestroyed(this),\n filter(([allUsers, inactiveUsers]) => !!allUsers && !!inactiveUsers),\n tap(([allUsers, inactiveUsers]: [UserWithGeneralRole[], RestUserModel[]]) => {\n const existingActiveEmails = allUsers.map(item => item.email);\n const existingInactiveEmails = inactiveUsers.map(item => item.email);\n this.email.addValidators(UserExistsValidator(existingActiveEmails));\n this.email.addValidators(UserInactiveValidator(existingInactiveEmails));\n })\n )\n .subscribe();\n\n combineLatest([\n this.store.select(selectAllPropertiesStructure),\n this.store.select(selectAllUserToPropertyMappings),\n this.store.select(selectUserData),\n ])\n .pipe(\n untilDestroyed(this),\n distinctUntilChanged(),\n filter(\n ([allProperties, userToPropertyMapping, userData]) => !!allProperties && !!userToPropertyMapping && !!userData\n ),\n tap(([allProperties, userToPropertyMapping, userData]) => {\n this.userToPropertyMapping = userToPropertyMapping;\n this.root = formatPropertyStructureToTree(allProperties);\n this.propertiesToSelect = combineUserWithProperties(userData.id, allProperties, userToPropertyMapping);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.inProgress$ = combineLatest([\n this.store.select(selectUserInviteInProgress),\n this.store.select(selectSaveUserToGeneralRoleInProgress),\n this.store.select(selectAssignUserIntoPropertyInProgress),\n ]).pipe(map(operationsInProgress => some(operationsInProgress, Boolean)));\n\n combineLatest([\n this.store.select(selectUserInvited),\n this.store.select(selectUserInviteStatus),\n this.store.select(selectSaveUserToGeneralRoleStatus),\n this.store.select(selectAssignUserIntoPropertyStatus),\n ])\n .pipe(\n untilDestroyed(this),\n filter(\n ([invitedUser, userInviteStatus, saveUserToGeneralRoleStatus, assignUserIntoPropertyStatus]) =>\n invitedUser &&\n userInviteStatus === UpdateStatus.OK &&\n saveUserToGeneralRoleStatus === UpdateStatus.UPDATED &&\n assignUserIntoPropertyStatus === UpdateStatus.UPDATED\n )\n )\n .subscribe(([invitedUser]) => {\n const company = this.companyRadioList.find(c => c.value === invitedUser.companyId);\n this.snackbarService.success(`${invitedUser.displayName} added to ${company?.label}`);\n this.close(DialogResult.Success, invitedUser);\n });\n\n if (this.data.vendorId) {\n this.companyId.setValue(this.data.vendorId);\n }\n }\n\n save() {\n this.formSubmitted = true;\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const { firstName, lastName, email, userGroupType, companyId, phoneNumber, nativeLanguage } = this.form\n .value as UserPreview;\n let selectedProperty: number[] = [];\n const inviteUser: InviteRestUserModel = {\n email,\n firstName,\n lastName,\n userGroupType: UserType.Contractor,\n displayName: `${firstName} ${lastName}`,\n companyId,\n phoneNumber,\n nativeLanguage,\n };\n\n if (this.arePropertiesChanged) {\n selectedProperty = this.selectedProperties.map(item => item.id);\n }\n\n this.store.dispatch(inviteNewUser({ user: inviteUser, roleId: this.vendorRoleId, selectedProperty }));\n }\n\n close(result: DialogResult = DialogResult.Fail, invitedUser?: RestUserModel) {\n if (result === DialogResult.Fail) {\n this.dialogRef.close();\n } else {\n this.dialogRef.close({\n invitedUser,\n });\n }\n }\n\n ngOnDestroy(): void {\n this.store.dispatch(clearUserPreviewData());\n }\n\n private initForm() {\n this.form = this.formBuilder.group({\n [UserPreviewFields.FirstName]: [null, [Validators.required, Validators.maxLength(24)]],\n [UserPreviewFields.LastName]: [null, [Validators.required, Validators.maxLength(24)]],\n [UserPreviewFields.Email]: [null, [Validators.required, EmailPatternValidator(), Validators.email]],\n [UserPreviewFields.CompanyId]: [null, [Validators.required]],\n [UserPreviewFields.PhoneNumber]: [null, [Validators.pattern('[- +()0-9]+')]],\n [UserPreviewFields.NativeLanguage]: [0, Validators.required],\n });\n }\n\n selectedRootsChange($event: PropertyBasicInfo[]) {\n this.arePropertiesChanged = true;\n this.selectedProperties = $event;\n }\n}\n","
    \n
    \n

    Pictures ({{ attachments?.length || 0 }})

    \n \n
    \n\n \n
    \n
    \n
      \n
    • \n \n \n \n \n
    • \n
    \n
    \n
    \n
    \n
    \n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n OnDestroy,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport Viewer from 'viewerjs';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { deleteUnitAttachment } from '@portfolio/store/portfolio.actions';\nimport { selectDeleteUnitAttachmentInProgress } from '@portfolio/store/portfolio.selectors';\nimport { UnitAttachmentType } from '@shared/enums/attachment-type';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { GalleryItem } from '@shared/interfaces/gallery-item';\n\nimport Options = Viewer.Options;\n\n@UntilDestroy()\n@Component({\n selector: 'app-gallery-modal',\n templateUrl: './gallery-modal.component.html',\n styleUrls: ['./gallery-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GalleryModalComponent extends ComponentAbstract implements OnInit, AfterViewInit, OnDestroy {\n attachments: RestGenericTypedAttachment[] = [];\n title = '';\n content = '';\n\n deleteAttachmentInProgress$: Observable;\n viewer: Viewer;\n viewerOptions: Options = {\n toolbar: {\n zoomIn: 4,\n zoomOut: 4,\n oneToOne: 4,\n reset: 4,\n prev: 4,\n play: {\n show: 4,\n size: 'large',\n },\n next: 4,\n rotateLeft: false,\n rotateRight: false,\n flipHorizontal: false,\n flipVertical: false,\n },\n };\n\n @ViewChild('imagesList', { read: ElementRef }) imagesList: ElementRef;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: GalleryItem,\n private store: Store<{}>\n ) {\n super(cdr);\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n ngOnInit(): void {\n this.deleteAttachmentInProgress$ = this.store.select(selectDeleteUnitAttachmentInProgress);\n\n this.data?.attachmentsBSubject\n .pipe(\n untilDestroyed(this),\n tap((attachments: RestGenericTypedAttachment[]) => {\n this.attachments = attachments;\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.getDeleteConfirmationLabels();\n }\n\n ngAfterViewInit(): void {\n // @ts-ignore\n this.viewer = new Viewer(this.imagesList.nativeElement, this.viewerOptions);\n this.cdr.detectChanges();\n }\n\n ngOnDestroy(): void {\n if (this.viewer) {\n this.viewer.destroy();\n }\n }\n\n deleteItem(attachment: RestGenericTypedAttachment) {\n this.store.dispatch(deleteUnitAttachment({ unitId: this.data.unitId, attachment }));\n }\n\n private getDeleteConfirmationLabels() {\n switch (this.data.attachmentType) {\n case UnitAttachmentType.Photo:\n {\n this.title = `Removal of the unit photo`;\n this.content = 'Are you sure you want to remove the unit photo?';\n }\n break;\n\n case UnitAttachmentType.FloorPlan:\n {\n this.title = `Removal of the unit floor plan`;\n this.content = 'Are you sure you want to remove the unit floor plan?';\n }\n break;\n }\n }\n}\n","
    \n
    \n
    {{ data?.title }}
    \n
    \n\n \n
    \n \n
    \n
    \n \n \n \n
    \n\n\n
    {{ data?.content || '' }}
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { ModalData } from '@shared/interfaces/modal-data';\n\n@Component({\n selector: 'app-info-modal',\n templateUrl: './info-modal.component.html',\n styleUrls: ['./info-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InfoModalComponent extends ComponentAbstract implements OnInit {\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: ModalData\n ) {\n super(cdr);\n }\n\n ngOnInit(): void {}\n\n confirm() {\n this.dialogRef.close();\n }\n}\n","
    \n
    \n
    \n Choose new assignee for {{ data.nextWorkflowStep | enumerationValue: workflowStepList }}\n
    \n
    \n\n \n
    \n
    \n \n\n \n\n remember my choice \n
    \n\n
    \n \n \n
    \n Done\n \n
    \n \n
    \n
    \n \n Over this message?\n \n Choose all assignees here\n \n \n
    \n
    \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ActivatedRoute } from '@angular/router';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nimport { UserService } from '@app/services/user.service';\nimport { selectUpdateStepAssigneeInProgress } from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { WorkflowStepListConst } from '@shared/constants/workflow-step-list.const';\nimport { ManagementRoute } from '@shared/enums/management-route.enum';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestTurnoverDataModel } from '@shared/interfaces/turnover.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { WorkflowAction } from '@shared/interfaces/workflow-action.interface';\n\nexport class NextStepAssigneeModalData {\n nextWorkflowStep: WorkflowStepEnumType;\n turnoverData: RestTurnoverDataModel;\n propertyId: number;\n propertyName: string;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-next-step-assignee-modal',\n templateUrl: './next-step-assignee-modal.component.html',\n styleUrls: ['./next-step-assignee-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NextStepAssigneeModalComponent implements OnInit, OnDestroy {\n form = this.formBuilder.group({\n assigneeId: [null as number, [Validators.required]],\n rememberIt: [false as boolean],\n });\n\n userListModel: RestUserModel[] = [];\n propertyUserListLoading$ = new BehaviorSubject(true);\n updateInProgress$: Observable;\n currentWorkflowStep: WorkflowStepEnumType;\n ManagementRoute = ManagementRoute;\n workflowStepList: IRadioButtonOption[] = WorkflowStepListConst;\n\n get propertyId() {\n return this.data.propertyId ?? this.data.turnoverData.property.id;\n }\n get propertyName() {\n return this.data.propertyName ?? this.data.turnoverData.property.name;\n }\n\n constructor(\n protected cdr: ChangeDetectorRef,\n protected store: Store<{}>,\n protected activatedRoute: ActivatedRoute,\n protected formBuilder: FormBuilder,\n private userService: UserService,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: NextStepAssigneeModalData\n ) {\n this.currentWorkflowStep = this.data.turnoverData.activeWorkflowStepType;\n }\n\n ngOnInit(): void {\n this.updateInProgress$ = this.store.select(selectUpdateStepAssigneeInProgress);\n\n this.propertyUserListLoading$.next(true);\n this.userService\n .getCachedPropertyUserList(this.propertyId, true)\n .pipe(untilDestroyed(this))\n .subscribe(userListModel => {\n this.propertyUserListLoading$.next(false);\n this.userListModel = userListModel;\n this.cdr.detectChanges();\n });\n }\n\n close() {\n this.dialogRef.close();\n }\n\n ngOnDestroy(): void {}\n\n save() {\n const { assigneeId, rememberIt } = this.form.value;\n const workflowAction: WorkflowAction = {\n turnoverId: this.data.turnoverData.id,\n nextWorkflowStep: this.data.nextWorkflowStep,\n assigneeId,\n rememberIt,\n };\n\n this.dialogRef.close(workflowAction);\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n UntypedFormBuilder,\n UntypedFormControl,\n UntypedFormGroup,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { CustomInspectionHeaderComponent } from '@main-application/boards/boards-view/boards-cell/cell-types/schedule-cell/custom-inspection-template-dialog/custom-inspection-header/custom-inspection-header.component';\nimport { InputComponent } from '@ui-components/components/input/input.component';\n\nexport interface PromptModalData {\n title: string;\n fieldName: string;\n fieldPlaceholder?: string;\n minLength?: number;\n okButtonText?: string;\n okButtonColor?: ThemePalette;\n cancelButtonColor?: ThemePalette;\n}\n\nexport interface PromptModalResult {\n value: string;\n}\n\n@Component({\n selector: 'app-prompt-modal',\n templateUrl: './prompt-modal.component.html',\n styleUrls: ['./prompt-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PromptModalComponent implements OnInit, AfterViewInit {\n form: UntypedFormGroup;\n isSubmitted: boolean;\n\n @ViewChild(InputComponent) input: InputComponent;\n\n get displayName() {\n return this.form.controls.displayName as UntypedFormControl;\n }\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: PromptModalData,\n private formBuilder: UntypedFormBuilder\n ) {\n this.data.okButtonText = this.data.okButtonText || 'Add';\n this.data.okButtonColor = this.data.okButtonColor || 'primary';\n this.data.cancelButtonColor = this.data.cancelButtonColor || 'warn';\n }\n\n ngOnInit(): void {\n this.initForm();\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this.input?.focus();\n }, 0);\n }\n\n cancel() {\n this.dialogRef.close(null);\n }\n\n save() {\n this.isSubmitted = true;\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n this.dialogRef.close({ value: this.form.controls.displayName.value });\n }\n\n private initForm() {\n this.form = this.formBuilder.group({\n displayName: [null, [Validators.required]],\n });\n\n if (this.data.minLength > 0) {\n this.displayName.addValidators(Validators.minLength(this.data.minLength));\n }\n }\n}\n","
    \n

    {{ data.title }}

    \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n","import { TicketAttachmentType } from '@shared/enums/attachment-type';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { UpdateTypedAttachmentToEntityModel } from '@shared/interfaces/turnover.interface';\n\nexport function getAttachmentToEntityParams(\n attachmentItem: AttachmentItem,\n ticketId: number\n): UpdateTypedAttachmentToEntityModel {\n let params: UpdateTypedAttachmentToEntityModel = {\n description: '',\n externalUrl: '',\n title: '',\n unitId: 0,\n propertyId: 0,\n portfolioId: 0,\n turnoverIds: [],\n applianceId: 0,\n bidId: 0,\n ticketId: ticketId,\n attachmentType: TicketAttachmentType.Attachment,\n };\n\n if (attachmentItem?.link) {\n params = {\n ...params,\n externalUrl: attachmentItem.link,\n };\n } else {\n params = {\n ...params,\n fileUploadId: attachmentItem?.upload?.id,\n title: attachmentItem?.upload?.originalFileName,\n description: attachmentItem?.upload?.originalFileName,\n };\n }\n\n return params;\n}\n","import { createSelector } from '@ngrx/store';\n\nimport { fileUploadFeatureKey } from '@shared/reducers/file-upload.reducer';\nimport { selectCoreModule } from '@shared/selectors/core.selector';\n\nconst selectFileUploadState = createSelector(selectCoreModule, coreState => coreState[fileUploadFeatureKey]);\n\n/**\n * select uploaded file params\n */\nexport const selectUploadedFileParams = createSelector(\n selectFileUploadState,\n fileUploadState => fileUploadState?.uploadedFileItem\n);\n\n/**\n * select file to upload loading\n */\nexport const selectFileToUploadLoading = createSelector(\n selectFileUploadState,\n fileUploadState => fileUploadState.fileToUploadLoading\n);\n\n/**\n * select delete status\n */\nexport const selectDeleteStatus = createSelector(\n selectFileUploadState,\n fileUploadState => fileUploadState.deleteStatus\n);\n","
    \n
    \n \n
    \n\n \n
    \n
    \n
    \n
    \n \n \n \n
    \n \n \n \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n \n
    \n Mark as done\n \n
    \n \n\n \n
    \n {{ data.isNew ? 'Create' : 'Save changes' }}\n \n
    \n \n
    \n
    \n
    \n\n\n
    New ticket:
    \n \n
    \n\n \n\n\n\n
    {{ data?.propertyName || '' }} - {{ data?.unitName }}
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { Observable, combineLatest } from 'rxjs';\nimport { delay, filter, tap } from 'rxjs/operators';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { loadPropertyUsers } from '@main-application/administration/actions/administration.actions';\nimport {\n selectPropertyUsers,\n selectPropertyUsersLoading,\n} from '@main-application/administration/selectors/administration.selectors';\nimport { TimezoneService } from '@main-application/management/components/system-configuration/components/date-time-configuration/timezone.service';\nimport {\n addNewTurnoverTicket,\n clearAddedTicketAttachment,\n clearTicketPreview,\n deleteFileFromRepository,\n deleteTurnoverTicketAttachment,\n getTicket,\n getTicketAttachments,\n setTicketAttachment,\n updateTicketPreview,\n} from '@main-application/turnovers/actions/turnovers.actions';\nimport { TurnoverForm } from '@main-application/turnovers/config/enums/turnover-form';\nimport {\n selectAddedTicketAttachment,\n selectNewTurnoverTicket,\n selectNewTurnoverTicketLoading,\n selectTicket,\n selectTicketAttachments,\n selectTicketUpdateInProgress,\n selectTicketUpdateInProgressStatus,\n} from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { deleteFile } from '@shared/actions/file-upload.actions';\nimport { TicketAttachmentType } from '@shared/enums/attachment-type';\nimport { PermissionLevelType } from '@shared/enums/permission-level.enum';\nimport { PriorityType } from '@shared/enums/priority-type';\nimport { TicketStatusType } from '@shared/enums/ticket-status-type';\nimport { TicketType } from '@shared/enums/ticket-type';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { checkPermissionLevel } from '@shared/functions/check-permission-level.function';\nimport { getDateObjectFunction } from '@shared/functions/get-date-object.function';\nimport { getAttachmentToEntityParams } from '@shared/functions/ticket-attachment.utils';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { ListUpdateAction } from '@shared/interfaces/list-update-action.interface';\nimport { TicketPreviewForm } from '@shared/interfaces/turnover-form.interface';\nimport { RestTicketModel, RestTypedTicketAttachment } from '@shared/interfaces/turnover.interface';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\nimport { TurnoverAttachmentPipe } from '@shared/pipes/turnover-attachment.pipe';\nimport { selectDeleteStatus } from '@shared/selectors/file-upload.selectors';\nimport { selectUserData } from '@shared/selectors/user.selectors';\n\n@UntilDestroy()\n@Component({\n selector: 'app-ticket-preview-modal',\n templateUrl: './ticket-preview-modal.component.html',\n styleUrls: ['./ticket-preview-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TicketPreviewModalComponent extends ComponentAbstract implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n updateInProgress$: Observable;\n addNewInProgress$: Observable;\n propertyUserListLoading$: Observable;\n users: RestUserModel[] = [];\n attachmentItems: RestGenericTypedAttachment[] = [];\n cleanInputAttachment: EventEmitter = new EventEmitter();\n ticket: RestTicketModel = null;\n newAttachmentItem: AttachmentItem = null;\n isTicketDone = false;\n formSubmitted = false;\n\n @ViewChild('attachments', { read: ElementRef, static: false }) attachments: ElementRef;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: ListUpdateAction,\n private formBuilder: UntypedFormBuilder,\n private store: Store<{}>,\n private turnoverAttachmentPipe: TurnoverAttachmentPipe,\n private timezoneService: TimezoneService\n ) {\n super(cdr);\n }\n\n get name(): UntypedFormControl {\n return this.form?.get(TurnoverForm.NAME) as UntypedFormControl;\n }\n\n get detailedInformation(): UntypedFormControl {\n return this.form.get(TurnoverForm.DETAILED_INFORMATION) as UntypedFormControl;\n }\n\n get assigneeId(): UntypedFormControl {\n return this.form.get(TurnoverForm.ASSIGNEE_ID) as UntypedFormControl;\n }\n\n get end(): UntypedFormControl {\n return this.form?.get(TurnoverForm.END) as UntypedFormControl;\n }\n\n get ticketPriorityType(): UntypedFormControl {\n return this.form.get(TurnoverForm.TICKET_PRIORITY_TYPE) as UntypedFormControl;\n }\n\n get ticketStatusType(): UntypedFormControl {\n return this.form.get(TurnoverForm.TICKET_STATUS_TYPE) as UntypedFormControl;\n }\n\n get ableToResolve(): UntypedFormControl {\n return this.form?.get(TurnoverForm.ABLE_TO_RESOLVE) as UntypedFormControl;\n }\n\n ngOnDestroy(): void {\n this.store.dispatch(clearTicketPreview());\n }\n\n ngOnInit(): void {\n if (this.data?.isNew) {\n this.initForm();\n } else {\n this.store.dispatch(getTicket({ ticketId: this.data?.ticketId }));\n }\n this.updateInProgress$ = this.store.select(selectTicketUpdateInProgress);\n this.addNewInProgress$ = this.store.select(selectNewTurnoverTicketLoading);\n this.store.dispatch(loadPropertyUsers({ propertyId: this.data?.propertyId }));\n this.propertyUserListLoading$ = this.store.select(selectPropertyUsersLoading);\n\n this.store\n .select(selectPropertyUsers)\n .pipe(\n untilDestroyed(this),\n filter(users => !!users),\n tap(users => {\n this.users = users;\n })\n )\n .subscribe();\n\n combineLatest([this.store.select(selectUserData), this.store.select(selectTicket)])\n .pipe(\n untilDestroyed(this),\n filter(([userData, ticket]) => !!userData && !!ticket),\n tap(([userData, ticket]) => {\n this.ticket = ticket;\n this.userData = userData;\n this.attachmentItems = this.turnoverAttachmentPipe.transform(\n this.ticket?.allAttachments,\n TicketAttachmentType.Attachment\n );\n this.initForm();\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectAddedTicketAttachment)\n .pipe(\n untilDestroyed(this),\n filter((addedTicketAttachment: RestTypedTicketAttachment) => !!addedTicketAttachment),\n tap((addedTicketAttachment: RestTypedTicketAttachment) => {\n this.cleanInputAttachment.emit();\n this.store.dispatch(clearAddedTicketAttachment());\n if (this.ticket?.id) {\n this.store.dispatch(getTicketAttachments({ ticketId: this.ticket.id }));\n }\n })\n )\n .subscribe();\n\n this.store\n .select(selectTicketAttachments)\n .pipe(\n untilDestroyed(this),\n filter(ticketAttachments => !!ticketAttachments),\n tap((ticketAttachments: RestTypedTicketAttachment[]) => {\n this.attachmentItems = this.turnoverAttachmentPipe.transform(\n ticketAttachments.map(item => {\n return {\n ...item,\n targetAttachmentType: item.ticketAttachmentType,\n };\n }),\n TicketAttachmentType.Attachment\n );\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectTicketUpdateInProgressStatus)\n .pipe(\n untilDestroyed(this),\n filter(status => status === UpdateStatus.UPDATE),\n delay(300),\n tap(() => {\n this.dialogRef.close();\n })\n )\n .subscribe();\n\n this.store\n .select(selectNewTurnoverTicket)\n .pipe(\n untilDestroyed(this),\n filter((newTurnoverTicket: RestTicketModel) => !!newTurnoverTicket),\n tap((newTurnoverTicket: RestTicketModel) => {\n if (this.newAttachmentItem) {\n this.store.dispatch(\n setTicketAttachment({\n ticketType: TicketType.Ticket,\n attachmentToEntity: getAttachmentToEntityParams(this.newAttachmentItem, newTurnoverTicket.id),\n })\n );\n this.newAttachmentItem = null;\n this.store.dispatch(clearAddedTicketAttachment());\n }\n this.dialogRef.close();\n })\n )\n .subscribe();\n\n this.store\n .select(selectDeleteStatus)\n .pipe(\n untilDestroyed(this),\n filter((status: UpdateStatus) => status === UpdateStatus.DELETED),\n tap(() => {\n this.clearNewTicketAttachment();\n })\n )\n .subscribe();\n }\n\n deleteTicketAttachment(attachment: RestGenericTypedAttachment) {\n const ticketType = TicketType.Ticket;\n this.store.dispatch(deleteTurnoverTicketAttachment({ ticketType, attachment, ticketId: this.ticket.id }));\n }\n\n deleteNewTicketAttachment() {\n if (this.newAttachmentItem?.upload) {\n this.store.dispatch(deleteFile({ fileId: this.newAttachmentItem?.upload?.id }));\n } else {\n this.clearNewTicketAttachment();\n }\n }\n\n addTicketAttachment(attachmentItem: AttachmentItem) {\n if (this.data?.isNew) {\n if (attachmentItem?.upload?.id !== this.newAttachmentItem?.upload?.id && this.newAttachmentItem?.upload?.id) {\n this.store.dispatch(deleteFileFromRepository({ fileId: this.newAttachmentItem?.upload?.id }));\n }\n this.newAttachmentItem = attachmentItem;\n if (this.attachments) {\n setTimeout(() => {\n this.attachments.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }, 0);\n }\n this.cdr.detectChanges();\n } else {\n this.store.dispatch(\n setTicketAttachment({\n ticketType: TicketType.Ticket,\n attachmentToEntity: getAttachmentToEntityParams(attachmentItem, this.ticket.id),\n })\n );\n }\n }\n\n cancel() {\n if (this.newAttachmentItem?.upload) {\n this.store.dispatch(deleteFile({ fileId: this.newAttachmentItem?.upload?.id }));\n }\n this.dialogRef.close();\n }\n\n save() {\n this.formSubmitted = true;\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const formValue: TicketPreviewForm = this.form.value;\n const turnoverTicket: RestTicketModel = {\n ...this.ticket,\n id: formValue[TurnoverForm.ID],\n endDate: formValue[TurnoverForm.END],\n name: formValue[TurnoverForm.NAME],\n detailedInformation: formValue[TurnoverForm.DETAILED_INFORMATION],\n assigneeId: formValue[TurnoverForm.ASSIGNEE_ID],\n ticketPriorityType: formValue[TurnoverForm.TICKET_PRIORITY_TYPE],\n turnoverId: this.data.isNew ? this.data.turnoverId : this.ticket.turnoverId,\n };\n\n if (this.data.isNew) {\n this.store.dispatch(addNewTurnoverTicket({ turnoverTicket }));\n } else {\n this.store.dispatch(updateTicketPreview({ turnoverTicket }));\n }\n }\n\n markAsDone() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const formValue: TicketPreviewForm = this.form.value;\n const turnoverTicket: RestTicketModel = {\n ...this.ticket,\n detailedInformation: formValue[TurnoverForm.DETAILED_INFORMATION],\n assigneeId: formValue[TurnoverForm.ASSIGNEE_ID],\n ticketPriorityType: formValue[TurnoverForm.TICKET_PRIORITY_TYPE],\n dateCompleted: this.timezoneService.getCurrentDate(),\n ticketStatusType: TicketStatusType.Done,\n };\n\n this.store.dispatch(updateTicketPreview({ turnoverTicket }));\n }\n\n private initForm() {\n this.form = this.formBuilder.group({\n [TurnoverForm.ID]: [this.ticket?.id || 0],\n [TurnoverForm.NAME]: [this.ticket?.name || null, [Validators.required, Validators.maxLength(50)]],\n [TurnoverForm.DETAILED_INFORMATION]: [\n this.ticket?.detailedInformation || null,\n [Validators.required, Validators.maxLength(1000)],\n ],\n [TurnoverForm.ASSIGNEE_ID]: [this.ticket?.assigneeId || this.data.stepAssigneeId, [Validators.required]],\n [TurnoverForm.END]: [getDateObjectFunction(this.ticket?.endDate || new Date()), [Validators.required]],\n [TurnoverForm.TICKET_PRIORITY_TYPE]: [\n this.ticket?.ticketPriorityType || PriorityType.Medium,\n [Validators.required],\n ],\n [TurnoverForm.TICKET_STATUS_TYPE]: [this.ticket?.ticketStatusType || TicketStatusType.NotDone], // todo - add [Validators.required]\n [TurnoverForm.ABLE_TO_RESOLVE]: [\n this.ticket?.createdBy?.id === this.userData?.id ||\n checkPermissionLevel(this.userData?.permissionLevel || [], [\n PermissionLevelType.Tickets_EditAll,\n PermissionLevelType.PropertyManager_ActiveTurnovers_Edit,\n ]),\n ],\n });\n this.isTicketDone = this.ticketStatusType.value === TicketStatusType.Done;\n }\n\n private clearNewTicketAttachment() {\n this.cleanInputAttachment.emit();\n this.newAttachmentItem = null;\n this.cdr.detectChanges();\n }\n}\n","
    \n
    \n
    {{ header }}
    \n
    \n\n \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n\n
    \n \n \n
    \n\n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, FormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { some } from 'lodash';\nimport { Observable, combineLatest } from 'rxjs';\nimport { distinctUntilChanged, filter, map, tap } from 'rxjs/operators';\n\nimport { AdministrationAbstract } from '@main-application/administration/abstract/administration-abstract';\nimport {\n clearUserPreviewData,\n inviteNewUser,\n loadAllGeneralRoles,\n updateUserData,\n} from '@main-application/administration/actions/administration.actions';\nimport { VENDOR_ROLE_NAME } from '@main-application/administration/constants/vendor-role-name.constant';\nimport { combineUserWithProperties } from '@main-application/administration/functions/combineUserWithProperties';\nimport { formatPropertyStructureToTree } from '@main-application/administration/functions/propertyStructureToTree';\nimport { prepareSelectedUserToPropertyMappings } from '@main-application/administration/functions/userToPropertyMappingHandlers';\nimport {\n selectAllPropertiesStructure,\n selectAllUserToPropertyMappings,\n selectAllUsersWithGeneralRoles,\n selectAssignUserIntoPropertyInProgress,\n selectAssignUserIntoPropertyStatus,\n selectInactiveUsers,\n selectRemovingPropertyAssignedUserInProgress,\n selectRemovingPropertyAssignedUserStatus,\n selectSaveUserToGeneralRoleInProgress,\n selectSaveUserToGeneralRoleStatus,\n selectUserInviteInProgress,\n selectUserInviteStatus,\n selectUserInvited,\n selectUserUpdateInProgress,\n selectUserUpdateStatus,\n} from '@main-application/administration/selectors/administration.selectors';\nimport { UserPreview, UserPreviewFields } from '@main-application/administration/users/config/enums/user-preview';\nimport { getCompanyList } from '@main-application/turnovers/actions/turnovers.actions';\nimport { selectCompanyList, selectCompanyListLoading } from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { loadAllUserPortfolios } from '@portfolio/store/portfolio.actions';\nimport { loadAllUserProperties } from '@shared/actions/user.actions';\nimport { UpdateStatus } from '@shared/enums/update-status';\nimport { UserType } from '@shared/enums/user-type';\nimport { getCompanyRadioList } from '@shared/functions/get-company-radio-list.function';\nimport { getEnumerationRadioListFunction } from '@shared/functions/get-enumeration-radio-list.function';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { UserWithProperties } from '@shared/interfaces/user-with-properties';\nimport { InviteRestUserModel, RestUserModel, UpdateRestUserModel } from '@shared/interfaces/user.interface';\nimport { selectNativeLanguagesEnumeration } from '@shared/selectors/enumeration.selectors';\nimport { selectUserData } from '@shared/selectors/user.selectors';\nimport { UserExistsValidator } from '@shared/validators/user-exists.validator';\nimport { UserInactiveValidator } from '@shared/validators/user-inactive.validator';\nimport { DialogResult } from '@ui-components/modals/config/dialog-result.enum';\nimport { ModalsService } from '@ui-components/modals/modals.service';\nimport { EmailPatternValidator } from '@ui-components/validators/email.validator';\n\nexport interface UserPreviewModalData {\n vendorId?: number;\n header?: string;\n user: UserWithGeneralRole;\n}\n\nexport interface UserPreviewModalResult {\n invitedUser: RestUserModel;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-user-preview-modal',\n templateUrl: './user-preview-modal.component.html',\n styleUrls: ['./user-preview-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class UserPreviewModalComponent extends AdministrationAbstract implements OnInit, OnDestroy {\n form: UntypedFormGroup;\n\n warningMessage = '';\n selectedProperties: PropertyBasicInfo[] = [];\n propertiesToSelect: PropertyBasicInfo[] = [];\n arePropertiesChanged = false;\n root = [];\n isSubmitted = false;\n nativeLanguages: IRadioButtonOption[] = [];\n companyRadioList: IRadioButtonOption[] = [];\n companyListLoading$: Observable;\n\n userToPropertyMapping: UserToPropertyMapping[];\n selectedUsersWithProperties: UserWithProperties[];\n\n header: string;\n saveButtonText: string;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n protected store: Store<{}>,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: UserPreviewModalData,\n private formBuilder: FormBuilder,\n private modalsService: ModalsService\n ) {\n super(cdr, store);\n\n this.header = data.header || (data.user ? 'Edit user' : 'Add new user');\n this.saveButtonText = data.vendorId ? 'Add and Assignee' : data.user ? 'Save' : 'Send invitation';\n }\n\n get firstName(): FormControl {\n return this.form.get(UserPreviewFields.FirstName) as FormControl;\n }\n\n get lastName(): FormControl {\n return this.form.get(UserPreviewFields.LastName) as FormControl;\n }\n\n get email(): FormControl {\n return this.form.get(UserPreviewFields.Email) as FormControl;\n }\n\n get userGroupType(): FormControl {\n return this.form.get(UserPreviewFields.UserGroupType) as FormControl;\n }\n\n get roleId(): FormControl {\n return this.form.get(UserPreviewFields.RoleId) as FormControl;\n }\n\n get companyId(): FormControl {\n return this.form.get(UserPreviewFields.CompanyId) as FormControl;\n }\n\n get phoneNumber(): FormControl {\n return this.form.get(UserPreviewFields.PhoneNumber) as FormControl;\n }\n\n get nativeLanguage(): FormControl {\n return this.form.get(UserPreviewFields.NativeLanguage) as FormControl;\n }\n\n ngOnInit(): void {\n this.initForm();\n this.store.dispatch(getCompanyList());\n this.store.dispatch(loadAllGeneralRoles());\n this.companyListLoading$ = this.store.select(selectCompanyListLoading);\n this.selectAllGeneralRoles().subscribe();\n this.selectGeneralRoleRadioList().subscribe();\n\n this.store\n .select(selectCompanyList)\n .pipe(\n untilDestroyed(this),\n filter((companyList: RestCompanyModel[]) => !!companyList),\n tap((companyList: RestCompanyModel[]) => {\n this.companyRadioList = getCompanyRadioList(companyList);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectNativeLanguagesEnumeration)\n .pipe(\n untilDestroyed(this),\n tap(values => {\n this.nativeLanguages = getEnumerationRadioListFunction(values, null, false);\n if (this.data.user) {\n this.nativeLanguage.setValue(this.data.user.nativeLanguage);\n }\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectUserData)\n .pipe(\n untilDestroyed(this),\n filter((userData: UserData) => !!userData),\n tap((userData: UserData) => {\n this.userData = userData;\n })\n )\n .subscribe();\n\n combineLatest([this.store.select(selectAllUsersWithGeneralRoles), this.store.select(selectInactiveUsers)])\n .pipe(\n untilDestroyed(this),\n filter(([allUsers, inactiveUsers]) => !!allUsers && !!inactiveUsers),\n tap(([allUsers, inactiveUsers]: [UserWithGeneralRole[], RestUserModel[]]) => {\n const existingActiveEmails = allUsers.map(item => item.email);\n const existingInactiveEmails = inactiveUsers.map(item => item.email);\n\n if (!this.data.user) {\n this.email.addValidators(UserExistsValidator(existingActiveEmails));\n this.email.addValidators(UserInactiveValidator(existingInactiveEmails));\n }\n })\n )\n .subscribe();\n\n combineLatest([this.store.select(selectAllPropertiesStructure), this.store.select(selectAllUserToPropertyMappings)])\n .pipe(\n untilDestroyed(this),\n distinctUntilChanged(),\n filter(([allProperties, userToPropertyMapping]) => !!allProperties && !!userToPropertyMapping),\n tap(([allProperties, userToPropertyMapping]) => {\n this.userToPropertyMapping = userToPropertyMapping;\n this.root = formatPropertyStructureToTree(allProperties);\n\n if (this.data.user) {\n this.propertiesToSelect = combineUserWithProperties(\n this.data.user.id,\n allProperties,\n userToPropertyMapping\n );\n } else {\n const rootNodes = allProperties.filter(item => !item.parentId);\n this.propertiesToSelect = rootNodes;\n }\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.userGroupType.valueChanges\n .pipe(\n untilDestroyed(this),\n tap((userGroupType: UserType) => {\n const validators = userGroupType === UserType.Contractor ? [Validators.required] : [];\n if (userGroupType === UserType.Contractor) {\n const vendroRole = this.userRoles.find(x => x.label === VENDOR_ROLE_NAME);\n if (vendroRole) {\n this.roleId.setValue(vendroRole.value);\n }\n } else {\n this.roleId.setValue(null);\n }\n this.companyId.setValidators(validators);\n this.companyId.updateValueAndValidity();\n })\n )\n .subscribe();\n\n if (this.data.user) {\n this.inProgress$ = combineLatest([\n this.store.select(selectUserUpdateInProgress),\n this.store.select(selectSaveUserToGeneralRoleInProgress),\n this.store.select(selectAssignUserIntoPropertyInProgress),\n this.store.select(selectRemovingPropertyAssignedUserInProgress),\n ]).pipe(map(operationsInProgress => some(operationsInProgress, Boolean)));\n\n combineLatest([\n this.store.select(selectUserUpdateStatus),\n this.store.select(selectSaveUserToGeneralRoleStatus),\n this.store.select(selectAssignUserIntoPropertyStatus),\n this.store.select(selectRemovingPropertyAssignedUserStatus),\n ])\n .pipe(\n untilDestroyed(this),\n filter(\n ([\n userUpdateStatus,\n saveUserToGeneralRoleStatus,\n assignUserIntoPropertyStatus,\n removingPropertyAssignedUserStatus,\n ]) =>\n userUpdateStatus === UpdateStatus.UPDATED &&\n saveUserToGeneralRoleStatus === UpdateStatus.UPDATED &&\n (this.arePropertiesChanged\n ? assignUserIntoPropertyStatus === UpdateStatus.UPDATED ||\n removingPropertyAssignedUserStatus === UpdateStatus.DELETED\n : true)\n ),\n tap(() => {\n if (this.arePropertiesChanged && this.userData?.id === this.data.user?.id) {\n this.store.dispatch(loadAllUserProperties());\n this.store.dispatch(loadAllUserPortfolios());\n }\n\n this.close(DialogResult.Success);\n })\n )\n .subscribe();\n } else {\n this.inProgress$ = combineLatest([\n this.store.select(selectUserInviteInProgress),\n this.store.select(selectSaveUserToGeneralRoleInProgress),\n this.store.select(selectAssignUserIntoPropertyInProgress),\n ]).pipe(map(operationsInProgress => some(operationsInProgress, Boolean)));\n\n combineLatest([\n this.store.select(selectUserInvited),\n this.store.select(selectUserInviteStatus),\n this.store.select(selectSaveUserToGeneralRoleStatus),\n this.store.select(selectAssignUserIntoPropertyStatus),\n ])\n .pipe(\n untilDestroyed(this),\n filter(\n ([invitedUser, userInviteStatus, saveUserToGeneralRoleStatus, assignUserIntoPropertyStatus]) =>\n invitedUser &&\n userInviteStatus === UpdateStatus.OK &&\n saveUserToGeneralRoleStatus === UpdateStatus.UPDATED &&\n assignUserIntoPropertyStatus === UpdateStatus.UPDATED\n )\n )\n .subscribe(([invitedUser]) => this.close(DialogResult.Success, invitedUser));\n }\n\n if (this.data.vendorId) {\n this.userGroupType.setValue(UserType.Contractor);\n this.companyId.setValue(this.data.vendorId);\n }\n }\n\n save() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.isSubmitted = true;\n this.cdr.detectChanges();\n return;\n }\n\n const { firstName, lastName, roleId, email, userGroupType, companyId, nativeLanguage, phoneNumber } = this.form\n .value as UserPreview;\n let userToPropertyRoleList: UserToPropertyMapping[] = [];\n let deleteUserToPropertyMappings: number[] = [];\n let selectedProperty: number[] = [];\n\n const updateUser: UpdateRestUserModel = {\n id: this.data.user?.id || 0,\n firstName,\n lastName,\n companyId,\n nativeLanguage,\n phoneNumber,\n };\n\n const inviteUser: InviteRestUserModel = {\n email,\n firstName,\n lastName,\n userGroupType,\n displayName: `${firstName} ${lastName}`,\n companyId: userGroupType === UserType.Contractor ? companyId : null,\n nativeLanguage,\n phoneNumber,\n };\n\n const currentUserProperties = this.userToPropertyMapping?.filter(item => item.userId === this.data.user?.id);\n const currentUserPropertyIds = currentUserProperties\n ? currentUserProperties.map(item => item.propertyId)\n : [];\n\n if (this.arePropertiesChanged) {\n if (this.data.user) {\n const newUserToPropertyMappings = prepareSelectedUserToPropertyMappings(\n this.data.user,\n this.selectedProperties,\n roleId\n );\n\n const selectedPropertyIds = newUserToPropertyMappings.map(value => value.propertyId);\n\n const propertyToDelete = this.propertiesToSelect\n .filter(item => !selectedPropertyIds.includes(item.id))\n .map(item => item.id);\n\n deleteUserToPropertyMappings = currentUserProperties\n .filter(item => propertyToDelete.includes(item.propertyId))\n .map(item => item.id);\n\n userToPropertyRoleList = newUserToPropertyMappings.filter(\n item => !currentUserPropertyIds.includes(item.propertyId)\n );\n } else {\n selectedProperty = this.selectedProperties.map(item => item.id);\n }\n }\n\n if (this.data.user) {\n this.store.dispatch(\n updateUserData({ user: updateUser, roleId, userToPropertyRoleList, deleteUserToPropertyMappings })\n );\n } else {\n this.store.dispatch(inviteNewUser({ user: inviteUser, roleId, selectedProperty }));\n }\n }\n\n close(result: DialogResult = DialogResult.Fail, invitedUser?: RestUserModel) {\n if (result === DialogResult.Fail) {\n this.dialogRef.close();\n } else {\n this.dialogRef.close({\n invitedUser,\n });\n }\n }\n\n ngOnDestroy(): void {\n this.store.dispatch(clearUserPreviewData());\n }\n\n addNewVendor() {\n this.modalsService\n .openNewVendorModal({})\n .afterClosed()\n .pipe(\n tap(company => {\n if (company) {\n this.companyId.setValue(company.id);\n this.store.dispatch(getCompanyList());\n this.cdr.detectChanges();\n }\n })\n )\n .subscribe();\n }\n\n private initForm() {\n this.form = this.formBuilder.group({\n [UserPreviewFields.FirstName]: [\n this.data.user?.firstName || null,\n [Validators.required, Validators.maxLength(24)],\n ],\n [UserPreviewFields.LastName]: [this.data.user?.lastName || null, [Validators.required, Validators.maxLength(24)]],\n [UserPreviewFields.Email]: [\n this.data.user?.email || null,\n [Validators.required, EmailPatternValidator(), Validators.email],\n ],\n [UserPreviewFields.UserGroupType]: [this.data.user?.userGroupType || UserType.Employee, [Validators.required]],\n [UserPreviewFields.RoleId]: [this.data.user?.roleId || null, [Validators.required]],\n [UserPreviewFields.CompanyId]: [\n this.data.user?.companyId,\n this.data.user?.userGroupType === UserType.Contractor ? [Validators.required] : [],\n ],\n [UserPreviewFields.PhoneNumber]: [this.data.user?.phoneNumber || null],\n [UserPreviewFields.NativeLanguage]: [this.data.user?.nativeLanguage || 0, [Validators.required]],\n });\n }\n\n selectedRootsChange($event: PropertyBasicInfo[]) {\n this.arePropertiesChanged = true;\n this.selectedProperties = $event;\n }\n}\n","import { filter, some } from 'lodash';\n\nimport { PropertyBasicInfo } from '@shared/interfaces/propertyBasicInfo';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\nimport { UserWithProperties } from '@shared/interfaces/user-with-properties';\nimport { RestUserModel } from '@shared/interfaces/user.interface';\n\n/* TODO: if Chris doesn't change back his mind change it to accept single user */\nexport function prepareSelectedUserToPropertyMappings(\n user: RestUserModel,\n selectedProperties: PropertyBasicInfo[],\n roleId: number\n): UserToPropertyMapping[] {\n return selectedProperties.map(item => {\n return {\n id: 0,\n roleId,\n userId: user.id,\n propertyId: item.id,\n };\n });\n}\n\nexport function prepareUserToPropertyMappingsToAdd(\n selectedUsersUserToPropertyCurrentMappings: UserToPropertyMapping[],\n newUserToPropertyMappings: UserToPropertyMapping[]\n): UserToPropertyMapping[] {\n return filter(\n newUserToPropertyMappings,\n mapping =>\n !some(selectedUsersUserToPropertyCurrentMappings, { userId: mapping.userId, propertyId: mapping.propertyId })\n );\n}\n\nexport function prepareUserToPropertyMappings(\n user: RestUserModel,\n selectedUsersWithProperties: UserWithProperties[]\n): UserWithProperties[] {\n return selectedUsersWithProperties?.filter(item => item.id === user.id);\n}\n\nexport function prepareUserToPropertyMappingsToRemove(\n selectedUsersUserToPropertyCurrentMappings: UserToPropertyMapping[],\n newUserToPropertyMappings: UserToPropertyMapping[]\n) {\n const selectedUsersUserToPropertyMappingsToDelete = filter(\n selectedUsersUserToPropertyCurrentMappings,\n mapping => !some(newUserToPropertyMappings, { userId: mapping.userId, propertyId: mapping.propertyId })\n );\n\n return selectedUsersUserToPropertyMappingsToDelete;\n}\n","
    \n

    Add vendor {{ data.addOnlyVendor ? '' : 'and employee' }}

    \n \n \n \n \n
    \n \n
    \n \n \n
    \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Actions, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { Observable, filter, take, tap } from 'rxjs';\n\nimport {\n addCompany,\n addCompanySuccess,\n addCompanyWithOwner,\n addCompanyWithOwnerSuccess,\n} from '@companies/store/companies.actions';\nimport { selectAddCompanyWithOwnerLoading } from '@companies/store/companies.selectors';\nimport { AdministrationAbstract } from '@main-application/administration/abstract/administration-abstract';\nimport { loadAllGeneralRoles } from '@main-application/administration/actions/administration.actions';\nimport { VENDOR_ROLE_NAME } from '@main-application/administration/constants/vendor-role-name.constant';\nimport {\n selectActiveUsers,\n selectAllGeneralRoles,\n} from '@main-application/administration/selectors/administration.selectors';\nimport { UserType } from '@shared/enums/user-type';\nimport { getEnumerationRadioListFunction } from '@shared/functions/get-enumeration-radio-list.function';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { InviteRestUserModel, RestUserModel } from '@shared/interfaces/user.interface';\nimport { selectNativeLanguagesEnumeration } from '@shared/selectors/enumeration.selectors';\nimport { UserExistsValidator } from '@shared/validators/user-exists.validator';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { EmailPatternValidator } from '@ui-components/validators/email.validator';\n\nenum NewVendorFields {\n FirstName = 'firstName',\n LastName = 'lastName',\n Email = 'email',\n Company = 'company',\n PhoneNumber = 'phoneNumber',\n NativeLanguage = 'nativeLanguage',\n RoleId = 'roleId',\n}\n\ninterface NewVendor {\n [NewVendorFields.FirstName]: string;\n [NewVendorFields.LastName]: string;\n [NewVendorFields.Email]: string;\n [NewVendorFields.Company]: string;\n [NewVendorFields.PhoneNumber]: string;\n [NewVendorFields.NativeLanguage]: number;\n [NewVendorFields.RoleId]: number;\n}\n\nexport interface AddVendorModalData {\n addOnlyVendor?: boolean;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-add-vendor-modal',\n templateUrl: './add-vendor-modal.component.html',\n styleUrls: ['./add-vendor-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AddVendorModalComponent extends AdministrationAbstract implements OnInit {\n form: FormGroup;\n vendorRoleId: number;\n inProgress$: Observable;\n nativeLanguages: IRadioButtonOption[] = [];\n formSubmitted = false;\n\n constructor(\n public fb: FormBuilder,\n public dialogRef: MatDialogRef,\n store: Store<{}>,\n private actions$: Actions,\n private snackbarService: SnackbarService,\n @Inject(MAT_DIALOG_DATA) public data: AddVendorModalData,\n cdr: ChangeDetectorRef\n ) {\n super(cdr, store);\n }\n\n get firstName(): FormControl {\n return this.form.get(NewVendorFields.FirstName) as FormControl;\n }\n\n get lastName(): FormControl {\n return this.form.get(NewVendorFields.LastName) as FormControl;\n }\n\n get email(): FormControl {\n return this.form.get(NewVendorFields.Email) as FormControl;\n }\n\n get company(): FormControl {\n return this.form.get(NewVendorFields.Company) as FormControl;\n }\n\n get phoneNumber(): FormControl {\n return this.form.get(NewVendorFields.PhoneNumber) as FormControl;\n }\n\n get nativeLanguage(): FormControl {\n return this.form.get(NewVendorFields.NativeLanguage) as FormControl;\n }\n\n ngOnInit(): void {\n this.store.dispatch(loadAllGeneralRoles());\n\n this.inProgress$ = this.store.select(selectAddCompanyWithOwnerLoading);\n\n if (this.data.addOnlyVendor) {\n this.form = this.fb.group({\n [NewVendorFields.Company]: ['', Validators.required],\n });\n } else {\n this.form = this.fb.group({\n [NewVendorFields.FirstName]: ['', Validators.required],\n [NewVendorFields.LastName]: ['', Validators.required],\n [NewVendorFields.Email]: ['', [Validators.required, Validators.email, EmailPatternValidator()]],\n [NewVendorFields.Company]: ['', Validators.required],\n [NewVendorFields.PhoneNumber]: ['', [Validators.pattern('[- +()0-9]+')]],\n [NewVendorFields.NativeLanguage]: [0, Validators.required],\n });\n }\n\n this.store\n .select(selectNativeLanguagesEnumeration)\n .pipe(\n untilDestroyed(this),\n tap(values => {\n this.nativeLanguages = getEnumerationRadioListFunction(values, null, false);\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.store\n .select(selectActiveUsers)\n .pipe(\n untilDestroyed(this),\n filter((allUsers: RestUserModel[]) => !!allUsers)\n )\n .subscribe((allUsers: RestUserModel[]) => {\n const existingEmails = allUsers.map(item => item.email);\n if (this.email) {\n this.email.addValidators([UserExistsValidator(existingEmails)]);\n }\n });\n\n this.store\n .select(selectAllGeneralRoles)\n .pipe(untilDestroyed(this), filter(Boolean))\n .subscribe(allRoles => (this.vendorRoleId = allRoles.find(e => e.roleName == VENDOR_ROLE_NAME)?.id));\n\n this.cdr.detectChanges();\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n send() {\n this.formSubmitted = true;\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const value: NewVendor = this.form.value;\n\n const inviteUser: InviteRestUserModel = {\n email: value[NewVendorFields.Email],\n firstName: value[NewVendorFields.FirstName],\n lastName: value[NewVendorFields.LastName],\n userGroupType: UserType.Contractor,\n displayName: `${value.firstName} ${value.lastName}`,\n nativeLanguage: value[NewVendorFields.NativeLanguage],\n phoneNumber: value[NewVendorFields.PhoneNumber],\n };\n\n const companyModel: RestCompanyModel = {\n displayName: value.company,\n id: 0,\n employees: [],\n addresses: [],\n };\n\n if (this.data.addOnlyVendor) {\n this.store.dispatch(\n addCompany({\n companyModel,\n })\n );\n this.actions$\n .pipe(\n ofType(addCompanySuccess),\n take(1),\n tap(action => {\n this.snackbarService.success(`${action.companyModel.displayName} added`);\n this.dialogRef.close(action.companyModel);\n })\n )\n .subscribe();\n } else {\n this.store.dispatch(\n addCompanyWithOwner({\n user: inviteUser,\n roleId: this.vendorRoleId,\n companyModel,\n })\n );\n this.actions$\n .pipe(\n ofType(addCompanyWithOwnerSuccess),\n take(1),\n tap(action => {\n this.snackbarService.success(`${action.company.displayName} added`);\n this.dialogRef.close(action.company);\n })\n )\n .subscribe();\n }\n }\n}\n","import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-comment-too-long-modal',\n templateUrl: './comment-too-long-modal.component.html',\n})\nexport class CommentTooLongModalComponent implements OnInit {\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: number\n ) {}\n\n ngOnInit(): void {}\n\n cancel() {\n this.dialogRef.close();\n }\n}\n","
    \n

    Comment too long

    \n \n
    Please reduce to {{ data }} characters.
    \n
    \n \n \n \n
    \n","
    \n

    \n
    {{ data?.title }}
    \n

    \n \n
    \n {{ data?.content }}\n
    \n
    \n \n
    \n \n {{ doNotShowAgainMessage }}\n \n
    \n
    \n \n \n
    \n
    \n
    \n\n\n \n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { tap } from 'rxjs/operators';\n\nimport { ConfirmationModalData } from '@shared/interfaces/modal-data';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\nimport { DialogResult } from '../config/dialog-result.enum';\n\nconst CANCEL_DEFAULT_LABEL = 'Cancel';\nconst CANCEL_DEFAULT_COLOR = '';\nconst CONFIRM_DEFAULT_LABEL = 'OK';\nconst CONFIRM_DEFAULT_COLOR = 'primary';\n\n@UntilDestroy()\n@Component({\n selector: 'app-confirmation-modal',\n templateUrl: './confirmation-modal.component.html',\n styleUrls: ['./confirmation-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConfirmationModalComponent implements OnInit {\n cancelLabel: string;\n cancelColor: string;\n confirmLabel: string;\n confirmColor: 'primary' | 'warn';\n doNotShowAgain = new UntypedFormControl(false);\n doNotShowAgainMessage: string;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n private modalsService: ModalsService,\n private elementRef: ElementRef,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmationModalData\n ) {}\n\n ngOnInit(): void {\n const overlay = this.elementRef.nativeElement.closest('.cdk-overlay-container');\n if (overlay) {\n overlay.style.zIndex = '1001';\n }\n this.cancelLabel = this.data.cancelLabel || CANCEL_DEFAULT_LABEL;\n this.cancelColor = this.data.cancelColor || CANCEL_DEFAULT_COLOR;\n this.confirmLabel = this.data.confirmLabel || CONFIRM_DEFAULT_LABEL;\n this.confirmColor = this.data.confirmColor || CONFIRM_DEFAULT_COLOR;\n this.doNotShowAgainMessage = this.data.doNotShowAgainMessage || \"Don't show again\";\n this.doNotShowAgain.valueChanges\n .pipe(\n untilDestroyed(this),\n tap(value => {\n this.modalsService.updateDialogHiddenState(value, this.data);\n })\n )\n .subscribe();\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n send() {\n this.dialogRef.close(DialogResult.Success);\n }\n}\n","export enum TurnoverPunchFields {\n DueDate = 'DueDate',\n Priority = 'Priority',\n Title = 'Title',\n Description = 'Description',\n Attachment = 'Attachment',\n Unit = 'Unit',\n}\n","
    \n

    {{ isNewPunch ? 'Create New Punch' : 'Edit Punch' }}

    \n \n
    \n
    \n
    \n
    \n
    Unit
    \n
    {{ turnoverUnitName$ | async }}
    \n
    \n\n
    \n \n \n
    \n \n \n \n
    \n
    \n \n\n \n
    \n
    \n
    \n
    \n \n \n\n \n
    \n {{ isNewPunch ? 'Create and go to PUNCH' : 'Edit' }}\n \n
    \n \n
    \n
    \n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Actions, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { each } from 'lodash';\nimport { Observable, filter, iif, mergeMap, of, take, tap, withLatestFrom } from 'rxjs';\n\nimport { TimezoneService } from '@main-application/management/components/system-configuration/components/date-time-configuration/timezone.service';\nimport { getElapsedDaysThresholds } from '@main-application/management/components/turnover-configuration/actions/turnover-configuration.actions';\nimport { selectThresholdsConfiguration } from '@main-application/management/components/turnover-configuration/selectors/turnover-configuration.selectors';\nimport {\n clearSelectedPunch,\n loadPunchesByTurnoverId,\n sendPunch,\n sendPunchFinished,\n} from '@main-application/turnovers/actions/punch.actions';\nimport {\n deleteFileFromRepository,\n deleteTurnoverTicketAttachment,\n setTicketAttachment,\n setTicketAttachmentSuccess,\n} from '@main-application/turnovers/actions/turnovers.actions';\nimport { selectSelectedPunch } from '@main-application/turnovers/selectors/punch.selectors';\nimport {\n selectTurnoverDataId,\n selectTurnoverUnitName,\n} from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { deleteFile } from '@shared/actions/file-upload.actions';\nimport { PriorityTypeListConst } from '@shared/constants/priority-type-list.const';\nimport { TicketAttachmentType } from '@shared/enums/attachment-type';\nimport { PriorityType } from '@shared/enums/priority-type';\nimport { TicketStatusType } from '@shared/enums/ticket-status-type';\nimport { TicketType } from '@shared/enums/ticket-type';\nimport { TurnoverPunchFields } from '@shared/enums/turnover-punch-fields.enum';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { getAttachmentToEntityParams } from '@shared/functions/ticket-attachment.utils';\nimport { AttachmentItem } from '@shared/interfaces/attachment-item';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { TurnoverPunch } from '@shared/interfaces/turnover-punch';\nimport { RestTicketModel } from '@shared/interfaces/turnover.interface';\nimport { TurnoverAttachmentPipe } from '@shared/pipes/turnover-attachment.pipe';\n\nimport { DialogResult } from '../config/dialog-result.enum';\n\n@UntilDestroy()\n@Component({\n selector: 'app-turnover-punch-modal',\n templateUrl: './turnover-punch-modal.component.html',\n styleUrls: ['./turnover-punch-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TurnoverPunchModalComponent implements OnInit {\n TicketAttachmentType = TicketAttachmentType;\n TicketStatusType = TicketStatusType;\n form: UntypedFormGroup;\n isNewPunch = false;\n newAttachment: AttachmentItem;\n allAttachments: RestGenericTypedAttachment[];\n cleanInputAttachment: EventEmitter = new EventEmitter();\n isCompleted: boolean;\n turnoverUnitName$: Observable;\n inProgress = false;\n\n readonly priorityItems: IRadioButtonOption[] = PriorityTypeListConst;\n\n constructor(\n private fb: UntypedFormBuilder,\n @Inject(MAT_DIALOG_DATA) public data: RestTicketModel,\n private dialogRef: MatDialogRef,\n private store: Store<{}>,\n private actions$: Actions,\n private cdr: ChangeDetectorRef,\n private timezoneService: TimezoneService,\n private turnoverAttachment: TurnoverAttachmentPipe\n ) {}\n\n get dueDate(): UntypedFormControl {\n return this.form.get(TurnoverPunchFields.DueDate) as UntypedFormControl;\n }\n get priority(): UntypedFormControl {\n return this.form.get(TurnoverPunchFields.Priority) as UntypedFormControl;\n }\n\n get title(): UntypedFormControl {\n return this.form.get(TurnoverPunchFields.Title) as UntypedFormControl;\n }\n\n get description(): UntypedFormControl {\n return this.form.get(TurnoverPunchFields.Description) as UntypedFormControl;\n }\n\n get attachment(): UntypedFormControl {\n return this.form.get(TurnoverPunchFields.Attachment) as UntypedFormControl;\n }\n\n ngOnInit(): void {\n this.isNewPunch = !this.data.id;\n this.isCompleted = this.data?.ticketStatusType === TicketStatusType.Done;\n this.allAttachments = this.data?.allAttachments;\n\n /* reset modal */\n this.store.dispatch(clearSelectedPunch());\n this.store.dispatch(getElapsedDaysThresholds());\n\n /**\n * after deleting attachment on existing punch\n * it will be reloaded\n */\n this.store\n .select(selectSelectedPunch)\n .pipe(\n untilDestroyed(this),\n filter(Boolean),\n tap(punch => {\n this.data = punch;\n this.allAttachments = this.data?.allAttachments;\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.turnoverUnitName$ = this.store.select(selectTurnoverUnitName);\n this.store\n .select(selectThresholdsConfiguration)\n .pipe(untilDestroyed(this), filter(Boolean), take(1))\n .subscribe(config => {\n const punchLowThreshold = config.stepThresholds.find(\n e => e.workflowStepEnumType === WorkflowStepEnumType.Punch\n )?.lowThresholdValue;\n const currentDate = this.timezoneService.getCurrentDateOnly();\n const defaultDate = new Date(currentDate.setDate(currentDate.getDate() + punchLowThreshold));\n\n this.form = this.fb.group({\n [TurnoverPunchFields.DueDate]: [this.data?.dueDate ?? defaultDate, Validators.required],\n [TurnoverPunchFields.Priority]: [this.data?.ticketPriorityType ?? PriorityType.Medium, Validators.required],\n // let's hardcode title as \"Punch List\" for now - lyman\n // [TurnoverPunchFields.Title]: [this.data?.name, Validators.maxLength(50)],\n [TurnoverPunchFields.Title]: ['Punch List', Validators.maxLength(50)],\n [TurnoverPunchFields.Description]: [this.data?.detailedInformation, Validators.maxLength(500)],\n [TurnoverPunchFields.Attachment]: [],\n });\n this.cdr.detectChanges();\n });\n }\n\n deletePunchAttachment(attachment: RestGenericTypedAttachment) {\n const ticketType = TicketType.Punch;\n this.store.dispatch(deleteTurnoverTicketAttachment({ ticketType, attachment, ticketId: this.data.id }));\n }\n\n deleteNewPunchAttachment() {\n if (this.newAttachment?.upload) {\n this.store.dispatch(deleteFile({ fileId: this.newAttachment?.upload?.id }));\n }\n this.cleanInputAttachment.emit();\n this.newAttachment = null;\n this.cdr.detectChanges();\n }\n\n private removeAttachmentsIfNeeded() {\n if (this.hasAttachments()) {\n each(this.getAttachments(), item => this.deletePunchAttachment(item));\n }\n }\n\n addAttachment(attachmentItem: AttachmentItem) {\n const isNewTicket = !this.data.id;\n\n if (isNewTicket) {\n if (attachmentItem?.upload?.id !== this.newAttachment?.upload?.id && this.newAttachment?.upload?.id) {\n this.store.dispatch(deleteFileFromRepository({ fileId: this.newAttachment?.upload?.id }));\n }\n this.newAttachment = attachmentItem;\n } else {\n this.removeAttachmentsIfNeeded();\n\n this.store.dispatch(\n setTicketAttachment({\n ticketType: TicketType.Punch,\n attachmentToEntity: getAttachmentToEntityParams(attachmentItem, this.data.id),\n })\n );\n }\n\n this.cdr.detectChanges();\n }\n\n cancel() {\n this.close(DialogResult.Fail);\n }\n\n private close(result: DialogResult) {\n if (this.newAttachment?.upload) {\n this.store.dispatch(deleteFile({ fileId: this.newAttachment?.upload?.id }));\n }\n\n this.dialogRef.close(result);\n }\n\n private getAttachments(): RestGenericTypedAttachment[] {\n return this.turnoverAttachment.transform(this.data.allAttachments, TicketAttachmentType.Attachment);\n }\n\n hasAttachments(): boolean {\n const attachments = this.getAttachments();\n\n return this.isNewPunch ? !!this.newAttachment : !!attachments?.length;\n }\n\n send() {\n if (!this.form.valid) {\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n this.inProgress = true;\n const formValue = this.form.value as TurnoverPunch;\n const punch = {\n ...this.data,\n dueDate: formValue.DueDate,\n ticketPriorityType: formValue.Priority,\n name: formValue.Title || '',\n detailedInformation: formValue.Description || '',\n } as RestTicketModel;\n\n this.store.dispatch(sendPunch({ punch }));\n\n const attachmentAdded$ = this.actions$.pipe(\n ofType(setTicketAttachmentSuccess),\n take(1),\n tap(() => {\n this.newAttachment = null;\n this.cdr.detectChanges();\n })\n );\n\n /* send punch and assign attachment if needed */\n this.actions$\n .pipe(\n ofType(sendPunchFinished),\n take(1),\n mergeMap(action => {\n const isNewTicket = !this.data.id;\n\n const addAttachmentAndWaitForSuccess$ = of(action.punch.id).pipe(\n tap(id => {\n this.store.dispatch(\n setTicketAttachment({\n ticketType: TicketType.Punch,\n attachmentToEntity: getAttachmentToEntityParams(this.newAttachment, action.punch.id),\n })\n );\n }),\n mergeMap(() => attachmentAdded$)\n );\n\n return iif(() => isNewTicket, addAttachmentAndWaitForSuccess$, of(null));\n }),\n withLatestFrom(this.store.select(selectTurnoverDataId)),\n tap(([, turnoverId]) => {\n this.store.dispatch(loadPunchesByTurnoverId({ turnoverId }));\n this.close(DialogResult.Success);\n })\n )\n .subscribe();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';\nimport { AddNewCompanyModalComponent } from '@companies/components/add-new-company-modal/add-new-company-modal.component';\nimport { Store } from '@ngrx/store';\nimport { remove } from 'lodash';\nimport { Observable, filter, map, of, take } from 'rxjs';\n\nimport { DefaultModalConfigConstant } from '@app/modules/ui-components/modals/config/default-modal-config.constant';\nimport {\n CustomInspectionSaveTemplateDialogComponent,\n CustomInspectionSaveTemplateDialogData,\n CustomInspectionSaveTemplateDialogResult,\n} from '@main-application/boards/boards-view/boards-cell/cell-types/schedule-cell/custom-inspection-save-template-dialog/custom-inspection-save-template-dialog.component';\nimport { UnitAttachmentType } from '@shared/enums/attachment-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { RestCompanyModel } from '@shared/interfaces/companies.interface';\nimport { GalleryItem } from '@shared/interfaces/gallery-item';\nimport { ListUpdateAction } from '@shared/interfaces/list-update-action.interface';\nimport { ConfirmationModalData, ModalData } from '@shared/interfaces/modal-data';\nimport { RestTicketModel, RestTurnoverDataModel } from '@shared/interfaces/turnover.interface';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { WorkflowAction } from '@shared/interfaces/workflow-action.interface';\nimport { selectTenantData } from '@shared/selectors/user.selectors';\nimport { AddBidModalComponent, AddBidModalData } from '@ui-components/modals/add-bid-modal/add-bid-modal.component';\nimport {\n AddVendorUserModalComponent,\n AddVendorUserModalData,\n AddVendorUserModalResult,\n} from '@ui-components/modals/add-vendor-user-modal/add-vendor-user-modal.component';\nimport { DialogResult } from '@ui-components/modals/config/dialog-result.enum';\nimport { GalleryModalComponent } from '@ui-components/modals/gallery-modal/gallery-modal.component';\nimport { InfoModalComponent } from '@ui-components/modals/info-modal/info-modal.component';\nimport {\n NewTurnoverModalComponent,\n NewTurnoverModalData,\n} from '@ui-components/modals/new-turnover-modal/new-turnover-modal.component';\nimport {\n NextStepAssigneeModalComponent,\n NextStepAssigneeModalData,\n} from '@ui-components/modals/next-step-assignee-modal/next-step-assignee-modal.component';\nimport {\n PromptModalComponent,\n PromptModalData,\n PromptModalResult,\n} from '@ui-components/modals/prompt-modal/prompt-modal.component';\nimport { TicketPreviewModalComponent } from '@ui-components/modals/ticket-preview-modal/ticket-preview-modal.component';\nimport {\n UserPreviewModalComponent,\n UserPreviewModalData,\n UserPreviewModalResult,\n} from '@ui-components/modals/user-preview-modal/user-preview-modal.component';\nimport { environment } from 'src/environments/environment';\n\nimport { AddVendorModalComponent, AddVendorModalData } from './add-vendor-modal/add-vendor-modal.component';\nimport { CommentTooLongModalComponent } from './comment-too-long-modal/comment-too-long-modal.component';\nimport { ConfirmationModalComponent } from './confirmation-modal/confirmation-modal.component';\nimport { TurnoverPunchModalComponent } from './turnover-punch-modal/turnover-punch-modal.component';\n\nconst ModalDialogSizes = {\n xxs: '280px',\n xs: '350px',\n sm: '472px',\n md: '572px',\n lg: '650px',\n};\n\nexport type ModalDialogSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | number;\n\n@Injectable()\nexport class ModalsService {\n nonPmsUnitCost$ = this.store.select(selectTenantData).pipe(\n filter(tenantData => !!tenantData),\n take(1),\n map(tenantData => tenantData.nonPmsUnitCost)\n );\n\n constructor(private dialog: MatDialog, private store: Store<{}>) {}\n\n updateDialogHiddenState(hidden: boolean, data: any) {\n const state = localStorage.getItem('dialogsHiddenByUser');\n try {\n const parsed: any[] = state ? JSON.parse(state) : [];\n if (hidden) {\n parsed.push({\n data,\n });\n } else {\n remove(parsed, d => JSON.stringify(d.data) === JSON.stringify(data));\n }\n localStorage.setItem('dialogsHiddenByUser', JSON.stringify(parsed));\n } catch (e) {}\n }\n\n isDialogHiddenByUser(data: any) {\n const state = localStorage.getItem('dialogsHiddenByUser');\n try {\n const parsed: any[] = JSON.parse(state);\n const dialog = parsed.find(d => JSON.stringify(d.data) === JSON.stringify(data));\n return dialog !== undefined;\n } catch (e) {}\n return false;\n }\n\n openInfoModal(data: ModalData) {\n return this.dialog.open(InfoModalComponent, {\n autoFocus: false,\n panelClass: 'info-modal-container',\n data,\n });\n }\n\n openCommentTooLongModal(maxCounter: number) {\n this.dialog.open(CommentTooLongModalComponent, {\n panelClass: 'comment-too-long-modal-container',\n data: maxCounter,\n });\n }\n\n openGalleryModal(data: GalleryItem) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '1170px',\n maxHeight: '100vh',\n panelClass: 'gallery-modal-container',\n data,\n };\n\n this.dialog.open(GalleryModalComponent, config);\n }\n\n openNewTurnoverModal(activeProperty: number[], isNonPms: boolean) {\n this.dialog.open(NewTurnoverModalComponent, {\n autoFocus: false,\n width: '454px',\n minHeight: '368px',\n panelClass: 'new-turnover-modal-container',\n data: { activePropertyIds: activeProperty, isNonPms: isNonPms },\n });\n }\n\n openNextStepAssigneeModal(\n turnoverData: RestTurnoverDataModel,\n workflowStep: WorkflowStepEnumType,\n propertyId: number,\n propertyName: string\n ) {\n return this.dialog.open(\n NextStepAssigneeModalComponent,\n {\n autoFocus: false,\n width: '412px',\n panelClass: 'next-step-assignee-modal-container',\n disableClose: true,\n data: {\n nextWorkflowStep: workflowStep,\n turnoverData,\n propertyId,\n propertyName,\n },\n }\n );\n }\n\n openTicketPreviewModal(data: ListUpdateAction) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '683px',\n maxHeight: '100vh',\n panelClass: 'ticket-preview-modal-container',\n data,\n };\n\n return this.dialog.open(TicketPreviewModalComponent, config);\n }\n\n openPunchModal(data: RestTicketModel) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '1171px',\n maxHeight: '100vh',\n panelClass: 'punch-modal-container',\n disableClose: true,\n data,\n };\n\n return this.dialog.open(TurnoverPunchModalComponent, config);\n }\n\n openNewVendor() {\n return this.dialog.open(AddNewCompanyModalComponent, { ...DefaultModalConfigConstant, width: '400px' });\n }\n\n openPrompt(data: PromptModalData, size: ModalDialogSize = 'sm') {\n return this.dialog.open(PromptModalComponent, {\n ...DefaultModalConfigConstant,\n width: typeof size === 'number' ? `${size}px` : ModalDialogSizes[size],\n data,\n });\n }\n\n openNewVendorModal(data: AddVendorModalData) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '572px',\n maxHeight: '100vh',\n panelClass: 'add-vendor-modal-container',\n disableClose: true,\n data,\n };\n\n return this.dialog.open(\n AddVendorModalComponent,\n config\n );\n }\n\n openCustomInspectionSaveTemplateModal(data: CustomInspectionSaveTemplateDialogData) {\n return this.dialog.open<\n CustomInspectionSaveTemplateDialogComponent,\n CustomInspectionSaveTemplateDialogData,\n CustomInspectionSaveTemplateDialogResult\n >(CustomInspectionSaveTemplateDialogComponent, {\n data,\n panelClass: 'schedule-modal-container',\n autoFocus: 'dialog',\n disableClose: true,\n });\n }\n\n getAcceptChargesText() {\n return this.nonPmsUnitCost$.pipe(\n map(cost => {\n const version = environment.ver.split('.').map(e => +e);\n const isBeta = environment.apiUrl.includes('beta');\n if (isBeta && (version[0] < 5 || (version[0] == 5 && version[1] < 6))) {\n return `There will be a monthly fee of $${cost} (waived until 01/01/24) for this unit for each month it is active.`;\n }\n return `There will be a monthly fee of $${cost} for this unit for each month it is active.`;\n })\n );\n }\n\n openConfirmationModal(\n data: ConfirmationModalData,\n size: ModalDialogSize = 'sm'\n ): MatDialogRef {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: typeof size === 'number' ? `${size}px` : ModalDialogSizes[size],\n maxHeight: '80vh',\n panelClass: 'confirmation-modal-container',\n disableClose: true,\n data,\n };\n\n if (data.doNotShowAgain && this.isDialogHiddenByUser(data)) {\n return {\n afterClosed(): Observable {\n return of(DialogResult.Success);\n },\n } as MatDialogRef;\n } else {\n return this.dialog.open(ConfirmationModalComponent, config);\n }\n }\n\n openUserPreviewModal(user?: UserWithGeneralRole, vendorId?: number, header?: string) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '572px',\n panelClass: 'user-preview-modal-container',\n data: { user, vendorId, header },\n };\n\n return this.dialog.open(\n UserPreviewModalComponent,\n config\n );\n }\n\n openVendorUserModal(vendorId?: number, header?: string) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '572px',\n panelClass: 'add-vendor-user-modal-container',\n data: { vendorId, header },\n };\n\n return this.dialog.open(\n AddVendorUserModalComponent,\n config\n );\n }\n\n addBid(turnoverId: number) {\n const config: MatDialogConfig = {\n ...DefaultModalConfigConstant,\n width: '450px',\n panelClass: 'add-bid-modal-container',\n data: {\n turnoverId,\n },\n };\n\n return this.dialog.open(AddBidModalComponent, config);\n }\n}\n","
    \n
    \n
    \n {{ form.value.isNonPms ? 'Create non-PMS unit and turn' : 'New ' + (systemConfigPmsName$ | async) }}\n
    \n
    \n\n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n\n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n Cancel\n \n \n
    \n {{ form.value.isNonPms ? 'Create unit & turn' : 'Create turn' }}\n \n
    \n \n
    \n
    \n","import { DatePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormBuilder, FormControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { Router } from '@angular/router';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Store } from '@ngrx/store';\nimport { isNil } from 'lodash';\nimport { Observable, of } from 'rxjs';\nimport { filter, map, switchMap, take } from 'rxjs/operators';\n\nimport { ComponentAbstract } from '@app/components/abstract/component.abstract';\nimport { UnitNonPmsService } from '@app/services/unit-non-pms.service';\nimport { loadUnitDetails, loadUnitList, resetUnitList } from '@dashboards/store/actions/dashboard.actions';\nimport {\n selectSelectedPortfolioId,\n selectSelectedPropertyId,\n selectUnitDetails,\n selectUnitList,\n selectUnitListLoading,\n} from '@dashboards/store/selectors/dashboards.selectors';\nimport { TimezoneService } from '@main-application/management/components/system-configuration/components/date-time-configuration/timezone.service';\nimport { createNewTurnover, resetCreateNewTurnover } from '@main-application/turnovers/actions/turnovers.actions';\nimport { TurnoverForm } from '@main-application/turnovers/config/enums/turnover-form';\nimport {\n selectCreateTurnoverLoading,\n selectCreatedTurnover,\n} from '@main-application/turnovers/selectors/turnovers.selectors';\nimport { selectProperties, selectPropertiesLoading } from '@portfolio/store/portfolio.selectors';\nimport { loadAllUserProperties } from '@shared/actions/user.actions';\nimport { AppRoutes } from '@shared/constants/app-routes.const';\nimport { WorkflowStepListActive } from '@shared/constants/workflow-step-list.const';\nimport { DashboardViewType } from '@shared/enums/dashboard-view-type';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { getPortfolioProperties } from '@shared/functions/get-portfolio-properties.function';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { RestPortfolioModel, RestPropertyModel } from '@shared/interfaces/rest-portfolio-model.interface';\nimport { RestUnitSummaryModel } from '@shared/interfaces/rest-unit-summary-model.interface';\nimport { PostTurnoverModel } from '@shared/interfaces/turnover.interface';\nimport { selectTenantData } from '@shared/selectors/user.selectors';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\nimport { DialogResult } from '../config/dialog-result.enum';\nimport { ModalsService } from '../modals.service';\n\nexport class NewTurnoverModalData {\n activePropertyIds: number[];\n isNonPms: boolean;\n defaultWorkflowStepType?: WorkflowStepEnumType;\n}\n\n@UntilDestroy()\n@Component({\n selector: 'app-new-turnover-modal',\n templateUrl: './new-turnover-modal.component.html',\n styleUrls: ['./new-turnover-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NewTurnoverModalComponent extends ComponentAbstract implements OnInit, OnDestroy {\n form = this.formBuilder.group({\n [TurnoverForm.PROPERTY_ID]: [null as number, [Validators.required]],\n [TurnoverForm.UNIT_ID]: [null as number, [Validators.required]],\n unitName: ['non-PMS unit', [Validators.required]],\n [TurnoverForm.MOVE_OUT]: [this.timezoneService.getCurrentDateOnly(), [Validators.required]],\n startWorkflowStepType: [WorkflowStepEnumType.MoveOut, [Validators.required, this.noticeValidation()]],\n isNonPms: false,\n });\n\n portfolioItems: RestPortfolioModel[] = [];\n userPropertiesList: IRadioButtonOption[] = [];\n userProperties: IRadioButtonOption[] | IRadioButtonOption[][] = [];\n userUnits: IRadioButtonOption[] = [];\n\n selectPropertiesLoading$: Observable;\n unitListLoading$: Observable;\n newTurnoverLoadingInProgress$: Observable;\n systemConfigPmsName$ = this.store.select(selectTenantData).pipe(\n untilDestroyed(this),\n filter(tenantData => !!tenantData),\n take(1),\n map(tenantData => tenantData.pmses.split(',')[0])\n );\n nonPmsUnitCost$ = this.store.select(selectTenantData).pipe(\n untilDestroyed(this),\n filter(tenantData => !!tenantData),\n take(1),\n map(tenantData => tenantData.nonPmsUnitCost)\n );\n workflowStepTypes = WorkflowStepListActive;\n\n constructor(\n protected cdr: ChangeDetectorRef,\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) public data: NewTurnoverModalData,\n private formBuilder: FormBuilder,\n private store: Store<{}>,\n private router: Router,\n private unitNonPmsService: UnitNonPmsService,\n private timezoneService: TimezoneService,\n private modalService: ModalsService,\n private datePipe: DatePipe,\n private snackbarService: SnackbarService\n ) {\n super(cdr);\n\n if (data.defaultWorkflowStepType) {\n this.form.controls.startWorkflowStepType.setValue(data.defaultWorkflowStepType);\n }\n }\n\n noticeValidation(): ValidatorFn {\n const today = this.timezoneService.getCurrentDateOnly();\n const tomorrow = new Date(today.setDate(today.getDate() + 1));\n return (control: FormControl): ValidationErrors | null => {\n if (!this.form?.value || control.value == WorkflowStepEnumType.Notice || today >= this.form.value.MoveOutDate) {\n return null;\n }\n\n return {\n customError: `NOTICE required if MOD < ${this.datePipe.transform(tomorrow, 'MM/dd')}`,\n };\n };\n }\n\n ngOnInit(): void {\n this.store.dispatch(loadAllUserProperties());\n this.store.dispatch(resetCreateNewTurnover());\n\n this.selectPropertiesLoading$ = this.store.select(selectPropertiesLoading);\n this.unitListLoading$ = this.store.select(selectUnitListLoading);\n this.newTurnoverLoadingInProgress$ = this.store.select(selectCreateTurnoverLoading);\n\n this.form.controls.MoveOutDate.valueChanges.subscribe(() =>\n this.form.controls.startWorkflowStepType.updateValueAndValidity()\n );\n\n this.form.controls.isNonPms.valueChanges.subscribe(value => {\n if (value) {\n this.form.controls.unitName.enable();\n this.form.controls.UnitId.disable();\n this.modalService\n .getAcceptChargesText()\n .pipe(\n switchMap(acceptChargesText =>\n this.modalService\n .openConfirmationModal({\n cancelLabel: 'No, go back',\n confirmColor: 'warn',\n confirmLabel: 'I accept',\n title: 'Accept charges?',\n content: acceptChargesText,\n })\n .afterClosed()\n ),\n take(1),\n untilDestroyed(this),\n filter(result => result !== DialogResult.Success)\n )\n .subscribe(() => this.form.controls.isNonPms.setValue(false));\n } else {\n this.form.controls.UnitId.addValidators(Validators.required);\n this.form.controls.unitName.disable();\n this.form.controls.UnitId.enable();\n }\n });\n\n this.form.controls.isNonPms.setValue(this.data.isNonPms);\n\n this.store\n .select(selectSelectedPropertyId)\n .pipe(untilDestroyed(this), take(1), filter(Boolean))\n .subscribe(propertyId => {\n this.form.controls.PropertyId.setValue(propertyId);\n this.cdr.detectChanges();\n });\n\n this.store\n .select(selectSelectedPortfolioId)\n .pipe(\n untilDestroyed(this),\n filter(portfolioId => !!portfolioId),\n take(1)\n )\n .subscribe(portfolioId => {\n this.store.dispatch(\n loadUnitDetails({ propertyId: portfolioId, dashboardViewType: DashboardViewType.PORTFOLIO_WIDE_VIEW })\n );\n });\n\n this.store.select(selectUnitDetails).subscribe(unitList => {\n const nonPmsUnitMaxNumber = unitList\n .flatMap(e => e.unitName)\n .filter(unitName => /^non-PMS unit[0-9]*$/.test(unitName))\n .map(unitName => +unitName.replace('non-PMS unit', ''))\n .reduce((max, nextValue) => (nextValue >= max ? nextValue + 1 : max), 0);\n\n const unitName = 'non-PMS unit' + (nonPmsUnitMaxNumber == 0 ? '' : nonPmsUnitMaxNumber);\n\n this.form.controls.unitName.setValue(unitName);\n });\n\n this.store\n .select(selectProperties)\n .pipe(\n untilDestroyed(this),\n filter((userProperties: RestPropertyModel[]) => !!userProperties)\n )\n .subscribe((userProperties: RestPropertyModel[]) => {\n this.userPropertiesList = getPortfolioProperties(userProperties);\n\n if (this.data?.activePropertyIds?.length) {\n const activeProperties: IRadioButtonOption[] = [];\n const otherProperties: IRadioButtonOption[] = [];\n\n this.userPropertiesList.forEach((item: IRadioButtonOption) => {\n if (this.data.activePropertyIds?.includes(item.value)) {\n activeProperties.push(item);\n } else {\n otherProperties.push(item);\n }\n });\n\n this.userProperties = [activeProperties, otherProperties];\n } else {\n this.userProperties = [...this.userPropertiesList];\n }\n\n this.cdr.detectChanges();\n });\n\n this.store\n .select(selectUnitList)\n .pipe(\n untilDestroyed(this),\n filter(() => !!this.form.value.PropertyId)\n )\n .subscribe((unitList: RestUnitSummaryModel[]) => {\n this.userUnits = this.getUnitList(unitList);\n this.cdr.markForCheck();\n });\n\n this.store\n .select(selectCreatedTurnover)\n .pipe(\n untilDestroyed(this),\n filter(createdTurnover => !!createdTurnover)\n )\n .subscribe(createdTurnover => {\n let successMessage: string;\n if (this.form.value.isNonPms) {\n const unitName = this.form.value.unitName;\n successMessage = `Turn created for ${unitName}`;\n } else {\n const unitName = this.userUnits.find(e => e.value === this.form?.value?.UnitId)?.label;\n const propertyName = this.userPropertiesList.find(e => e.value === this.form.value.PropertyId)?.label;\n successMessage = `Turn created for ${propertyName} - ${unitName}`;\n }\n this.store.dispatch(resetUnitList());\n\n this.dialogRef.close();\n this.reloadRoute().then(() =>\n this.router\n .navigate([AppRoutes.TURNOVERS, `${createdTurnover.id}`], {\n queryParamsHandling: 'merge',\n })\n .then(() => this.snackbarService.success(successMessage))\n );\n });\n\n this.form.controls.PropertyId.valueChanges.pipe(untilDestroyed(this)).subscribe(propertyId => {\n if (!isNil(propertyId)) {\n this.store.dispatch(loadUnitList({ propertyId }));\n }\n this.form.controls.UnitId.reset();\n });\n\n if (!this.data.defaultWorkflowStepType) {\n this.form.controls.MoveOutDate.valueChanges.pipe(untilDestroyed(this)).subscribe(moveOutDate => {\n if (moveOutDate > this.timezoneService.getCurrentDateOnly()) {\n this.form.controls.startWorkflowStepType.setValue(WorkflowStepEnumType.Notice);\n } else {\n this.form.controls.startWorkflowStepType.setValue(WorkflowStepEnumType.MoveOut);\n }\n });\n }\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n newTurnover() {\n if (this.form.invalid) {\n this.showValidationError = true;\n this.form.markAllAsTouched();\n this.cdr.detectChanges();\n return;\n }\n\n const unitId$ = this.form.value.isNonPms\n ? this.unitNonPmsService.add({\n propertyId: this.form.value.PropertyId,\n name: this.form.value.unitName,\n })\n : of(this.form.value.UnitId);\n\n unitId$.subscribe(unitId => {\n const postTurnoverModel: PostTurnoverModel = {\n unitId: unitId,\n propertyId: this.form.value.PropertyId,\n dateMoveOut: this.form.value.MoveOutDate,\n startWorkflowStepType: this.form.value.startWorkflowStepType,\n };\n\n this.store.dispatch(createNewTurnover({ postTurnoverModel }));\n });\n }\n\n ngOnDestroy(): void {}\n\n private getUnitList(unitList: RestUnitSummaryModel[] = []): IRadioButtonOption[] {\n if (!unitList?.length) {\n return [];\n }\n return unitList.map>(item => {\n return {\n value: item.id,\n label: item.name,\n };\n });\n }\n\n private reloadRoute(): Promise {\n return this.router.navigateByUrl('/', { skipLocationChange: true });\n }\n}\n","import { CommonModule, DatePipe } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { RadioButtonDropdownModule } from '@app/modules/ui-components/components/radio-button-dropdown/radio-button-dropdown.module';\nimport { TurnoverDateRangeModule } from '@main-application/turnovers/components/sections/turnover-date-range/turnover-date-range.module';\nimport { DateDropdownModule } from '@ui-components/components/date-dropdown/date-dropdown.module';\nimport { InputModule } from '@ui-components/components/input/input.module';\nimport { SlideToggleComponent } from '@ui-components/components/slide-toggle/slide-toggle.component';\n\nimport { NewTurnoverModalComponent } from './new-turnover-modal.component';\n\n@NgModule({\n declarations: [NewTurnoverModalComponent],\n imports: [\n InputModule,\n SlideToggleComponent,\n MatDialogModule,\n ReactiveFormsModule,\n TurnoverDateRangeModule,\n RadioButtonDropdownModule,\n CommonModule,\n MatButtonModule,\n MatProgressSpinnerModule,\n DateDropdownModule,\n ],\n providers: [DatePipe],\n})\nexport class NewTurnoverModalModule {}\n","export const EMAIL_REGEXP =\n /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nimport { EMAIL_REGEXP } from '@shared/constants/email.regexp.const';\n\nexport const EmailPatternValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: boolean } => {\n return EMAIL_REGEXP.test(control?.value) ? null : { email: true };\n };\n};\n","import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { BillingReportFilter, BillingReportItem } from '@shared/interfaces/billing.interface';\nimport { UserToGeneralRoleModel } from '@shared/interfaces/user-to-general-role-model';\nimport { UserToPropertyMapping } from '@shared/interfaces/user-to-property-mapping';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AdminPanelService {\n constructor(private restApiService: RestapiService) {}\n\n setUserToGeneralRole(usersToGeneralRoleList: UserToGeneralRoleModel[]): Observable {\n return this.restApiService.create(`AdminPanel/UserToGeneralRole`, usersToGeneralRoleList);\n }\n\n setUserToPropertyRole(userToPropertyRoleList: UserToPropertyMapping[]): Observable {\n if (!userToPropertyRoleList?.length) {\n return of(false);\n }\n\n return this.restApiService.create(`AdminPanel/UserToPropertyRole`, userToPropertyRoleList);\n }\n\n removeUserFromPropertyRole(propertyId: number[]): Observable {\n if (!propertyId?.length) {\n return of(false);\n }\n\n return this.restApiService.create(`AdminPanel/UserToPropertyRole/remove`, propertyId);\n }\n\n billingReport(filter: BillingReportFilter): Observable {\n return this.restApiService.getData(\n `AdminPanel/BillingReport?startDate=${filter.startDate.toISOString()}&endDate=${filter.endDate.toISOString()}`\n );\n }\n\n runImporterNow(): Observable {\n return this.restApiService.getData(`AdminPanel/runImporterNow`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, filter } from 'rxjs';\n\nimport { LocalStorageDataEnum } from '@shared/enums/local-storage-data.enum';\n\nclass CacheInfo {\n cachedSubject: ReplaySubject;\n expired: boolean;\n id: number;\n timestamp: Date;\n version?: number;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CacheService {\n private cacheInfoDictionary: { [key: string]: CacheInfo } = {};\n\n getCachedInfo(key: string, id: number, f: (id: number) => Observable, version?: number): Observable {\n if (!this.cacheInfoDictionary[key]) {\n this.cacheInfoDictionary[key] = {\n cachedSubject: new ReplaySubject(1),\n expired: true,\n id: id,\n timestamp: new Date(),\n version: undefined,\n };\n }\n\n const cacheInfo = this.cacheInfoDictionary[key];\n\n if (\n cacheInfo.expired ||\n cacheInfo.id !== id ||\n cacheInfo.version !== version ||\n this.expiredFromLocalStarage(key, cacheInfo.timestamp)\n ) {\n if (cacheInfo.id !== id) {\n cacheInfo.cachedSubject.complete();\n cacheInfo.cachedSubject = new ReplaySubject(1);\n } else {\n cacheInfo.cachedSubject.next(undefined);\n }\n\n cacheInfo.expired = false;\n cacheInfo.timestamp = new Date();\n cacheInfo.version = version;\n cacheInfo.id = id;\n f(id).subscribe(data => cacheInfo.cachedSubject.next(data));\n }\n return cacheInfo.cachedSubject.pipe(filter(data => typeof data !== 'undefined'));\n }\n\n private expiredFromLocalStarage(key: string, timestamp: Date) {\n const storageTimestamp = localStorage.getItem(LocalStorageDataEnum.CACHE_KEYS.replace('{0}', key));\n return storageTimestamp && new Date(storageTimestamp) > timestamp;\n }\n\n expireCachedInfo(key: string): void {\n const cacheInfo = this.cacheInfoDictionary[key];\n if (cacheInfo) {\n cacheInfo.expired = true;\n localStorage.setItem(LocalStorageDataEnum.CACHE_KEYS.replace('{0}', key), new Date().toString());\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestAddressModel } from '@shared/interfaces/address.interface';\nimport { PostCompanyAddressModel, RestCompanyModel, UpdateEmployeeItem } from '@shared/interfaces/companies.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CompaniesService {\n constructor(private restApiService: RestapiService) {}\n\n getCompanyList(): Observable {\n return this.restApiService.getData(`Companies`);\n }\n\n getCompany(companyId: number): Observable {\n return this.restApiService.getData(`Companies/${companyId}`);\n }\n\n addNewCompany(companyModel: RestCompanyModel): Observable {\n return this.restApiService.create('Companies', companyModel);\n }\n\n updateCompany(companyModel: RestCompanyModel): Observable {\n return this.restApiService.update(`Companies/${companyModel.id}`, companyModel);\n }\n\n deleteCompany(companyId: number): Observable {\n return this.restApiService.delete(`Companies/${companyId}`);\n }\n\n addEmployeeToCompany(updateEmployeeItem: UpdateEmployeeItem): Observable {\n return this.restApiService.associate(\n `Companies/${updateEmployeeItem.companyId}/assignEmployees`,\n updateEmployeeItem.userIds\n );\n }\n\n deleteEmployeeFromCompany(updateEmployeeItem: UpdateEmployeeItem): Observable {\n return this.restApiService.associate(\n `Companies/${updateEmployeeItem.companyId}/removeEmployees`,\n updateEmployeeItem.userIds\n );\n }\n\n addAddressToCompany(postCompanyAddressModel: PostCompanyAddressModel): Observable {\n return this.restApiService.create(\n `Companies/${postCompanyAddressModel.companyId}/Addresses`,\n postCompanyAddressModel\n );\n }\n\n updateAddressInCompany(restAddressModel: RestAddressModel, companyId: number): Observable {\n return this.restApiService.update(`Companies/${companyId}/Addresses/${restAddressModel.id}`, restAddressModel);\n }\n}\n","import { HttpEvent } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { FileSearchQuery, FileUploadModel, Upload } from '@shared/interfaces';\n\nimport { environment } from '../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FileUploadsService {\n constructor(private restApiService: RestapiService) {}\n\n uploadFile(file: File): Observable {\n return this.restApiService.upload(`FileUploads/`, file);\n }\n\n uploadFileProgress(file: File): Observable> {\n return this.restApiService.uploadProgress(`FileUploads/`, file);\n }\n\n removeFile(fileId: number): Observable {\n return this.restApiService.delete(`FileUploads/${fileId}`);\n }\n\n search(query: FileSearchQuery) {\n return this.restApiService.post(`FileUploads/search`, query);\n }\n\n download(fileUploadId: number) {\n this.search({ ids: [fileUploadId] }).subscribe(result => {\n if (result?.length) {\n window.open(result[0].cloudUri, '_parent');\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sumBy } from 'lodash';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { PortfolioKpiType, RestPortfolioKpi } from '@dashboards/models/portfolio-kpi';\nimport { KpiWindowType } from '@shared/enums/kpi-window-type';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class KpiService {\n constructor(private restApiService: RestapiService) {}\n\n private filterKpiByType(kpis: RestPortfolioKpi[], kpiType: PortfolioKpiType): RestPortfolioKpi[] {\n return kpis.filter(k => k.kpiType === kpiType);\n }\n\n avg(kpis: RestPortfolioKpi[], kpiType: PortfolioKpiType, precision = 0): number | undefined {\n const filtered = this.filterKpiByType(kpis, kpiType);\n const avg = sumBy(filtered, k => k.value * k.unitsCount) / sumBy(filtered, k => k.unitsCount);\n if (isNaN(avg)) {\n return undefined;\n } else {\n return !precision ? Math.round(avg) : parseFloat(avg.toFixed(precision));\n }\n }\n\n sum(kpis: RestPortfolioKpi[], kpiType: PortfolioKpiType, precision = 0): number {\n const filtered = this.filterKpiByType(kpis, kpiType);\n return parseFloat(sumBy(filtered, k => k.value).toFixed(precision));\n }\n\n percent(kpis: RestPortfolioKpi[], kpiType: PortfolioKpiType): number | undefined {\n const filtered = this.filterKpiByType(kpis, kpiType);\n const value = sumBy(filtered, k => k.value) / sumBy(filtered, k => k.unitsCount);\n if (isNaN(value)) {\n return undefined;\n }\n return Math.round(value * 100);\n }\n\n fetch(portfolioId: number, dateOffset: KpiWindowType, kpiTypes: PortfolioKpiType[]) {\n return this.restApiService.getData(\n `portfolio/${portfolioId}/kpis?dateOffset=${dateOffset}&${kpiTypes.map(k => `kpiIds=${k}`).join('&')}`\n );\n }\n\n trend(portfolioId: number, kpiTypes: PortfolioKpiType[], trendDays: number[]) {\n return this.restApiService.getData(\n `portfolio/${portfolioId}/kpisTrend?kpi=[${kpiTypes.map(k => k).join(',')}]&trend_line=[${trendDays.join(',')}]`\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AbstractSecurityStorage } from 'angular-auth-oidc-client';\n\nconst OIDC_STORAGE_KEY_PREFIX = 'oidc_key';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OidcStorageService implements AbstractSecurityStorage {\n read(key: string) {\n return localStorage.getItem(this.getKey(key));\n }\n\n write(key: string, value: any): void {\n localStorage.setItem(this.getKey(key), value);\n }\n\n remove(key: string): void {\n localStorage.removeItem(this.getKey(key));\n }\n\n clear(): void {\n Object.keys(localStorage)\n .filter(key => key.startsWith(OIDC_STORAGE_KEY_PREFIX))\n .forEach(key => {\n localStorage.removeItem(key);\n });\n }\n\n private getKey(key: string) {\n return `${OIDC_STORAGE_KEY_PREFIX}_${key}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport {\n RestPropertyManagerAccessModel,\n RestPropertyModel,\n RestPropertyTurnsWithoutAssignees,\n UpdatePropertyManagerModel,\n} from '@shared/interfaces/rest-portfolio-model.interface';\nimport { PreleaseFilterMode } from '@shared/interfaces/turnover.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PropertiesService {\n constructor(private restApiService: RestapiService) {}\n\n getAllUserProperties(): Observable {\n return this.restApiService.getData(`properties`);\n }\n\n getAllUserUnassignedProperties(): Observable {\n return this.restApiService.getData(`properties/unassigned`);\n }\n\n getPropertyManagers(): Observable {\n return this.restApiService.getData(`Properties/PropertyManagers`);\n }\n\n getPropertyManagersForProperty(propertyId: number): Observable {\n return this.restApiService.getData(`Properties/${propertyId}/PropertyManagers`);\n }\n\n removePropertyManagers(propertyManagerModels: UpdatePropertyManagerModel[]): Observable {\n return this.restApiService.update(`Properties/RemovePropertyManagers`, propertyManagerModels);\n }\n\n setPropertyManagers(propertyManagerModels: UpdatePropertyManagerModel[]): Observable {\n return this.restApiService.update(`Properties/SetPropertyManagers`, propertyManagerModels);\n }\n\n setPropertyPreleaseFilter(propertyId: number, preleaseFilterMode: PreleaseFilterMode): Observable {\n return this.restApiService.create(`Properties/${propertyId}/SetPreleaseMode`, preleaseFilterMode);\n }\n\n addPropertyToPortfolio(portfolioId: number, propertyName: string): Observable {\n return this.restApiService.create(`Properties`, {\n portfolioId,\n name: propertyName,\n });\n }\n\n getTurnsWithoutAssignees(\n propertyId: number,\n step: WorkflowStepEnumType\n ): Observable {\n return this.restApiService.getData(\n `Properties/turnsWithoutAssignee/${propertyId}/${step}`\n );\n }\n\n getTurnsWithoutPortfolioAssignees(\n portfolioId: number,\n step: WorkflowStepEnumType\n ): Observable {\n return this.restApiService.getData(\n `Portfolio/turnsWithoutAssignee/${portfolioId}/${step}`\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestRenewalModel, RestUnitRenewalTargetModel } from '@shared/interfaces/renevals.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RenewalsService {\n constructor(private restApiService: RestapiService) {}\n\n getRenewalDetails(renewalId: number): Observable {\n return this.restApiService.getData(`Renewals/${renewalId}`);\n }\n\n updateRenewalDetails(renewalModel: RestRenewalModel): Observable {\n return this.restApiService.update(`Renewals/${renewalModel.id}`, renewalModel);\n }\n\n getRenewalList(propertyId: number): Observable {\n return this.restApiService.getData(`Renewals/property/${propertyId}`);\n }\n\n renewalTargetList(propertyId: number): Observable {\n return this.restApiService.getData(`Renewals/RenewalTargets/property/${propertyId}`);\n }\n\n renewalTargetForUnitId(unitId: number): Observable {\n return this.restApiService.getData(`Renewals/RenewalTargetForUnitId/${unitId}`);\n }\n\n updateRenewalTarget(renewalTargetModels: RestUnitRenewalTargetModel[]): Observable {\n return this.restApiService.update(`Renewals/RenewalTargets`, renewalTargetModels);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\ntype ScreenWiperStatuses = 'start' | 'end' | '';\n\n@Injectable()\nexport class ScreenWiperService {\n private screenWipeState = 0;\n private screenClasses = new BehaviorSubject(`screen-wiper state-${this.screenWipeState}`);\n public screenClasses$ = this.screenClasses.asObservable();\n\n private globalWiperVisible = new BehaviorSubject(false);\n public globalWiperVisible$ = this.globalWiperVisible.asObservable();\n\n public readonly wipeDuration = 5000;\n\n constructor(private snackbarService: SnackbarService) {}\n\n next(globalWiper = false) {\n this.globalWiperVisible.next(globalWiper);\n if (globalWiper) {\n setTimeout(() => this.runWiper(globalWiper), 100);\n } else {\n this.runWiper(globalWiper);\n }\n }\n\n private runWiper(globalWiper: boolean) {\n this.screenWipeState = (this.screenWipeState + 1) % 3;\n this.setClasses('start');\n setTimeout(() => {\n if (globalWiper) {\n this.snackbarService.info(\"Preventing monitor burn-in. You're welcome. 😰\", this.wipeDuration);\n }\n this.setClasses('end');\n setTimeout(() => {\n this.setClasses('');\n }, this.wipeDuration);\n }, 10);\n }\n\n private setClasses(status: ScreenWiperStatuses) {\n this.screenClasses.next(`screen-wiper state-${this.screenWipeState} ${status}`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestSurveyTemplate } from '@main-application/survey-creator/interfaces/survey-template';\nimport { RestTemplateAreaModel } from '@template/models/rest-template-model.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SurveysService {\n constructor(private restApiService: RestapiService) {}\n\n getSurveyTemplates(): Observable {\n return this.restApiService.getData('AdminPanel/templatesList');\n }\n\n saveTemplate(id: number, template: string): Observable {\n return this.restApiService.update('AdminPanel/template', { id, template });\n }\n\n get(id: number): Observable {\n return this.restApiService.getData(`inspections/template/survey/${id}`);\n }\n add(survey: RestTemplateAreaModel): Observable {\n return this.restApiService.post(`inspections/template/survey/add`, survey);\n }\n\n update(survey: RestTemplateAreaModel): Observable {\n return this.restApiService.post(`inspections/template/survey/${survey.id}`, survey);\n }\n\n delete(id: number): Observable {\n return this.restApiService.post('inspections/template/survey/delete', id);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { PmsCredentialModel } from '@shared/interfaces/pms-credential-model.interface';\nimport { RestChatHooksChannel } from '@shared/interfaces/rest-chat-hooks-channel';\nimport { RestTimerReport } from '@shared/interfaces/rest-timer-report';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SystemConfigService {\n constructor(private restApiService: RestapiService) {}\n\n getSystemConfig(): Observable {\n return this.restApiService.getData('AdminPanel/ApiCredentials');\n }\n\n getChatHooksChannels(): Observable {\n return this.restApiService.getData('slack/channels');\n }\n\n getTimerReport(): Observable {\n return this.restApiService.getData('Turnovers/mismatchissues');\n }\n\n setPropertyChatChannel(propertyId: number, channelIds: string[]): Observable<{}> {\n return this.restApiService.update<{}>(`properties/${propertyId}/UpdateSlackChannelId`, {\n channelIds,\n });\n }\n\n addSystemConfig(pmsCredential: PmsCredentialModel): Observable {\n return this.restApiService.create('AdminPanel/ApiCredentials', pmsCredential);\n }\n\n deleteSystemConfig(id: number): Observable {\n return this.restApiService.delete('AdminPanel/ApiCredentials/' + id);\n }\n\n updateSystemConfig(pmsCredential: PmsCredentialModel): Observable {\n return this.restApiService.associate('AdminPanel/ApiCredentials', pmsCredential);\n }\n\n buildiumTokenExchange(jwtToken: string): Observable {\n return this.restApiService.associate('AdminPanel/buildiumTokenExchange', { jwtToken });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport {\n RestTicketCategoryModel,\n RestTicketModel,\n RestTypedTicketAttachment,\n UpdateTypedAttachmentToEntityModel,\n} from '@shared/interfaces/turnover.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TicketsService {\n constructor(private restApiService: RestapiService) {}\n\n create(turnoverTicket: RestTicketModel, residentMode = false): Observable {\n return this.restApiService.create(`Tickets?residentTickets=${residentMode}`, turnoverTicket);\n }\n\n update(turnoverTicket: RestTicketModel): Observable {\n return this.restApiService.update(`Tickets/${turnoverTicket.id}`, turnoverTicket);\n }\n\n delete(ticketId: number): Observable {\n return this.restApiService.delete(`Tickets/${ticketId}`);\n }\n\n list(residentMode = false): Observable {\n return this.restApiService.getData(`Tickets?residentTickets=${residentMode}`);\n }\n\n rate(ticketId: number, clientFeedbackRating: number): Observable {\n return this.restApiService.post(`Tickets/submitfeedback`, {\n ticketId: ticketId,\n clientFeedbackRating: clientFeedbackRating,\n });\n }\n\n getTicket(ticketId: number): Observable {\n return this.restApiService.getData(`Tickets/${ticketId}`);\n }\n\n getTicketAttachment(ticketId: number): Observable {\n return this.restApiService.getData(`Tickets/${ticketId}/Attachments`);\n }\n\n setAttachment(attachmentToEntity: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.create(\n `Tickets/${attachmentToEntity.ticketId}/Attachments`,\n attachmentToEntity\n );\n }\n\n getTicketsByTurnover(turnoverId: number): Observable {\n return this.restApiService.getData(`Tickets/ByTurnoverId/${turnoverId}`);\n }\n\n getTicketsByAssigneeId(assigneeId: number): Observable {\n return this.restApiService.getData(`Tickets/ByAssigneeId/${assigneeId}`);\n }\n\n getTicketsByPropertyId(propertyId: number): Observable {\n return this.restApiService.getData(`Tickets/ByPropertyId/${propertyId}`);\n }\n\n deleteTurnoverAttachment(ticketId: number, attachmentId: number): Observable {\n return this.restApiService.delete(`Tickets/${ticketId}/Attachments/${attachmentId}`);\n }\n\n getCategories() {\n return this.restApiService.getData(`TicketPickupList`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { TenantSettingsModel } from '@main-application/management/components/turnover-configuration/components/turnover-configuration-elapsed-days-section/models/config.models';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport { RestThresholdsConfiguration } from '@shared/interfaces/thresholds-configuration.interface';\nimport { TurnoverConfigSection } from '@shared/interfaces/turnover-config.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TurnoverConfigService {\n constructor(private restApiService: RestapiService) {}\n\n getTurnoverConfigList(): Observable {\n return this.restApiService.getData('AdminPanel/turnoverConfiguration');\n }\n\n getTurnoverConfigListByWorkflowType(id: WorkflowStepEnumType): Observable {\n return this.restApiService.getData(`AdminPanel/turnoverConfiguration/${id}`);\n }\n\n updateTurnoverFieldConfiguration(turnoverConfig: TurnoverConfigSection): Observable {\n return this.restApiService.update(`AdminPanel/turnoverConfiguration`, turnoverConfig);\n }\n\n getElapsedDaysThresholds(): Observable {\n return this.restApiService.getData('AdminPanel/ElapsedDaysThresholds');\n }\n\n getTenantSettings(): Observable {\n return this.restApiService.getData('adminPanel/tenantSettings');\n }\n\n saveTenantSettings(\n tenantSettings: Partial<\n Pick<\n TenantSettingsModel,\n | 'disableAllEscalationNotices'\n | 'pmsImportNonRevenueUnits'\n | 'escalationEmailsEnabledForProperties'\n | 'autoMoveToMakeReady'\n | 'doNotEmailWhenAssigneeChanges'\n | 'writeMakeReadyStatus'\n | 'writeAvailableDate'\n >\n >\n ): Observable {\n return this.restApiService.post('adminPanel/tenantSettings', tenantSettings);\n }\n\n getFinishTypes(): Observable {\n return this.restApiService.getData('AdminPanel/FinishTypes');\n }\n\n addFinishType(body): Observable {\n return this.restApiService.create('AdminPanel/FinishTypes/Add', body);\n }\n\n updateFinishType(body: any): Observable {\n return this.restApiService.customPatchData('AdminPanel/FinishTypes/Update', body);\n }\n\n deleteFinishType(id: number): Observable {\n return this.restApiService.delete(`AdminPanel/FinishTypes/Delete/${id}`);\n }\n\n updateElapsedDaysThresholds(\n thresholdsConfiguration: RestThresholdsConfiguration\n ): Observable {\n return this.restApiService.associate('AdminPanel/ElapsedDaysThresholds', thresholdsConfiguration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { first } from 'lodash';\nimport { BehaviorSubject, Observable, finalize, of, switchMap } from 'rxjs';\n\nimport { RestapiService, RestapiServiceWithoutTimezone } from '@app/services/restapi.service';\nimport { TimezoneEntityHelper } from '@main-application/management/components/system-configuration/components/timezone-entity.helper';\nimport { TimezoneHelper } from '@main-application/management/components/system-configuration/components/timezone.helper';\nimport { TurnoverStepTimer } from '@main-application/turnovers/interfaces/timers.interface';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport {\n PostTurnoverModel,\n RestArchivedTurnover,\n RestTurnoverDataModel,\n RestTurnoverTaskModel,\n RestWorkflowTemplate,\n UpdateTypedAttachmentToEntityModel,\n} from '@shared/interfaces/turnover.interface';\n\nimport { CacheService } from './cache.service';\n\nclass TurnoverPatchOperation {\n op: 'add' | 'replace' | 'remove';\n path: KeyOfClassWithType | string;\n value: T;\n}\n\ntype KeyOfClassWithType = {\n [Property in keyof Class]: Class[Property] extends AllowedType ? Property : never;\n}[keyof Class];\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TurnoversService {\n kanbanListLoading = new BehaviorSubject(false);\n kanbanListLoading$ = this.kanbanListLoading.asObservable();\n\n constructor(\n private restApiService: RestapiService,\n private cacheService: CacheService,\n private restapiWithoutTimezone: RestapiServiceWithoutTimezone\n ) {}\n\n create(postTurnoverModel: PostTurnoverModel): Observable {\n return this.restApiService.create(\n `Turnovers`,\n postTurnoverModel,\n null,\n TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToClient\n );\n }\n\n public static fixTimezoneForTurnoverTaskModel(data: RestTurnoverTaskModel[], timezone: number) {\n data.forEach(e => TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToClient(e.turnoverData, timezone));\n return data;\n }\n\n public static fixTimezoneForArchivedTurnoverTaskModel(data: RestArchivedTurnover[], timezone: number) {\n data.forEach(e => TimezoneEntityHelper.fixTimezoneForArchivedTurnoverDataModelToClient(e, timezone));\n return data;\n }\n\n getTurnover(turnoverId: number): Observable {\n return this.restApiService.getData(\n `Turnovers/${turnoverId}`,\n TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToClient\n );\n }\n\n update(turnoverData: RestTurnoverDataModel): Observable {\n return this.restApiService.update(\n `Turnovers/${turnoverData.id}`,\n turnoverData,\n TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToServer,\n TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToClient\n );\n }\n\n patch(id: number, patchData: TurnoverPatchOperation[]): Observable {\n return this.restApiService.customPatchData[]>(\n `Turnovers/${id}`,\n patchData,\n data => {\n data.forEach(e => {\n if (['dateMoveIn', 'dateMoveOut', 'pmsMoveOutDate', 'dateAvailable', 'dateAvailable'].includes(e.path)) {\n e.value = TimezoneHelper.removeTimeZone(e.value as Date) as T;\n }\n });\n return data;\n },\n TimezoneEntityHelper.fixTimezoneForTurnoverDataModelToClient\n );\n }\n\n updateMoveOutDateSortOrder(turnoverId: number, boardId: number, sortOrderValue: number): Observable {\n return this.restApiService.post(`Turnovers/${turnoverId}/UpdateMoveOutPosition`, {\n boardId,\n position: sortOrderValue,\n });\n }\n\n updateMoveInDateSortOrder(turnoverId: number, boardId: number, sortOrderValue: number): Observable {\n return this.restApiService.post(`Turnovers/${turnoverId}/UpdateMoveInPosition`, {\n boardId,\n position: sortOrderValue,\n });\n }\n\n patchAdditionalData(\n turnoverId: number,\n boardId: number,\n patchData: TurnoverPatchOperation[]\n ): Observable {\n this.cacheService.expireCachedInfo('getPortfolioTurnovers');\n\n return this.restApiService.customPatchData[]>(\n `Turnovers/additionalData/${turnoverId}/${boardId}`,\n patchData\n );\n }\n\n setAttachment(attachmentToEntity: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.create(\n `Turnovers/${first(attachmentToEntity.turnoverIds)}/Attachments`,\n attachmentToEntity\n );\n }\n\n updateAttachment(attachmentToEntity: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.update(\n `Turnovers/${first(attachmentToEntity.turnoverIds)}/Attachments`,\n attachmentToEntity\n );\n }\n\n getPropertyTurnovers(portfolioId: number): Observable {\n return this.restApiService.getData(\n `Turnovers/property/${portfolioId}`,\n TurnoversService.fixTimezoneForTurnoverTaskModel\n );\n }\n\n getCachedPortfolioTurnovers(portfolioId: number): Observable {\n this.kanbanListLoading.next(true);\n return this.restApiService\n .getData(`Turnovers/getlatestversionbyportfolioid?portfolioId=${portfolioId}`)\n .pipe(\n switchMap(version => {\n return this.cacheService.getCachedInfo(\n 'getPortfolioTurnovers',\n portfolioId,\n (id: number) => this.getPortfolioTurnovers(id),\n version\n );\n }),\n finalize(() => this.kanbanListLoading.next(false))\n );\n }\n\n getArchivedPortfolioTurnovers(portfolioId: number): Observable {\n return this.restApiService.getData(\n `Turnovers/portfolio/${portfolioId}/archived`,\n TurnoversService.fixTimezoneForArchivedTurnoverTaskModel\n );\n }\n\n getPortfolioTurnovers(portfolioId: number): Observable {\n return this.restApiService.getData(\n `Turnovers/portfolio/${portfolioId}`,\n TurnoversService.fixTimezoneForTurnoverTaskModel\n );\n }\n\n getAllTasks(portfolioId: number): Observable {\n return this.restApiService.getData(\n `Turnovers/alltasks?portfolioId=${portfolioId}`,\n TurnoversService.fixTimezoneForTurnoverTaskModel\n );\n }\n\n deleteTurnover(turnoverId: number): Observable {\n return this.restApiService.delete(`Turnovers/${turnoverId}`);\n }\n\n deleteTurnoverAttachment(turnoverId: number, attachmentId: number): Observable {\n return this.restApiService.delete(`Turnovers/${turnoverId}/Attachments/${attachmentId}`);\n }\n\n getTurnoversAttachments(turnoverId: number): Observable {\n return this.restApiService.getData(`Turnovers/${turnoverId}/Attachments`);\n }\n\n toggleAllSections(allPropertyIds: number[], active: boolean): Observable {\n return of(active ? allPropertyIds : []);\n }\n\n toggleSingleSection(activePropertyIds: number[], propertyId: number, active: boolean): Observable {\n if (active) {\n return of([...activePropertyIds, propertyId]);\n }\n return of(activePropertyIds.filter(value => value !== propertyId));\n }\n\n getTurnoversTimers(turnoverId: number): Observable {\n return this.restapiWithoutTimezone.getData(`Turnovers/${turnoverId}/timers`);\n }\n\n updateTurnoversTimers(turnoverId: number, timers: TurnoverStepTimer[]): Observable {\n return this.restApiService.create(`Turnovers/${turnoverId}/updateTimersData`, timers);\n }\n\n restoreTurnover(turnoverId: number) {\n return this.restApiService.post(`Turnovers/restore/${turnoverId}`);\n }\n\n getWorkflowTemplates(): Observable {\n return this.restApiService.getData(`Turnovers/GetWorkflowTemplates`);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { NonPmsModelModel } from '@shared/interfaces/turnover.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class UnitNonPmsService {\n constructor(private restApiService: RestapiService) {}\n\n add(data: NonPmsModelModel) {\n return this.restApiService.create(`Units/nonPms`, data);\n }\n\n update(data: NonPmsModelModel) {\n return this.restApiService.update(`Units/nonPms`, data);\n }\n\n delete(id: number) {\n return this.restApiService.delete(`Units/nonPms/${id}`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, catchError } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestGenericTypedAttachment } from '@shared/interfaces/attachment.interface';\nimport { UpdateTypedAttachmentToEntityModel } from '@shared/interfaces/turnover.interface';\nimport { RestPropertyUnits, RestUnitModel, RestUnitSummaryModel } from '@shared/interfaces/unit.interface';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\n\n@Injectable()\nexport class UnitsService {\n constructor(private restApiService: RestapiService, private snackbarService: SnackbarService) {}\n\n update(unit: RestUnitModel) {\n return this.restApiService.update(`Units/${unit.id}`, unit).pipe(\n catchError((_err, c) => {\n this.snackbarService.error(SnackbarErrorMessage.UpdatingUnit);\n return c;\n })\n );\n }\n\n getPropertyUnits(propertyId: number): Observable {\n return this.restApiService.getData(`Units/property/${propertyId}`);\n }\n\n getPropertiesUnits(propertyIds: number[]): Observable {\n return this.restApiService.getData(`Units/all?propertyIds=${propertyIds.join(',')}`);\n }\n\n setAttachment(attachmentToEntity: UpdateTypedAttachmentToEntityModel): Observable {\n return this.restApiService.create(\n `Units/${attachmentToEntity.unitId}/Attachments`,\n attachmentToEntity\n );\n }\n\n getUnitAttachments(unitId: number): Observable {\n return this.restApiService.getData(`Units/${unitId}/Attachments`);\n }\n\n deleteUnitAttachment(unitId: number, attachmentId: number): Observable {\n return this.restApiService.delete(`Units/${unitId}/Attachments/${attachmentId}`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { find } from 'lodash';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { PermissionLevelType } from '@shared/enums/permission-level.enum';\nimport { UserType } from '@shared/enums/user-type';\nimport { getUserItems, getUserOrVendorItems } from '@shared/functions/get-user-list.function';\nimport { IRadioButtonOption } from '@shared/interfaces/radio-button-option.interface';\nimport { UserClaims } from '@shared/interfaces/user-claims';\nimport { UserData } from '@shared/interfaces/user-data';\nimport { UserWithGeneralRole } from '@shared/interfaces/user-with-general-role';\nimport { InviteRestUserModel, RestUserModel, UpdateRestUserModel } from '@shared/interfaces/user.interface';\n\nimport { CacheService } from './cache.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserService {\n constructor(private restApiService: RestapiService, private cacheService: CacheService) {}\n\n getCachedUserList(isActive?: boolean): Observable {\n return this.cacheService\n .getCachedInfo('getUserList', 0, () => this.getUserList())\n .pipe(map(list => (typeof isActive !== 'boolean' ? list : list.filter(e => e.isActive === isActive))));\n }\n\n getCachedUserOrVendorList(): Observable[]> {\n return this.getCachedUserList(true).pipe(map(list => getUserOrVendorItems(list)));\n }\n\n getCachedUserListOptions(): Observable[]> {\n return this.getCachedUserList(true).pipe(map(list => getUserItems(list)));\n }\n\n getUserList(): Observable {\n return this.restApiService.getData(`Users/`);\n }\n\n getCachedPropertyUserList(propertyId: number, isActive?: boolean): Observable {\n return this.cacheService\n .getCachedInfo('getPropertyUserList', propertyId, () => this.getPropertyUserList(propertyId))\n .pipe(map(list => (typeof isActive !== 'boolean' ? list : list.filter(e => e.isActive === isActive))));\n }\n\n getPropertyUserList(propertyId: number): Observable {\n return this.restApiService.getData(`Users/property/${propertyId}`);\n }\n\n expireCashedUserData() {\n this.cacheService.expireCachedInfo('getUserData');\n this.cacheService.expireCachedInfo('getPropertyUserList');\n }\n\n getCashedUserData(): Observable {\n return this.cacheService.getCachedInfo('getUserData', 0, () => this.getUserData());\n }\n\n private getUserData(): Observable {\n return this.restApiService.getData(`users/claims`).pipe(\n map(result => {\n const userId = find(result, { claim: 'DbUserId' });\n const email = find(result, { claim: 'UserEmail' });\n const name = find(result, { claim: 'name' });\n // todo - temporary\n const firstName = find(result, {\n claim: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',\n })?.value;\n const lastName = find(result, {\n claim: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',\n })?.value;\n\n const generalRole = find(result, {\n claim: 'GeneralRole',\n })?.value;\n\n const companyId = find(result, {\n claim: 'CompanyId',\n })?.value;\n\n const userType: UserType = (parseInt(\n find(result, {\n claim: 'UserTypeEnumValue',\n })?.value\n ) || 0) as UserType;\n\n const permissionLevel = result\n .filter(item => item.claim === 'PermissionLevel')\n .map(item => item.value as PermissionLevelType);\n\n return {\n email: email?.value,\n id: Number.parseInt(userId?.value),\n name: name.value,\n firstName,\n lastName,\n permissionLevel,\n generalRole,\n companyId: companyId ? parseInt(companyId, 10) : null,\n userType,\n };\n })\n );\n }\n\n getUserById(id: number): Observable {\n return this.restApiService.getData(`Users/${id}`);\n }\n\n setUserData(user: UpdateRestUserModel): Observable {\n this.expireCashedUserData();\n return this.restApiService.update(`Users/`, user);\n }\n\n removeUser(user: UserWithGeneralRole): Observable {\n this.expireCashedUserData();\n return this.restApiService.delete(`users/${user.id}`);\n }\n\n reactivateUser(user: UserWithGeneralRole): Observable {\n this.expireCashedUserData();\n return this.restApiService.create(`users/reactivate?id=${user.id}`, {});\n }\n\n inviteUser(user: InviteRestUserModel): Observable {\n this.expireCashedUserData();\n return this.restApiService.associate(`Users/Invitations`, user);\n }\n\n resendInvitationEmail(userId: number): Observable {\n return this.restApiService.create(`Users/${userId}/ResendInvitation`, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, catchError, map, mergeMap, of, switchMap } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { TurnoverConfigurationStepAssigneesService } from '@main-application/management/components/turnover-configuration/components/turnover-configuration-step-assignees/services/turnover-configuration-step-assignees.service';\nimport { WorkflowStepEnumType } from '@shared/enums/workflow-step.enum';\nimport {\n RestTurnoverDataModel,\n RestTurnoverTaskModel,\n isRestTurnoverTaskModel,\n} from '@shared/interfaces/turnover.interface';\nimport { WorkflowAction } from '@shared/interfaces/workflow-action.interface';\nimport { SnackbarErrorMessage } from '@ui-components/components/customized-snackbar/snackbar-message.enum';\nimport { SnackbarService } from '@ui-components/components/customized-snackbar/snackbar.service';\nimport { ModalsService } from '@ui-components/modals/modals.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WorkflowActionsService {\n constructor(\n private restApiService: RestapiService,\n private snackbarService: SnackbarService,\n private responsiblePartiesService: TurnoverConfigurationStepAssigneesService,\n protected modalsService: ModalsService\n ) {}\n\n setWorkflowStepAssignee(\n turnoverId: number,\n stepType: WorkflowStepEnumType,\n assigneeId: number,\n rememberIt = false\n ): Observable {\n return this.restApiService\n .associate(`WorkflowActions/${turnoverId}/${stepType}/${assigneeId}?rememberIt=${rememberIt}`, null)\n .pipe(\n catchError(err => {\n this.snackbarService.error(SnackbarErrorMessage.ErrorUpdatingTurnoverStepAssignee);\n throw err;\n })\n );\n }\n\n moveToNextStep(\n turnoverId: number,\n stepType: WorkflowStepEnumType,\n assigneeId: number,\n boardId: number = null,\n rememberIt = false\n ) {\n if (typeof assigneeId === 'number')\n return this.restApiService.post(\n `turnovers/${turnoverId}/transit/${stepType}/${assigneeId}?rememberIt=${rememberIt}&source=${\n boardId ? `1&sourceId=${boardId}` : '0'\n }`\n );\n return this.restApiService.post(\n `turnovers/${turnoverId}/transit/${stepType}?source=${boardId ? `1&sourceId=${boardId}` : '0'}`\n );\n }\n\n moveToNextStepWithDefaultAssignee(\n turnover: RestTurnoverDataModel | RestTurnoverTaskModel,\n stepType: WorkflowStepEnumType,\n boardId: number = null\n ) {\n return this.getAssignee(turnover, stepType).pipe(\n mergeMap(assigneeInfo => {\n if (!assigneeInfo) {\n return of(false);\n }\n return this.moveToNextStep(\n turnover.id,\n stepType,\n assigneeInfo.assigneeId,\n boardId,\n assigneeInfo.rememberIt ?? false\n ).pipe(map(() => true));\n })\n );\n }\n\n getAssignee(turnover: RestTurnoverDataModel | RestTurnoverTaskModel, stepType: WorkflowStepEnumType) {\n if (stepType === WorkflowStepEnumType.Archive) {\n return of({} as WorkflowAction);\n }\n\n let turnoverData: RestTurnoverDataModel;\n let propertyId: number;\n let propertyName: string;\n if (isRestTurnoverTaskModel(turnover)) {\n turnoverData = turnover.turnoverData;\n propertyId = turnover.propertyId;\n propertyName = turnover.propertyName;\n } else {\n turnoverData = turnover;\n }\n propertyId = propertyId ?? turnoverData.property?.id;\n propertyName = propertyName ?? turnoverData.property?.name;\n\n const currentAssigneeId = turnoverData.workflow.find(e => e.workflowStepEnumType === stepType)?.responsiblePartyId;\n if (currentAssigneeId) {\n return of({ assigneeId: currentAssigneeId } as WorkflowAction);\n }\n return this.responsiblePartiesService.getResponsiblePartiesByPropertyId(propertyId).pipe(\n map(list => list?.find(step => step.workflowStepEnumType === stepType)?.responsiblePartyId),\n switchMap(defaultAssigneeId => {\n if (defaultAssigneeId) {\n return of({ assigneeId: defaultAssigneeId } as WorkflowAction);\n } else {\n return this.modalsService\n .openNextStepAssigneeModal(turnoverData, stepType, propertyId, propertyName)\n .afterClosed();\n }\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { RestapiService } from '@app/services/restapi.service';\nimport { RestWorkflowStepCommentModel } from '@shared/interfaces/comments.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WorkflowStepCommentsService {\n constructor(private restApiService: RestapiService) {}\n\n create(comment: RestWorkflowStepCommentModel): Observable {\n return this.restApiService.create(`WorkflowStepComments`, comment);\n }\n\n update(comment: RestWorkflowStepCommentModel): Observable {\n return this.restApiService.update(`WorkflowStepComments/${comment.id}`, comment);\n }\n\n delete(commentId: number): Observable {\n return this.restApiService.delete(`WorkflowStepComments/${commentId}`);\n }\n\n getWorkflowStepComments(turnoverId: number): Observable {\n return this.restApiService.getData(`WorkflowStepComments/turnover/${turnoverId}`);\n }\n\n addReaction(commentId: number, reactionId: string): Observable {\n return this.restApiService.post(\n `WorkflowStepComments/${commentId}/AddReaction?reactionId=${encodeURIComponent(reactionId)}`,\n {}\n );\n }\n\n deleteReaction(commentId: number, reactionId: string): Observable {\n return this.restApiService.post(\n `WorkflowStepComments/${commentId}/DeleteReaction?reactionId=${encodeURIComponent(reactionId)}`,\n {}\n );\n }\n}\n","/** MobX - (c) Michel Weststrate 2015 - 2018 - MIT Licensed */\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\nvar OBFUSCATED_ERROR = \"An invariant failed, however the error is obfuscated because this is an production build.\";\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n return mockGlobal;\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\nfunction fail(message) {\n invariant(false, message);\n throw \"X\"; // unreachable\n}\nfunction invariant(check, message) {\n if (!check)\n throw new Error(\"[mobx] \" + (message || OBFUSCATED_ERROR));\n}\n/**\n * Prints a deprecation message, but only one time.\n * Returns false if the deprecated message was already printed before\n */\nvar deprecatedMessages = [];\nfunction deprecated(msg, thing) {\n if (process.env.NODE_ENV === \"production\")\n return false;\n if (thing) {\n return deprecated(\"'\" + msg + \"', use '\" + thing + \"' instead.\");\n }\n if (deprecatedMessages.indexOf(msg) !== -1)\n return false;\n deprecatedMessages.push(msg);\n console.error(\"[mobx] Deprecated: \" + msg);\n return true;\n}\n/**\n * Makes sure that the provided function is invoked at most once.\n */\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked)\n return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function () { };\nfunction unique(list) {\n var res = [];\n list.forEach(function (item) {\n if (res.indexOf(item) === -1)\n res.push(item);\n });\n return res;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n if (value === null || typeof value !== \"object\")\n return false;\n var proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n }\n else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n }\n else if (isPlainObject(dataStructure)) {\n return new Map(Object.entries(dataStructure));\n }\n else {\n return fail(\"Cannot convert to map from '\" + dataStructure + \"'\");\n }\n}\nfunction makeNonEnumerable(object, propNames) {\n for (var i = 0; i < propNames.length; i++) {\n addHiddenProp(object, propNames[i], object[propNames[i]]);\n }\n}\nfunction addHiddenProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction isPropertyConfigurable(object, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(object, prop);\n return !descriptor || (descriptor.configurable !== false && descriptor.writable !== false);\n}\nfunction assertPropertyConfigurable(object, prop) {\n if (process.env.NODE_ENV !== \"production\" && !isPropertyConfigurable(object, prop))\n fail(\"Cannot make property '\" + prop + \"' observable, it is not configurable and writable in the target object\");\n}\nfunction createInstanceofPredicate(name, clazz) {\n var propName = \"isMobX\" + name;\n clazz.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction areBothNaN(a, b) {\n return typeof a === \"number\" && typeof b === \"number\" && isNaN(a) && isNaN(b);\n}\n/**\n * Returns whether the argument is an array, disregarding observability.\n */\nfunction isArrayLike(x) {\n return Array.isArray(x) || isObservableArray(x);\n}\nfunction isES6Map(thing) {\n if (getGlobal().Map !== undefined && thing instanceof getGlobal().Map)\n return true;\n return false;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\n// use Array.from in Mobx 5\nfunction iteratorToArray(it) {\n var res = [];\n while (true) {\n var r = it.next();\n if (r.done)\n break;\n res.push(r.value);\n }\n return res;\n}\nfunction primitiveSymbol() {\n // es-disable-next-line\n return (typeof Symbol === \"function\" && Symbol.toPrimitive) || \"@@toPrimitive\";\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\n\nfunction iteratorSymbol() {\n return (typeof Symbol === \"function\" && Symbol.iterator) || \"@@iterator\";\n}\nfunction declareIterator(prototType, iteratorFactory) {\n addHiddenFinalProp(prototType, iteratorSymbol(), iteratorFactory);\n}\nfunction makeIterable(iterator) {\n iterator[iteratorSymbol()] = getSelf;\n return iterator;\n}\nfunction toStringTagSymbol() {\n return (typeof Symbol === \"function\" && Symbol.toStringTag) || \"@@toStringTag\";\n}\nfunction getSelf() {\n return this;\n}\n\n/**\n * Anything that can be used to _store_ state is an Atom in mobx. Atoms have two important jobs\n *\n * 1) detect when they are being _used_ and report this (using reportObserved). This allows mobx to make the connection between running functions and the data they used\n * 2) they should notify mobx whenever they have _changed_. This way mobx can re-run any functions (derivations) that are using this atom.\n */\nvar Atom = /** @class */ (function () {\n /**\n * Create a new atom. For debugging purposes it is recommended to give it a name.\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\n */\n function Atom(name) {\n if (name === void 0) { name = \"Atom@\" + getNextId(); }\n this.name = name;\n this.isPendingUnobservation = false; // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n this.isBeingObserved = false;\n this.observers = [];\n this.observersIndexes = {};\n this.diffValue = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.NOT_TRACKING;\n }\n Atom.prototype.onBecomeUnobserved = function () {\n // noop\n };\n Atom.prototype.onBecomeObserved = function () {\n /* noop */\n };\n /**\n * Invoke this method to notify mobx that your atom has been used somehow.\n * Returns true if there is currently a reactive context.\n */\n Atom.prototype.reportObserved = function () {\n return reportObserved(this);\n };\n /**\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\n */\n Atom.prototype.reportChanged = function () {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n Atom.prototype.toString = function () {\n return this.name;\n };\n return Atom;\n}());\nvar isAtom = createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) { onBecomeObservedHandler = noop; }\n if (onBecomeUnobservedHandler === void 0) { onBecomeUnobservedHandler = noop; }\n var atom = new Atom(name);\n onBecomeObserved(atom, onBecomeObservedHandler);\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\nfunction defaultComparer(a, b) {\n return areBothNaN(a, b) || identityComparer(a, b);\n}\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n default: defaultComparer,\n shallow: shallowComparer\n};\n\nvar enumerableDescriptorCache = {};\nvar nonEnumerableDescriptorCache = {};\nfunction createPropertyInitializerDescriptor(prop, enumerable) {\n var cache = enumerable ? enumerableDescriptorCache : nonEnumerableDescriptorCache;\n return (cache[prop] ||\n (cache[prop] = {\n configurable: true,\n enumerable: enumerable,\n get: function () {\n initializeInstance(this);\n return this[prop];\n },\n set: function (value) {\n initializeInstance(this);\n this[prop] = value;\n }\n }));\n}\nfunction initializeInstance(target) {\n if (target.__mobxDidRunLazyInitializers === true)\n return;\n var decorators = target.__mobxDecorators;\n if (decorators) {\n addHiddenProp(target, \"__mobxDidRunLazyInitializers\", true);\n for (var key in decorators) {\n var d = decorators[key];\n d.propertyCreator(target, d.prop, d.descriptor, d.decoratorTarget, d.decoratorArguments);\n }\n }\n}\nfunction createPropDecorator(propertyInitiallyEnumerable, propertyCreator) {\n return function decoratorFactory() {\n var decoratorArguments;\n var decorator = function decorate(target, prop, descriptor, applyImmediately\n // This is a special parameter to signal the direct application of a decorator, allow extendObservable to skip the entire type decoration part,\n // as the instance to apply the decorator to equals the target\n ) {\n if (applyImmediately === true) {\n propertyCreator(target, prop, descriptor, target, decoratorArguments);\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" && !quacksLikeADecorator(arguments))\n fail(\"This function is a decorator, but it wasn't invoked like a decorator\");\n if (!Object.prototype.hasOwnProperty.call(target, \"__mobxDecorators\")) {\n var inheritedDecorators = target.__mobxDecorators;\n addHiddenProp(target, \"__mobxDecorators\", __assign({}, inheritedDecorators));\n }\n target.__mobxDecorators[prop] = {\n prop: prop,\n propertyCreator: propertyCreator,\n descriptor: descriptor,\n decoratorTarget: target,\n decoratorArguments: decoratorArguments\n };\n return createPropertyInitializerDescriptor(prop, propertyInitiallyEnumerable);\n };\n if (quacksLikeADecorator(arguments)) {\n // @decorator\n decoratorArguments = EMPTY_ARRAY;\n return decorator.apply(null, arguments);\n }\n else {\n // @decorator(args)\n decoratorArguments = Array.prototype.slice.call(arguments);\n return decorator;\n }\n };\n}\nfunction quacksLikeADecorator(args) {\n return (((args.length === 2 || args.length === 3) && typeof args[1] === \"string\") ||\n (args.length === 4 && args[3] === true));\n}\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n if (Array.isArray(v))\n return observable.array(v, { name: name });\n if (isPlainObject(v))\n return observable.object(v, undefined, { name: name });\n if (isES6Map(v))\n return observable.map(v, { name: name });\n if (isES6Set(v))\n return observable.set(v, { name: name });\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null)\n return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v))\n return v;\n if (Array.isArray(v))\n return observable.array(v, { name: name, deep: false });\n if (isPlainObject(v))\n return observable.object(v, undefined, { name: name, deep: false });\n if (isES6Map(v))\n return observable.map(v, { name: name, deep: false });\n if (isES6Set(v))\n return observable.set(v, { name: name, deep: false });\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue, name) {\n if (process.env.NODE_ENV !== \"production\" && isObservable(v))\n throw \"observable.struct should not be used with observable values\";\n if (deepEqual(v, oldValue))\n return oldValue;\n return v;\n}\n\nfunction createDecoratorForEnhancer(enhancer) {\n var decorator = createPropDecorator(true, function (target, propertyName, descriptor, _decoratorTarget, decoratorArgs) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(!descriptor || !descriptor.get, \"@observable cannot be used on getter (property \\\"\" + propertyName + \"\\\"), use @computed instead.\");\n }\n var initialValue = descriptor\n ? descriptor.initializer\n ? descriptor.initializer.call(target)\n : descriptor.value\n : undefined;\n defineObservableProperty(target, propertyName, initialValue, enhancer);\n });\n var res = \n // Extra process checks, as this happens during module initialization\n typeof process !== \"undefined\" && process.env && process.env.NODE_ENV !== \"production\"\n ? function observableDecorator() {\n // This wrapper function is just to detect illegal decorator invocations, deprecate in a next version\n // and simply return the created prop decorator\n if (arguments.length < 2)\n return fail(\"Incorrect decorator invocation. @observable decorator doesn't expect any arguments\");\n return decorator.apply(null, arguments);\n }\n : decorator;\n res.enhancer = enhancer;\n return res;\n}\n\n// Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined\n};\nvar shallowCreateObservableOptions = {\n deep: false,\n name: undefined,\n defaultDecorator: undefined\n};\nObject.freeze(defaultCreateObservableOptions);\nObject.freeze(shallowCreateObservableOptions);\nfunction assertValidOption(key) {\n if (!/^(deep|name|equals|defaultDecorator)$/.test(key))\n fail(\"invalid option for (extend)observable: \" + key);\n}\nfunction asCreateObservableOptions(thing) {\n if (thing === null || thing === undefined)\n return defaultCreateObservableOptions;\n if (typeof thing === \"string\")\n return { name: thing, deep: true };\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof thing !== \"object\")\n return fail(\"expected options object\");\n Object.keys(thing).forEach(assertValidOption);\n }\n return thing;\n}\nfunction getEnhancerFromOptions(options) {\n return options.defaultDecorator\n ? options.defaultDecorator.enhancer\n : options.deep === false\n ? referenceEnhancer\n : deepEnhancer;\n}\nvar deepDecorator = createDecoratorForEnhancer(deepEnhancer);\nvar shallowDecorator = createDecoratorForEnhancer(shallowEnhancer);\nvar refDecorator = createDecoratorForEnhancer(referenceEnhancer);\nvar refStructDecorator = createDecoratorForEnhancer(refStructEnhancer);\n/**\n * Turns an object, array or function into a reactive structure.\n * @param v the value which should become observable.\n */\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (typeof arguments[1] === \"string\") {\n return deepDecorator.apply(null, arguments);\n }\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n var res = isPlainObject(v)\n ? observable.object(v, arg2, arg3)\n : Array.isArray(v)\n ? observable.array(v, arg2)\n : isES6Map(v)\n ? observable.map(v, arg2)\n : isES6Set(v)\n ? observable.set(v, arg2)\n : v;\n // this value could be converted to a new observable data structure, return it\n if (res !== v)\n return res;\n // otherwise, just box it\n fail(process.env.NODE_ENV !== \"production\" &&\n \"The provided value could not be converted into an observable. If you want just create an observable reference to the object use 'observable.box(value)'\");\n}\nvar observableFactories = {\n box: function (value, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"box\");\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n shallowBox: function (value, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowBox\");\n deprecated(\"observable.shallowBox\", \"observable.box(value, { deep: false })\");\n return observable.box(value, { name: name, deep: false });\n },\n array: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"array\");\n var o = asCreateObservableOptions(options);\n return new ObservableArray(initialValues, getEnhancerFromOptions(o), o.name);\n },\n shallowArray: function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowArray\");\n deprecated(\"observable.shallowArray\", \"observable.array(values, { deep: false })\");\n return observable.array(initialValues, { name: name, deep: false });\n },\n map: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"map\");\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n shallowMap: function (initialValues, name) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"shallowMap\");\n deprecated(\"observable.shallowMap\", \"observable.map(values, { deep: false })\");\n return observable.map(initialValues, { name: name, deep: false });\n },\n set: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"set\");\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function (props, decorators, options) {\n if (typeof arguments[1] === \"string\")\n incorrectlyUsedAsDecorator(\"object\");\n var o = asCreateObservableOptions(options);\n return extendObservable({}, props, decorators, o);\n },\n shallowObject: function (props, name) {\n if (typeof arguments[1] === \"string\")\n incorrectlyUsedAsDecorator(\"shallowObject\");\n deprecated(\"observable.shallowObject\", \"observable.object(values, {}, { deep: false })\");\n return observable.object(props, {}, { name: name, deep: false });\n },\n ref: refDecorator,\n shallow: shallowDecorator,\n deep: deepDecorator,\n struct: refStructDecorator\n};\nvar observable = createObservable;\n// weird trick to keep our typings nicely with our funcs, and still extend the observable function\nObject.keys(observableFactories).forEach(function (name) { return (observable[name] = observableFactories[name]); });\nfunction incorrectlyUsedAsDecorator(methodName) {\n fail(\n // process.env.NODE_ENV !== \"production\" &&\n \"Expected one or two arguments to observable.\" + methodName + \". Did you accidentally try to use observable.\" + methodName + \" as decorator?\");\n}\n\nvar computedDecorator = createPropDecorator(false, function (instance, propertyName, descriptor, decoratorTarget, decoratorArgs) {\n var get = descriptor.get, set = descriptor.set; // initialValue is the descriptor for get / set props\n // Optimization: faster on decorator target or instance? Assuming target\n // Optimization: find out if declaring on instance isn't just faster. (also makes the property descriptor simpler). But, more memory usage..\n // Forcing instance now, fixes hot reloadig issues on React Native:\n var options = decoratorArgs[0] || {};\n defineComputedProperty(instance, propertyName, __assign({ get: get, set: set }, options));\n});\nvar computedStructDecorator = computedDecorator({ equals: comparer.structural });\n/**\n * Decorator for class properties: @computed get value() { return expr; }.\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\n */\nvar computed = function computed(arg1, arg2, arg3) {\n if (typeof arg2 === \"string\") {\n // @computed\n return computedDecorator.apply(null, arguments);\n }\n if (arg1 !== null && typeof arg1 === \"object\" && arguments.length === 1) {\n // @computed({ options })\n return computedDecorator.apply(null, arguments);\n }\n // computed(expr, options?)\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof arg1 === \"function\", \"First argument to `computed` should be an expression.\");\n invariant(arguments.length < 3, \"Computed takes one or two arguments if used as function\");\n }\n var opts = typeof arg2 === \"object\" ? arg2 : {};\n opts.get = arg1;\n opts.set = typeof arg2 === \"function\" ? arg2 : opts.set;\n opts.name = opts.name || arg1.name || \"\"; /* for generated name */\n return new ComputedValue(opts);\n};\ncomputed.struct = computedStructDecorator;\n\nvar IDerivationState;\n(function (IDerivationState) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState[IDerivationState[\"NOT_TRACKING\"] = -1] = \"NOT_TRACKING\";\n // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n IDerivationState[IDerivationState[\"UP_TO_DATE\"] = 0] = \"UP_TO_DATE\";\n // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n IDerivationState[IDerivationState[\"POSSIBLY_STALE\"] = 1] = \"POSSIBLY_STALE\";\n // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n IDerivationState[IDerivationState[\"STALE\"] = 2] = \"STALE\";\n})(IDerivationState || (IDerivationState = {}));\nvar TraceMode;\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\nvar CaughtException = /** @class */ (function () {\n function CaughtException(cause) {\n this.cause = cause;\n // Empty\n }\n return CaughtException;\n}());\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\n * Finds out whether any dependency of the derivation has actually changed.\n * If dependenciesState is 1 then it will recalculate dependencies,\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\n *\n * By iterating over the dependencies in the same order that they were reported and\n * stopping on the first change, all the recalculations are only called for ComputedValues\n * that will be tracked by derivation. That is because we assume that if the first x\n * dependencies of the derivation doesn't change then the derivation should run the same way\n * up until accessing x-th dependency.\n */\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState) {\n case IDerivationState.UP_TO_DATE:\n return false;\n case IDerivationState.NOT_TRACKING:\n case IDerivationState.STALE:\n return true;\n case IDerivationState.POSSIBLY_STALE: {\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n var obs = derivation.observing, l = obs.length;\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n }\n else {\n try {\n obj.get();\n }\n catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n return true;\n }\n }\n // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n if (derivation.dependenciesState === IDerivationState.STALE) {\n untrackedEnd(prevUntracked);\n return true;\n }\n }\n }\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n return false;\n }\n }\n}\n// function invariantShouldCompute(derivation: IDerivation) {\n// const newDepState = (derivation as any).dependenciesState\n// if (\n// process.env.NODE_ENV === \"production\" &&\n// (newDepState === IDerivationState.POSSIBLY_STALE ||\n// newDepState === IDerivationState.NOT_TRACKING)\n// )\n// fail(\"Illegal dependency state\")\n// }\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n var hasObservers = atom.observers.length > 0;\n // Should never be possible to change an observed observable from inside computed, see #798\n if (globalState.computationDepth > 0 && hasObservers)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: \" + atom.name);\n // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"strict\"))\n fail(process.env.NODE_ENV !== \"production\" &&\n (globalState.enforceActions\n ? \"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: \"\n : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: \") +\n atom.name);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if (process.env.NODE_ENV !== \"production\" &&\n !globalState.allowStateReads &&\n globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable \" + observable.name + \" being read outside a reactive context\");\n }\n}\n/**\n * Executes the provided function `f` and tracks which observables are being accessed.\n * The tracking information is stored on the `derivation` object and the derivation is registered\n * as observer of any of the accessed observables.\n */\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true);\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n }\n else {\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n if (derivation.observing.length === 0) {\n warnAboutDerivationWithoutDependencies(derivation);\n }\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (globalState.reactionRequiresObservable || derivation.requiresObservable) {\n console.warn(\"[mobx] Derivation \" + derivation.name + \" is created/updated without reading any observable value\");\n }\n}\n/**\n * diffs newObserving with observing.\n * update observing to be newObserving with unique observables\n * notify observers that become observed/unobserved\n */\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing;\n var observing = (derivation.observing = derivation.newObserving);\n var lowestNewObservingDerivationState = IDerivationState.UP_TO_DATE;\n // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n var i0 = 0, l = derivation.unboundDepsCount;\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n if (dep.diffValue === 0) {\n dep.diffValue = 1;\n if (i0 !== i)\n observing[i0] = dep;\n i0++;\n }\n // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n if (dep.dependenciesState > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState;\n }\n }\n observing.length = i0;\n derivation.newObserving = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n l = prevObserving.length;\n while (l--) {\n var dep = prevObserving[l];\n if (dep.diffValue === 0) {\n removeObserver(dep, derivation);\n }\n dep.diffValue = 0;\n }\n // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n while (i0--) {\n var dep = observing[i0];\n if (dep.diffValue === 1) {\n dep.diffValue = 0;\n addObserver(dep, derivation);\n }\n }\n // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n if (lowestNewObservingDerivationState !== IDerivationState.UP_TO_DATE) {\n derivation.dependenciesState = lowestNewObservingDerivationState;\n derivation.onBecomeStale();\n }\n}\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing;\n derivation.observing = [];\n var i = obs.length;\n while (i--)\n removeObserver(obs[i], derivation);\n derivation.dependenciesState = IDerivationState.NOT_TRACKING;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n var res = action();\n untrackedEnd(prev);\n return res;\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\n *\n */\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState === IDerivationState.UP_TO_DATE)\n return;\n derivation.dependenciesState = IDerivationState.UP_TO_DATE;\n var obs = derivation.observing;\n var i = obs.length;\n while (i--)\n obs[i].lowestObserverState = IDerivationState.UP_TO_DATE;\n}\n\n// we don't use globalState for these in order to avoid possible issues with multiple\n// mobx versions\nvar currentActionId = 0;\nvar nextActionId = 1;\nfunction createAction(actionName, fn) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof fn === \"function\", \"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName)\n fail(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n var res = function () {\n return executeAction(actionName, fn, this, arguments);\n };\n res.isMobxAction = true;\n return res;\n}\nfunction executeAction(actionName, fn, scope, args) {\n var runInfo = _startAction(actionName, scope, args);\n try {\n return fn.apply(scope, args);\n }\n catch (err) {\n runInfo.error = err;\n throw err;\n }\n finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, scope, args) {\n var notifySpy = isSpyEnabled() && !!actionName;\n var startTime = 0;\n if (notifySpy) {\n startTime = Date.now();\n var l = (args && args.length) || 0;\n var flattendArgs = new Array(l);\n if (l > 0)\n for (var i = 0; i < l; i++)\n flattendArgs[i] = args[i];\n spyReportStart({\n type: \"action\",\n name: actionName,\n object: scope,\n arguments: flattendArgs\n });\n }\n var prevDerivation = untrackedStart();\n startBatch();\n var prevAllowStateChanges = allowStateChangesStart(true);\n var prevAllowStateReads = allowStateReadsStart(true);\n var runInfo = {\n prevDerivation: prevDerivation,\n prevAllowStateChanges: prevAllowStateChanges,\n prevAllowStateReads: prevAllowStateReads,\n notifySpy: notifySpy,\n startTime: startTime,\n actionId: nextActionId++,\n parentActionId: currentActionId\n };\n currentActionId = runInfo.actionId;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId) {\n fail(\"invalid action stack. did you forget to finish an action?\");\n }\n currentActionId = runInfo.parentActionId;\n if (runInfo.error !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n allowStateChangesEnd(runInfo.prevAllowStateChanges);\n allowStateReadsEnd(runInfo.prevAllowStateReads);\n endBatch();\n untrackedEnd(runInfo.prevDerivation);\n if (runInfo.notifySpy) {\n spyReportEnd({ time: Date.now() - runInfo.startTime });\n }\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n var res;\n try {\n res = func();\n }\n finally {\n allowStateChangesEnd(prev);\n }\n return res;\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\nfunction allowStateChangesInsideComputed(func) {\n var prev = globalState.computationDepth;\n globalState.computationDepth = 0;\n var res;\n try {\n res = func();\n }\n finally {\n globalState.computationDepth = prev;\n }\n return res;\n}\n\nvar ObservableValue = /** @class */ (function (_super) {\n __extends(ObservableValue, _super);\n function ObservableValue(value, enhancer, name, notifySpy, equals) {\n if (name === void 0) { name = \"ObservableValue@\" + getNextId(); }\n if (notifySpy === void 0) { notifySpy = true; }\n if (equals === void 0) { equals = comparer.default; }\n var _this = _super.call(this, name) || this;\n _this.enhancer = enhancer;\n _this.name = name;\n _this.equals = equals;\n _this.hasUnreportedChange = false;\n _this.value = enhancer(value, undefined, name);\n if (notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({ type: \"create\", name: _this.name, newValue: \"\" + _this.value });\n }\n return _this;\n }\n ObservableValue.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableValue.prototype.set = function (newValue) {\n var oldValue = this.value;\n newValue = this.prepareNewValue(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n if (notifySpy) {\n spyReportStart({\n type: \"update\",\n name: this.name,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n this.setNewValue(newValue);\n if (notifySpy)\n spyReportEnd();\n }\n };\n ObservableValue.prototype.prepareNewValue = function (newValue) {\n checkIfStateModificationsAreAllowed(this);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: \"update\",\n newValue: newValue\n });\n if (!change)\n return globalState.UNCHANGED;\n newValue = change.newValue;\n }\n // apply modifier\n newValue = this.enhancer(newValue, this.value, this.name);\n return this.equals(this.value, newValue) ? globalState.UNCHANGED : newValue;\n };\n ObservableValue.prototype.setNewValue = function (newValue) {\n var oldValue = this.value;\n this.value = newValue;\n this.reportChanged();\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: \"update\",\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n ObservableValue.prototype.get = function () {\n this.reportObserved();\n return this.dehanceValue(this.value);\n };\n ObservableValue.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableValue.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately)\n listener({\n object: this,\n type: \"update\",\n newValue: this.value,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n ObservableValue.prototype.toJSON = function () {\n return this.get();\n };\n ObservableValue.prototype.toString = function () {\n return this.name + \"[\" + this.value + \"]\";\n };\n ObservableValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n return ObservableValue;\n}(Atom));\nObservableValue.prototype[primitiveSymbol()] = ObservableValue.prototype.valueOf;\nvar isObservableValue = createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\n/**\n * A node in the state dependency root that observes other nodes, and can be observed itself.\n *\n * ComputedValue will remember the result of the computation for the duration of the batch, or\n * while being observed.\n *\n * During this time it will recompute only when one of its direct dependencies changed,\n * but only when it is being accessed with `ComputedValue.get()`.\n *\n * Implementation description:\n * 1. First time it's being accessed it will compute and remember result\n * give back remembered result until 2. happens\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\n * 3. When it's being accessed, recompute if any shallow dependency changed.\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\n * go to step 2. either way\n *\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\n */\nvar ComputedValue = /** @class */ (function () {\n /**\n * Create a new computed value based on a function expression.\n *\n * The `name` property is for debug purposes only.\n *\n * The `equals` property specifies the comparer function to use to determine if a newly produced\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\n * compares based on identity comparison (===), and `structualComparer` deeply compares the structure.\n * Structural comparison can be convenient if you always produce a new aggregated object and\n * don't want to notify observers if it is structurally the same.\n * This is useful for working with vectors, mouse coordinates etc.\n */\n function ComputedValue(options) {\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = null; // during tracking it's an array with new observed observers\n this.isBeingObserved = false;\n this.isPendingUnobservation = false;\n this.observers = [];\n this.observersIndexes = {};\n this.diffValue = 0;\n this.runId = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.UP_TO_DATE;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.value = new CaughtException(null);\n this.isComputing = false; // to check for cycles\n this.isRunningSetter = false;\n this.isTracing = TraceMode.NONE;\n if (process.env.NODE_ENV !== \"production\" && !options.get)\n return fail(\"missing option for computed: get\");\n this.derivation = options.get;\n this.name = options.name || \"ComputedValue@\" + getNextId();\n if (options.set)\n this.setter = createAction(this.name + \"-setter\", options.set);\n this.equals =\n options.equals ||\n (options.compareStructural || options.struct\n ? comparer.structural\n : comparer.default);\n this.scope = options.context;\n this.requiresReaction = !!options.requiresReaction;\n this.keepAlive = !!options.keepAlive;\n }\n ComputedValue.prototype.onBecomeStale = function () {\n propagateMaybeChanged(this);\n };\n ComputedValue.prototype.onBecomeUnobserved = function () { };\n ComputedValue.prototype.onBecomeObserved = function () { };\n /**\n * Returns the current value of this computed value.\n * Will evaluate its computation first if needed.\n */\n ComputedValue.prototype.get = function () {\n if (this.isComputing)\n fail(\"Cycle detected in computation \" + this.name + \": \" + this.derivation);\n if (globalState.inBatch === 0 && this.observers.length === 0 && !this.keepAlive) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead();\n startBatch(); // See perf test 'computed memoization'\n this.value = this.computeValue(false);\n endBatch();\n }\n }\n else {\n reportObserved(this);\n if (shouldCompute(this))\n if (this.trackAndCompute())\n propagateChangeConfirmed(this);\n }\n var result = this.value;\n if (isCaughtException(result))\n throw result.cause;\n return result;\n };\n ComputedValue.prototype.peek = function () {\n var res = this.computeValue(false);\n if (isCaughtException(res))\n throw res.cause;\n return res;\n };\n ComputedValue.prototype.set = function (value) {\n if (this.setter) {\n invariant(!this.isRunningSetter, \"The setter of computed value '\" + this.name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\");\n this.isRunningSetter = true;\n try {\n this.setter.call(this.scope, value);\n }\n finally {\n this.isRunningSetter = false;\n }\n }\n else\n invariant(false, process.env.NODE_ENV !== \"production\" &&\n \"[ComputedValue '\" + this.name + \"'] It is not possible to assign a new value to a computed value.\");\n };\n ComputedValue.prototype.trackAndCompute = function () {\n if (isSpyEnabled()) {\n spyReport({\n object: this.scope,\n type: \"compute\",\n name: this.name\n });\n }\n var oldValue = this.value;\n var wasSuspended = \n /* see #1208 */ this.dependenciesState === IDerivationState.NOT_TRACKING;\n var newValue = this.computeValue(true);\n var changed = wasSuspended ||\n isCaughtException(oldValue) ||\n isCaughtException(newValue) ||\n !this.equals(oldValue, newValue);\n if (changed) {\n this.value = newValue;\n }\n return changed;\n };\n ComputedValue.prototype.computeValue = function (track) {\n this.isComputing = true;\n globalState.computationDepth++;\n var res;\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope);\n }\n else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope);\n }\n else {\n try {\n res = this.derivation.call(this.scope);\n }\n catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n globalState.computationDepth--;\n this.isComputing = false;\n return res;\n };\n ComputedValue.prototype.suspend = function () {\n if (!this.keepAlive) {\n clearObserving(this);\n this.value = undefined; // don't hold on to computed value!\n }\n };\n ComputedValue.prototype.observe = function (listener, fireImmediately) {\n var _this = this;\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n var newValue = _this.get();\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n type: \"update\",\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n firstTime = false;\n prevValue = newValue;\n });\n };\n ComputedValue.prototype.warnAboutUntrackedRead = function () {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (this.requiresReaction === true) {\n fail(\"[mobx] Computed value \" + this.name + \" is read outside a reactive context\");\n }\n if (this.isTracing !== TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + this.name + \"' is being read outside a reactive context. Doing a full recompute\");\n }\n if (globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value \" + this.name + \" is being read outside a reactive context. Doing a full recompute\");\n }\n };\n ComputedValue.prototype.toJSON = function () {\n return this.get();\n };\n ComputedValue.prototype.toString = function () {\n return this.name + \"[\" + this.derivation.toString() + \"]\";\n };\n ComputedValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n return ComputedValue;\n}());\nComputedValue.prototype[primitiveSymbol()] = ComputedValue.prototype.valueOf;\nvar isComputedValue = createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\n/**\n * These values will persist if global state is reset\n */\nvar persistentKeys = [\n \"mobxGuid\",\n \"spyListeners\",\n \"enforceActions\",\n \"computedRequiresReaction\",\n \"reactionRequiresObservable\",\n \"observableRequiresReaction\",\n \"allowStateReads\",\n \"disableErrorBoundaries\",\n \"runId\",\n \"UNCHANGED\"\n];\nvar MobXGlobals = /** @class */ (function () {\n function MobXGlobals() {\n /**\n * MobXGlobals version.\n * MobX compatiblity with other versions loaded in memory as long as this version matches.\n * It indicates that the global state still stores similar information\n *\n * N.B: this version is unrelated to the package version of MobX, and is only the version of the\n * internal state storage of MobX, and can be the same across many different package versions\n */\n this.version = 5;\n /**\n * globally unique token to signal unchanged\n */\n this.UNCHANGED = {};\n /**\n * Currently running derivation\n */\n this.trackingDerivation = null;\n /**\n * Are we running a computation currently? (not a reaction)\n */\n this.computationDepth = 0;\n /**\n * Each time a derivation is tracked, it is assigned a unique run-id\n */\n this.runId = 0;\n /**\n * 'guid' for general purpose. Will be persisted amongst resets.\n */\n this.mobxGuid = 0;\n /**\n * Are we in a batch block? (and how many of them)\n */\n this.inBatch = 0;\n /**\n * Observables that don't have observers anymore, and are about to be\n * suspended, unless somebody else accesses it in the same batch\n *\n * @type {IObservable[]}\n */\n this.pendingUnobservations = [];\n /**\n * List of scheduled, not yet executed, reactions.\n */\n this.pendingReactions = [];\n /**\n * Are we currently processing reactions?\n */\n this.isRunningReactions = false;\n /**\n * Is it allowed to change observables at this point?\n * In general, MobX doesn't allow that when running computations and React.render.\n * To ensure that those functions stay pure.\n */\n this.allowStateChanges = true;\n /**\n * Is it allowed to read observables at this point?\n * Used to hold the state needed for `observableRequiresReaction`\n */\n this.allowStateReads = true;\n /**\n * If strict mode is enabled, state changes are by default not allowed\n */\n this.enforceActions = false;\n /**\n * Spy callbacks\n */\n this.spyListeners = [];\n /**\n * Globally attached error handlers that react specifically to errors in reactions\n */\n this.globalReactionErrorHandlers = [];\n /**\n * Warn if computed values are accessed outside a reactive context\n */\n this.computedRequiresReaction = false;\n /**\n * (Experimental)\n * Warn if you try to create to derivation / reactive context without accessing any observable.\n */\n this.reactionRequiresObservable = false;\n /**\n * (Experimental)\n * Warn if observables are accessed outside a reactive context\n */\n this.observableRequiresReaction = false;\n /**\n * Allows overwriting of computed properties, useful in tests but not prod as it can cause\n * memory leaks. See https://github.com/mobxjs/mobx/issues/1867\n */\n this.computedConfigurable = false;\n /*\n * Don't catch and rethrow exceptions. This is useful for inspecting the state of\n * the stack when an exception occurs while debugging.\n */\n this.disableErrorBoundaries = false;\n /*\n * If true, we are already handling an exception in an action. Any errors in reactions should be supressed, as\n * they are not the cause, see: https://github.com/mobxjs/mobx/issues/1836\n */\n this.suppressReactionErrors = false;\n }\n return MobXGlobals;\n}());\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = (function () {\n var global = getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals)\n canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version)\n canMergeGlobalState = false;\n if (!canMergeGlobalState) {\n setTimeout(function () {\n if (!isolateCalled) {\n fail(\"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\");\n }\n }, 1);\n return new MobXGlobals();\n }\n else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED)\n global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n return global.__mobxGlobals;\n }\n else {\n global.__mobxInstanceCount = 1;\n return (global.__mobxGlobals = new MobXGlobals());\n }\n})();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length ||\n globalState.inBatch ||\n globalState.isRunningReactions)\n fail(\"isolateGlobalState should be called before MobX is running any reactions\");\n isolateCalled = true;\n if (canMergeGlobalState) {\n if (--getGlobal().__mobxInstanceCount === 0)\n getGlobal().__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\n * For testing purposes only; this will break the internal state of existing observables,\n * but can be used to get back at a stable state after throwing errors\n */\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n for (var key in defaultGlobals)\n if (persistentKeys.indexOf(key) === -1)\n globalState[key] = defaultGlobals[key];\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers && observable.observers.length > 0;\n}\nfunction getObservers(observable) {\n return observable.observers;\n}\n// function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n var l = observable.observers.length;\n if (l) {\n // because object assignment is relatively expensive, let's not store data about index 0.\n observable.observersIndexes[node.__mapid] = l;\n }\n observable.observers[l] = node;\n if (observable.lowestObserverState > node.dependenciesState)\n observable.lowestObserverState = node.dependenciesState;\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n if (observable.observers.length === 1) {\n // deleting last observer\n observable.observers.length = 0;\n queueForUnobservation(observable);\n }\n else {\n // deleting from _observersIndexes is straight forward, to delete from _observers, let's swap `node` with last element\n var list = observable.observers;\n var map = observable.observersIndexes;\n var filler = list.pop(); // get last element, which should fill the place of `node`, so the array doesn't have holes\n if (filler !== node) {\n // otherwise node was the last element, which already got removed from array\n var index = map[node.__mapid] || 0; // getting index of `node`. this is the only place we actually use map.\n if (index) {\n // map store all indexes but 0, see comment in `addObserver`\n map[filler.__mapid] = index;\n }\n else {\n delete map[filler.__mapid];\n }\n list[index] = filler;\n }\n delete map[node.__mapid];\n }\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\n * Avoids unnecessary recalculations.\n */\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions();\n // the batch is actually about to finish, all unobserving should happen here.\n var list = globalState.pendingUnobservations;\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation = false;\n if (observable.observers.length === 0) {\n if (observable.isBeingObserved) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved = false;\n observable.onBecomeUnobserved();\n }\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend();\n }\n }\n }\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n if (derivation !== null) {\n /**\n * Simple optimization, give each derivation run an unique id (runId)\n * Check if last time this observable was accessed the same runId is used\n * if this is the case, the relation is already known\n */\n if (derivation.runId !== observable.lastAccessedBy) {\n observable.lastAccessedBy = derivation.runId;\n derivation.newObserving[derivation.unboundDepsCount++] = observable;\n if (!observable.isBeingObserved) {\n observable.isBeingObserved = true;\n observable.onBecomeObserved();\n }\n }\n return true;\n }\n else if (observable.observers.length === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n return false;\n}\n// function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n/**\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\n * It will propagate changes to observers from previous run\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\n * Hopefully self reruning autoruns aren't a feature people should depend on\n * Also most basic use cases should be ok\n */\n// Called by Atom when its value changes\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.UP_TO_DATE) {\n if (d.isTracing !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n d.onBecomeStale();\n }\n d.dependenciesState = IDerivationState.STALE;\n }\n // invariantLOS(observable, \"changed end\");\n}\n// Called by ComputedValue when it recalculate and its value changed\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.POSSIBLY_STALE)\n d.dependenciesState = IDerivationState.STALE;\n else if (d.dependenciesState === IDerivationState.UP_TO_DATE // this happens during computing of `d`, just keep lowestObserverState up to date.\n )\n observable.lowestObserverState = IDerivationState.UP_TO_DATE;\n }\n // invariantLOS(observable, \"confirmed end\");\n}\n// Used by computed when its dependency changed, but we don't wan't to immediately recompute.\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState !== IDerivationState.UP_TO_DATE)\n return;\n observable.lowestObserverState = IDerivationState.POSSIBLY_STALE;\n var observers = observable.observers;\n var i = observers.length;\n while (i--) {\n var d = observers[i];\n if (d.dependenciesState === IDerivationState.UP_TO_DATE) {\n d.dependenciesState = IDerivationState.POSSIBLY_STALE;\n if (d.isTracing !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n d.onBecomeStale();\n }\n }\n // invariantLOS(observable, \"maybe end\");\n}\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name + \"' is invalidated due to a change in: '\" + observable.name + \"'\");\n if (derivation.isTracing === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1);\n // prettier-ignore\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name + \"' is being traced and '\" + observable.name + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n lines.push(\"\" + new Array(depth).join(\"\\t\") + tree.name); // MWE: not the fastest, but the easiest way :)\n if (tree.dependencies)\n tree.dependencies.forEach(function (child) { return printDepTree(child, lines, depth + 1); });\n}\n\nvar Reaction = /** @class */ (function () {\n function Reaction(name, onInvalidate, errorHandler, requiresObservable) {\n if (name === void 0) { name = \"Reaction@\" + getNextId(); }\n if (requiresObservable === void 0) { requiresObservable = false; }\n this.name = name;\n this.onInvalidate = onInvalidate;\n this.errorHandler = errorHandler;\n this.requiresObservable = requiresObservable;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = [];\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.diffValue = 0;\n this.runId = 0;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.isDisposed = false;\n this._isScheduled = false;\n this._isTrackPending = false;\n this._isRunning = false;\n this.isTracing = TraceMode.NONE;\n }\n Reaction.prototype.onBecomeStale = function () {\n this.schedule();\n };\n Reaction.prototype.schedule = function () {\n if (!this._isScheduled) {\n this._isScheduled = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n Reaction.prototype.isScheduled = function () {\n return this._isScheduled;\n };\n /**\n * internal, use schedule() if you intend to kick off a reaction\n */\n Reaction.prototype.runReaction = function () {\n if (!this.isDisposed) {\n startBatch();\n this._isScheduled = false;\n if (shouldCompute(this)) {\n this._isTrackPending = true;\n try {\n this.onInvalidate();\n if (this._isTrackPending && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name,\n type: \"scheduled-reaction\"\n });\n }\n }\n catch (e) {\n this.reportExceptionInDerivation(e);\n }\n }\n endBatch();\n }\n };\n Reaction.prototype.track = function (fn) {\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n if (notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name,\n type: \"reaction\"\n });\n }\n this._isRunning = true;\n var result = trackDerivedFunction(this, fn, undefined);\n this._isRunning = false;\n this._isTrackPending = false;\n if (this.isDisposed) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n if (isCaughtException(result))\n this.reportExceptionInDerivation(result.cause);\n if (notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n endBatch();\n };\n Reaction.prototype.reportExceptionInDerivation = function (error) {\n var _this = this;\n if (this.errorHandler) {\n this.errorHandler(error, this);\n return;\n }\n if (globalState.disableErrorBoundaries)\n throw error;\n var message = \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\";\n if (globalState.suppressReactionErrors) {\n console.warn(\"[mobx] (error in reaction '\" + this.name + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n }\n else {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n }\n if (isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name,\n message: message,\n error: \"\" + error\n });\n }\n globalState.globalReactionErrorHandlers.forEach(function (f) { return f(error, _this); });\n };\n Reaction.prototype.dispose = function () {\n if (!this.isDisposed) {\n this.isDisposed = true;\n if (!this._isRunning) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n Reaction.prototype.getDisposer = function () {\n var r = this.dispose.bind(this);\n r.$mobx = this;\n return r;\n };\n Reaction.prototype.toString = function () {\n return \"Reaction[\" + this.name + \"]\";\n };\n Reaction.prototype.trace = function (enterBreakPoint) {\n if (enterBreakPoint === void 0) { enterBreakPoint = false; }\n trace(this, enterBreakPoint);\n };\n return Reaction;\n}());\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0)\n globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\n * Magic number alert!\n * Defines within how many times a reaction is allowed to re-trigger itself\n * until it is assumed that this is gonna be a never ending loop...\n */\nvar MAX_REACTION_ITERATIONS = 100;\nvar reactionScheduler = function (f) { return f(); };\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions)\n return;\n reactionScheduler(runReactionsHelper);\n}\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0;\n // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(\"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" +\n (\" Probably there is a cycle in the reactive function: \" + allReactions[0]));\n allReactions.splice(0); // clear reactions\n }\n var remainingReactions = allReactions.splice(0);\n for (var i = 0, l = remainingReactions.length; i < l; i++)\n remainingReactions[i].runReaction();\n }\n globalState.isRunningReactions = false;\n}\nvar isReaction = createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n reactionScheduler = function (f) { return fn(function () { return baseScheduler(f); }); };\n}\n\nfunction isSpyEnabled() {\n return !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (!globalState.spyListeners.length)\n return;\n var listeners = globalState.spyListeners;\n for (var i = 0, l = listeners.length; i < l; i++)\n listeners[i](event);\n}\nfunction spyReportStart(event) {\n var change = __assign({}, event, { spyReportStart: true });\n spyReport(change);\n}\nvar END_EVENT = { spyReportEnd: true };\nfunction spyReportEnd(change) {\n if (change)\n spyReport(__assign({}, change, { spyReportEnd: true }));\n else\n spyReport(END_EVENT);\n}\nfunction spy(listener) {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) { return l !== listener; });\n });\n}\n\nfunction dontReassignFields() {\n fail(process.env.NODE_ENV !== \"production\" && \"@action fields are not reassignable\");\n}\nfunction namedActionDecorator(name) {\n return function (target, prop, descriptor) {\n if (descriptor) {\n if (process.env.NODE_ENV !== \"production\" && descriptor.get !== undefined) {\n return fail(\"@action cannot be used with getters\");\n }\n // babel / typescript\n // @action method() { }\n if (descriptor.value) {\n // typescript\n return {\n value: createAction(name, descriptor.value),\n enumerable: false,\n configurable: true,\n writable: true // for typescript, this must be writable, otherwise it cannot inherit :/ (see inheritable actions test)\n };\n }\n // babel only: @action method = () => {}\n var initializer_1 = descriptor.initializer;\n return {\n enumerable: false,\n configurable: true,\n writable: true,\n initializer: function () {\n // N.B: we can't immediately invoke initializer; this would be wrong\n return createAction(name, initializer_1.call(this));\n }\n };\n }\n // bound instance methods\n return actionFieldDecorator(name).apply(this, arguments);\n };\n}\nfunction actionFieldDecorator(name) {\n // Simple property that writes on first invocation to the current instance\n return function (target, prop, descriptor) {\n Object.defineProperty(target, prop, {\n configurable: true,\n enumerable: false,\n get: function () {\n return undefined;\n },\n set: function (value) {\n addHiddenProp(this, prop, action(name, value));\n }\n });\n };\n}\nfunction boundActionDecorator(target, propertyName, descriptor, applyToInstance) {\n if (applyToInstance === true) {\n defineBoundAction(target, propertyName, descriptor.value);\n return null;\n }\n if (descriptor) {\n // if (descriptor.value)\n // Typescript / Babel: @action.bound method() { }\n // also: babel @action.bound method = () => {}\n return {\n configurable: true,\n enumerable: false,\n get: function () {\n defineBoundAction(this, propertyName, descriptor.value || descriptor.initializer.call(this));\n return this[propertyName];\n },\n set: dontReassignFields\n };\n }\n // field decorator Typescript @action.bound method = () => {}\n return {\n enumerable: false,\n configurable: true,\n set: function (v) {\n defineBoundAction(this, propertyName, v);\n },\n get: function () {\n return undefined;\n }\n };\n}\n\nvar action = function action(arg1, arg2, arg3, arg4) {\n // action(fn() {})\n if (arguments.length === 1 && typeof arg1 === \"function\")\n return createAction(arg1.name || \"\", arg1);\n // action(\"name\", fn() {})\n if (arguments.length === 2 && typeof arg2 === \"function\")\n return createAction(arg1, arg2);\n // @action(\"name\") fn() {}\n if (arguments.length === 1 && typeof arg1 === \"string\")\n return namedActionDecorator(arg1);\n // @action fn() {}\n if (arg4 === true) {\n // apply to instance immediately\n arg1[arg2] = createAction(arg1.name || arg2, arg3.value);\n }\n else {\n return namedActionDecorator(arg2).apply(null, arguments);\n }\n};\naction.bound = boundActionDecorator;\nfunction runInAction(arg1, arg2) {\n // TODO: deprecate?\n var actionName = typeof arg1 === \"string\" ? arg1 : arg1.name || \"\";\n var fn = typeof arg1 === \"function\" ? arg1 : arg2;\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof fn === \"function\" && fn.length === 0, \"`runInAction` expects a function without arguments\");\n if (typeof actionName !== \"string\" || !actionName)\n fail(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n return executeAction(actionName, fn, this, undefined);\n}\nfunction isAction(thing) {\n return typeof thing === \"function\" && thing.isMobxAction === true;\n}\nfunction defineBoundAction(target, propertyName, fn) {\n addHiddenProp(target, propertyName, createAction(propertyName, fn.bind(target)));\n}\n\n/**\n * Creates a named reactive view and keeps it alive, so that the view is always\n * updated if one of the dependencies changes, even when the view is not further used by something else.\n * @param view The reactive view\n * @returns disposer function, which can be used to stop the view from being updated in the future.\n */\nfunction autorun(view, opts) {\n if (opts === void 0) { opts = EMPTY_OBJECT; }\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof view === \"function\", \"Autorun expects a function as first argument\");\n invariant(isAction(view) === false, \"Autorun does not accept actions since actions are untrackable\");\n }\n var name = (opts && opts.name) || view.name || \"Autorun@\" + getNextId();\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n }\n else {\n var scheduler_1 = createSchedulerFromOptions(opts);\n // debounced autorun\n var isScheduled_1 = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled_1) {\n isScheduled_1 = true;\n scheduler_1(function () {\n isScheduled_1 = false;\n if (!reaction.isDisposed)\n reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n function reactionRunner() {\n view(reaction);\n }\n reaction.schedule();\n return reaction.getDisposer();\n}\nvar run = function (f) { return f(); };\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler\n ? opts.scheduler\n : opts.delay\n ? function (f) { return setTimeout(f, opts.delay); }\n : run;\n}\nfunction reaction(expression, effect, opts) {\n if (opts === void 0) { opts = EMPTY_OBJECT; }\n if (typeof opts === \"boolean\") {\n opts = { fireImmediately: opts };\n deprecated(\"Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead\");\n }\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof expression === \"function\", \"First argument to reaction should be a function\");\n invariant(typeof opts === \"object\", \"Third argument of reactions should be an object\");\n }\n var name = opts.name || \"Reaction@\" + getNextId();\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var equals = opts.compareStructural\n ? comparer.structural\n : opts.equals || comparer.default;\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n }\n else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n function reactionRunner() {\n isScheduled = false; // Q: move into reaction runner?\n if (r.isDisposed)\n return;\n var changed = false;\n r.track(function () {\n var nextValue = expression(r);\n changed = firstTime || !equals(value, nextValue);\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately)\n effectAction(value, r);\n if (!firstTime && changed === true)\n effectAction(value, r);\n if (firstTime)\n firstTime = false;\n }\n r.schedule();\n return r.getDisposer();\n}\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n }\n catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(\"onBecomeObserved\", thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(\"onBecomeUnobserved\", thing, arg2, arg3);\n}\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = typeof arg3 === \"function\" ? arg3 : arg2;\n var orig = atom[hook];\n if (typeof orig !== \"function\")\n return fail(process.env.NODE_ENV !== \"production\" && \"Not an atom that can be (un)observed\");\n atom[hook] = function () {\n orig.call(this);\n cb.call(this);\n };\n return function () {\n atom[hook] = orig;\n };\n}\n\nfunction configure(options) {\n var enforceActions = options.enforceActions, computedRequiresReaction = options.computedRequiresReaction, computedConfigurable = options.computedConfigurable, disableErrorBoundaries = options.disableErrorBoundaries, arrayBuffer = options.arrayBuffer, reactionScheduler = options.reactionScheduler, reactionRequiresObservable = options.reactionRequiresObservable, observableRequiresReaction = options.observableRequiresReaction;\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n if (enforceActions !== undefined) {\n if (typeof enforceActions === \"boolean\" || enforceActions === \"strict\")\n deprecated(\"Deprecated value for 'enforceActions', use 'false' => '\\\"never\\\"', 'true' => '\\\"observed\\\"', '\\\"strict\\\"' => \\\"'always'\\\" instead\");\n var ea = void 0;\n switch (enforceActions) {\n case true:\n case \"observed\":\n ea = true;\n break;\n case false:\n case \"never\":\n ea = false;\n break;\n case \"strict\":\n case \"always\":\n ea = \"strict\";\n break;\n default:\n fail(\"Invalid value for 'enforceActions': '\" + enforceActions + \"', expected 'never', 'always' or 'observed'\");\n }\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === \"strict\" ? false : true;\n }\n if (computedRequiresReaction !== undefined) {\n globalState.computedRequiresReaction = !!computedRequiresReaction;\n }\n if (reactionRequiresObservable !== undefined) {\n globalState.reactionRequiresObservable = !!reactionRequiresObservable;\n }\n if (observableRequiresReaction !== undefined) {\n globalState.observableRequiresReaction = !!observableRequiresReaction;\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n }\n if (computedConfigurable !== undefined) {\n globalState.computedConfigurable = !!computedConfigurable;\n }\n if (disableErrorBoundaries !== undefined) {\n if (disableErrorBoundaries === true)\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors if this is on.\");\n globalState.disableErrorBoundaries = !!disableErrorBoundaries;\n }\n if (typeof arrayBuffer === \"number\") {\n reserveArrayBuffer(arrayBuffer);\n }\n if (reactionScheduler) {\n setReactionScheduler(reactionScheduler);\n }\n}\n\nfunction decorate(thing, decorators) {\n if (process.env.NODE_ENV !== \"production\" && !isPlainObject(decorators))\n fail(\"Decorators should be a key value map\");\n var target = typeof thing === \"function\" ? thing.prototype : thing;\n var _loop_1 = function (prop) {\n var propertyDecorators = decorators[prop];\n if (!Array.isArray(propertyDecorators)) {\n propertyDecorators = [propertyDecorators];\n }\n // prettier-ignore\n if (process.env.NODE_ENV !== \"production\" && !propertyDecorators.every(function (decorator) { return typeof decorator === \"function\"; }))\n fail(\"Decorate: expected a decorator function or array of decorator functions for '\" + prop + \"'\");\n var descriptor = Object.getOwnPropertyDescriptor(target, prop);\n var newDescriptor = propertyDecorators.reduce(function (accDescriptor, decorator) { return decorator(target, prop, accDescriptor); }, descriptor);\n if (newDescriptor)\n Object.defineProperty(target, prop, newDescriptor);\n };\n for (var prop in decorators) {\n _loop_1(prop);\n }\n return thing;\n}\n\nfunction extendShallowObservable(target, properties, decorators) {\n deprecated(\"'extendShallowObservable' is deprecated, use 'extendObservable(target, props, { deep: false })' instead\");\n return extendObservable(target, properties, decorators, shallowCreateObservableOptions);\n}\nfunction extendObservable(target, properties, decorators, options) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(arguments.length >= 2 && arguments.length <= 4, \"'extendObservable' expected 2-4 arguments\");\n invariant(typeof target === \"object\", \"'extendObservable' expects an object as first argument\");\n invariant(!isObservableMap(target), \"'extendObservable' should not be used on maps, use map.merge instead\");\n invariant(!isObservable(properties), \"Extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540\");\n if (decorators)\n for (var key in decorators)\n if (!(key in properties))\n fail(\"Trying to declare a decorator for unspecified property '\" + key + \"'\");\n }\n options = asCreateObservableOptions(options);\n var defaultDecorator = options.defaultDecorator || (options.deep === false ? refDecorator : deepDecorator);\n initializeInstance(target);\n asObservableObject(target, options.name, defaultDecorator.enhancer); // make sure object is observable, even without initial props\n startBatch();\n try {\n for (var key in properties) {\n var descriptor = Object.getOwnPropertyDescriptor(properties, key);\n if (process.env.NODE_ENV !== \"production\") {\n if (Object.getOwnPropertyDescriptor(target, key))\n fail(\"'extendObservable' can only be used to introduce new properties. Use 'set' or 'decorate' instead. The property '\" + key + \"' already exists on '\" + target + \"'\");\n if (isComputed(descriptor.value))\n fail(\"Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead\");\n }\n var decorator = decorators && key in decorators\n ? decorators[key]\n : descriptor.get\n ? computedDecorator\n : defaultDecorator;\n if (process.env.NODE_ENV !== \"production\" && typeof decorator !== \"function\")\n return fail(\"Not a valid decorator for '\" + key + \"', got: \" + decorator);\n var resultDescriptor = decorator(target, key, descriptor, true);\n if (resultDescriptor // otherwise, assume already applied, due to `applyToInstance`\n )\n Object.defineProperty(target, key, resultDescriptor);\n }\n }\n finally {\n endBatch();\n }\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name\n };\n if (node.observing && node.observing.length > 0)\n result.dependencies = unique(node.observing).map(nodeToDependencyTree);\n return result;\n}\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name\n };\n if (hasObservers(node))\n result.observers = getObservers(node).map(nodeToObserverTree);\n return result;\n}\n\nvar generatorId = 0;\nfunction flow(generator) {\n if (arguments.length !== 1)\n fail(!!process.env.NODE_ENV && \"Flow expects one 1 argument and cannot be used as decorator\");\n var name = generator.name || \"\";\n // Implementation based on https://github.com/tj/co/blob/master/index.js\n return function () {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var res = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n }\n catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.throw).call(gen, err);\n }\n catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function next(ret) {\n if (ret && typeof ret.then === \"function\") {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n if (ret.done)\n return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n onFulfilled(undefined); // kick off the process\n });\n res.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise)\n cancelPromise(pendingPromise);\n // Finally block can return (or yield) stuff..\n var res_1 = gen.return();\n // eat anything that promise would do, it's cancelled!\n var yieldedPromise = Promise.resolve(res_1.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n rejector(new Error(\"FLOW_CANCELLED\"));\n }\n catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return res;\n };\n}\nfunction cancelPromise(promise) {\n if (typeof promise.cancel === \"function\")\n promise.cancel();\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n }\n else if (isObservableObject(thing)) {\n if (typeof propOrHandler !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"Expected observable map, object or array as first array\");\n }\n if (target.dehancer !== undefined)\n return fail(process.env.NODE_ENV !== \"production\" && \"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (typeof handler === \"function\")\n return interceptProperty(thing, propOrHandler, handler);\n else\n return interceptInterceptable(thing, propOrHandler);\n}\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept(handler);\n}\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept(handler);\n}\n\nfunction _isComputed(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (isObservableObject(value) === false)\n return false;\n if (!value.$mobx.values[property])\n return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n return isComputedValue(value);\n}\nfunction isComputed(value) {\n if (arguments.length > 1)\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"isComputed expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if (typeof propName !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (process.env.NODE_ENV !== \"production\" &&\n (isObservableMap(value) || isObservableArray(value)))\n return fail(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n if (isObservableObject(value)) {\n var o = value.$mobx;\n return o.values && !!o.values[property];\n }\n return false;\n }\n // For first check, see #701\n return (isObservableObject(value) ||\n !!value.$mobx ||\n isAtom(value) ||\n isReaction(value) ||\n isComputedValue(value));\n}\nfunction isObservable(value) {\n if (arguments.length !== 1)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if (typeof propName !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" && \"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj.$mobx.getKeys();\n }\n if (isObservableMap(obj)) {\n return obj._keys.slice();\n }\n if (isObservableSet(obj)) {\n return iteratorToArray(obj.keys());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) { return index; });\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'keys()' can only be used on observable objects, arrays, sets and maps\");\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) { return obj[key]; });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) { return obj.get(key); });\n }\n if (isObservableSet(obj)) {\n return iteratorToArray(obj.values());\n }\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'values()' can only be used on observable objects, arrays, sets and maps\");\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) { return [key, obj[key]]; });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) { return [key, obj.get(key)]; });\n }\n if (isObservableSet(obj)) {\n return iteratorToArray(obj.entries());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) { return [index, key]; });\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'entries()' can only be used on observable objects, arrays and maps\");\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var values_1 = key;\n try {\n for (var key_1 in values_1)\n set(obj, key_1, values_1[key_1]);\n }\n finally {\n endBatch();\n }\n return;\n }\n if (isObservableObject(obj)) {\n var adm = obj.$mobx;\n var existingObservable = adm.values[key];\n if (existingObservable) {\n adm.write(obj, key, value);\n }\n else {\n defineObservableProperty(obj, key, value, adm.defaultEnhancer);\n }\n }\n else if (isObservableMap(obj)) {\n obj.set(key, value);\n }\n else if (isObservableSet(obj)) {\n obj.add(key);\n }\n else if (isObservableArray(obj)) {\n if (typeof key !== \"number\")\n key = parseInt(key, 10);\n invariant(key >= 0, \"Not a valid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length)\n obj.length = key + 1;\n obj[key] = value;\n endBatch();\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'set()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj.$mobx.remove(key);\n }\n else if (isObservableMap(obj)) {\n obj.delete(key);\n }\n else if (isObservableSet(obj)) {\n obj.delete(key);\n }\n else if (isObservableArray(obj)) {\n if (typeof key !== \"number\")\n key = parseInt(key, 10);\n invariant(key >= 0, \"Not a valid index: '\" + key + \"'\");\n obj.splice(key, 1);\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'remove()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n // return keys(obj).indexOf(key) >= 0\n var adm = getAdministration(obj);\n adm.getKeys(); // make sure we get notified of key changes, but for performance, use the values map to look up existence\n return !!adm.values[key];\n }\n else if (isObservableMap(obj)) {\n return obj.has(key);\n }\n else if (isObservableSet(obj)) {\n return obj.has(key);\n }\n else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'has()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction get(obj, key) {\n if (!has(obj, key))\n return undefined;\n if (isObservableObject(obj)) {\n return obj[key];\n }\n else if (isObservableMap(obj)) {\n return obj.get(key);\n }\n else if (isObservableArray(obj)) {\n return obj[key];\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'get()' can only be used on observable objects, arrays and maps\");\n }\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (typeof cbOrFire === \"function\")\n return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);\n else\n return observeObservable(thing, propOrCb, cbOrFire);\n}\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe(listener, fireImmediately);\n}\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe(listener, fireImmediately);\n}\n\nvar defaultOptions = {\n detectCycles: true,\n exportMapsAsObjects: true,\n recurseEverything: false\n};\nfunction cache(map, key, value, options) {\n if (options.detectCycles)\n map.set(key, value);\n return value;\n}\nfunction toJSHelper(source, options, __alreadySeen) {\n if (!options.recurseEverything && !isObservable(source))\n return source;\n if (typeof source !== \"object\")\n return source;\n // Directly return null if source is null\n if (source === null)\n return null;\n // Directly return the Date object itself if contained in the observable\n if (source instanceof Date)\n return source;\n if (isObservableValue(source))\n return toJSHelper(source.get(), options, __alreadySeen);\n // make sure we track the keys of the object\n if (isObservable(source))\n keys(source);\n var detectCycles = options.detectCycles === true;\n if (detectCycles && source !== null && __alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n if (isObservableArray(source) || Array.isArray(source)) {\n var res_1 = cache(__alreadySeen, source, [], options);\n var toAdd = source.map(function (value) { return toJSHelper(value, options, __alreadySeen); });\n res_1.length = toAdd.length;\n for (var i = 0, l = toAdd.length; i < l; i++)\n res_1[i] = toAdd[i];\n return res_1;\n }\n if (isObservableSet(source) || Object.getPrototypeOf(source) === Set.prototype) {\n if (options.exportMapsAsObjects === false) {\n var res_2 = cache(__alreadySeen, source, new Set(), options);\n source.forEach(function (value) {\n res_2.add(toJSHelper(value, options, __alreadySeen));\n });\n return res_2;\n }\n else {\n var res_3 = cache(__alreadySeen, source, [], options);\n source.forEach(function (value) {\n res_3.push(toJSHelper(value, options, __alreadySeen));\n });\n return res_3;\n }\n }\n if (isObservableMap(source) || Object.getPrototypeOf(source) === Map.prototype) {\n if (options.exportMapsAsObjects === false) {\n var res_4 = cache(__alreadySeen, source, new Map(), options);\n source.forEach(function (value, key) {\n res_4.set(key, toJSHelper(value, options, __alreadySeen));\n });\n return res_4;\n }\n else {\n var res_5 = cache(__alreadySeen, source, {}, options);\n source.forEach(function (value, key) {\n res_5[key] = toJSHelper(value, options, __alreadySeen);\n });\n return res_5;\n }\n }\n // Fallback to the situation that source is an ObservableObject or a plain object\n var res = cache(__alreadySeen, source, {}, options);\n for (var key in source) {\n res[key] = toJSHelper(source[key], options, __alreadySeen);\n }\n return res;\n}\nfunction toJS(source, options) {\n // backward compatibility\n if (typeof options === \"boolean\")\n options = { detectCycles: options };\n if (!options)\n options = defaultOptions;\n options.detectCycles =\n options.detectCycles === undefined\n ? options.recurseEverything === true\n : options.detectCycles === true;\n var __alreadySeen;\n if (options.detectCycles)\n __alreadySeen = new Map();\n return toJSHelper(source, options, __alreadySeen);\n}\n\nfunction trace() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var enterBreakPoint = false;\n if (typeof args[args.length - 1] === \"boolean\")\n enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n if (!derivation) {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n if (derivation.isTracing === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name + \"' tracing enabled\");\n }\n derivation.isTracing = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n case 1:\n return getAtom(args[0]);\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\n * During a transaction no views are updated until the end of the transaction.\n * The transaction will be run synchronously nonetheless.\n *\n * @param action a function that updates some reactive state\n * @returns any value that was returned by the 'action' parameter.\n */\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) { thisArg = undefined; }\n startBatch();\n try {\n return action.apply(thisArg);\n }\n finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || (arg1 && typeof arg1 === \"object\"))\n return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n if (typeof opts.timeout === \"number\") {\n timeoutHandle = setTimeout(function () {\n if (!disposer.$mobx.isDisposed) {\n disposer();\n var error = new Error(\"WHEN_TIMEOUT\");\n if (opts.onError)\n opts.onError(error);\n else\n throw error;\n }\n }, opts.timeout);\n }\n opts.name = opts.name || \"When@\" + getNextId();\n var effectAction = createAction(opts.name + \"-effect\", effect);\n var disposer = autorun(function (r) {\n if (predicate()) {\n r.dispose();\n if (timeoutHandle)\n clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\nfunction whenPromise(predicate, opts) {\n if (process.env.NODE_ENV !== \"production\" && opts && opts.onError)\n return fail(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, __assign({}, opts, { onError: reject }));\n cancel = function () {\n disposer();\n reject(\"WHEN_CANCELLED\");\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors !== undefined && interceptable.interceptors.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors || (interceptable.interceptors = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1)\n interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n try {\n var interceptors = interceptable.interceptors;\n if (interceptors)\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n invariant(!change || change.type, \"Intercept handlers should return nothing or a change object\");\n if (!change)\n break;\n }\n return change;\n }\n finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners !== undefined && listenable.changeListeners.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners || (listenable.changeListeners = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1)\n listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners;\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n untrackedEnd(prevU);\n}\n\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n// Detects bug in safari 9.1.1 (or iOS 9 safari mobile). See #364\nvar safariPrototypeSetterInheritanceBug = (function () {\n var v = false;\n var p = {};\n Object.defineProperty(p, \"0\", {\n set: function () {\n v = true;\n }\n });\n Object.create(p)[\"0\"] = 1;\n return v === false;\n})();\n/**\n * This array buffer contains two lists of properties, so that all arrays\n * can recycle their property definitions, which significantly improves performance of creating\n * properties on the fly.\n */\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0;\n// Typescript workaround to make sure ObservableArray extends Array\nvar StubArray = /** @class */ (function () {\n function StubArray() {\n }\n return StubArray;\n}());\nfunction inherit(ctor, proto) {\n if (typeof Object[\"setPrototypeOf\"] !== \"undefined\") {\n Object[\"setPrototypeOf\"](ctor.prototype, proto);\n }\n else if (typeof ctor.prototype.__proto__ !== \"undefined\") {\n ctor.prototype.__proto__ = proto;\n }\n else {\n ctor[\"prototype\"] = proto;\n }\n}\ninherit(StubArray, Array.prototype);\n// Weex freeze Array.prototype\n// Make them writeable and configurable in prototype chain\n// https://github.com/alibaba/weex/pull/1529\nif (Object.isFrozen(Array)) {\n [\n \"constructor\",\n \"push\",\n \"shift\",\n \"concat\",\n \"pop\",\n \"unshift\",\n \"replace\",\n \"find\",\n \"findIndex\",\n \"splice\",\n \"reverse\",\n \"sort\"\n ].forEach(function (key) {\n Object.defineProperty(StubArray.prototype, key, {\n configurable: true,\n writable: true,\n value: Array.prototype[key]\n });\n });\n}\nvar ObservableArrayAdministration = /** @class */ (function () {\n function ObservableArrayAdministration(name, enhancer, array, owned) {\n this.array = array;\n this.owned = owned;\n this.values = [];\n this.lastKnownLength = 0;\n this.atom = new Atom(name || \"ObservableArray@\" + getNextId());\n this.enhancer = function (newV, oldV) { return enhancer(newV, oldV, name + \"[..]\"); };\n }\n ObservableArrayAdministration.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableArrayAdministration.prototype.dehanceValues = function (values) {\n if (this.dehancer !== undefined && values.length > 0)\n return values.map(this.dehancer);\n return values;\n };\n ObservableArrayAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableArrayAdministration.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n if (fireImmediately) {\n listener({\n object: this.array,\n type: \"splice\",\n index: 0,\n added: this.values.slice(),\n addedCount: this.values.length,\n removed: [],\n removedCount: 0\n });\n }\n return registerListener(this, listener);\n };\n ObservableArrayAdministration.prototype.getArrayLength = function () {\n this.atom.reportObserved();\n return this.values.length;\n };\n ObservableArrayAdministration.prototype.setArrayLength = function (newLength) {\n if (typeof newLength !== \"number\" || newLength < 0)\n throw new Error(\"[mobx.array] Out of range: \" + newLength);\n var currentLength = this.values.length;\n if (newLength === currentLength)\n return;\n else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n for (var i = 0; i < newLength - currentLength; i++)\n newItems[i] = undefined; // No Array.fill everywhere...\n this.spliceWithArray(currentLength, 0, newItems);\n }\n else\n this.spliceWithArray(newLength, currentLength - newLength);\n };\n // adds / removes the necessary numeric properties to this object\n ObservableArrayAdministration.prototype.updateArrayLength = function (oldLength, delta) {\n if (oldLength !== this.lastKnownLength)\n throw new Error(\"[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?\");\n this.lastKnownLength += delta;\n if (delta > 0 && oldLength + delta + 1 > OBSERVABLE_ARRAY_BUFFER_SIZE)\n reserveArrayBuffer(oldLength + delta + 1);\n };\n ObservableArrayAdministration.prototype.spliceWithArray = function (index, deleteCount, newItems) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this.atom);\n var length = this.values.length;\n if (index === undefined)\n index = 0;\n else if (index > length)\n index = length;\n else if (index < 0)\n index = Math.max(0, length + index);\n if (arguments.length === 1)\n deleteCount = length - index;\n else if (deleteCount === undefined || deleteCount === null)\n deleteCount = 0;\n else\n deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined)\n newItems = EMPTY_ARRAY;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.array,\n type: \"splice\",\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change)\n return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n newItems =\n newItems.length === 0 ? newItems : newItems.map(function (v) { return _this.enhancer(v, undefined); });\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength(length, lengthDelta); // create or remove new entries\n var res = this.spliceItemsIntoValues(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0)\n this.notifyArraySplice(index, newItems, res);\n return this.dehanceValues(res);\n };\n ObservableArrayAdministration.prototype.spliceItemsIntoValues = function (index, deleteCount, newItems) {\n var _a;\n if (newItems.length < MAX_SPLICE_SIZE) {\n return (_a = this.values).splice.apply(_a, __spread([index, deleteCount], newItems));\n }\n else {\n var res = this.values.slice(index, index + deleteCount);\n this.values = this.values\n .slice(0, index)\n .concat(newItems, this.values.slice(index + deleteCount));\n return res;\n }\n };\n ObservableArrayAdministration.prototype.notifyArrayChildUpdate = function (index, newValue, oldValue) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n object: this.array,\n type: \"update\",\n index: index,\n newValue: newValue,\n oldValue: oldValue\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.atom.name }));\n this.atom.reportChanged();\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n ObservableArrayAdministration.prototype.notifyArraySplice = function (index, added, removed) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n object: this.array,\n type: \"splice\",\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.atom.name }));\n this.atom.reportChanged();\n // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n return ObservableArrayAdministration;\n}());\nvar ObservableArray = /** @class */ (function (_super) {\n __extends(ObservableArray, _super);\n function ObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) { name = \"ObservableArray@\" + getNextId(); }\n if (owned === void 0) { owned = false; }\n var _this = _super.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, _this, owned);\n addHiddenFinalProp(_this, \"$mobx\", adm);\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n _this.spliceWithArray(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n if (safariPrototypeSetterInheritanceBug) {\n // Seems that Safari won't use numeric prototype setter untill any * numeric property is\n // defined on the instance. After that it works fine, even if this property is deleted.\n Object.defineProperty(adm.array, \"0\", ENTRY_0);\n }\n return _this;\n }\n ObservableArray.prototype.intercept = function (handler) {\n return this.$mobx.intercept(handler);\n };\n ObservableArray.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n return this.$mobx.observe(listener, fireImmediately);\n };\n ObservableArray.prototype.clear = function () {\n return this.splice(0);\n };\n ObservableArray.prototype.concat = function () {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n this.$mobx.atom.reportObserved();\n return Array.prototype.concat.apply(this.peek(), arrays.map(function (a) { return (isObservableArray(a) ? a.peek() : a); }));\n };\n ObservableArray.prototype.replace = function (newItems) {\n return this.$mobx.spliceWithArray(0, this.$mobx.values.length, newItems);\n };\n /**\n * Converts this array back to a (shallow) javascript structure.\n * For a deep clone use mobx.toJS\n */\n ObservableArray.prototype.toJS = function () {\n return this.slice();\n };\n ObservableArray.prototype.toJSON = function () {\n // Used by JSON.stringify\n return this.toJS();\n };\n ObservableArray.prototype.peek = function () {\n this.$mobx.atom.reportObserved();\n return this.$mobx.dehanceValues(this.$mobx.values);\n };\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n ObservableArray.prototype.find = function (predicate, thisArg, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n if (arguments.length === 3)\n deprecated(\"The array.find fromIndex argument to find will not be supported anymore in the next major\");\n var idx = this.findIndex.apply(this, arguments);\n return idx === -1 ? undefined : this.get(idx);\n };\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n ObservableArray.prototype.findIndex = function (predicate, thisArg, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n if (arguments.length === 3)\n deprecated(\"The array.findIndex fromIndex argument to find will not be supported anymore in the next major\");\n var items = this.peek(), l = items.length;\n for (var i = fromIndex; i < l; i++)\n if (predicate.call(thisArg, items[i], i, this))\n return i;\n return -1;\n };\n /*\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\n * since these functions alter the inner structure of the array, the have side effects.\n * Because the have side effects, they should not be used in computed function,\n * and for that reason the do not call dependencyState.notifyObserved\n */\n ObservableArray.prototype.splice = function (index, deleteCount) {\n var newItems = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n newItems[_i - 2] = arguments[_i];\n }\n switch (arguments.length) {\n case 0:\n return [];\n case 1:\n return this.$mobx.spliceWithArray(index);\n case 2:\n return this.$mobx.spliceWithArray(index, deleteCount);\n }\n return this.$mobx.spliceWithArray(index, deleteCount, newItems);\n };\n ObservableArray.prototype.spliceWithArray = function (index, deleteCount, newItems) {\n return this.$mobx.spliceWithArray(index, deleteCount, newItems);\n };\n ObservableArray.prototype.push = function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this.$mobx;\n adm.spliceWithArray(adm.values.length, 0, items);\n return adm.values.length;\n };\n ObservableArray.prototype.pop = function () {\n return this.splice(Math.max(this.$mobx.values.length - 1, 0), 1)[0];\n };\n ObservableArray.prototype.shift = function () {\n return this.splice(0, 1)[0];\n };\n ObservableArray.prototype.unshift = function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this.$mobx;\n adm.spliceWithArray(0, 0, items);\n return adm.values.length;\n };\n ObservableArray.prototype.reverse = function () {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n // so we deviate from the default and just make it an dervitation\n var clone = this.slice();\n return clone.reverse.apply(clone, arguments);\n };\n ObservableArray.prototype.sort = function (compareFn) {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n var clone = this.slice();\n return clone.sort.apply(clone, arguments);\n };\n ObservableArray.prototype.remove = function (value) {\n var idx = this.$mobx.dehanceValues(this.$mobx.values).indexOf(value);\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n return false;\n };\n ObservableArray.prototype.move = function (fromIndex, toIndex) {\n deprecated(\"observableArray.move is deprecated, use .slice() & .replace() instead\");\n function checkIndex(index) {\n if (index < 0) {\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is negative\");\n }\n var length = this.$mobx.values.length;\n if (index >= length) {\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is not smaller than \" + length);\n }\n }\n checkIndex.call(this, fromIndex);\n checkIndex.call(this, toIndex);\n if (fromIndex === toIndex) {\n return;\n }\n var oldItems = this.$mobx.values;\n var newItems;\n if (fromIndex < toIndex) {\n newItems = __spread(oldItems.slice(0, fromIndex), oldItems.slice(fromIndex + 1, toIndex + 1), [\n oldItems[fromIndex]\n ], oldItems.slice(toIndex + 1));\n }\n else {\n // toIndex < fromIndex\n newItems = __spread(oldItems.slice(0, toIndex), [\n oldItems[fromIndex]\n ], oldItems.slice(toIndex, fromIndex), oldItems.slice(fromIndex + 1));\n }\n this.replace(newItems);\n };\n // See #734, in case property accessors are unreliable...\n ObservableArray.prototype.get = function (index) {\n var impl = this.$mobx;\n if (impl) {\n if (index < impl.values.length) {\n impl.atom.reportObserved();\n return impl.dehanceValue(impl.values[index]);\n }\n console.warn(\"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + impl.values.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\");\n }\n return undefined;\n };\n // See #734, in case property accessors are unreliable...\n ObservableArray.prototype.set = function (index, newValue) {\n var adm = this.$mobx;\n var values = adm.values;\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(adm.atom);\n var oldValue = values[index];\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n type: \"update\",\n object: this,\n index: index,\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = adm.enhancer(newValue, oldValue);\n var changed = newValue !== oldValue;\n if (changed) {\n values[index] = newValue;\n adm.notifyArrayChildUpdate(index, newValue, oldValue);\n }\n }\n else if (index === values.length) {\n // add a new item\n adm.spliceWithArray(index, 0, [newValue]);\n }\n else {\n // out of bounds\n throw new Error(\"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + values.length);\n }\n };\n return ObservableArray;\n}(StubArray));\ndeclareIterator(ObservableArray.prototype, function () {\n this.$mobx.atom.reportObserved();\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function () {\n return nextIndex < self.length\n ? { value: self[nextIndex++], done: false }\n : { done: true, value: undefined };\n }\n });\n});\nObject.defineProperty(ObservableArray.prototype, \"length\", {\n enumerable: false,\n configurable: true,\n get: function () {\n return this.$mobx.getArrayLength();\n },\n set: function (newLength) {\n this.$mobx.setArrayLength(newLength);\n }\n});\naddHiddenProp(ObservableArray.prototype, toStringTagSymbol(), \"Array\");\n[\n \"every\",\n \"filter\",\n \"forEach\",\n \"indexOf\",\n \"join\",\n \"lastIndexOf\",\n \"map\",\n \"reduce\",\n \"reduceRight\",\n \"slice\",\n \"some\",\n \"toString\",\n \"toLocaleString\"\n].forEach(function (funcName) {\n var baseFunc = Array.prototype[funcName];\n invariant(typeof baseFunc === \"function\", \"Base function not defined on Array prototype: '\" + funcName + \"'\");\n addHiddenProp(ObservableArray.prototype, funcName, function () {\n return baseFunc.apply(this.peek(), arguments);\n });\n});\n/**\n * We don't want those to show up in `for (const key in ar)` ...\n */\nmakeNonEnumerable(ObservableArray.prototype, [\n \"constructor\",\n \"intercept\",\n \"observe\",\n \"clear\",\n \"concat\",\n \"get\",\n \"replace\",\n \"toJS\",\n \"toJSON\",\n \"peek\",\n \"find\",\n \"findIndex\",\n \"splice\",\n \"spliceWithArray\",\n \"push\",\n \"pop\",\n \"set\",\n \"shift\",\n \"unshift\",\n \"reverse\",\n \"sort\",\n \"remove\",\n \"move\",\n \"toString\",\n \"toLocaleString\"\n]);\n// See #364\nvar ENTRY_0 = createArrayEntryDescriptor(0);\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: false,\n get: function () {\n return this.get(index);\n },\n set: function (value) {\n this.set(index, value);\n }\n };\n}\nfunction createArrayBufferItem(index) {\n Object.defineProperty(ObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\nfunction reserveArrayBuffer(max) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max; index++)\n createArrayBufferItem(index);\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n}\nreserveArrayBuffer(1000);\nvar isObservableArrayAdministration = createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing.$mobx);\n}\n\nvar ObservableMapMarker = {};\nvar ObservableMap = /** @class */ (function () {\n function ObservableMap(initialData, enhancer, name) {\n if (enhancer === void 0) { enhancer = deepEnhancer; }\n if (name === void 0) { name = \"ObservableMap@\" + getNextId(); }\n this.enhancer = enhancer;\n this.name = name;\n this.$mobx = ObservableMapMarker;\n this._keys = (new ObservableArray(undefined, referenceEnhancer, this.name + \".keys()\", true));\n if (typeof Map !== \"function\") {\n throw new Error(\"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\");\n }\n this._data = new Map();\n this._hasMap = new Map();\n this.merge(initialData);\n }\n ObservableMap.prototype._has = function (key) {\n return this._data.has(key);\n };\n ObservableMap.prototype.has = function (key) {\n var _this = this;\n if (!globalState.trackingDerivation)\n return this._has(key);\n var entry = this._hasMap.get(key);\n if (!entry) {\n // todo: replace with atom (breaking change)\n var newEntry = (entry = new ObservableValue(this._has(key), referenceEnhancer, this.name + \".\" + stringifyKey(key) + \"?\", false));\n this._hasMap.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () { return _this._hasMap.delete(key); });\n }\n return entry.get();\n };\n ObservableMap.prototype.set = function (key, value) {\n var hasKey = this._has(key);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? \"update\" : \"add\",\n object: this,\n newValue: value,\n name: key\n });\n if (!change)\n return this;\n value = change.newValue;\n }\n if (hasKey) {\n this._updateValue(key, value);\n }\n else {\n this._addValue(key, value);\n }\n return this;\n };\n ObservableMap.prototype.delete = function (key) {\n var _this = this;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"delete\",\n object: this,\n name: key\n });\n if (!change)\n return false;\n }\n if (this._has(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"delete\",\n object: this,\n oldValue: this._data.get(key).value,\n name: key\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.name, key: key }));\n transaction(function () {\n _this._keys.remove(key);\n _this._updateHasMapEntry(key, false);\n var observable = _this._data.get(key);\n observable.setNewValue(undefined);\n _this._data.delete(key);\n });\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n return true;\n }\n return false;\n };\n ObservableMap.prototype._updateHasMapEntry = function (key, value) {\n var entry = this._hasMap.get(key);\n if (entry) {\n entry.setNewValue(value);\n }\n };\n ObservableMap.prototype._updateValue = function (key, newValue) {\n var observable = this._data.get(key);\n newValue = observable.prepareNewValue(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"update\",\n object: this,\n oldValue: observable.value,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.name, key: key }));\n observable.setNewValue(newValue);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n }\n };\n ObservableMap.prototype._addValue = function (key, newValue) {\n var _this = this;\n transaction(function () {\n var observable = new ObservableValue(newValue, _this.enhancer, _this.name + \".\" + stringifyKey(key), false);\n _this._data.set(key, observable);\n newValue = observable.value; // value might have been changed\n _this._updateHasMapEntry(key, true);\n _this._keys.push(key);\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: this,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.name, key: key }));\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n };\n ObservableMap.prototype.get = function (key) {\n if (this.has(key))\n return this.dehanceValue(this._data.get(key).get());\n return this.dehanceValue(undefined);\n };\n ObservableMap.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n ObservableMap.prototype.keys = function () {\n return this._keys[iteratorSymbol()]();\n };\n ObservableMap.prototype.values = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function () {\n return nextIndex < self._keys.length\n ? { value: self.get(self._keys[nextIndex++]), done: false }\n : { value: undefined, done: true };\n }\n });\n };\n ObservableMap.prototype.entries = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function () {\n if (nextIndex < self._keys.length) {\n var key = self._keys[nextIndex++];\n return {\n value: [key, self.get(key)],\n done: false\n };\n }\n return { done: true };\n }\n });\n };\n ObservableMap.prototype.forEach = function (callback, thisArg) {\n var _this = this;\n this._keys.forEach(function (key) { return callback.call(thisArg, _this.get(key), key, _this); });\n };\n /** Merge another object into this object, returns this. */\n ObservableMap.prototype.merge = function (other) {\n var _this = this;\n if (isObservableMap(other)) {\n other = other.toJS();\n }\n transaction(function () {\n if (isPlainObject(other))\n Object.keys(other).forEach(function (key) { return _this.set(key, other[key]); });\n else if (Array.isArray(other))\n other.forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n return _this.set(key, value);\n });\n else if (isES6Map(other)) {\n if (other.constructor !== Map)\n fail(\"Cannot initialize from classes that inherit from Map: \" + other.constructor.name); // prettier-ignore\n else\n other.forEach(function (value, key) { return _this.set(key, value); });\n }\n else if (other !== null && other !== undefined)\n fail(\"Cannot initialize map from \" + other);\n });\n return this;\n };\n ObservableMap.prototype.clear = function () {\n var _this = this;\n transaction(function () {\n untracked(function () {\n _this._keys.slice().forEach(function (key) { return _this.delete(key); });\n });\n });\n };\n ObservableMap.prototype.replace = function (values) {\n var _this = this;\n transaction(function () {\n var replacementMap = convertToMap(values);\n var oldKeys = _this._keys;\n var newKeys = Array.from(replacementMap.keys());\n var keysChanged = false;\n for (var i = 0; i < oldKeys.length; i++) {\n var oldKey = oldKeys[i];\n // key order change\n if (oldKeys.length === newKeys.length && oldKey !== newKeys[i]) {\n keysChanged = true;\n }\n // deleted key\n if (!replacementMap.has(oldKey)) {\n keysChanged = true;\n _this.delete(oldKey);\n }\n }\n replacementMap.forEach(function (value, key) {\n // new key\n if (!_this._data.has(key)) {\n keysChanged = true;\n }\n _this.set(key, value);\n });\n if (keysChanged) {\n _this._keys.replace(newKeys);\n }\n });\n return this;\n };\n Object.defineProperty(ObservableMap.prototype, \"size\", {\n get: function () {\n return this._keys.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a plain object that represents this map.\n * Note that all the keys being stringified.\n * If there are duplicating keys after converting them to strings, behaviour is undetermined.\n */\n ObservableMap.prototype.toPOJO = function () {\n var _this = this;\n var res = {};\n this._keys.forEach(function (key) { return (res[typeof key === \"symbol\" ? key : stringifyKey(key)] = _this.get(key)); });\n return res;\n };\n /**\n * Returns a shallow non observable object clone of this map.\n * Note that the values migth still be observable. For a deep clone use mobx.toJS.\n */\n ObservableMap.prototype.toJS = function () {\n var _this = this;\n var res = new Map();\n this._keys.forEach(function (key) { return res.set(key, _this.get(key)); });\n return res;\n };\n ObservableMap.prototype.toJSON = function () {\n // Used by JSON.stringify\n return this.toPOJO();\n };\n ObservableMap.prototype.toString = function () {\n var _this = this;\n return (this.name +\n \"[{ \" +\n this._keys.map(function (key) { return stringifyKey(key) + \": \" + (\"\" + _this.get(key)); }).join(\", \") +\n \" }]\");\n };\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableMap.prototype.observe = function (listener, fireImmediately) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n ObservableMap.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n return ObservableMap;\n}());\nfunction stringifyKey(key) {\n if (key && key.toString)\n return key.toString();\n else\n return new String(key).toString();\n}\ndeclareIterator(ObservableMap.prototype, function () {\n return this.entries();\n});\naddHiddenFinalProp(ObservableMap.prototype, toStringTagSymbol(), \"Map\");\n/* 'var' fixes small-build issue */\nvar isObservableMap = createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nvar ObservableSetMarker = {};\nvar ObservableSet = /** @class */ (function () {\n function ObservableSet(initialData, enhancer, name) {\n if (enhancer === void 0) { enhancer = deepEnhancer; }\n if (name === void 0) { name = \"ObservableSet@\" + getNextId(); }\n this.name = name;\n this.$mobx = ObservableSetMarker;\n this._data = new Set();\n this._atom = createAtom(this.name);\n if (typeof Set !== \"function\") {\n throw new Error(\"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\");\n }\n this.enhancer = function (newV, oldV) { return enhancer(newV, oldV, name); };\n if (initialData) {\n this.replace(initialData);\n }\n }\n ObservableSet.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n ObservableSet.prototype.clear = function () {\n var _this = this;\n transaction(function () {\n untracked(function () {\n _this._data.forEach(function (value) {\n _this.delete(value);\n });\n });\n });\n };\n ObservableSet.prototype.forEach = function (callbackFn, thisArg) {\n var _this = this;\n this._data.forEach(function (value) {\n callbackFn.call(thisArg, value, value, _this);\n });\n };\n Object.defineProperty(ObservableSet.prototype, \"size\", {\n get: function () {\n this._atom.reportObserved();\n return this._data.size;\n },\n enumerable: true,\n configurable: true\n });\n ObservableSet.prototype.add = function (value) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this._atom);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"add\",\n object: this,\n newValue: value\n });\n if (!change)\n return this;\n // TODO: ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n if (!this.has(value)) {\n transaction(function () {\n _this._data.add(_this.enhancer(value, undefined));\n _this._atom.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: this,\n newValue: value\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(change);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n return this;\n };\n ObservableSet.prototype.delete = function (value) {\n var _this = this;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"delete\",\n object: this,\n oldValue: value\n });\n if (!change)\n return false;\n }\n if (this.has(value)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"delete\",\n object: this,\n oldValue: value\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign({}, change, { name: this.name }));\n transaction(function () {\n _this._atom.reportChanged();\n _this._data.delete(value);\n });\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n return true;\n }\n return false;\n };\n ObservableSet.prototype.has = function (value) {\n this._atom.reportObserved();\n return this._data.has(this.dehanceValue(value));\n };\n ObservableSet.prototype.entries = function () {\n var nextIndex = 0;\n var keys = iteratorToArray(this.keys());\n var values = iteratorToArray(this.values());\n return makeIterable({\n next: function () {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length\n ? { value: [keys[index], values[index]], done: false }\n : { done: true };\n }\n });\n };\n ObservableSet.prototype.keys = function () {\n return this.values();\n };\n ObservableSet.prototype.values = function () {\n this._atom.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues;\n if (this._data.values !== undefined) {\n observableValues = iteratorToArray(this._data.values());\n }\n else {\n // There is no values function in IE11\n observableValues = [];\n this._data.forEach(function (e) { return observableValues.push(e); });\n }\n return makeIterable({\n next: function () {\n return nextIndex < observableValues.length\n ? { value: self.dehanceValue(observableValues[nextIndex++]), done: false }\n : { done: true };\n }\n });\n };\n ObservableSet.prototype.replace = function (other) {\n var _this = this;\n if (isObservableSet(other)) {\n other = other.toJS();\n }\n transaction(function () {\n if (Array.isArray(other)) {\n _this.clear();\n other.forEach(function (value) { return _this.add(value); });\n }\n else if (isES6Set(other)) {\n _this.clear();\n other.forEach(function (value) { return _this.add(value); });\n }\n else if (other !== null && other !== undefined) {\n fail(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n ObservableSet.prototype.observe = function (listener, fireImmediately) {\n // TODO 'fireImmediately' can be true?\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n ObservableSet.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableSet.prototype.toJS = function () {\n return new Set(this);\n };\n ObservableSet.prototype.toString = function () {\n return this.name + \"[ \" + iteratorToArray(this.keys()).join(\", \") + \" ]\";\n };\n return ObservableSet;\n}());\ndeclareIterator(ObservableSet.prototype, function () {\n return this.values();\n});\naddHiddenFinalProp(ObservableSet.prototype, toStringTagSymbol(), \"Set\");\nvar isObservableSet = createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar ObservableObjectAdministration = /** @class */ (function () {\n function ObservableObjectAdministration(target, name, defaultEnhancer) {\n this.target = target;\n this.name = name;\n this.defaultEnhancer = defaultEnhancer;\n this.values = {};\n }\n ObservableObjectAdministration.prototype.read = function (owner, key) {\n if (process.env.NODE_ENV === \"production\" && this.target !== owner) {\n this.illegalAccess(owner, key);\n if (!this.values[key])\n return undefined;\n }\n return this.values[key].get();\n };\n ObservableObjectAdministration.prototype.write = function (owner, key, newValue) {\n var instance = this.target;\n if (process.env.NODE_ENV === \"production\" && instance !== owner) {\n this.illegalAccess(owner, key);\n }\n var observable = this.values[key];\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return;\n }\n // intercept\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"update\",\n object: instance,\n name: key,\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = observable.prepareNewValue(newValue);\n // notify spy & observers\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy\n ? {\n type: \"update\",\n object: instance,\n oldValue: observable.value,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.name, key: key }));\n observable.setNewValue(newValue);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n }\n };\n ObservableObjectAdministration.prototype.remove = function (key) {\n if (!this.values[key])\n return;\n var target = this.target;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: target,\n name: key,\n type: \"remove\"\n });\n if (!change)\n return;\n }\n try {\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = isSpyEnabled();\n var oldValue = this.values[key].get();\n if (this.keys)\n this.keys.remove(key);\n delete this.values[key];\n delete this.target[key];\n var change = notify || notifySpy\n ? {\n type: \"remove\",\n object: target,\n oldValue: oldValue,\n name: key\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: this.name, key: key }));\n if (notify)\n notifyListeners(this, change);\n if (notifySpy)\n spyReportEnd();\n }\n finally {\n endBatch();\n }\n };\n ObservableObjectAdministration.prototype.illegalAccess = function (owner, propName) {\n /**\n * This happens if a property is accessed through the prototype chain, but the property was\n * declared directly as own property on the prototype.\n *\n * E.g.:\n * class A {\n * }\n * extendObservable(A.prototype, { x: 1 })\n *\n * classB extens A {\n * }\n * console.log(new B().x)\n *\n * It is unclear whether the property should be considered 'static' or inherited.\n * Either use `console.log(A.x)`\n * or: decorate(A, { x: observable })\n *\n * When using decorate, the property will always be redeclared as own property on the actual instance\n */\n console.warn(\"Property '\" + propName + \"' of '\" + owner + \"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner\");\n };\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableObjectAdministration.prototype.observe = function (callback, fireImmediately) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n ObservableObjectAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableObjectAdministration.prototype.getKeys = function () {\n var _this = this;\n if (this.keys === undefined) {\n this.keys = (new ObservableArray(Object.keys(this.values).filter(function (key) { return _this.values[key] instanceof ObservableValue; }), referenceEnhancer, \"keys(\" + this.name + \")\", true));\n }\n return this.keys.slice();\n };\n return ObservableObjectAdministration;\n}());\nfunction asObservableObject(target, name, defaultEnhancer) {\n if (name === void 0) { name = \"\"; }\n if (defaultEnhancer === void 0) { defaultEnhancer = deepEnhancer; }\n var adm = target.$mobx;\n if (adm)\n return adm;\n process.env.NODE_ENV !== \"production\" &&\n invariant(Object.isExtensible(target), \"Cannot make the designated object observable; it is not extensible\");\n if (!isPlainObject(target))\n name = (target.constructor.name || \"ObservableObject\") + \"@\" + getNextId();\n if (!name)\n name = \"ObservableObject@\" + getNextId();\n adm = new ObservableObjectAdministration(target, name, defaultEnhancer);\n addHiddenFinalProp(target, \"$mobx\", adm);\n return adm;\n}\nfunction defineObservableProperty(target, propName, newValue, enhancer) {\n var adm = asObservableObject(target);\n assertPropertyConfigurable(target, propName);\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n object: target,\n name: propName,\n type: \"add\",\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n var observable = (adm.values[propName] = new ObservableValue(newValue, enhancer, adm.name + \".\" + propName, false));\n newValue = observable.value; // observableValue might have changed it\n Object.defineProperty(target, propName, generateObservablePropConfig(propName));\n if (adm.keys)\n adm.keys.push(propName);\n notifyPropertyAddition(adm, target, propName, newValue);\n}\nfunction defineComputedProperty(target, // which objects holds the observable and provides `this` context?\npropName, options) {\n var adm = asObservableObject(target);\n options.name = adm.name + \".\" + propName;\n options.context = target;\n adm.values[propName] = new ComputedValue(options);\n Object.defineProperty(target, propName, generateComputedPropConfig(propName));\n}\nvar observablePropertyConfigs = Object.create(null);\nvar computedPropertyConfigs = Object.create(null);\nfunction generateObservablePropConfig(propName) {\n return (observablePropertyConfigs[propName] ||\n (observablePropertyConfigs[propName] = {\n configurable: true,\n enumerable: true,\n get: function () {\n return this.$mobx.read(this, propName);\n },\n set: function (v) {\n this.$mobx.write(this, propName, v);\n }\n }));\n}\nfunction getAdministrationForComputedPropOwner(owner) {\n var adm = owner.$mobx;\n if (!adm) {\n // because computed props are declared on proty,\n // the current instance might not have been initialized yet\n initializeInstance(owner);\n return owner.$mobx;\n }\n return adm;\n}\nfunction generateComputedPropConfig(propName) {\n return (computedPropertyConfigs[propName] ||\n (computedPropertyConfigs[propName] = {\n configurable: globalState.computedConfigurable,\n enumerable: false,\n get: function () {\n return getAdministrationForComputedPropOwner(this).read(this, propName);\n },\n set: function (v) {\n getAdministrationForComputedPropOwner(this).write(this, propName, v);\n }\n }));\n}\nfunction notifyPropertyAddition(adm, object, key, newValue) {\n var notify = hasListeners(adm);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: object,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy)\n spyReportStart(__assign({}, change, { name: adm.name, key: key }));\n if (notify)\n notifyListeners(adm, change);\n if (notifySpy)\n spyReportEnd();\n}\nvar isObservableObjectAdministration = createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n return isObservableObjectAdministration(thing.$mobx);\n }\n return false;\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"It is not possible to get index atoms from arrays\");\n return thing.$mobx.atom;\n }\n if (isObservableSet(thing)) {\n return thing.$mobx;\n }\n if (isObservableMap(thing)) {\n var anyThing = thing;\n if (property === undefined)\n return getAtom(anyThing._keys);\n var observable = anyThing._data.get(property) || anyThing._hasMap.get(property);\n if (!observable)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"the entry '\" + property + \"' does not exist in the observable map '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n if (property && !thing.$mobx)\n thing[property]; // See #1072\n if (isObservableObject(thing)) {\n if (!property)\n return fail(process.env.NODE_ENV !== \"production\" && \"please specify a property\");\n var observable = thing.$mobx.values[property];\n if (!observable)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"no observable property '\" + property + \"' found on the observable object '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n }\n else if (typeof thing === \"function\") {\n if (isReaction(thing.$mobx)) {\n // disposer function\n return thing.$mobx;\n }\n }\n return fail(process.env.NODE_ENV !== \"production\" && \"Cannot obtain atom from \" + thing);\n}\nfunction getAdministration(thing, property) {\n if (!thing)\n fail(\"Expecting some object\");\n if (property !== undefined)\n return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing))\n return thing;\n if (isObservableMap(thing) || isObservableSet(thing))\n return thing;\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n if (thing.$mobx)\n return thing.$mobx;\n fail(process.env.NODE_ENV !== \"production\" && \"Cannot obtain administration from \" + thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n if (property !== undefined)\n named = getAtom(thing, property);\n else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing))\n named = getAdministration(thing);\n else\n named = getAtom(thing); // valid for arrays as well\n return named.name;\n}\n\nvar toString = Object.prototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) { depth = -1; }\n return eq(a, b, depth);\n}\n// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b)\n return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null)\n return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a)\n return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== \"function\" && type !== \"object\" && typeof b != \"object\")\n return false;\n // Unwrap any wrapped objects.\n a = unwrap(a);\n b = unwrap(b);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b))\n return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\":\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a)\n return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case \"[object Symbol]\":\n return (\n // eslint-disable-next-line\n typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));\n }\n var areArrays = className === \"[object Array]\";\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\")\n return false;\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor &&\n !(typeof aCtor === \"function\" &&\n aCtor instanceof aCtor &&\n typeof bCtor === \"function\" &&\n bCtor instanceof bCtor) &&\n (\"constructor\" in a && \"constructor\" in b)) {\n return false;\n }\n }\n if (depth === 0) {\n return false;\n }\n else if (depth < 0) {\n depth = -1;\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a)\n return bStack[length] === b;\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length)\n return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack))\n return false;\n }\n }\n else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key = void 0;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (Object.keys(b).length !== length)\n return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has$1(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack)))\n return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\nfunction unwrap(a) {\n if (isObservableArray(a))\n return a.peek();\n if (isES6Map(a) || isObservableMap(a))\n return iteratorToArray(a.entries());\n if (isES6Set(a) || isObservableSet(a))\n return iteratorToArray(a.entries());\n return a;\n}\nfunction has$1(a, key) {\n return Object.prototype.hasOwnProperty.call(a, key);\n}\n\n/*\nThe only reason for this file to exist is pure horror:\nWithout it rollup can make the bundling fail at any point in time; when it rolls up the files in the wrong order\nit will cause undefined errors (for example because super classes or local variables not being hosted).\nWith this file that will still happen,\nbut at least in this file we can magically reorder the imports with trial and error until the build succeeds again.\n*/\n\n/**\n * (c) Michel Weststrate 2015 - 2019\n * MIT Licensed\n *\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\n * this is a good place to start:\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\n *\n * Source folders:\n * ===============\n *\n * - api/ Most of the public static methods exposed by the module can be found here.\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\n * - utils/ Utility stuff.\n *\n */\ntry {\n // define process.env if needed\n // if this is not a production build in the first place\n // (in which case the expression below would be substituted with 'production')\n // tslint:disable-next-line\n process.env.NODE_ENV;\n}\ncatch (e) {\n var g = getGlobal();\n if (typeof process === \"undefined\")\n g.process = {};\n g.process.env = {};\n}\n(function () {\n function testCodeMinification() { }\n if (testCodeMinification.name !== \"testCodeMinification\" &&\n process.env.NODE_ENV !== \"production\" &&\n process.env.IGNORE_MOBX_MINIFY_WARNING !== \"true\") {\n // trick so it doesn't get replaced\n var varName = [\"process\", \"env\", \"NODE_ENV\"].join(\".\");\n console.warn(\"[mobx] you are running a minified build, but '\" + varName + \"' was not set to 'production' in your bundler. This results in an unnecessarily large and slow bundle\");\n }\n})();\n// forward compatibility with mobx, so that packages can easily support mobx 4 & 5\nvar $mobx = \"$mobx\";\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n// TODO: remove in some future build\nif (process.env.NODE_ENV !== \"production\" &&\n typeof module !== \"undefined\" &&\n typeof module.exports !== \"undefined\") {\n var warnedAboutDefaultExport_1 = false;\n Object.defineProperty(module.exports, \"default\", {\n enumerable: false,\n get: function () {\n if (!warnedAboutDefaultExport_1) {\n warnedAboutDefaultExport_1 = true;\n console.warn(\"The MobX package does not have a default export. Use 'import { thing } from \\\"mobx\\\"' (recommended) or 'import * as mobx from \\\"mobx\\\"' instead.\\\"\");\n }\n return undefined;\n }\n });\n [\n \"extras\",\n \"Atom\",\n \"BaseAtom\",\n \"asFlat\",\n \"asMap\",\n \"asReference\",\n \"asStructure\",\n \"autorunAsync\",\n \"createTranformer\",\n \"expr\",\n \"isModifierDescriptor\",\n \"isStrictModeEnabled\",\n \"map\",\n \"useStrict\",\n \"whyRun\"\n ].forEach(function (prop) {\n Object.defineProperty(module.exports, prop, {\n enumerable: false,\n get: function () {\n fail(\"'\" + prop + \"' is no longer part of the public MobX api. Please consult the changelog to find out where this functionality went\");\n },\n set: function () { }\n });\n });\n}\n\nexport { $mobx, IDerivationState, ObservableMap, ObservableSet, Reaction, allowStateChanges as _allowStateChanges, allowStateChangesInsideComputed as _allowStateChangesInsideComputed, _endAction, getAdministration as _getAdministration, getGlobalState as _getGlobalState, interceptReads as _interceptReads, isComputingDerivation as _isComputingDerivation, resetGlobalState as _resetGlobalState, _startAction, action, autorun, comparer, computed, configure, createAtom, decorate, entries, extendObservable, extendShallowObservable, flow, get, getAtom, getDebugName, getDependencyTree, getObserverTree, has, intercept, isAction, isArrayLike, isObservableValue as isBoxedObservable, isComputed, isComputedProp, isObservable, isObservableArray, isObservableMap, isObservableObject, isObservableProp, isObservableSet, keys, observable, observe, onBecomeObserved, onBecomeUnobserved, onReactionError, reaction, remove, runInAction, set, spy, toJS, trace, transaction, untracked, values, when };\n","import { Directive, TemplateRef, ViewContainerRef, Input, Injectable, ɵɵdefineInjectable, Component, ViewEncapsulation, ElementRef, EventEmitter, ContentChild, ViewChild, Output, HostListener, Renderer2, NgZone, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { autorun, reaction, computed as computed$1, observable as observable$1, action as action$1 } from 'mobx';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\n\nfunction LoadingComponent_span_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\");\n ɵngcc0.ɵɵtext(1, \"loading...\");\n ɵngcc0.ɵɵelementEnd();\n} }\nconst _c0 = function (a0) { return { $implicit: a0 }; };\nfunction TreeViewportComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵelementStart(1, \"div\");\n ɵngcc0.ɵɵprojection(2);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵstyleProp(\"height\", ctx_r0.getTotalHeight());\n} }\nconst _c1 = function () { return { dontDetach: true }; };\nconst _c2 = [\"*\"];\nconst _c3 = [\"loadingTemplate\"];\nconst _c4 = [\"treeNodeTemplate\"];\nconst _c5 = [\"treeNodeWrapperTemplate\"];\nconst _c6 = [\"treeNodeFullTemplate\"];\nconst _c7 = [\"viewport\"];\nconst _c8 = function (a0, a1, a2, a3) { return { loadingTemplate: a0, treeNodeTemplate: a1, treeNodeWrapperTemplate: a2, treeNodeFullTemplate: a3 }; };\nfunction TreeComponent_tree_node_collection_3_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node-collection\", 4);\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵproperty(\"nodes\", ctx_r1.treeModel.roots)(\"treeModel\", ctx_r1.treeModel)(\"templates\", ɵngcc0.ɵɵpureFunction4(3, _c8, ctx_r1.loadingTemplate, ctx_r1.treeNodeTemplate, ctx_r1.treeNodeWrapperTemplate, ctx_r1.treeNodeFullTemplate));\n} }\nfunction TreeComponent_tree_node_drop_slot_4_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node-drop-slot\", 5);\n} if (rf & 2) {\n const ctx_r2 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵproperty(\"dropIndex\", 0)(\"node\", ctx_r2.treeModel.virtualRoot);\n} }\nfunction TreeNodeComponent_ng_container_0_div_1_tree_node_drop_slot_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node-drop-slot\", 6);\n} if (rf & 2) {\n const ctx_r2 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵproperty(\"dropIndex\", ctx_r2.node.index)(\"node\", ctx_r2.node.parent);\n} }\nfunction TreeNodeComponent_ng_container_0_div_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\");\n ɵngcc0.ɵɵtemplate(1, TreeNodeComponent_ng_container_0_div_1_tree_node_drop_slot_1_Template, 1, 2, \"tree-node-drop-slot\", 3);\n ɵngcc0.ɵɵelement(2, \"tree-node-wrapper\", 4)(3, \"tree-node-children\", 5)(4, \"tree-node-drop-slot\", 6);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassMap(ctx_r1.node.getClass());\n ɵngcc0.ɵɵclassProp(\"tree-node\", true)(\"tree-node-expanded\", ctx_r1.node.isExpanded && ctx_r1.node.hasChildren)(\"tree-node-collapsed\", ctx_r1.node.isCollapsed && ctx_r1.node.hasChildren)(\"tree-node-leaf\", ctx_r1.node.isLeaf)(\"tree-node-active\", ctx_r1.node.isActive)(\"tree-node-focused\", ctx_r1.node.isFocused);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r1.index === 0);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"node\", ctx_r1.node)(\"index\", ctx_r1.index)(\"templates\", ctx_r1.templates);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"node\", ctx_r1.node)(\"templates\", ctx_r1.templates);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"dropIndex\", ctx_r1.node.index + 1)(\"node\", ctx_r1.node.parent);\n} }\nconst _c9 = function (a0, a1, a2, a3) { return { $implicit: a0, node: a1, index: a2, templates: a3 }; };\nfunction TreeNodeComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, TreeNodeComponent_ng_container_0_div_1_Template, 5, 22, \"div\", 1);\n ɵngcc0.ɵɵelementContainer(2, 2);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r0.templates.treeNodeFullTemplate);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.templates.treeNodeFullTemplate)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction4(3, _c9, ctx_r0.node, ctx_r0.node, ctx_r0.index, ctx_r0.templates));\n} }\nfunction TreeNodeContent_span_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx_r0.node.displayField);\n} }\nconst _c10 = function (a0, a1, a2) { return { $implicit: a0, node: a1, index: a2 }; };\nfunction TreeNodeExpanderComponent_ng_container_0_span_1_Template(rf, ctx) { if (rf & 1) {\n const _r4 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"span\", 3);\n ɵngcc0.ɵɵlistener(\"click\", function TreeNodeExpanderComponent_ng_container_0_span_1_Template_span_click_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r4); const ctx_r3 = ɵngcc0.ɵɵnextContext(2); return ɵngcc0.ɵɵresetView(ctx_r3.node.mouseAction(\"expanderClick\", $event)); });\n ɵngcc0.ɵɵelement(1, \"span\", 4);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassProp(\"toggle-children-wrapper-expanded\", ctx_r1.node.isExpanded)(\"toggle-children-wrapper-collapsed\", ctx_r1.node.isCollapsed);\n} }\nfunction TreeNodeExpanderComponent_ng_container_0_span_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"span\", 5);\n} }\nfunction TreeNodeExpanderComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, TreeNodeExpanderComponent_ng_container_0_span_1_Template, 2, 4, \"span\", 1);\n ɵngcc0.ɵɵtemplate(2, TreeNodeExpanderComponent_ng_container_0_span_2_Template, 1, 0, \"span\", 2);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.node.hasChildren);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r0.node.hasChildren);\n} }\nfunction TreeNodeChildrenComponent_ng_container_0_div_1_tree_node_collection_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node-collection\", 4);\n} if (rf & 2) {\n const ctx_r2 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵproperty(\"nodes\", ctx_r2.node.children)(\"templates\", ctx_r2.templates)(\"treeModel\", ctx_r2.node.treeModel);\n} }\nfunction TreeNodeChildrenComponent_ng_container_0_div_1_tree_loading_component_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-loading-component\", 5);\n} if (rf & 2) {\n const ctx_r3 = ɵngcc0.ɵɵnextContext(3);\n ɵngcc0.ɵɵstyleProp(\"padding-left\", ctx_r3.node.getNodePadding());\n ɵngcc0.ɵɵproperty(\"template\", ctx_r3.templates.loadingTemplate)(\"node\", ctx_r3.node);\n} }\nfunction TreeNodeChildrenComponent_ng_container_0_div_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\");\n ɵngcc0.ɵɵtemplate(1, TreeNodeChildrenComponent_ng_container_0_div_1_tree_node_collection_1_Template, 1, 3, \"tree-node-collection\", 2);\n ɵngcc0.ɵɵtemplate(2, TreeNodeChildrenComponent_ng_container_0_div_1_tree_loading_component_2_Template, 1, 4, \"tree-loading-component\", 3);\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵclassProp(\"tree-children\", true)(\"tree-children-no-padding\", ctx_r1.node.options.levelPadding);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r1.node.children);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r1.node.children);\n} }\nfunction TreeNodeChildrenComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵtemplate(1, TreeNodeChildrenComponent_ng_container_0_div_1_Template, 3, 6, \"div\", 1);\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"treeAnimateOpen\", ctx_r0.node.isExpanded)(\"treeAnimateOpenSpeed\", ctx_r0.node.options.animateSpeed)(\"treeAnimateOpenAcceleration\", ctx_r0.node.options.animateAcceleration)(\"treeAnimateOpenEnabled\", ctx_r0.node.options.animateExpand);\n} }\nfunction TreeNodeCollectionComponent_ng_container_0_tree_node_2_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node\", 2);\n} if (rf & 2) {\n const node_r2 = ctx.$implicit;\n const i_r3 = ctx.index;\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵproperty(\"node\", node_r2)(\"index\", i_r3)(\"templates\", ctx_r1.templates);\n} }\nfunction TreeNodeCollectionComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵelementStart(1, \"div\");\n ɵngcc0.ɵɵtemplate(2, TreeNodeCollectionComponent_ng_container_0_tree_node_2_Template, 1, 3, \"tree-node\", 1);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵstyleProp(\"margin-top\", ctx_r0.marginTop);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r0.viewportNodes)(\"ngForTrackBy\", ctx_r0.trackNode);\n} }\nfunction TreeNodeWrapperComponent_div_0_tree_node_checkbox_1_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"tree-node-checkbox\", 4);\n} if (rf & 2) {\n const ctx_r1 = ɵngcc0.ɵɵnextContext(2);\n ɵngcc0.ɵɵproperty(\"node\", ctx_r1.node);\n} }\nfunction TreeNodeWrapperComponent_div_0_Template(rf, ctx) { if (rf & 1) {\n const _r3 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 2);\n ɵngcc0.ɵɵtemplate(1, TreeNodeWrapperComponent_div_0_tree_node_checkbox_1_Template, 1, 1, \"tree-node-checkbox\", 3);\n ɵngcc0.ɵɵelement(2, \"tree-node-expander\", 4);\n ɵngcc0.ɵɵelementStart(3, \"div\", 5);\n ɵngcc0.ɵɵlistener(\"click\", function TreeNodeWrapperComponent_div_0_Template_div_click_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r2 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r2.node.mouseAction(\"click\", $event)); })(\"dblclick\", function TreeNodeWrapperComponent_div_0_Template_div_dblclick_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r4 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r4.node.mouseAction(\"dblClick\", $event)); })(\"mouseover\", function TreeNodeWrapperComponent_div_0_Template_div_mouseover_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r5 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r5.node.mouseAction(\"mouseOver\", $event)); })(\"mouseout\", function TreeNodeWrapperComponent_div_0_Template_div_mouseout_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r6 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r6.node.mouseAction(\"mouseOut\", $event)); })(\"contextmenu\", function TreeNodeWrapperComponent_div_0_Template_div_contextmenu_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r7 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r7.node.mouseAction(\"contextMenu\", $event)); })(\"treeDrop\", function TreeNodeWrapperComponent_div_0_Template_div_treeDrop_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r8 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r8.node.onDrop($event)); })(\"treeDropDragOver\", function TreeNodeWrapperComponent_div_0_Template_div_treeDropDragOver_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r9 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r9.node.mouseAction(\"dragOver\", $event)); })(\"treeDropDragLeave\", function TreeNodeWrapperComponent_div_0_Template_div_treeDropDragLeave_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r10 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r10.node.mouseAction(\"dragLeave\", $event)); })(\"treeDropDragEnter\", function TreeNodeWrapperComponent_div_0_Template_div_treeDropDragEnter_3_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r11 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r11.node.mouseAction(\"dragEnter\", $event)); });\n ɵngcc0.ɵɵelement(4, \"tree-node-content\", 6);\n ɵngcc0.ɵɵelementEnd()();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵstyleProp(\"padding-left\", ctx_r0.node.getNodePadding());\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.node.options.useCheckbox);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"node\", ctx_r0.node);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵclassProp(\"node-content-wrapper-active\", ctx_r0.node.isActive)(\"node-content-wrapper-focused\", ctx_r0.node.isFocused);\n ɵngcc0.ɵɵproperty(\"treeAllowDrop\", ctx_r0.node.allowDrop)(\"allowDragoverStyling\", ctx_r0.node.allowDragoverStyling())(\"treeDrag\", ctx_r0.node)(\"treeDragEnabled\", ctx_r0.node.allowDrag());\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"node\", ctx_r0.node)(\"index\", ctx_r0.index)(\"template\", ctx_r0.templates.treeNodeTemplate);\n} }\nfunction TreeNodeCheckboxComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {\n const _r2 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementContainerStart(0);\n ɵngcc0.ɵɵelementStart(1, \"input\", 1);\n ɵngcc0.ɵɵlistener(\"click\", function TreeNodeCheckboxComponent_ng_container_0_Template_input_click_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r2); const ctx_r1 = ɵngcc0.ɵɵnextContext(); return ɵngcc0.ɵɵresetView(ctx_r1.node.mouseAction(\"checkboxClick\", $event)); });\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"checked\", ctx_r0.node.isSelected)(\"indeterminate\", ctx_r0.node.isPartiallySelected);\n} }\nclass TreeMobxAutorunDirective {\r\n constructor(templateRef, viewContainer) {\r\n this.templateRef = templateRef;\r\n this.viewContainer = viewContainer;\r\n this.templateBindings = {};\r\n }\r\n ngOnInit() {\r\n this.view = this.viewContainer.createEmbeddedView(this.templateRef);\r\n if (this.dispose) {\r\n this.dispose();\r\n }\r\n if (this.shouldDetach()) {\r\n this.view.detach();\r\n }\r\n this.autoDetect(this.view);\r\n }\r\n shouldDetach() {\r\n return this.treeMobxAutorun && this.treeMobxAutorun.detach;\r\n }\r\n autoDetect(view) {\r\n this.dispose = autorun(() => view.detectChanges());\r\n }\r\n ngOnDestroy() {\r\n if (this.dispose) {\r\n this.dispose();\r\n }\r\n }\r\n}\nTreeMobxAutorunDirective.ɵfac = function TreeMobxAutorunDirective_Factory(t) { return new (t || TreeMobxAutorunDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nTreeMobxAutorunDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: TreeMobxAutorunDirective, selectors: [[\"\", \"treeMobxAutorun\", \"\"]], inputs: { treeMobxAutorun: \"treeMobxAutorun\" } });\r\n/** @nocollapse */\r\nTreeMobxAutorunDirective.ctorParameters = () => [\r\n { type: TemplateRef },\r\n { type: ViewContainerRef }\r\n];\r\nTreeMobxAutorunDirective.propDecorators = {\r\n treeMobxAutorun: [{ type: Input }]\r\n};\n\nconst KEYS = {\r\n LEFT: 37,\r\n UP: 38,\r\n RIGHT: 39,\r\n DOWN: 40,\r\n ENTER: 13,\r\n SPACE: 32,\r\n CONTEXT_MENU: 32\r\n};\n\nconst ɵ0 = (tree, node, $event) => node && node.toggleActivated(), ɵ1 = (tree, node, $event) => node && node.toggleActivated(true), ɵ2 = (tree, node, $event) => node && node.toggleSelected(), ɵ3 = (tree, node, $event) => node.setIsActive(true), ɵ4 = (tree, node, $event) => node.setIsActive(false), ɵ5 = (tree, node, $event) => node.setIsSelected(true), ɵ6 = (tree, node, $event) => node.setIsSelected(false), ɵ7 = (tree, node, $event) => node.focus(), ɵ8 = (tree, node, $event) => node.hasChildren && node.toggleExpanded(), ɵ9 = (tree, node, $event) => node.expand(), ɵ10 = (tree, node, $event) => node.collapse(), ɵ11 = (tree, node, $event) => tree.focusDrillDown(), ɵ12 = (tree, node, $event) => tree.focusDrillUp(), ɵ13 = (tree, node, $event) => tree.focusNextNode(), ɵ14 = (tree, node, $event) => tree.focusPreviousNode(), ɵ15 = (tree, node, $event, { from, to }) => {\r\n // default action assumes from = node, to = {parent, index}\r\n if ($event.ctrlKey) {\r\n tree.copyNode(from, to);\r\n }\r\n else {\r\n tree.moveNode(from, to);\r\n }\r\n};\r\nconst TREE_ACTIONS = {\r\n TOGGLE_ACTIVE: ɵ0,\r\n TOGGLE_ACTIVE_MULTI: ɵ1,\r\n TOGGLE_SELECTED: ɵ2,\r\n ACTIVATE: ɵ3,\r\n DEACTIVATE: ɵ4,\r\n SELECT: ɵ5,\r\n DESELECT: ɵ6,\r\n FOCUS: ɵ7,\r\n TOGGLE_EXPANDED: ɵ8,\r\n EXPAND: ɵ9,\r\n COLLAPSE: ɵ10,\r\n DRILL_DOWN: ɵ11,\r\n DRILL_UP: ɵ12,\r\n NEXT_NODE: ɵ13,\r\n PREVIOUS_NODE: ɵ14,\r\n MOVE_NODE: ɵ15\r\n};\r\nconst defaultActionMapping = {\r\n mouse: {\r\n click: TREE_ACTIONS.TOGGLE_ACTIVE,\r\n dblClick: null,\r\n contextMenu: null,\r\n expanderClick: TREE_ACTIONS.TOGGLE_EXPANDED,\r\n checkboxClick: TREE_ACTIONS.TOGGLE_SELECTED,\r\n drop: TREE_ACTIONS.MOVE_NODE\r\n },\r\n keys: {\r\n [KEYS.RIGHT]: TREE_ACTIONS.DRILL_DOWN,\r\n [KEYS.LEFT]: TREE_ACTIONS.DRILL_UP,\r\n [KEYS.DOWN]: TREE_ACTIONS.NEXT_NODE,\r\n [KEYS.UP]: TREE_ACTIONS.PREVIOUS_NODE,\r\n [KEYS.SPACE]: TREE_ACTIONS.TOGGLE_ACTIVE,\r\n [KEYS.ENTER]: TREE_ACTIONS.TOGGLE_ACTIVE\r\n }\r\n};\r\nclass TreeOptions {\r\n constructor(options = {}) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35;\r\n this.options = options;\r\n this.actionMapping = {\r\n mouse: {\r\n click: (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.actionMapping) === null || _b === void 0 ? void 0 : _b.mouse) === null || _c === void 0 ? void 0 : _c.click) !== null && _d !== void 0 ? _d : defaultActionMapping.mouse.click,\r\n dblClick: (_h = (_g = (_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.actionMapping) === null || _f === void 0 ? void 0 : _f.mouse) === null || _g === void 0 ? void 0 : _g.dblClick) !== null && _h !== void 0 ? _h : defaultActionMapping.mouse.dblClick,\r\n contextMenu: (_m = (_l = (_k = (_j = this.options) === null || _j === void 0 ? void 0 : _j.actionMapping) === null || _k === void 0 ? void 0 : _k.mouse) === null || _l === void 0 ? void 0 : _l.contextMenu) !== null && _m !== void 0 ? _m : defaultActionMapping.mouse.contextMenu,\r\n expanderClick: (_r = (_q = (_p = (_o = this.options) === null || _o === void 0 ? void 0 : _o.actionMapping) === null || _p === void 0 ? void 0 : _p.mouse) === null || _q === void 0 ? void 0 : _q.expanderClick) !== null && _r !== void 0 ? _r : defaultActionMapping.mouse.expanderClick,\r\n checkboxClick: (_v = (_u = (_t = (_s = this.options) === null || _s === void 0 ? void 0 : _s.actionMapping) === null || _t === void 0 ? void 0 : _t.mouse) === null || _u === void 0 ? void 0 : _u.checkboxClick) !== null && _v !== void 0 ? _v : defaultActionMapping.mouse.checkboxClick,\r\n drop: (_z = (_y = (_x = (_w = this.options) === null || _w === void 0 ? void 0 : _w.actionMapping) === null || _x === void 0 ? void 0 : _x.mouse) === null || _y === void 0 ? void 0 : _y.drop) !== null && _z !== void 0 ? _z : defaultActionMapping.mouse.drop,\r\n dragStart: (_3 = (_2 = (_1 = (_0 = this.options) === null || _0 === void 0 ? void 0 : _0.actionMapping) === null || _1 === void 0 ? void 0 : _1.mouse) === null || _2 === void 0 ? void 0 : _2.dragStart) !== null && _3 !== void 0 ? _3 : undefined,\r\n drag: (_7 = (_6 = (_5 = (_4 = this.options) === null || _4 === void 0 ? void 0 : _4.actionMapping) === null || _5 === void 0 ? void 0 : _5.mouse) === null || _6 === void 0 ? void 0 : _6.drag) !== null && _7 !== void 0 ? _7 : undefined,\r\n dragEnd: (_11 = (_10 = (_9 = (_8 = this.options) === null || _8 === void 0 ? void 0 : _8.actionMapping) === null || _9 === void 0 ? void 0 : _9.mouse) === null || _10 === void 0 ? void 0 : _10.dragEnd) !== null && _11 !== void 0 ? _11 : undefined,\r\n dragOver: (_15 = (_14 = (_13 = (_12 = this.options) === null || _12 === void 0 ? void 0 : _12.actionMapping) === null || _13 === void 0 ? void 0 : _13.mouse) === null || _14 === void 0 ? void 0 : _14.dragOver) !== null && _15 !== void 0 ? _15 : undefined,\r\n dragLeave: (_19 = (_18 = (_17 = (_16 = this.options) === null || _16 === void 0 ? void 0 : _16.actionMapping) === null || _17 === void 0 ? void 0 : _17.mouse) === null || _18 === void 0 ? void 0 : _18.dragLeave) !== null && _19 !== void 0 ? _19 : undefined,\r\n dragEnter: (_23 = (_22 = (_21 = (_20 = this.options) === null || _20 === void 0 ? void 0 : _20.actionMapping) === null || _21 === void 0 ? void 0 : _21.mouse) === null || _22 === void 0 ? void 0 : _22.dragEnter) !== null && _23 !== void 0 ? _23 : undefined,\r\n mouseOver: (_27 = (_26 = (_25 = (_24 = this.options) === null || _24 === void 0 ? void 0 : _24.actionMapping) === null || _25 === void 0 ? void 0 : _25.mouse) === null || _26 === void 0 ? void 0 : _26.mouseOver) !== null && _27 !== void 0 ? _27 : undefined,\r\n mouseOut: (_31 = (_30 = (_29 = (_28 = this.options) === null || _28 === void 0 ? void 0 : _28.actionMapping) === null || _29 === void 0 ? void 0 : _29.mouse) === null || _30 === void 0 ? void 0 : _30.mouseOut) !== null && _31 !== void 0 ? _31 : undefined,\r\n },\r\n keys: {\r\n [KEYS.RIGHT]: TREE_ACTIONS.DRILL_DOWN,\r\n [KEYS.LEFT]: TREE_ACTIONS.DRILL_UP,\r\n [KEYS.DOWN]: TREE_ACTIONS.NEXT_NODE,\r\n [KEYS.UP]: TREE_ACTIONS.PREVIOUS_NODE,\r\n [KEYS.SPACE]: TREE_ACTIONS.TOGGLE_ACTIVE,\r\n [KEYS.ENTER]: TREE_ACTIONS.TOGGLE_ACTIVE\r\n }\r\n };\r\n if ((_33 = (_32 = this.options) === null || _32 === void 0 ? void 0 : _32.actionMapping) === null || _33 === void 0 ? void 0 : _33.keys) {\r\n this.actionMapping.keys = Object.assign(Object.assign({}, this.actionMapping.keys), this.options.actionMapping.keys);\r\n }\r\n if (options.rtl) {\r\n this.actionMapping.keys[KEYS.RIGHT] = ((_34 = options.actionMapping) === null || _34 === void 0 ? void 0 : _34.keys[KEYS.RIGHT]) || TREE_ACTIONS.DRILL_UP;\r\n this.actionMapping.keys[KEYS.LEFT] = ((_35 = options.actionMapping) === null || _35 === void 0 ? void 0 : _35.keys[KEYS.LEFT]) || TREE_ACTIONS.DRILL_DOWN;\r\n }\r\n }\r\n get hasChildrenField() { return this.options.hasChildrenField || 'hasChildren'; }\r\n get childrenField() { return this.options.childrenField || 'children'; }\r\n get displayField() { return this.options.displayField || 'name'; }\r\n get idField() { return this.options.idField || 'id'; }\r\n get isExpandedField() { return this.options.isExpandedField || 'isExpanded'; }\r\n get getChildren() { return this.options.getChildren; }\r\n get levelPadding() { return this.options.levelPadding || 0; }\r\n get useVirtualScroll() { return this.options.useVirtualScroll; }\r\n get animateExpand() { return this.options.animateExpand; }\r\n get animateSpeed() { return this.options.animateSpeed || 1; }\r\n get animateAcceleration() { return this.options.animateAcceleration || 1.2; }\r\n get scrollOnActivate() { return this.options.scrollOnActivate === undefined ? true : this.options.scrollOnActivate; }\r\n get rtl() { return !!this.options.rtl; }\r\n get rootId() { return this.options.rootId; }\r\n get useCheckbox() { return this.options.useCheckbox; }\r\n get useTriState() { return this.options.useTriState === undefined ? true : this.options.useTriState; }\r\n get scrollContainer() { return this.options.scrollContainer; }\r\n get allowDragoverStyling() { return this.options.allowDragoverStyling === undefined ? true : this.options.allowDragoverStyling; }\r\n getNodeClone(node) {\r\n if (this.options.getNodeClone) {\r\n return this.options.getNodeClone(node);\r\n }\r\n // remove id from clone\r\n // keeping ie11 compatibility\r\n const nodeClone = Object.assign({}, node.data);\r\n if (nodeClone.id) {\r\n delete nodeClone.id;\r\n }\r\n return nodeClone;\r\n }\r\n allowDrop(element, to, $event) {\r\n if (this.options.allowDrop instanceof Function) {\r\n return this.options.allowDrop(element, to, $event);\r\n }\r\n else {\r\n return this.options.allowDrop === undefined ? true : this.options.allowDrop;\r\n }\r\n }\r\n allowDrag(node) {\r\n if (this.options.allowDrag instanceof Function) {\r\n return this.options.allowDrag(node);\r\n }\r\n else {\r\n return this.options.allowDrag;\r\n }\r\n }\r\n nodeClass(node) {\r\n return this.options.nodeClass ? this.options.nodeClass(node) : '';\r\n }\r\n nodeHeight(node) {\r\n if (node.data.virtual) {\r\n return 0;\r\n }\r\n let nodeHeight = this.options.nodeHeight || 22;\r\n if (typeof nodeHeight === 'function') {\r\n nodeHeight = nodeHeight(node);\r\n }\r\n // account for drop slots:\r\n return nodeHeight + (node.index === 0 ? 2 : 1) * this.dropSlotHeight;\r\n }\r\n get dropSlotHeight() {\r\n return typeof this.options.dropSlotHeight === 'number' ? this.options.dropSlotHeight : 2;\r\n }\r\n}\n\nconst TREE_EVENTS = {\r\n toggleExpanded: 'toggleExpanded',\r\n activate: 'activate',\r\n deactivate: 'deactivate',\r\n nodeActivate: 'nodeActivate',\r\n nodeDeactivate: 'nodeDeactivate',\r\n select: 'select',\r\n deselect: 'deselect',\r\n focus: 'focus',\r\n blur: 'blur',\r\n initialized: 'initialized',\r\n updateData: 'updateData',\r\n moveNode: 'moveNode',\r\n copyNode: 'copyNode',\r\n event: 'event',\r\n loadNodeChildren: 'loadNodeChildren',\r\n changeFilter: 'changeFilter',\r\n stateChange: 'stateChange'\r\n};\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nclass TreeNode {\r\n constructor(data, parent, treeModel, index) {\r\n this.data = data;\r\n this.parent = parent;\r\n this.treeModel = treeModel;\r\n this.position = 0;\r\n this.allowDrop = (element, $event) => {\r\n return this.options.allowDrop(element, { parent: this, index: 0 }, $event);\r\n };\r\n this.allowDragoverStyling = () => {\r\n return this.options.allowDragoverStyling;\r\n };\r\n if (this.id === undefined || this.id === null) {\r\n this.id = uuid();\r\n } // Make sure there's a unique id without overriding existing ids to work with immutable data structures\r\n this.index = index;\r\n if (this.getField('children')) {\r\n this._initChildren();\r\n }\r\n this.autoLoadChildren();\r\n }\r\n get isHidden() { return this.treeModel.isHidden(this); }\r\n ;\r\n get isExpanded() { return this.treeModel.isExpanded(this); }\r\n ;\r\n get isActive() { return this.treeModel.isActive(this); }\r\n ;\r\n get isFocused() { return this.treeModel.isNodeFocused(this); }\r\n ;\r\n get isSelected() {\r\n if (this.isSelectable()) {\r\n return this.treeModel.isSelected(this);\r\n }\r\n else {\r\n return this.children.some((node) => node.isSelected);\r\n }\r\n }\r\n ;\r\n get isAllSelected() {\r\n if (this.isSelectable()) {\r\n return this.treeModel.isSelected(this);\r\n }\r\n else {\r\n return this.children.every((node) => node.isAllSelected);\r\n }\r\n }\r\n ;\r\n get isPartiallySelected() {\r\n return this.isSelected && !this.isAllSelected;\r\n }\r\n get level() {\r\n return this.parent ? this.parent.level + 1 : 0;\r\n }\r\n get path() {\r\n return this.parent ? [...this.parent.path, this.id] : [];\r\n }\r\n get elementRef() {\r\n throw `Element Ref is no longer supported since introducing virtual scroll\\n\r\n You may use a template to obtain a reference to the element`;\r\n }\r\n get originalNode() { return this._originalNode; }\r\n ;\r\n // helper get functions:\r\n get hasChildren() {\r\n return !!(this.getField('hasChildren') || (this.children && this.children.length > 0));\r\n }\r\n get isCollapsed() { return !this.isExpanded; }\r\n get isLeaf() { return !this.hasChildren; }\r\n get isRoot() { return this.parent.data.virtual; }\r\n get realParent() { return this.isRoot ? null : this.parent; }\r\n // proxy functions:\r\n get options() { return this.treeModel.options; }\r\n fireEvent(event) { this.treeModel.fireEvent(event); }\r\n // field accessors:\r\n get displayField() {\r\n return this.getField('display');\r\n }\r\n get id() {\r\n return this.getField('id');\r\n }\r\n set id(value) {\r\n this.setField('id', value);\r\n }\r\n getField(key) {\r\n return this.data[this.options[`${key}Field`]];\r\n }\r\n setField(key, value) {\r\n this.data[this.options[`${key}Field`]] = value;\r\n }\r\n // traversing:\r\n _findAdjacentSibling(steps, skipHidden = false) {\r\n const siblings = this._getParentsChildren(skipHidden);\r\n const index = siblings.indexOf(this);\r\n return siblings.length > index + steps ? siblings[index + steps] : null;\r\n }\r\n findNextSibling(skipHidden = false) {\r\n return this._findAdjacentSibling(+1, skipHidden);\r\n }\r\n findPreviousSibling(skipHidden = false) {\r\n return this._findAdjacentSibling(-1, skipHidden);\r\n }\r\n getVisibleChildren() {\r\n return this.visibleChildren;\r\n }\r\n get visibleChildren() {\r\n return (this.children || []).filter((node) => !node.isHidden);\r\n }\r\n getFirstChild(skipHidden = false) {\r\n let children = skipHidden ? this.visibleChildren : this.children;\r\n return children != null && children.length ? children[0] : null;\r\n }\r\n getLastChild(skipHidden = false) {\r\n let children = skipHidden ? this.visibleChildren : this.children;\r\n return children != null && children.length ? children[children.length - 1] : null;\r\n }\r\n findNextNode(goInside = true, skipHidden = false) {\r\n return goInside && this.isExpanded && this.getFirstChild(skipHidden) ||\r\n this.findNextSibling(skipHidden) ||\r\n this.parent && this.parent.findNextNode(false, skipHidden);\r\n }\r\n findPreviousNode(skipHidden = false) {\r\n let previousSibling = this.findPreviousSibling(skipHidden);\r\n if (!previousSibling) {\r\n return this.realParent;\r\n }\r\n return previousSibling._getLastOpenDescendant(skipHidden);\r\n }\r\n _getLastOpenDescendant(skipHidden = false) {\r\n const lastChild = this.getLastChild(skipHidden);\r\n return (this.isCollapsed || !lastChild)\r\n ? this\r\n : lastChild._getLastOpenDescendant(skipHidden);\r\n }\r\n _getParentsChildren(skipHidden = false) {\r\n const children = this.parent &&\r\n (skipHidden ? this.parent.getVisibleChildren() : this.parent.children);\r\n return children || [];\r\n }\r\n getIndexInParent(skipHidden = false) {\r\n return this._getParentsChildren(skipHidden).indexOf(this);\r\n }\r\n isDescendantOf(node) {\r\n if (this === node)\r\n return true;\r\n else\r\n return this.parent && this.parent.isDescendantOf(node);\r\n }\r\n getNodePadding() {\r\n return this.options.levelPadding * (this.level - 1) + 'px';\r\n }\r\n getClass() {\r\n return [this.options.nodeClass(this), `tree-node-level-${this.level}`].join(' ');\r\n }\r\n onDrop($event) {\r\n this.mouseAction('drop', $event.event, {\r\n from: $event.element,\r\n to: { parent: this, index: 0, dropOnNode: true }\r\n });\r\n }\r\n allowDrag() {\r\n return this.options.allowDrag(this);\r\n }\r\n // helper methods:\r\n loadNodeChildren() {\r\n if (!this.options.getChildren) {\r\n return Promise.resolve(); // Not getChildren method - for using redux\r\n }\r\n return Promise.resolve(this.options.getChildren(this))\r\n .then((children) => {\r\n if (children) {\r\n this.setField('children', children);\r\n this._initChildren();\r\n if (this.options.useTriState && this.treeModel.isSelected(this)) {\r\n this.setIsSelected(true);\r\n }\r\n this.children.forEach((child) => {\r\n if (child.getField('isExpanded') && child.hasChildren) {\r\n child.expand();\r\n }\r\n });\r\n }\r\n }).then(() => {\r\n this.fireEvent({\r\n eventName: TREE_EVENTS.loadNodeChildren,\r\n node: this\r\n });\r\n });\r\n }\r\n expand() {\r\n if (!this.isExpanded) {\r\n this.toggleExpanded();\r\n }\r\n return this;\r\n }\r\n collapse() {\r\n if (this.isExpanded) {\r\n this.toggleExpanded();\r\n }\r\n return this;\r\n }\r\n doForAll(fn) {\r\n Promise.resolve(fn(this)).then(() => {\r\n if (this.children) {\r\n this.children.forEach((child) => child.doForAll(fn));\r\n }\r\n });\r\n }\r\n expandAll() {\r\n this.doForAll((node) => node.expand());\r\n }\r\n collapseAll() {\r\n this.doForAll((node) => node.collapse());\r\n }\r\n ensureVisible() {\r\n if (this.realParent) {\r\n this.realParent.expand();\r\n this.realParent.ensureVisible();\r\n }\r\n return this;\r\n }\r\n toggleExpanded() {\r\n this.setIsExpanded(!this.isExpanded);\r\n return this;\r\n }\r\n setIsExpanded(value) {\r\n if (this.hasChildren) {\r\n this.treeModel.setExpandedNode(this, value);\r\n }\r\n return this;\r\n }\r\n ;\r\n autoLoadChildren() {\r\n this.handler =\r\n reaction(() => this.isExpanded, (isExpanded) => {\r\n if (!this.children && this.hasChildren && isExpanded) {\r\n this.loadNodeChildren();\r\n }\r\n }, { fireImmediately: true });\r\n }\r\n dispose() {\r\n if (this.children) {\r\n this.children.forEach((child) => child.dispose());\r\n }\r\n if (this.handler) {\r\n this.handler();\r\n }\r\n this.parent = null;\r\n this.children = null;\r\n }\r\n setIsActive(value, multi = false) {\r\n this.treeModel.setActiveNode(this, value, multi);\r\n if (value) {\r\n this.focus(this.options.scrollOnActivate);\r\n }\r\n return this;\r\n }\r\n isSelectable() {\r\n return this.isLeaf || !this.children || !this.options.useTriState;\r\n }\r\n setIsSelected(value) {\r\n if (this.isSelectable()) {\r\n this.treeModel.setSelectedNode(this, value);\r\n }\r\n else {\r\n this.visibleChildren.forEach((child) => child.setIsSelected(value));\r\n }\r\n return this;\r\n }\r\n toggleSelected() {\r\n this.setIsSelected(!this.isSelected);\r\n return this;\r\n }\r\n toggleActivated(multi = false) {\r\n this.setIsActive(!this.isActive, multi);\r\n return this;\r\n }\r\n setActiveAndVisible(multi = false) {\r\n this.setIsActive(true, multi)\r\n .ensureVisible();\r\n setTimeout(this.scrollIntoView.bind(this));\r\n return this;\r\n }\r\n scrollIntoView(force = false) {\r\n this.treeModel.virtualScroll.scrollIntoView(this, force);\r\n }\r\n focus(scroll = true) {\r\n let previousNode = this.treeModel.getFocusedNode();\r\n this.treeModel.setFocusedNode(this);\r\n if (scroll) {\r\n this.scrollIntoView();\r\n }\r\n if (previousNode) {\r\n this.fireEvent({ eventName: TREE_EVENTS.blur, node: previousNode });\r\n }\r\n this.fireEvent({ eventName: TREE_EVENTS.focus, node: this });\r\n return this;\r\n }\r\n blur() {\r\n let previousNode = this.treeModel.getFocusedNode();\r\n this.treeModel.setFocusedNode(null);\r\n if (previousNode) {\r\n this.fireEvent({ eventName: TREE_EVENTS.blur, node: this });\r\n }\r\n return this;\r\n }\r\n setIsHidden(value) {\r\n this.treeModel.setIsHidden(this, value);\r\n }\r\n hide() {\r\n this.setIsHidden(true);\r\n }\r\n show() {\r\n this.setIsHidden(false);\r\n }\r\n mouseAction(actionName, $event, data = null) {\r\n this.treeModel.setFocus(true);\r\n const actionMapping = this.options.actionMapping.mouse;\r\n const mouseAction = actionMapping[actionName];\r\n if (mouseAction) {\r\n mouseAction(this.treeModel, this, $event, data);\r\n }\r\n }\r\n getSelfHeight() {\r\n return this.options.nodeHeight(this);\r\n }\r\n _initChildren() {\r\n this.children = this.getField('children')\r\n .map((c, index) => new TreeNode(c, this, this.treeModel, index));\r\n }\r\n}\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isHidden\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isExpanded\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isActive\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isFocused\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isSelected\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isAllSelected\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"isPartiallySelected\", null);\r\n__decorate([\r\n observable$1,\r\n __metadata(\"design:type\", Array)\r\n], TreeNode.prototype, \"children\", void 0);\r\n__decorate([\r\n observable$1,\r\n __metadata(\"design:type\", Number)\r\n], TreeNode.prototype, \"index\", void 0);\r\n__decorate([\r\n observable$1,\r\n __metadata(\"design:type\", Object)\r\n], TreeNode.prototype, \"position\", void 0);\r\n__decorate([\r\n observable$1,\r\n __metadata(\"design:type\", Number)\r\n], TreeNode.prototype, \"height\", void 0);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Number),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"level\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Array),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"path\", null);\r\n__decorate([\r\n computed$1,\r\n __metadata(\"design:type\", Object),\r\n __metadata(\"design:paramtypes\", [])\r\n], TreeNode.prototype, \"visibleChildren\", null);\r\n__decorate([\r\n action$1,\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [Object]),\r\n __metadata(\"design:returntype\", void 0)\r\n], TreeNode.prototype, \"setIsSelected\", null);\r\n__decorate([\r\n action$1,\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", []),\r\n __metadata(\"design:returntype\", void 0)\r\n], TreeNode.prototype, \"_initChildren\", null);\r\nfunction uuid() {\r\n return Math.floor(Math.random() * 10000000000000);\r\n}\n\nvar __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata$1 = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nclass TreeModel {\r\n constructor() {\r\n this.options = new TreeOptions();\r\n this.eventNames = Object.keys(TREE_EVENTS);\r\n this.expandedNodeIds = {};\r\n this.selectedLeafNodeIds = {};\r\n this.activeNodeIds = {};\r\n this.hiddenNodeIds = {};\r\n this.focusedNodeId = null;\r\n this.firstUpdate = true;\r\n this.subscriptions = [];\r\n }\r\n // events\r\n fireEvent(event) {\r\n event.treeModel = this;\r\n this.events[event.eventName].emit(event);\r\n this.events.event.emit(event);\r\n }\r\n subscribe(eventName, fn) {\r\n const subscription = this.events[eventName].subscribe(fn);\r\n this.subscriptions.push(subscription);\r\n }\r\n // getters\r\n getFocusedNode() {\r\n return this.focusedNode;\r\n }\r\n getActiveNode() {\r\n return this.activeNodes[0];\r\n }\r\n getActiveNodes() {\r\n return this.activeNodes;\r\n }\r\n getVisibleRoots() {\r\n return this.virtualRoot.visibleChildren;\r\n }\r\n getFirstRoot(skipHidden = false) {\r\n const root = skipHidden ? this.getVisibleRoots() : this.roots;\r\n return root != null && root.length ? root[0] : null;\r\n }\r\n getLastRoot(skipHidden = false) {\r\n const root = skipHidden ? this.getVisibleRoots() : this.roots;\r\n return root != null && root.length ? root[root.length - 1] : null;\r\n }\r\n get isFocused() {\r\n return TreeModel.focusedTree === this;\r\n }\r\n isNodeFocused(node) {\r\n return this.focusedNode === node;\r\n }\r\n isEmptyTree() {\r\n return this.roots && this.roots.length === 0;\r\n }\r\n get focusedNode() {\r\n return this.focusedNodeId ? this.getNodeById(this.focusedNodeId) : null;\r\n }\r\n get expandedNodes() {\r\n const nodes = Object.keys(this.expandedNodeIds)\r\n .filter((id) => this.expandedNodeIds[id])\r\n .map((id) => this.getNodeById(id));\r\n return nodes.filter(Boolean);\r\n }\r\n get activeNodes() {\r\n const nodes = Object.keys(this.activeNodeIds)\r\n .filter((id) => this.activeNodeIds[id])\r\n .map((id) => this.getNodeById(id));\r\n return nodes.filter(Boolean);\r\n }\r\n get hiddenNodes() {\r\n const nodes = Object.keys(this.hiddenNodeIds)\r\n .filter((id) => this.hiddenNodeIds[id])\r\n .map((id) => this.getNodeById(id));\r\n return nodes.filter(Boolean);\r\n }\r\n get selectedLeafNodes() {\r\n const nodes = Object.keys(this.selectedLeafNodeIds)\r\n .filter((id) => this.selectedLeafNodeIds[id])\r\n .map((id) => this.getNodeById(id));\r\n return nodes.filter(Boolean);\r\n }\r\n // locating nodes\r\n getNodeByPath(path, startNode = null) {\r\n if (!path)\r\n return null;\r\n startNode = startNode || this.virtualRoot;\r\n if (path.length === 0)\r\n return startNode;\r\n if (!startNode.children)\r\n return null;\r\n const childId = path.shift();\r\n const childNode = startNode.children.find(c => c.id === childId);\r\n if (!childNode)\r\n return null;\r\n return this.getNodeByPath(path, childNode);\r\n }\r\n getNodeById(id) {\r\n const idStr = id.toString();\r\n return this.getNodeBy((node) => node.id.toString() === idStr);\r\n }\r\n getNodeBy(predicate, startNode = null) {\r\n startNode = startNode || this.virtualRoot;\r\n if (!startNode.children)\r\n return null;\r\n const found = startNode.children.find(predicate);\r\n if (found) { // found in children\r\n return found;\r\n }\r\n else { // look in children's children\r\n for (let child of startNode.children) {\r\n const foundInChildren = this.getNodeBy(predicate, child);\r\n if (foundInChildren)\r\n return foundInChildren;\r\n }\r\n }\r\n }\r\n isExpanded(node) {\r\n return this.expandedNodeIds[node.id];\r\n }\r\n isHidden(node) {\r\n return this.hiddenNodeIds[node.id];\r\n }\r\n isActive(node) {\r\n return this.activeNodeIds[node.id];\r\n }\r\n isSelected(node) {\r\n return this.selectedLeafNodeIds[node.id];\r\n }\r\n ngOnDestroy() {\r\n this.dispose();\r\n this.unsubscribeAll();\r\n }\r\n dispose() {\r\n // Dispose reactions of the replaced nodes\r\n if (this.virtualRoot) {\r\n this.virtualRoot.dispose();\r\n }\r\n }\r\n unsubscribeAll() {\r\n this.subscriptions.forEach(subscription => subscription.unsubscribe());\r\n this.subscriptions = [];\r\n }\r\n // actions\r\n setData({ nodes, options = null, events = null }) {\r\n if (options) {\r\n this.options = new TreeOptions(options);\r\n }\r\n if (events) {\r\n this.events = events;\r\n }\r\n if (nodes) {\r\n this.nodes = nodes;\r\n }\r\n this.update();\r\n }\r\n update() {\r\n // Rebuild tree:\r\n let virtualRootConfig = {\r\n id: this.options.rootId,\r\n virtual: true,\r\n [this.options.childrenField]: this.nodes\r\n };\r\n this.dispose();\r\n this.virtualRoot = new TreeNode(virtualRootConfig, null, this, 0);\r\n this.roots = this.virtualRoot.children;\r\n // Fire event:\r\n if (this.firstUpdate) {\r\n if (this.roots) {\r\n this.firstUpdate = false;\r\n this._calculateExpandedNodes();\r\n }\r\n }\r\n else {\r\n this.fireEvent({ eventName: TREE_EVENTS.updateData });\r\n }\r\n }\r\n setFocusedNode(node) {\r\n this.focusedNodeId = node ? node.id : null;\r\n }\r\n setFocus(value) {\r\n TreeModel.focusedTree = value ? this : null;\r\n }\r\n doForAll(fn) {\r\n this.roots.forEach((root) => root.doForAll(fn));\r\n }\r\n focusNextNode() {\r\n let previousNode = this.getFocusedNode();\r\n let nextNode = previousNode ? previousNode.findNextNode(true, true) : this.getFirstRoot(true);\r\n if (nextNode)\r\n nextNode.focus();\r\n }\r\n focusPreviousNode() {\r\n let previousNode = this.getFocusedNode();\r\n let nextNode = previousNode ? previousNode.findPreviousNode(true) : this.getLastRoot(true);\r\n if (nextNode)\r\n nextNode.focus();\r\n }\r\n focusDrillDown() {\r\n let previousNode = this.getFocusedNode();\r\n if (previousNode && previousNode.isCollapsed && previousNode.hasChildren) {\r\n previousNode.toggleExpanded();\r\n }\r\n else {\r\n let nextNode = previousNode ? previousNode.getFirstChild(true) : this.getFirstRoot(true);\r\n if (nextNode)\r\n nextNode.focus();\r\n }\r\n }\r\n focusDrillUp() {\r\n let previousNode = this.getFocusedNode();\r\n if (!previousNode)\r\n return;\r\n if (previousNode.isExpanded) {\r\n previousNode.toggleExpanded();\r\n }\r\n else {\r\n let nextNode = previousNode.realParent;\r\n if (nextNode)\r\n nextNode.focus();\r\n }\r\n }\r\n setActiveNode(node, value, multi = false) {\r\n if (multi) {\r\n this._setActiveNodeMulti(node, value);\r\n }\r\n else {\r\n this._setActiveNodeSingle(node, value);\r\n }\r\n if (value) {\r\n node.focus(this.options.scrollOnActivate);\r\n this.fireEvent({ eventName: TREE_EVENTS.activate, node });\r\n this.fireEvent({ eventName: TREE_EVENTS.nodeActivate, node }); // For IE11\r\n }\r\n else {\r\n this.fireEvent({ eventName: TREE_EVENTS.deactivate, node });\r\n this.fireEvent({ eventName: TREE_EVENTS.nodeDeactivate, node }); // For IE11\r\n }\r\n }\r\n setSelectedNode(node, value) {\r\n this.selectedLeafNodeIds = Object.assign({}, this.selectedLeafNodeIds, { [node.id]: value });\r\n if (value) {\r\n node.focus();\r\n this.fireEvent({ eventName: TREE_EVENTS.select, node });\r\n }\r\n else {\r\n this.fireEvent({ eventName: TREE_EVENTS.deselect, node });\r\n }\r\n }\r\n setExpandedNode(node, value) {\r\n this.expandedNodeIds = Object.assign({}, this.expandedNodeIds, { [node.id]: value });\r\n this.fireEvent({ eventName: TREE_EVENTS.toggleExpanded, node, isExpanded: value });\r\n }\r\n expandAll() {\r\n this.roots.forEach((root) => root.expandAll());\r\n }\r\n collapseAll() {\r\n this.roots.forEach((root) => root.collapseAll());\r\n }\r\n setIsHidden(node, value) {\r\n this.hiddenNodeIds = Object.assign({}, this.hiddenNodeIds, { [node.id]: value });\r\n }\r\n setHiddenNodeIds(nodeIds) {\r\n this.hiddenNodeIds = nodeIds.reduce((hiddenNodeIds, id) => Object.assign(hiddenNodeIds, {\r\n [id]: true\r\n }), {});\r\n }\r\n performKeyAction(node, $event) {\r\n const keyAction = this.options.actionMapping.keys[$event.keyCode];\r\n if (keyAction) {\r\n $event.preventDefault();\r\n keyAction(this, node, $event);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n filterNodes(filter, autoShow = true) {\r\n let filterFn;\r\n if (!filter) {\r\n return this.clearFilter();\r\n }\r\n // support function and string filter\r\n if (filter && typeof filter.valueOf() === 'string') {\r\n filterFn = (node) => node.displayField.toLowerCase().indexOf(filter.toLowerCase()) !== -1;\r\n }\r\n else if (filter && typeof filter === 'function') {\r\n filterFn = filter;\r\n }\r\n else {\r\n console.error('Don\\'t know what to do with filter', filter);\r\n console.error('Should be either a string or function');\r\n return;\r\n }\r\n const ids = {};\r\n this.roots.forEach((node) => this._filterNode(ids, node, filterFn, autoShow));\r\n this.hiddenNodeIds = ids;\r\n this.fireEvent({ eventName: TREE_EVENTS.changeFilter });\r\n }\r\n clearFilter() {\r\n this.hiddenNodeIds = {};\r\n this.fireEvent({ eventName: TREE_EVENTS.changeFilter });\r\n }\r\n moveNode(node, to) {\r\n const fromIndex = node.getIndexInParent();\r\n const fromParent = node.parent;\r\n if (!this.canMoveNode(node, to, fromIndex))\r\n return;\r\n const fromChildren = fromParent.getField('children');\r\n // If node doesn't have children - create children array\r\n if (!to.parent.getField('children')) {\r\n to.parent.setField('children', []);\r\n }\r\n const toChildren = to.parent.getField('children');\r\n const originalNode = fromChildren.splice(fromIndex, 1)[0];\r\n // Compensate for index if already removed from parent:\r\n let toIndex = (fromParent === to.parent && to.index > fromIndex) ? to.index - 1 : to.index;\r\n toChildren.splice(toIndex, 0, originalNode);\r\n fromParent.treeModel.update();\r\n if (to.parent.treeModel !== fromParent.treeModel) {\r\n to.parent.treeModel.update();\r\n }\r\n this.fireEvent({\r\n eventName: TREE_EVENTS.moveNode,\r\n node: originalNode,\r\n to: { parent: to.parent.data, index: toIndex },\r\n from: { parent: fromParent.data, index: fromIndex }\r\n });\r\n }\r\n copyNode(node, to) {\r\n const fromIndex = node.getIndexInParent();\r\n if (!this.canMoveNode(node, to, fromIndex))\r\n return;\r\n // If node doesn't have children - create children array\r\n if (!to.parent.getField('children')) {\r\n to.parent.setField('children', []);\r\n }\r\n const toChildren = to.parent.getField('children');\r\n const nodeCopy = this.options.getNodeClone(node);\r\n toChildren.splice(to.index, 0, nodeCopy);\r\n node.treeModel.update();\r\n if (to.parent.treeModel !== node.treeModel) {\r\n to.parent.treeModel.update();\r\n }\r\n this.fireEvent({ eventName: TREE_EVENTS.copyNode, node: nodeCopy, to: { parent: to.parent.data, index: to.index } });\r\n }\r\n getState() {\r\n return {\r\n expandedNodeIds: this.expandedNodeIds,\r\n selectedLeafNodeIds: this.selectedLeafNodeIds,\r\n activeNodeIds: this.activeNodeIds,\r\n hiddenNodeIds: this.hiddenNodeIds,\r\n focusedNodeId: this.focusedNodeId\r\n };\r\n }\r\n setState(state) {\r\n if (!state)\r\n return;\r\n Object.assign(this, {\r\n expandedNodeIds: state.expandedNodeIds || {},\r\n selectedLeafNodeIds: state.selectedLeafNodeIds || {},\r\n activeNodeIds: state.activeNodeIds || {},\r\n hiddenNodeIds: state.hiddenNodeIds || {},\r\n focusedNodeId: state.focusedNodeId\r\n });\r\n }\r\n subscribeToState(fn) {\r\n autorun(() => fn(this.getState()));\r\n }\r\n canMoveNode(node, to, fromIndex = undefined) {\r\n const fromNodeIndex = fromIndex || node.getIndexInParent();\r\n // same node:\r\n if (node.parent === to.parent && fromIndex === to.index) {\r\n return false;\r\n }\r\n return !to.parent.isDescendantOf(node);\r\n }\r\n calculateExpandedNodes() {\r\n this._calculateExpandedNodes();\r\n }\r\n // private methods\r\n _filterNode(ids, node, filterFn, autoShow) {\r\n // if node passes function then it's visible\r\n let isVisible = filterFn(node);\r\n if (node.children) {\r\n // if one of node's children passes filter then this node is also visible\r\n node.children.forEach((child) => {\r\n if (this._filterNode(ids, child, filterFn, autoShow)) {\r\n isVisible = true;\r\n }\r\n });\r\n }\r\n // mark node as hidden\r\n if (!isVisible) {\r\n ids[node.id] = true;\r\n }\r\n // auto expand parents to make sure the filtered nodes are visible\r\n if (autoShow && isVisible) {\r\n node.ensureVisible();\r\n }\r\n return isVisible;\r\n }\r\n _calculateExpandedNodes(startNode = null) {\r\n startNode = startNode || this.virtualRoot;\r\n if (startNode.data[this.options.isExpandedField]) {\r\n this.expandedNodeIds = Object.assign({}, this.expandedNodeIds, { [startNode.id]: true });\r\n }\r\n if (startNode.children) {\r\n startNode.children.forEach((child) => this._calculateExpandedNodes(child));\r\n }\r\n }\r\n _setActiveNodeSingle(node, value) {\r\n // Deactivate all other nodes:\r\n this.activeNodes\r\n .filter((activeNode) => activeNode !== node)\r\n .forEach((activeNode) => {\r\n this.fireEvent({ eventName: TREE_EVENTS.deactivate, node: activeNode });\r\n this.fireEvent({ eventName: TREE_EVENTS.nodeDeactivate, node: activeNode }); // For IE11\r\n });\r\n if (value) {\r\n this.activeNodeIds = { [node.id]: true };\r\n }\r\n else {\r\n this.activeNodeIds = {};\r\n }\r\n }\r\n _setActiveNodeMulti(node, value) {\r\n this.activeNodeIds = Object.assign({}, this.activeNodeIds, { [node.id]: value });\r\n }\r\n}\nTreeModel.ɵfac = function TreeModel_Factory(t) { return new (t || TreeModel)(); };\nTreeModel.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: TreeModel, factory: TreeModel.ɵfac });\r\nTreeModel.focusedTree = null;\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Array)\r\n], TreeModel.prototype, \"roots\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Object)\r\n], TreeModel.prototype, \"expandedNodeIds\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Object)\r\n], TreeModel.prototype, \"selectedLeafNodeIds\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Object)\r\n], TreeModel.prototype, \"activeNodeIds\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Object)\r\n], TreeModel.prototype, \"hiddenNodeIds\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", Object)\r\n], TreeModel.prototype, \"focusedNodeId\", void 0);\r\n__decorate$1([\r\n observable$1,\r\n __metadata$1(\"design:type\", TreeNode)\r\n], TreeModel.prototype, \"virtualRoot\", void 0);\r\n__decorate$1([\r\n computed$1,\r\n __metadata$1(\"design:type\", Object),\r\n __metadata$1(\"design:paramtypes\", [])\r\n], TreeModel.prototype, \"focusedNode\", null);\r\n__decorate$1([\r\n computed$1,\r\n __metadata$1(\"design:type\", Object),\r\n __metadata$1(\"design:paramtypes\", [])\r\n], TreeModel.prototype, \"expandedNodes\", null);\r\n__decorate$1([\r\n computed$1,\r\n __metadata$1(\"design:type\", Object),\r\n __metadata$1(\"design:paramtypes\", [])\r\n], TreeModel.prototype, \"activeNodes\", null);\r\n__decorate$1([\r\n computed$1,\r\n __metadata$1(\"design:type\", Object),\r\n __metadata$1(\"design:paramtypes\", [])\r\n], TreeModel.prototype, \"hiddenNodes\", null);\r\n__decorate$1([\r\n computed$1,\r\n __metadata$1(\"design:type\", Object),\r\n __metadata$1(\"design:paramtypes\", [])\r\n], TreeModel.prototype, \"selectedLeafNodes\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setData\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"update\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setFocusedNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setFocus\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"doForAll\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"focusNextNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"focusPreviousNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"focusDrillDown\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"focusDrillUp\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setActiveNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setSelectedNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setExpandedNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"expandAll\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"collapseAll\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setIsHidden\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setHiddenNodeIds\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"filterNodes\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", []),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"clearFilter\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"moveNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object, Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"copyNode\", null);\r\n__decorate$1([\r\n action$1,\r\n __metadata$1(\"design:type\", Function),\r\n __metadata$1(\"design:paramtypes\", [Object]),\r\n __metadata$1(\"design:returntype\", void 0)\r\n], TreeModel.prototype, \"setState\", null);\n\nclass TreeDraggedElement {\r\n constructor() {\r\n this._draggedElement = null;\r\n }\r\n set(draggedElement) {\r\n this._draggedElement = draggedElement;\r\n }\r\n get() {\r\n return this._draggedElement;\r\n }\r\n isDragging() {\r\n return !!this.get();\r\n }\r\n}\nTreeDraggedElement.ɵfac = function TreeDraggedElement_Factory(t) { return new (t || TreeDraggedElement)(); };\r\n/** @nocollapse */ TreeDraggedElement.ɵprov = ɵɵdefineInjectable({ factory: function TreeDraggedElement_Factory() { return new TreeDraggedElement(); }, token: TreeDraggedElement, providedIn: \"root\" });\n\nvar __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata$2 = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nconst Y_OFFSET = 500; // Extra pixels outside the viewport, in each direction, to render nodes in\r\nconst Y_EPSILON = 150; // Minimum pixel change required to recalculate the rendered nodes\r\nclass TreeVirtualScroll {\r\n constructor(treeModel) {\r\n this.treeModel = treeModel;\r\n this.yBlocks = 0;\r\n this.x = 0;\r\n this.viewportHeight = null;\r\n this.viewport = null;\r\n treeModel.virtualScroll = this;\r\n this._dispose = [autorun(() => this.fixScroll())];\r\n }\r\n get y() {\r\n return this.yBlocks * Y_EPSILON;\r\n }\r\n get totalHeight() {\r\n return this.treeModel.virtualRoot ? this.treeModel.virtualRoot.height : 0;\r\n }\r\n fireEvent(event) {\r\n this.treeModel.fireEvent(event);\r\n }\r\n init() {\r\n const fn = this.recalcPositions.bind(this);\r\n fn();\r\n this._dispose = [\r\n ...this._dispose,\r\n reaction(() => this.treeModel.roots, fn),\r\n reaction(() => this.treeModel.expandedNodeIds, fn),\r\n reaction(() => this.treeModel.hiddenNodeIds, fn)\r\n ];\r\n this.treeModel.subscribe(TREE_EVENTS.loadNodeChildren, fn);\r\n }\r\n isEnabled() {\r\n return this.treeModel.options.useVirtualScroll;\r\n }\r\n _setYBlocks(value) {\r\n this.yBlocks = value;\r\n }\r\n recalcPositions() {\r\n this.treeModel.virtualRoot.height = this._getPositionAfter(this.treeModel.getVisibleRoots(), 0);\r\n }\r\n _getPositionAfter(nodes, startPos) {\r\n let position = startPos;\r\n nodes.forEach((node) => {\r\n node.position = position;\r\n position = this._getPositionAfterNode(node, position);\r\n });\r\n return position;\r\n }\r\n _getPositionAfterNode(node, startPos) {\r\n let position = node.getSelfHeight() + startPos;\r\n if (node.children && node.isExpanded) { // TBD: consider loading component as well\r\n position = this._getPositionAfter(node.visibleChildren, position);\r\n }\r\n node.height = position - startPos;\r\n return position;\r\n }\r\n clear() {\r\n this._dispose.forEach((d) => d());\r\n }\r\n setViewport(viewport) {\r\n Object.assign(this, {\r\n viewport,\r\n x: viewport.scrollLeft,\r\n yBlocks: Math.round(viewport.scrollTop / Y_EPSILON),\r\n viewportHeight: viewport.getBoundingClientRect ? viewport.getBoundingClientRect().height : 0\r\n });\r\n }\r\n scrollIntoView(node, force, scrollToMiddle = true) {\r\n if (node.options.scrollContainer) {\r\n const scrollContainer = node.options.scrollContainer;\r\n const scrollContainerHeight = scrollContainer.getBoundingClientRect().height;\r\n const scrollContainerTop = scrollContainer.getBoundingClientRect().top;\r\n const nodeTop = this.viewport.getBoundingClientRect().top + node.position - scrollContainerTop;\r\n if (force || // force scroll to node\r\n nodeTop < scrollContainer.scrollTop || // node is above scroll container\r\n nodeTop + node.getSelfHeight() > scrollContainer.scrollTop + scrollContainerHeight) { // node is below container\r\n scrollContainer.scrollTop = scrollToMiddle ?\r\n nodeTop - scrollContainerHeight / 2 : // scroll to middle\r\n nodeTop; // scroll to start\r\n }\r\n }\r\n else {\r\n if (force || // force scroll to node\r\n node.position < this.y || // node is above viewport\r\n node.position + node.getSelfHeight() > this.y + this.viewportHeight) { // node is below viewport\r\n if (this.viewport) {\r\n this.viewport.scrollTop = scrollToMiddle ?\r\n node.position - this.viewportHeight / 2 : // scroll to middle\r\n node.position; // scroll to start\r\n this._setYBlocks(Math.floor(this.viewport.scrollTop / Y_EPSILON));\r\n }\r\n }\r\n }\r\n }\r\n getViewportNodes(nodes) {\r\n if (!nodes)\r\n return [];\r\n const visibleNodes = nodes.filter((node) => !node.isHidden);\r\n if (!this.isEnabled())\r\n return visibleNodes;\r\n if (!this.viewportHeight || !visibleNodes.length)\r\n return [];\r\n // When loading children async this method is called before their height and position is calculated.\r\n // In that case firstIndex === 0 and lastIndex === visibleNodes.length - 1 (e.g. 1000),\r\n // which means that it loops through every visibleNodes item and push them into viewportNodes array.\r\n // We can prevent nodes from being pushed to the array and wait for the appropriate calculations to take place\r\n const lastVisibleNode = visibleNodes.slice(-1)[0];\r\n if (!lastVisibleNode.height && lastVisibleNode.position === 0)\r\n return [];\r\n // Search for first node in the viewport using binary search\r\n // Look for first node that starts after the beginning of the viewport (with buffer)\r\n // Or that ends after the beginning of the viewport\r\n const firstIndex = binarySearch(visibleNodes, (node) => {\r\n return (node.position + Y_OFFSET > this.y) ||\r\n (node.position + node.height > this.y);\r\n });\r\n // Search for last node in the viewport using binary search\r\n // Look for first node that starts after the end of the viewport (with buffer)\r\n const lastIndex = binarySearch(visibleNodes, (node) => {\r\n return node.position - Y_OFFSET > this.y + this.viewportHeight;\r\n }, firstIndex);\r\n const viewportNodes = [];\r\n for (let i = firstIndex; i <= lastIndex; i++) {\r\n viewportNodes.push(visibleNodes[i]);\r\n }\r\n return viewportNodes;\r\n }\r\n fixScroll() {\r\n const maxY = Math.max(0, this.totalHeight - this.viewportHeight);\r\n if (this.y < 0)\r\n this._setYBlocks(0);\r\n if (this.y > maxY)\r\n this._setYBlocks(maxY / Y_EPSILON);\r\n }\r\n}\nTreeVirtualScroll.ɵfac = function TreeVirtualScroll_Factory(t) { return new (t || TreeVirtualScroll)(ɵngcc0.ɵɵinject(TreeModel)); };\nTreeVirtualScroll.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: TreeVirtualScroll, factory: TreeVirtualScroll.ɵfac });\r\n/** @nocollapse */\r\nTreeVirtualScroll.ctorParameters = () => [\r\n { type: TreeModel }\r\n];\r\n__decorate$2([\r\n observable$1,\r\n __metadata$2(\"design:type\", Object)\r\n], TreeVirtualScroll.prototype, \"yBlocks\", void 0);\r\n__decorate$2([\r\n observable$1,\r\n __metadata$2(\"design:type\", Object)\r\n], TreeVirtualScroll.prototype, \"x\", void 0);\r\n__decorate$2([\r\n observable$1,\r\n __metadata$2(\"design:type\", Object)\r\n], TreeVirtualScroll.prototype, \"viewportHeight\", void 0);\r\n__decorate$2([\r\n computed$1,\r\n __metadata$2(\"design:type\", Object),\r\n __metadata$2(\"design:paramtypes\", [])\r\n], TreeVirtualScroll.prototype, \"y\", null);\r\n__decorate$2([\r\n computed$1,\r\n __metadata$2(\"design:type\", Object),\r\n __metadata$2(\"design:paramtypes\", [])\r\n], TreeVirtualScroll.prototype, \"totalHeight\", null);\r\n__decorate$2([\r\n action$1,\r\n __metadata$2(\"design:type\", Function),\r\n __metadata$2(\"design:paramtypes\", [Object]),\r\n __metadata$2(\"design:returntype\", void 0)\r\n], TreeVirtualScroll.prototype, \"_setYBlocks\", null);\r\n__decorate$2([\r\n action$1,\r\n __metadata$2(\"design:type\", Function),\r\n __metadata$2(\"design:paramtypes\", []),\r\n __metadata$2(\"design:returntype\", void 0)\r\n], TreeVirtualScroll.prototype, \"recalcPositions\", null);\r\n__decorate$2([\r\n action$1,\r\n __metadata$2(\"design:type\", Function),\r\n __metadata$2(\"design:paramtypes\", [Object]),\r\n __metadata$2(\"design:returntype\", void 0)\r\n], TreeVirtualScroll.prototype, \"setViewport\", null);\r\n__decorate$2([\r\n action$1,\r\n __metadata$2(\"design:type\", Function),\r\n __metadata$2(\"design:paramtypes\", [Object, Object, Object]),\r\n __metadata$2(\"design:returntype\", void 0)\r\n], TreeVirtualScroll.prototype, \"scrollIntoView\", null);\r\nfunction binarySearch(nodes, condition, firstIndex = 0) {\r\n let index = firstIndex;\r\n let toIndex = nodes.length - 1;\r\n while (index !== toIndex) {\r\n let midIndex = Math.floor((index + toIndex) / 2);\r\n if (condition(nodes[midIndex])) {\r\n toIndex = midIndex;\r\n }\r\n else {\r\n if (index === midIndex)\r\n index = toIndex;\r\n else\r\n index = midIndex;\r\n }\r\n }\r\n return index;\r\n}\n\nclass LoadingComponent {\r\n}\nLoadingComponent.ɵfac = function LoadingComponent_Factory(t) { return new (t || LoadingComponent)(); };\nLoadingComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: LoadingComponent, selectors: [[\"tree-loading-component\"]], inputs: { template: \"template\", node: \"node\" }, decls: 2, vars: 5, consts: [[4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function LoadingComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, LoadingComponent_span_0_Template, 2, 0, \"span\", 0);\n ɵngcc0.ɵɵelementContainer(1, 1);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx.template);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx.template)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(3, _c0, ctx.node));\n } }, dependencies: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], encapsulation: 2 });\r\nLoadingComponent.propDecorators = {\r\n template: [{ type: Input }],\r\n node: [{ type: Input }]\r\n};\n\nclass TreeViewportComponent {\r\n constructor(elementRef, virtualScroll) {\r\n this.elementRef = elementRef;\r\n this.virtualScroll = virtualScroll;\r\n this.setViewport = this.throttle(() => {\r\n this.virtualScroll.setViewport(this.elementRef.nativeElement);\r\n }, 17);\r\n this.scrollEventHandler = this.setViewport.bind(this);\r\n }\r\n ngOnInit() {\r\n this.virtualScroll.init();\r\n }\r\n ngAfterViewInit() {\r\n setTimeout(() => {\r\n this.setViewport();\r\n this.virtualScroll.fireEvent({ eventName: TREE_EVENTS.initialized });\r\n });\r\n let el = this.elementRef.nativeElement;\r\n el.addEventListener('scroll', this.scrollEventHandler);\r\n }\r\n ngOnDestroy() {\r\n this.virtualScroll.clear();\r\n let el = this.elementRef.nativeElement;\r\n el.removeEventListener('scroll', this.scrollEventHandler);\r\n }\r\n getTotalHeight() {\r\n return ((this.virtualScroll.isEnabled() &&\r\n this.virtualScroll.totalHeight + 'px') ||\r\n 'auto');\r\n }\r\n throttle(func, timeFrame) {\r\n let lastTime = 0;\r\n return function () {\r\n let now = Date.now();\r\n if (now - lastTime >= timeFrame) {\r\n func();\r\n lastTime = now;\r\n }\r\n };\r\n }\r\n}\nTreeViewportComponent.ɵfac = function TreeViewportComponent_Factory(t) { return new (t || TreeViewportComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(TreeVirtualScroll)); };\nTreeViewportComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeViewportComponent, selectors: [[\"tree-viewport\"]], features: [ɵngcc0.ɵɵProvidersFeature([TreeVirtualScroll])], ngContentSelectors: _c2, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"]], template: function TreeViewportComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, TreeViewportComponent_ng_container_0_Template, 3, 2, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: [TreeMobxAutorunDirective], encapsulation: 2 });\r\n/** @nocollapse */\r\nTreeViewportComponent.ctorParameters = () => [\r\n { type: ElementRef },\r\n { type: TreeVirtualScroll }\r\n];\n\nclass TreeComponent {\r\n constructor(treeModel, treeDraggedElement) {\r\n this.treeModel = treeModel;\r\n this.treeDraggedElement = treeDraggedElement;\r\n treeModel.eventNames.forEach((name) => this[name] = new EventEmitter());\r\n treeModel.subscribeToState((state) => this.stateChange.emit(state));\r\n }\r\n // Will be handled in ngOnChanges\r\n set nodes(nodes) {\r\n }\r\n ;\r\n set options(options) {\r\n }\r\n ;\r\n set focused(value) {\r\n this.treeModel.setFocus(value);\r\n }\r\n set state(state) {\r\n this.treeModel.setState(state);\r\n }\r\n onKeydown($event) {\r\n if (!this.treeModel.isFocused)\r\n return;\r\n if (['input', 'textarea'].includes(document.activeElement.tagName.toLowerCase()))\r\n return;\r\n const focusedNode = this.treeModel.getFocusedNode();\r\n this.treeModel.performKeyAction(focusedNode, $event);\r\n }\r\n onMousedown($event) {\r\n function isOutsideClick(startElement, nodeName) {\r\n return !startElement ? true : startElement.localName === nodeName ? false : isOutsideClick(startElement.parentElement, nodeName);\r\n }\r\n if (isOutsideClick($event.target, 'tree-root')) {\r\n this.treeModel.setFocus(false);\r\n }\r\n }\r\n ngOnChanges(changes) {\r\n if (changes.options || changes.nodes) {\r\n this.treeModel.setData({\r\n options: changes.options && changes.options.currentValue,\r\n nodes: changes.nodes && changes.nodes.currentValue,\r\n events: this.pick(this, this.treeModel.eventNames)\r\n });\r\n }\r\n }\r\n sizeChanged() {\r\n this.viewportComponent.setViewport();\r\n }\r\n pick(object, keys) {\r\n return keys.reduce((obj, key) => {\r\n if (object && object.hasOwnProperty(key)) {\r\n obj[key] = object[key];\r\n }\r\n return obj;\r\n }, {});\r\n }\r\n}\nTreeComponent.ɵfac = function TreeComponent_Factory(t) { return new (t || TreeComponent)(ɵngcc0.ɵɵdirectiveInject(TreeModel), ɵngcc0.ɵɵdirectiveInject(TreeDraggedElement)); };\nTreeComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeComponent, selectors: [[\"Tree\"], [\"tree-root\"]], contentQueries: function TreeComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, _c3, 5);\n ɵngcc0.ɵɵcontentQuery(dirIndex, _c4, 5);\n ɵngcc0.ɵɵcontentQuery(dirIndex, _c5, 5);\n ɵngcc0.ɵɵcontentQuery(dirIndex, _c6, 5);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.loadingTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.treeNodeTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.treeNodeWrapperTemplate = _t.first);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.treeNodeFullTemplate = _t.first);\n } }, viewQuery: function TreeComponent_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c7, 5);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.viewportComponent = _t.first);\n } }, hostBindings: function TreeComponent_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"keydown\", function TreeComponent_keydown_HostBindingHandler($event) { return ctx.onKeydown($event); }, false, ɵngcc0.ɵɵresolveBody)(\"mousedown\", function TreeComponent_mousedown_HostBindingHandler($event) { return ctx.onMousedown($event); }, false, ɵngcc0.ɵɵresolveBody);\n } }, inputs: { nodes: \"nodes\", options: \"options\", focused: \"focused\", state: \"state\" }, outputs: { toggleExpanded: \"toggleExpanded\", activate: \"activate\", deactivate: \"deactivate\", nodeActivate: \"nodeActivate\", nodeDeactivate: \"nodeDeactivate\", select: \"select\", deselect: \"deselect\", focus: \"focus\", blur: \"blur\", updateData: \"updateData\", initialized: \"initialized\", moveNode: \"moveNode\", copyNode: \"copyNode\", loadNodeChildren: \"loadNodeChildren\", changeFilter: \"changeFilter\", event: \"event\", stateChange: \"stateChange\" }, features: [ɵngcc0.ɵɵProvidersFeature([TreeModel]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 5, vars: 6, consts: [[\"viewport\", \"\"], [1, \"angular-tree-component\"], [3, \"nodes\", \"treeModel\", \"templates\", 4, \"ngIf\"], [\"class\", \"empty-tree-drop-slot\", 3, \"dropIndex\", \"node\", 4, \"ngIf\"], [3, \"nodes\", \"treeModel\", \"templates\"], [1, \"empty-tree-drop-slot\", 3, \"dropIndex\", \"node\"]], template: function TreeComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"tree-viewport\", null, 0)(2, \"div\", 1);\n ɵngcc0.ɵɵtemplate(3, TreeComponent_tree_node_collection_3_Template, 1, 8, \"tree-node-collection\", 2);\n ɵngcc0.ɵɵtemplate(4, TreeComponent_tree_node_drop_slot_4_Template, 1, 2, \"tree-node-drop-slot\", 3);\n ɵngcc0.ɵɵelementEnd()();\n } if (rf & 2) {\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵclassProp(\"node-dragging\", ctx.treeDraggedElement.isDragging())(\"angular-tree-component-rtl\", ctx.treeModel.options.rtl);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.treeModel.roots);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.treeModel.isEmptyTree());\n } }, dependencies: function () { return [ɵngcc1.NgIf, TreeNodeDropSlot, TreeNodeCollectionComponent, TreeViewportComponent]; }, encapsulation: 2 });\r\n/** @nocollapse */\r\nTreeComponent.ctorParameters = () => [\r\n { type: TreeModel },\r\n { type: TreeDraggedElement }\r\n];\r\nTreeComponent.propDecorators = {\r\n loadingTemplate: [{ type: ContentChild, args: ['loadingTemplate', { static: false },] }],\r\n treeNodeTemplate: [{ type: ContentChild, args: ['treeNodeTemplate', { static: false },] }],\r\n treeNodeWrapperTemplate: [{ type: ContentChild, args: ['treeNodeWrapperTemplate', { static: false },] }],\r\n treeNodeFullTemplate: [{ type: ContentChild, args: ['treeNodeFullTemplate', { static: false },] }],\r\n viewportComponent: [{ type: ViewChild, args: ['viewport', { static: false },] }],\r\n nodes: [{ type: Input }],\r\n options: [{ type: Input }],\r\n focused: [{ type: Input }],\r\n state: [{ type: Input }],\r\n toggleExpanded: [{ type: Output }],\r\n activate: [{ type: Output }],\r\n deactivate: [{ type: Output }],\r\n nodeActivate: [{ type: Output }],\r\n nodeDeactivate: [{ type: Output }],\r\n select: [{ type: Output }],\r\n deselect: [{ type: Output }],\r\n focus: [{ type: Output }],\r\n blur: [{ type: Output }],\r\n updateData: [{ type: Output }],\r\n initialized: [{ type: Output }],\r\n moveNode: [{ type: Output }],\r\n copyNode: [{ type: Output }],\r\n loadNodeChildren: [{ type: Output }],\r\n changeFilter: [{ type: Output }],\r\n event: [{ type: Output }],\r\n stateChange: [{ type: Output }],\r\n onKeydown: [{ type: HostListener, args: ['body: keydown', ['$event'],] }],\r\n onMousedown: [{ type: HostListener, args: ['body: mousedown', ['$event'],] }]\r\n};\n\nclass TreeNodeComponent {\r\n}\nTreeNodeComponent.ɵfac = function TreeNodeComponent_Factory(t) { return new (t || TreeNodeComponent)(); };\nTreeNodeComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeComponent, selectors: [[\"TreeNode\"], [\"tree-node\"]], inputs: { node: \"node\", index: \"index\", templates: \"templates\" }, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"], [3, \"class\", \"tree-node\", \"tree-node-expanded\", \"tree-node-collapsed\", \"tree-node-leaf\", \"tree-node-active\", \"tree-node-focused\", 4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [3, \"dropIndex\", \"node\", 4, \"ngIf\"], [3, \"node\", \"index\", \"templates\"], [3, \"node\", \"templates\"], [3, \"dropIndex\", \"node\"]], template: function TreeNodeComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeComponent_ng_container_0_Template, 3, 8, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: function () { return [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet, TreeNodeChildrenComponent, TreeNodeDropSlot, TreeNodeWrapperComponent, TreeMobxAutorunDirective]; }, encapsulation: 2 });\r\nTreeNodeComponent.propDecorators = {\r\n node: [{ type: Input }],\r\n index: [{ type: Input }],\r\n templates: [{ type: Input }]\r\n};\n\nclass TreeNodeContent {\r\n}\nTreeNodeContent.ɵfac = function TreeNodeContent_Factory(t) { return new (t || TreeNodeContent)(); };\nTreeNodeContent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeContent, selectors: [[\"tree-node-content\"]], inputs: { node: \"node\", index: \"index\", template: \"template\" }, decls: 2, vars: 7, consts: [[4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function TreeNodeContent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeContent_span_0_Template, 2, 1, \"span\", 0);\n ɵngcc0.ɵɵelementContainer(1, 1);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx.template);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx.template)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction3(3, _c10, ctx.node, ctx.node, ctx.index));\n } }, dependencies: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], encapsulation: 2 });\r\nTreeNodeContent.propDecorators = {\r\n node: [{ type: Input }],\r\n index: [{ type: Input }],\r\n template: [{ type: Input }]\r\n};\n\nclass TreeNodeDropSlot {\r\n onDrop($event) {\r\n this.node.mouseAction('drop', $event.event, {\r\n from: $event.element,\r\n to: { parent: this.node, index: this.dropIndex }\r\n });\r\n }\r\n allowDrop(element, $event) {\r\n return this.node.options.allowDrop(element, { parent: this.node, index: this.dropIndex }, $event);\r\n }\r\n}\nTreeNodeDropSlot.ɵfac = function TreeNodeDropSlot_Factory(t) { return new (t || TreeNodeDropSlot)(); };\nTreeNodeDropSlot.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeDropSlot, selectors: [[\"TreeNodeDropSlot\"], [\"tree-node-drop-slot\"]], inputs: { node: \"node\", dropIndex: \"dropIndex\" }, decls: 1, vars: 2, consts: [[1, \"node-drop-slot\", 3, \"treeAllowDrop\", \"allowDragoverStyling\", \"treeDrop\"]], template: function TreeNodeDropSlot_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 0);\n ɵngcc0.ɵɵlistener(\"treeDrop\", function TreeNodeDropSlot_Template_div_treeDrop_0_listener($event) { return ctx.onDrop($event); });\n ɵngcc0.ɵɵelementEnd();\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeAllowDrop\", ctx.allowDrop.bind(ctx))(\"allowDragoverStyling\", true);\n } }, dependencies: function () { return [TreeDropDirective]; }, encapsulation: 2 });\r\nTreeNodeDropSlot.propDecorators = {\r\n node: [{ type: Input }],\r\n dropIndex: [{ type: Input }]\r\n};\n\nclass TreeNodeExpanderComponent {\r\n}\nTreeNodeExpanderComponent.ɵfac = function TreeNodeExpanderComponent_Factory(t) { return new (t || TreeNodeExpanderComponent)(); };\nTreeNodeExpanderComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeExpanderComponent, selectors: [[\"tree-node-expander\"]], inputs: { node: \"node\" }, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"], [\"class\", \"toggle-children-wrapper\", 3, \"toggle-children-wrapper-expanded\", \"toggle-children-wrapper-collapsed\", \"click\", 4, \"ngIf\"], [\"class\", \"toggle-children-placeholder\", 4, \"ngIf\"], [1, \"toggle-children-wrapper\", 3, \"click\"], [1, \"toggle-children\"], [1, \"toggle-children-placeholder\"]], template: function TreeNodeExpanderComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeExpanderComponent_ng_container_0_Template, 3, 2, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: [ɵngcc1.NgIf, TreeMobxAutorunDirective], encapsulation: 2 });\r\nTreeNodeExpanderComponent.propDecorators = {\r\n node: [{ type: Input }]\r\n};\n\nclass TreeNodeChildrenComponent {\r\n}\nTreeNodeChildrenComponent.ɵfac = function TreeNodeChildrenComponent_Factory(t) { return new (t || TreeNodeChildrenComponent)(); };\nTreeNodeChildrenComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeChildrenComponent, selectors: [[\"tree-node-children\"]], inputs: { node: \"node\", templates: \"templates\" }, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"], [3, \"tree-children\", \"tree-children-no-padding\", 4, \"treeAnimateOpen\", \"treeAnimateOpenSpeed\", \"treeAnimateOpenAcceleration\", \"treeAnimateOpenEnabled\"], [3, \"nodes\", \"templates\", \"treeModel\", 4, \"ngIf\"], [\"class\", \"tree-node-loading\", 3, \"padding-left\", \"template\", \"node\", 4, \"ngIf\"], [3, \"nodes\", \"templates\", \"treeModel\"], [1, \"tree-node-loading\", 3, \"template\", \"node\"]], template: function TreeNodeChildrenComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeChildrenComponent_ng_container_0_Template, 2, 4, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: function () { return [ɵngcc1.NgIf, LoadingComponent, TreeNodeCollectionComponent, TreeAnimateOpenDirective, TreeMobxAutorunDirective]; }, encapsulation: 2 });\r\nTreeNodeChildrenComponent.propDecorators = {\r\n node: [{ type: Input }],\r\n templates: [{ type: Input }]\r\n};\n\n// Re-export mobx operators to be able to use inside components with AOT:\r\nfunction actionInternal(...args) {\r\n return action$1(...args);\r\n}\r\nconst action = Object.assign(actionInternal, action$1);\r\nfunction computedInternal(...args) {\r\n return computed$1(...args);\r\n}\r\nconst computed = Object.assign(computedInternal, computed$1);\r\nfunction observableInternal(...args) {\r\n return observable$1(...args);\r\n}\r\nconst observable = Object.assign(observableInternal, observable$1);\n\nvar __decorate$3 = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata$3 = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nclass TreeNodeCollectionComponent {\r\n constructor() {\r\n this._dispose = [];\r\n }\r\n get nodes() {\r\n return this._nodes;\r\n }\r\n set nodes(nodes) {\r\n this.setNodes(nodes);\r\n }\r\n get marginTop() {\r\n const firstNode = this.viewportNodes && this.viewportNodes.length && this.viewportNodes[0];\r\n const relativePosition = firstNode && firstNode.parent\r\n ? firstNode.position -\r\n firstNode.parent.position -\r\n firstNode.parent.getSelfHeight()\r\n : 0;\r\n return `${relativePosition}px`;\r\n }\r\n setNodes(nodes) {\r\n this._nodes = nodes;\r\n }\r\n ngOnInit() {\r\n this.virtualScroll = this.treeModel.virtualScroll;\r\n this._dispose = [\r\n // return node indexes so we can compare structurally,\r\n reaction(() => {\r\n return this.virtualScroll\r\n .getViewportNodes(this.nodes)\r\n .map(n => n.index);\r\n }, nodeIndexes => {\r\n this.viewportNodes = nodeIndexes.map(i => this.nodes[i]);\r\n }, { compareStructural: true, fireImmediately: true }),\r\n reaction(() => this.nodes, nodes => {\r\n this.viewportNodes = this.virtualScroll.getViewportNodes(nodes);\r\n })\r\n ];\r\n }\r\n ngOnDestroy() {\r\n this._dispose.forEach(d => d());\r\n }\r\n trackNode(index, node) {\r\n return node.id;\r\n }\r\n}\nTreeNodeCollectionComponent.ɵfac = function TreeNodeCollectionComponent_Factory(t) { return new (t || TreeNodeCollectionComponent)(); };\nTreeNodeCollectionComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeCollectionComponent, selectors: [[\"tree-node-collection\"]], inputs: { nodes: \"nodes\", treeModel: \"treeModel\", templates: \"templates\" }, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"], [3, \"node\", \"index\", \"templates\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [3, \"node\", \"index\", \"templates\"]], template: function TreeNodeCollectionComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeCollectionComponent_ng_container_0_Template, 3, 4, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: [ɵngcc1.NgForOf, TreeNodeComponent, TreeMobxAutorunDirective], encapsulation: 2 });\r\nTreeNodeCollectionComponent.propDecorators = {\r\n nodes: [{ type: Input }],\r\n treeModel: [{ type: Input }],\r\n templates: [{ type: Input }]\r\n};\r\n__decorate$3([\r\n observable,\r\n __metadata$3(\"design:type\", Object)\r\n], TreeNodeCollectionComponent.prototype, \"_nodes\", void 0);\r\n__decorate$3([\r\n observable,\r\n __metadata$3(\"design:type\", Array)\r\n], TreeNodeCollectionComponent.prototype, \"viewportNodes\", void 0);\r\n__decorate$3([\r\n computed,\r\n __metadata$3(\"design:type\", String),\r\n __metadata$3(\"design:paramtypes\", [])\r\n], TreeNodeCollectionComponent.prototype, \"marginTop\", null);\r\n__decorate$3([\r\n action,\r\n __metadata$3(\"design:type\", Function),\r\n __metadata$3(\"design:paramtypes\", [Object]),\r\n __metadata$3(\"design:returntype\", void 0)\r\n], TreeNodeCollectionComponent.prototype, \"setNodes\", null);\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeMobxAutorunDirective, [{\n type: Directive,\n args: [{ selector: '[treeMobxAutorun]' }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }]; }, { treeMobxAutorun: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeModel, [{\n type: Injectable\n }], function () { return []; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeDraggedElement, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () { return []; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeVirtualScroll, [{\n type: Injectable\n }], function () { return [{ type: TreeModel }]; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LoadingComponent, [{\n type: Component,\n args: [{\n encapsulation: ViewEncapsulation.None,\n selector: 'tree-loading-component',\n template: `\r\n loading...\r\n \r\n \r\n `\n }]\n }], null, { template: [{\n type: Input\n }], node: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeViewportComponent, [{\n type: Component,\n args: [{\n selector: 'tree-viewport',\n providers: [TreeVirtualScroll],\n template: `\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n `\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: TreeVirtualScroll }]; }, null); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeComponent, [{\n type: Component,\n args: [{\n selector: 'Tree, tree-root',\n providers: [TreeModel],\n template: `\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `\n }]\n }], function () { return [{ type: TreeModel }, { type: TreeDraggedElement }]; }, { nodes: [{\n type: Input\n }], options: [{\n type: Input\n }], focused: [{\n type: Input\n }], state: [{\n type: Input\n }], onKeydown: [{\n type: HostListener,\n args: ['body: keydown', ['$event']]\n }], onMousedown: [{\n type: HostListener,\n args: ['body: mousedown', ['$event']]\n }], loadingTemplate: [{\n type: ContentChild,\n args: ['loadingTemplate', { static: false }]\n }], treeNodeTemplate: [{\n type: ContentChild,\n args: ['treeNodeTemplate', { static: false }]\n }], treeNodeWrapperTemplate: [{\n type: ContentChild,\n args: ['treeNodeWrapperTemplate', { static: false }]\n }], treeNodeFullTemplate: [{\n type: ContentChild,\n args: ['treeNodeFullTemplate', { static: false }]\n }], viewportComponent: [{\n type: ViewChild,\n args: ['viewport', { static: false }]\n }], toggleExpanded: [{\n type: Output\n }], activate: [{\n type: Output\n }], deactivate: [{\n type: Output\n }], nodeActivate: [{\n type: Output\n }], nodeDeactivate: [{\n type: Output\n }], select: [{\n type: Output\n }], deselect: [{\n type: Output\n }], focus: [{\n type: Output\n }], blur: [{\n type: Output\n }], updateData: [{\n type: Output\n }], initialized: [{\n type: Output\n }], moveNode: [{\n type: Output\n }], copyNode: [{\n type: Output\n }], loadNodeChildren: [{\n type: Output\n }], changeFilter: [{\n type: Output\n }], event: [{\n type: Output\n }], stateChange: [{\n type: Output\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeComponent, [{\n type: Component,\n args: [{\n selector: 'TreeNode, tree-node',\n encapsulation: ViewEncapsulation.None,\n template: `\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 `\n }]\n }], null, { node: [{\n type: Input\n }], index: [{\n type: Input\n }], templates: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeContent, [{\n type: Component,\n args: [{\n selector: 'tree-node-content',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n {{ node.displayField }}\r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }], index: [{\n type: Input\n }], template: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeDropSlot, [{\n type: Component,\n args: [{\n selector: 'TreeNodeDropSlot, tree-node-drop-slot',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n \r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }], dropIndex: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeExpanderComponent, [{\n type: Component,\n args: [{\n selector: 'tree-node-expander',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeChildrenComponent, [{\n type: Component,\n args: [{\n selector: 'tree-node-children',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }], templates: [{\n type: Input\n }] }); })();\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeCollectionComponent, [{\n type: Component,\n args: [{\n selector: 'tree-node-collection',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n `\n }]\n }], function () { return []; }, { nodes: [{\n type: Input\n }], treeModel: [{\n type: Input\n }], templates: [{\n type: Input\n }] }); })();\n\nclass TreeNodeWrapperComponent {\r\n}\nTreeNodeWrapperComponent.ɵfac = function TreeNodeWrapperComponent_Factory(t) { return new (t || TreeNodeWrapperComponent)(); };\nTreeNodeWrapperComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeWrapperComponent, selectors: [[\"tree-node-wrapper\"]], inputs: { node: \"node\", index: \"index\", templates: \"templates\" }, decls: 2, vars: 8, consts: [[\"class\", \"node-wrapper\", 3, \"padding-left\", 4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [1, \"node-wrapper\"], [3, \"node\", 4, \"ngIf\"], [3, \"node\"], [1, \"node-content-wrapper\", 3, \"treeAllowDrop\", \"allowDragoverStyling\", \"treeDrag\", \"treeDragEnabled\", \"click\", \"dblclick\", \"mouseover\", \"mouseout\", \"contextmenu\", \"treeDrop\", \"treeDropDragOver\", \"treeDropDragLeave\", \"treeDropDragEnter\"], [3, \"node\", \"index\", \"template\"]], template: function TreeNodeWrapperComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeWrapperComponent_div_0_Template, 5, 15, \"div\", 0);\n ɵngcc0.ɵɵelementContainer(1, 1);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", !ctx.templates.treeNodeWrapperTemplate);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx.templates.treeNodeWrapperTemplate)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction4(3, _c9, ctx.node, ctx.node, ctx.index, ctx.templates));\n } }, dependencies: function () { return [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet, TreeNodeContent, TreeDropDirective, TreeDragDirective, TreeNodeExpanderComponent, TreeNodeCheckboxComponent]; }, encapsulation: 2 });\r\nTreeNodeWrapperComponent.propDecorators = {\r\n node: [{ type: Input }],\r\n index: [{ type: Input }],\r\n templates: [{ type: Input }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeWrapperComponent, [{\n type: Component,\n args: [{\n selector: 'tree-node-wrapper',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n
    \r\n \r\n \r\n
    \r\n\r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }], index: [{\n type: Input\n }], templates: [{\n type: Input\n }] }); })();\n\nclass TreeNodeCheckboxComponent {\r\n}\nTreeNodeCheckboxComponent.ɵfac = function TreeNodeCheckboxComponent_Factory(t) { return new (t || TreeNodeCheckboxComponent)(); };\nTreeNodeCheckboxComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: TreeNodeCheckboxComponent, selectors: [[\"tree-node-checkbox\"]], inputs: { node: \"node\" }, decls: 1, vars: 2, consts: [[4, \"treeMobxAutorun\"], [\"type\", \"checkbox\", 1, \"tree-node-checkbox\", 3, \"checked\", \"indeterminate\", \"click\"]], template: function TreeNodeCheckboxComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, TreeNodeCheckboxComponent_ng_container_0_Template, 2, 2, \"ng-container\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"treeMobxAutorun\", ɵngcc0.ɵɵpureFunction0(1, _c1));\n } }, dependencies: [TreeMobxAutorunDirective], encapsulation: 2 });\r\nTreeNodeCheckboxComponent.propDecorators = {\r\n node: [{ type: Input }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeNodeCheckboxComponent, [{\n type: Component,\n args: [{\n selector: 'tree-node-checkbox',\n encapsulation: ViewEncapsulation.None,\n template: `\r\n \r\n \r\n \r\n `\n }]\n }], null, { node: [{\n type: Input\n }] }); })();\n\nconst DRAG_OVER_CLASS = 'is-dragging-over';\r\nconst DRAG_DISABLED_CLASS = 'is-dragging-over-disabled';\r\nclass TreeDropDirective {\r\n constructor(el, renderer, treeDraggedElement, ngZone) {\r\n this.el = el;\r\n this.renderer = renderer;\r\n this.treeDraggedElement = treeDraggedElement;\r\n this.ngZone = ngZone;\r\n this.allowDragoverStyling = true;\r\n this.onDropCallback = new EventEmitter();\r\n this.onDragOverCallback = new EventEmitter();\r\n this.onDragLeaveCallback = new EventEmitter();\r\n this.onDragEnterCallback = new EventEmitter();\r\n this._allowDrop = (element, $event) => true;\r\n this.dragOverEventHandler = this.onDragOver.bind(this);\r\n this.dragEnterEventHandler = this.onDragEnter.bind(this);\r\n this.dragLeaveEventHandler = this.onDragLeave.bind(this);\r\n }\r\n set treeAllowDrop(allowDrop) {\r\n if (allowDrop instanceof Function) {\r\n this._allowDrop = allowDrop;\r\n }\r\n else\r\n this._allowDrop = (element, $event) => allowDrop;\r\n }\r\n allowDrop($event) {\r\n return this._allowDrop(this.treeDraggedElement.get(), $event);\r\n }\r\n ngAfterViewInit() {\r\n let el = this.el.nativeElement;\r\n this.ngZone.runOutsideAngular(() => {\r\n el.addEventListener('dragover', this.dragOverEventHandler);\r\n el.addEventListener('dragenter', this.dragEnterEventHandler);\r\n el.addEventListener('dragleave', this.dragLeaveEventHandler);\r\n });\r\n }\r\n ngOnDestroy() {\r\n let el = this.el.nativeElement;\r\n el.removeEventListener('dragover', this.dragOverEventHandler);\r\n el.removeEventListener('dragenter', this.dragEnterEventHandler);\r\n el.removeEventListener('dragleave', this.dragLeaveEventHandler);\r\n }\r\n onDragOver($event) {\r\n if (!this.allowDrop($event)) {\r\n if (this.allowDragoverStyling) {\r\n return this.addDisabledClass();\r\n }\r\n return;\r\n }\r\n this.onDragOverCallback.emit({ event: $event, element: this.treeDraggedElement.get() });\r\n $event.preventDefault();\r\n if (this.allowDragoverStyling) {\r\n this.addClass();\r\n }\r\n }\r\n onDragEnter($event) {\r\n if (!this.allowDrop($event))\r\n return;\r\n $event.preventDefault();\r\n this.onDragEnterCallback.emit({ event: $event, element: this.treeDraggedElement.get() });\r\n }\r\n onDragLeave($event) {\r\n if (!this.allowDrop($event)) {\r\n if (this.allowDragoverStyling) {\r\n return this.removeDisabledClass();\r\n }\r\n return;\r\n }\r\n this.onDragLeaveCallback.emit({ event: $event, element: this.treeDraggedElement.get() });\r\n if (this.allowDragoverStyling) {\r\n this.removeClass();\r\n }\r\n }\r\n onDrop($event) {\r\n if (!this.allowDrop($event))\r\n return;\r\n $event.preventDefault();\r\n this.onDropCallback.emit({ event: $event, element: this.treeDraggedElement.get() });\r\n if (this.allowDragoverStyling) {\r\n this.removeClass();\r\n }\r\n this.treeDraggedElement.set(null);\r\n }\r\n addClass() {\r\n this.renderer.addClass(this.el.nativeElement, DRAG_OVER_CLASS);\r\n }\r\n removeClass() {\r\n this.renderer.removeClass(this.el.nativeElement, DRAG_OVER_CLASS);\r\n }\r\n addDisabledClass() {\r\n this.renderer.addClass(this.el.nativeElement, DRAG_DISABLED_CLASS);\r\n }\r\n removeDisabledClass() {\r\n this.renderer.removeClass(this.el.nativeElement, DRAG_DISABLED_CLASS);\r\n }\r\n}\nTreeDropDirective.ɵfac = function TreeDropDirective_Factory(t) { return new (t || TreeDropDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(TreeDraggedElement), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nTreeDropDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: TreeDropDirective, selectors: [[\"\", \"treeDrop\", \"\"]], hostBindings: function TreeDropDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"drop\", function TreeDropDirective_drop_HostBindingHandler($event) { return ctx.onDrop($event); });\n } }, inputs: { allowDragoverStyling: \"allowDragoverStyling\", treeAllowDrop: \"treeAllowDrop\" }, outputs: { onDropCallback: \"treeDrop\", onDragOverCallback: \"treeDropDragOver\", onDragLeaveCallback: \"treeDropDragLeave\", onDragEnterCallback: \"treeDropDragEnter\" } });\r\n/** @nocollapse */\r\nTreeDropDirective.ctorParameters = () => [\r\n { type: ElementRef },\r\n { type: Renderer2 },\r\n { type: TreeDraggedElement },\r\n { type: NgZone }\r\n];\r\nTreeDropDirective.propDecorators = {\r\n allowDragoverStyling: [{ type: Input }],\r\n onDropCallback: [{ type: Output, args: ['treeDrop',] }],\r\n onDragOverCallback: [{ type: Output, args: ['treeDropDragOver',] }],\r\n onDragLeaveCallback: [{ type: Output, args: ['treeDropDragLeave',] }],\r\n onDragEnterCallback: [{ type: Output, args: ['treeDropDragEnter',] }],\r\n treeAllowDrop: [{ type: Input }],\r\n onDrop: [{ type: HostListener, args: ['drop', ['$event'],] }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeDropDirective, [{\n type: Directive,\n args: [{\n selector: '[treeDrop]'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: TreeDraggedElement }, { type: ɵngcc0.NgZone }]; }, { allowDragoverStyling: [{\n type: Input\n }], onDropCallback: [{\n type: Output,\n args: ['treeDrop']\n }], onDragOverCallback: [{\n type: Output,\n args: ['treeDropDragOver']\n }], onDragLeaveCallback: [{\n type: Output,\n args: ['treeDropDragLeave']\n }], onDragEnterCallback: [{\n type: Output,\n args: ['treeDropDragEnter']\n }], treeAllowDrop: [{\n type: Input\n }], onDrop: [{\n type: HostListener,\n args: ['drop', ['$event']]\n }] }); })();\n\nconst DRAG_OVER_CLASS$1 = 'is-dragging-over';\r\nclass TreeDragDirective {\r\n constructor(el, renderer, treeDraggedElement, ngZone) {\r\n this.el = el;\r\n this.renderer = renderer;\r\n this.treeDraggedElement = treeDraggedElement;\r\n this.ngZone = ngZone;\r\n this.dragEventHandler = this.onDrag.bind(this);\r\n }\r\n ngAfterViewInit() {\r\n let el = this.el.nativeElement;\r\n this.ngZone.runOutsideAngular(() => {\r\n el.addEventListener('drag', this.dragEventHandler);\r\n });\r\n }\r\n ngDoCheck() {\r\n this.renderer.setAttribute(this.el.nativeElement, 'draggable', this.treeDragEnabled ? 'true' : 'false');\r\n }\r\n ngOnDestroy() {\r\n let el = this.el.nativeElement;\r\n el.removeEventListener('drag', this.dragEventHandler);\r\n }\r\n onDragStart(ev) {\r\n // setting the data is required by firefox\r\n ev.dataTransfer.setData('text', ev.target.id);\r\n this.treeDraggedElement.set(this.draggedElement);\r\n if (this.draggedElement.mouseAction) {\r\n this.draggedElement.mouseAction('dragStart', ev);\r\n }\r\n }\r\n onDrag(ev) {\r\n if (this.draggedElement.mouseAction) {\r\n this.draggedElement.mouseAction('drag', ev);\r\n }\r\n }\r\n onDragEnd() {\r\n if (this.draggedElement.mouseAction) {\r\n this.draggedElement.mouseAction('dragEnd');\r\n }\r\n this.treeDraggedElement.set(null);\r\n }\r\n}\nTreeDragDirective.ɵfac = function TreeDragDirective_Factory(t) { return new (t || TreeDragDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(TreeDraggedElement), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nTreeDragDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: TreeDragDirective, selectors: [[\"\", \"treeDrag\", \"\"]], hostBindings: function TreeDragDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"dragstart\", function TreeDragDirective_dragstart_HostBindingHandler($event) { return ctx.onDragStart($event); })(\"dragend\", function TreeDragDirective_dragend_HostBindingHandler() { return ctx.onDragEnd(); });\n } }, inputs: { draggedElement: [\"treeDrag\", \"draggedElement\"], treeDragEnabled: \"treeDragEnabled\" } });\r\n/** @nocollapse */\r\nTreeDragDirective.ctorParameters = () => [\r\n { type: ElementRef },\r\n { type: Renderer2 },\r\n { type: TreeDraggedElement },\r\n { type: NgZone }\r\n];\r\nTreeDragDirective.propDecorators = {\r\n draggedElement: [{ type: Input, args: ['treeDrag',] }],\r\n treeDragEnabled: [{ type: Input }],\r\n onDragStart: [{ type: HostListener, args: ['dragstart', ['$event'],] }],\r\n onDragEnd: [{ type: HostListener, args: ['dragend',] }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeDragDirective, [{\n type: Directive,\n args: [{\n selector: '[treeDrag]'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: TreeDraggedElement }, { type: ɵngcc0.NgZone }]; }, { onDragStart: [{\n type: HostListener,\n args: ['dragstart', ['$event']]\n }], onDragEnd: [{\n type: HostListener,\n args: ['dragend']\n }], draggedElement: [{\n type: Input,\n args: ['treeDrag']\n }], treeDragEnabled: [{\n type: Input\n }] }); })();\n\nconst EASE_ACCELERATION = 1.005;\r\nclass TreeAnimateOpenDirective {\r\n constructor(renderer, templateRef, viewContainerRef) {\r\n this.renderer = renderer;\r\n this.templateRef = templateRef;\r\n this.viewContainerRef = viewContainerRef;\r\n }\r\n set isOpen(value) {\r\n if (value) {\r\n this._show();\r\n if (this.isEnabled && this._isOpen === false) {\r\n this._animateOpen();\r\n }\r\n }\r\n else {\r\n this.isEnabled ? this._animateClose() : this._hide();\r\n }\r\n this._isOpen = !!value;\r\n }\r\n ;\r\n _show() {\r\n if (this.innerElement)\r\n return;\r\n // create child view\r\n this.innerElement = this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0];\r\n }\r\n _hide() {\r\n this.viewContainerRef.clear();\r\n this.innerElement = null;\r\n }\r\n _animateOpen() {\r\n let delta = this.animateSpeed;\r\n let ease = this.animateAcceleration;\r\n let maxHeight = 0;\r\n // set height to 0\r\n this.renderer.setStyle(this.innerElement, 'max-height', `0`);\r\n // increase maxHeight until height doesn't change\r\n setTimeout(() => {\r\n const i = setInterval(() => {\r\n if (!this._isOpen || !this.innerElement)\r\n return clearInterval(i);\r\n maxHeight += delta;\r\n const roundedMaxHeight = Math.round(maxHeight);\r\n this.renderer.setStyle(this.innerElement, 'max-height', `${roundedMaxHeight}px`);\r\n const height = this.innerElement.getBoundingClientRect ? this.innerElement.getBoundingClientRect().height : 0; // TBD use renderer\r\n delta *= ease;\r\n ease *= EASE_ACCELERATION;\r\n if (height < roundedMaxHeight) {\r\n // Make maxHeight auto because animation finished and container might change height later on\r\n this.renderer.setStyle(this.innerElement, 'max-height', null);\r\n clearInterval(i);\r\n }\r\n }, 17);\r\n });\r\n }\r\n _animateClose() {\r\n if (!this.innerElement)\r\n return;\r\n let delta = this.animateSpeed;\r\n let ease = this.animateAcceleration;\r\n let height = this.innerElement.getBoundingClientRect().height; // TBD use renderer\r\n // slowly decrease maxHeight to 0, starting from current height\r\n const i = setInterval(() => {\r\n if (this._isOpen || !this.innerElement)\r\n return clearInterval(i);\r\n height -= delta;\r\n this.renderer.setStyle(this.innerElement, 'max-height', `${height}px`);\r\n delta *= ease;\r\n ease *= EASE_ACCELERATION;\r\n if (height <= 0) {\r\n // after animation complete - remove child element\r\n this.viewContainerRef.clear();\r\n this.innerElement = null;\r\n clearInterval(i);\r\n }\r\n }, 17);\r\n }\r\n}\nTreeAnimateOpenDirective.ɵfac = function TreeAnimateOpenDirective_Factory(t) { return new (t || TreeAnimateOpenDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nTreeAnimateOpenDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: TreeAnimateOpenDirective, selectors: [[\"\", \"treeAnimateOpen\", \"\"]], inputs: { isOpen: [\"treeAnimateOpen\", \"isOpen\"], animateSpeed: [\"treeAnimateOpenSpeed\", \"animateSpeed\"], animateAcceleration: [\"treeAnimateOpenAcceleration\", \"animateAcceleration\"], isEnabled: [\"treeAnimateOpenEnabled\", \"isEnabled\"] } });\r\n/** @nocollapse */\r\nTreeAnimateOpenDirective.ctorParameters = () => [\r\n { type: Renderer2 },\r\n { type: TemplateRef },\r\n { type: ViewContainerRef }\r\n];\r\nTreeAnimateOpenDirective.propDecorators = {\r\n animateSpeed: [{ type: Input, args: ['treeAnimateOpenSpeed',] }],\r\n animateAcceleration: [{ type: Input, args: ['treeAnimateOpenAcceleration',] }],\r\n isEnabled: [{ type: Input, args: ['treeAnimateOpenEnabled',] }],\r\n isOpen: [{ type: Input, args: ['treeAnimateOpen',] }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeAnimateOpenDirective, [{\n type: Directive,\n args: [{\n selector: '[treeAnimateOpen]'\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }]; }, { isOpen: [{\n type: Input,\n args: ['treeAnimateOpen']\n }], animateSpeed: [{\n type: Input,\n args: ['treeAnimateOpenSpeed']\n }], animateAcceleration: [{\n type: Input,\n args: ['treeAnimateOpenAcceleration']\n }], isEnabled: [{\n type: Input,\n args: ['treeAnimateOpenEnabled']\n }] }); })();\n\nclass TreeModule {\r\n}\nTreeModule.ɵfac = function TreeModule_Factory(t) { return new (t || TreeModule)(); };\nTreeModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: TreeModule });\nTreeModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TreeModule, [{\n type: NgModule,\n args: [{\n declarations: [\n TreeComponent,\n TreeNodeComponent,\n TreeNodeContent,\n LoadingComponent,\n TreeDropDirective,\n TreeDragDirective,\n TreeNodeExpanderComponent,\n TreeNodeChildrenComponent,\n TreeNodeDropSlot,\n TreeNodeCollectionComponent,\n TreeViewportComponent,\n TreeNodeWrapperComponent,\n TreeNodeCheckboxComponent,\n TreeAnimateOpenDirective,\n TreeMobxAutorunDirective\n ],\n exports: [\n TreeComponent,\n TreeNodeComponent,\n TreeNodeContent,\n LoadingComponent,\n TreeDropDirective,\n TreeDragDirective,\n TreeNodeExpanderComponent,\n TreeNodeChildrenComponent,\n TreeNodeDropSlot,\n TreeNodeCollectionComponent,\n TreeViewportComponent,\n TreeNodeWrapperComponent,\n TreeNodeCheckboxComponent,\n TreeAnimateOpenDirective,\n TreeMobxAutorunDirective\n ],\n imports: [CommonModule],\n providers: []\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(TreeModule, { declarations: function () { return [TreeComponent, TreeNodeComponent, TreeNodeContent, LoadingComponent, TreeDropDirective, TreeDragDirective, TreeNodeExpanderComponent, TreeNodeChildrenComponent, TreeNodeDropSlot, TreeNodeCollectionComponent, TreeViewportComponent, TreeNodeWrapperComponent, TreeNodeCheckboxComponent, TreeAnimateOpenDirective, TreeMobxAutorunDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [TreeComponent, TreeNodeComponent, TreeNodeContent, LoadingComponent, TreeDropDirective, TreeDragDirective, TreeNodeExpanderComponent, TreeNodeChildrenComponent, TreeNodeDropSlot, TreeNodeCollectionComponent, TreeViewportComponent, TreeNodeWrapperComponent, TreeNodeCheckboxComponent, TreeAnimateOpenDirective, TreeMobxAutorunDirective]; } }); })();\n\n/*\r\n * Public API Surface of angular-tree-component\r\n */\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { KEYS, LoadingComponent, TREE_ACTIONS, TreeAnimateOpenDirective, TreeComponent, TreeDragDirective, TreeDraggedElement, TreeDropDirective, TreeModel, TreeModule, TreeNode, TreeNodeCheckboxComponent, TreeNodeChildrenComponent, TreeNodeCollectionComponent, TreeNodeComponent, TreeNodeContent, TreeNodeDropSlot, TreeNodeExpanderComponent, TreeNodeWrapperComponent, TreeViewportComponent, TreeVirtualScroll, actionInternal as ɵa, action as ɵb, computed as ɵc, observable as ɵd, TreeMobxAutorunDirective as ɵe };\n\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// 0, 2, 10, 30 second delays before reconnect attempts.\r\nconst DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null];\r\n/** @private */\r\nexport class DefaultReconnectPolicy {\r\n constructor(retryDelays) {\r\n this._retryDelays = retryDelays !== undefined ? [...retryDelays, null] : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS;\r\n }\r\n nextRetryDelayInMilliseconds(retryContext) {\r\n return this._retryDelays[retryContext.previousRetryCount];\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Error thrown when an HTTP request fails. */\r\nexport class HttpError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\r\n constructor(errorMessage, statusCode) {\r\n const trueProto = new.target.prototype;\r\n super(`${errorMessage}: Status code '${statusCode}'`);\r\n this.statusCode = statusCode;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when a timeout elapses. */\r\nexport class TimeoutError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"A timeout occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when an action is aborted. */\r\nexport class AbortError extends Error {\r\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"An abort occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is unsupported by the browser. */\r\n/** @private */\r\nexport class UnsupportedTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.UnsupportedTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occured on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'UnsupportedTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is disabled by the browser. */\r\n/** @private */\r\nexport class DisabledTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.DisabledTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occured on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'DisabledTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport cannot be started. */\r\n/** @private */\r\nexport class FailedToStartTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToStartTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occured on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'FailedToStartTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the negotiation with the server failed to complete. */\r\n/** @private */\r\nexport class FailedToNegotiateWithServerError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToNegotiateWithServerError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n */\r\n constructor(message) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.errorType = 'FailedToNegotiateWithServerError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when multiple errors have occured. */\r\n/** @private */\r\nexport class AggregateErrors extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.AggregateErrors}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {Error[]} innerErrors The collection of errors this error is aggregating.\r\n */\r\n constructor(message, innerErrors) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.innerErrors = innerErrors;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Represents an HTTP response. */\r\nexport class HttpResponse {\r\n constructor(statusCode, statusText, content) {\r\n this.statusCode = statusCode;\r\n this.statusText = statusText;\r\n this.content = content;\r\n }\r\n}\r\n/** Abstraction over an HTTP client.\r\n *\r\n * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms.\r\n */\r\nexport class HttpClient {\r\n get(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"GET\",\r\n url,\r\n });\r\n }\r\n post(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"POST\",\r\n url,\r\n });\r\n }\r\n delete(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"DELETE\",\r\n url,\r\n });\r\n }\r\n /** Gets all cookies that apply to the specified URL.\r\n *\r\n * @param url The URL that the cookies are valid for.\r\n * @returns {string} A string containing all the key-value cookie pairs for the specified URL.\r\n */\r\n // @ts-ignore\r\n getCookieString(url) {\r\n return \"\";\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** A logger that does nothing when log messages are sent to it. */\r\nexport class NullLogger {\r\n constructor() { }\r\n /** @inheritDoc */\r\n // eslint-disable-next-line\r\n log(_logLevel, _message) {\r\n }\r\n}\r\n/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\r\nNullLogger.instance = new NullLogger();\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { NullLogger } from \"./Loggers\";\r\n// Version token that will be replaced by the prepack command\r\n/** The version of the SignalR client. */\r\nexport const VERSION = \"6.0.11\";\r\n/** @private */\r\nexport class Arg {\r\n static isRequired(val, name) {\r\n if (val === null || val === undefined) {\r\n throw new Error(`The '${name}' argument is required.`);\r\n }\r\n }\r\n static isNotEmpty(val, name) {\r\n if (!val || val.match(/^\\s*$/)) {\r\n throw new Error(`The '${name}' argument should not be empty.`);\r\n }\r\n }\r\n static isIn(val, values, name) {\r\n // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\r\n if (!(val in values)) {\r\n throw new Error(`Unknown ${name} value: ${val}.`);\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class Platform {\r\n // react-native has a window but no document so we should check both\r\n static get isBrowser() {\r\n return typeof window === \"object\" && typeof window.document === \"object\";\r\n }\r\n // WebWorkers don't have a window object so the isBrowser check would fail\r\n static get isWebWorker() {\r\n return typeof self === \"object\" && \"importScripts\" in self;\r\n }\r\n // react-native has a window but no document\r\n static get isReactNative() {\r\n return typeof window === \"object\" && typeof window.document === \"undefined\";\r\n }\r\n // Node apps shouldn't have a window object, but WebWorkers don't either\r\n // so we need to check for both WebWorker and window\r\n static get isNode() {\r\n return !this.isBrowser && !this.isWebWorker && !this.isReactNative;\r\n }\r\n}\r\n/** @private */\r\nexport function getDataDetail(data, includeContent) {\r\n let detail = \"\";\r\n if (isArrayBuffer(data)) {\r\n detail = `Binary data of length ${data.byteLength}`;\r\n if (includeContent) {\r\n detail += `. Content: '${formatArrayBuffer(data)}'`;\r\n }\r\n }\r\n else if (typeof data === \"string\") {\r\n detail = `String data of length ${data.length}`;\r\n if (includeContent) {\r\n detail += `. Content: '${data}'`;\r\n }\r\n }\r\n return detail;\r\n}\r\n/** @private */\r\nexport function formatArrayBuffer(data) {\r\n const view = new Uint8Array(data);\r\n // Uint8Array.map only supports returning another Uint8Array?\r\n let str = \"\";\r\n view.forEach((num) => {\r\n const pad = num < 16 ? \"0\" : \"\";\r\n str += `0x${pad}${num.toString(16)} `;\r\n });\r\n // Trim of trailing space.\r\n return str.substr(0, str.length - 1);\r\n}\r\n// Also in signalr-protocol-msgpack/Utils.ts\r\n/** @private */\r\nexport function isArrayBuffer(val) {\r\n return val && typeof ArrayBuffer !== \"undefined\" &&\r\n (val instanceof ArrayBuffer ||\r\n // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof\r\n (val.constructor && val.constructor.name === \"ArrayBuffer\"));\r\n}\r\n/** @private */\r\nexport async function sendMessage(logger, transportName, httpClient, url, accessTokenFactory, content, options) {\r\n let headers = {};\r\n if (accessTokenFactory) {\r\n const token = await accessTokenFactory();\r\n if (token) {\r\n headers = {\r\n [\"Authorization\"]: `Bearer ${token}`,\r\n };\r\n }\r\n }\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n logger.log(LogLevel.Trace, `(${transportName} transport) sending data. ${getDataDetail(content, options.logMessageContent)}.`);\r\n const responseType = isArrayBuffer(content) ? \"arraybuffer\" : \"text\";\r\n const response = await httpClient.post(url, {\r\n content,\r\n headers: { ...headers, ...options.headers },\r\n responseType,\r\n timeout: options.timeout,\r\n withCredentials: options.withCredentials,\r\n });\r\n logger.log(LogLevel.Trace, `(${transportName} transport) request complete. Response status: ${response.statusCode}.`);\r\n}\r\n/** @private */\r\nexport function createLogger(logger) {\r\n if (logger === undefined) {\r\n return new ConsoleLogger(LogLevel.Information);\r\n }\r\n if (logger === null) {\r\n return NullLogger.instance;\r\n }\r\n if (logger.log !== undefined) {\r\n return logger;\r\n }\r\n return new ConsoleLogger(logger);\r\n}\r\n/** @private */\r\nexport class SubjectSubscription {\r\n constructor(subject, observer) {\r\n this._subject = subject;\r\n this._observer = observer;\r\n }\r\n dispose() {\r\n const index = this._subject.observers.indexOf(this._observer);\r\n if (index > -1) {\r\n this._subject.observers.splice(index, 1);\r\n }\r\n if (this._subject.observers.length === 0 && this._subject.cancelCallback) {\r\n this._subject.cancelCallback().catch((_) => { });\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class ConsoleLogger {\r\n constructor(minimumLogLevel) {\r\n this._minLevel = minimumLogLevel;\r\n this.out = console;\r\n }\r\n log(logLevel, message) {\r\n if (logLevel >= this._minLevel) {\r\n const msg = `[${new Date().toISOString()}] ${LogLevel[logLevel]}: ${message}`;\r\n switch (logLevel) {\r\n case LogLevel.Critical:\r\n case LogLevel.Error:\r\n this.out.error(msg);\r\n break;\r\n case LogLevel.Warning:\r\n this.out.warn(msg);\r\n break;\r\n case LogLevel.Information:\r\n this.out.info(msg);\r\n break;\r\n default:\r\n // console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug\r\n this.out.log(msg);\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport function getUserAgentHeader() {\r\n let userAgentHeaderName = \"X-SignalR-User-Agent\";\r\n if (Platform.isNode) {\r\n userAgentHeaderName = \"User-Agent\";\r\n }\r\n return [userAgentHeaderName, constructUserAgent(VERSION, getOsName(), getRuntime(), getRuntimeVersion())];\r\n}\r\n/** @private */\r\nexport function constructUserAgent(version, os, runtime, runtimeVersion) {\r\n // Microsoft SignalR/[Version] ([Detailed Version]; [Operating System]; [Runtime]; [Runtime Version])\r\n let userAgent = \"Microsoft SignalR/\";\r\n const majorAndMinor = version.split(\".\");\r\n userAgent += `${majorAndMinor[0]}.${majorAndMinor[1]}`;\r\n userAgent += ` (${version}; `;\r\n if (os && os !== \"\") {\r\n userAgent += `${os}; `;\r\n }\r\n else {\r\n userAgent += \"Unknown OS; \";\r\n }\r\n userAgent += `${runtime}`;\r\n if (runtimeVersion) {\r\n userAgent += `; ${runtimeVersion}`;\r\n }\r\n else {\r\n userAgent += \"; Unknown Runtime Version\";\r\n }\r\n userAgent += \")\";\r\n return userAgent;\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getOsName() {\r\n if (Platform.isNode) {\r\n switch (process.platform) {\r\n case \"win32\":\r\n return \"Windows NT\";\r\n case \"darwin\":\r\n return \"macOS\";\r\n case \"linux\":\r\n return \"Linux\";\r\n default:\r\n return process.platform;\r\n }\r\n }\r\n else {\r\n return \"\";\r\n }\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getRuntimeVersion() {\r\n if (Platform.isNode) {\r\n return process.versions.node;\r\n }\r\n return undefined;\r\n}\r\nfunction getRuntime() {\r\n if (Platform.isNode) {\r\n return \"NodeJS\";\r\n }\r\n else {\r\n return \"Browser\";\r\n }\r\n}\r\n/** @private */\r\nexport function getErrorString(e) {\r\n if (e.stack) {\r\n return e.stack;\r\n }\r\n else if (e.message) {\r\n return e.message;\r\n }\r\n return `${e}`;\r\n}\r\n/** @private */\r\nexport function getGlobalThis() {\r\n // globalThis is semi-new and not available in Node until v12\r\n if (typeof globalThis !== \"undefined\") {\r\n return globalThis;\r\n }\r\n if (typeof self !== \"undefined\") {\r\n return self;\r\n }\r\n if (typeof window !== \"undefined\") {\r\n return window;\r\n }\r\n if (typeof global !== \"undefined\") {\r\n return global;\r\n }\r\n throw new Error(\"could not find global\");\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Platform, getGlobalThis } from \"./Utils\";\r\nexport class FetchHttpClient extends HttpClient {\r\n constructor(logger) {\r\n super();\r\n this._logger = logger;\r\n if (typeof fetch === \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n // Cookies aren't automatically handled in Node so we need to add a CookieJar to preserve cookies across requests\r\n this._jar = new (requireFunc(\"tough-cookie\")).CookieJar();\r\n this._fetchType = requireFunc(\"node-fetch\");\r\n // node-fetch doesn't have a nice API for getting and setting cookies\r\n // fetch-cookie will wrap a fetch implementation with a default CookieJar or a provided one\r\n this._fetchType = requireFunc(\"fetch-cookie\")(this._fetchType, this._jar);\r\n }\r\n else {\r\n this._fetchType = fetch.bind(getGlobalThis());\r\n }\r\n if (typeof AbortController === \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n // Node needs EventListener methods on AbortController which our custom polyfill doesn't provide\r\n this._abortControllerType = requireFunc(\"abort-controller\");\r\n }\r\n else {\r\n this._abortControllerType = AbortController;\r\n }\r\n }\r\n /** @inheritDoc */\r\n async send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n throw new AbortError();\r\n }\r\n if (!request.method) {\r\n throw new Error(\"No method defined.\");\r\n }\r\n if (!request.url) {\r\n throw new Error(\"No url defined.\");\r\n }\r\n const abortController = new this._abortControllerType();\r\n let error;\r\n // Hook our abortSignal into the abort controller\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = () => {\r\n abortController.abort();\r\n error = new AbortError();\r\n };\r\n }\r\n // If a timeout has been passed in, setup a timeout to call abort\r\n // Type needs to be any to fit window.setTimeout and NodeJS.setTimeout\r\n let timeoutId = null;\r\n if (request.timeout) {\r\n const msTimeout = request.timeout;\r\n timeoutId = setTimeout(() => {\r\n abortController.abort();\r\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\r\n error = new TimeoutError();\r\n }, msTimeout);\r\n }\r\n let response;\r\n try {\r\n response = await this._fetchType(request.url, {\r\n body: request.content,\r\n cache: \"no-cache\",\r\n credentials: request.withCredentials === true ? \"include\" : \"same-origin\",\r\n headers: {\r\n \"Content-Type\": \"text/plain;charset=UTF-8\",\r\n \"X-Requested-With\": \"XMLHttpRequest\",\r\n ...request.headers,\r\n },\r\n method: request.method,\r\n mode: \"cors\",\r\n redirect: \"follow\",\r\n signal: abortController.signal,\r\n });\r\n }\r\n catch (e) {\r\n if (error) {\r\n throw error;\r\n }\r\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${e}.`);\r\n throw e;\r\n }\r\n finally {\r\n if (timeoutId) {\r\n clearTimeout(timeoutId);\r\n }\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = null;\r\n }\r\n }\r\n if (!response.ok) {\r\n const errorMessage = await deserializeContent(response, \"text\");\r\n throw new HttpError(errorMessage || response.statusText, response.status);\r\n }\r\n const content = deserializeContent(response, request.responseType);\r\n const payload = await content;\r\n return new HttpResponse(response.status, response.statusText, payload);\r\n }\r\n getCookieString(url) {\r\n let cookies = \"\";\r\n if (Platform.isNode && this._jar) {\r\n // @ts-ignore: unused variable\r\n this._jar.getCookies(url, (e, c) => cookies = c.join(\"; \"));\r\n }\r\n return cookies;\r\n }\r\n}\r\nfunction deserializeContent(response, responseType) {\r\n let content;\r\n switch (responseType) {\r\n case \"arraybuffer\":\r\n content = response.arrayBuffer();\r\n break;\r\n case \"text\":\r\n content = response.text();\r\n break;\r\n case \"blob\":\r\n case \"document\":\r\n case \"json\":\r\n throw new Error(`${responseType} is not supported.`);\r\n default:\r\n content = response.text();\r\n break;\r\n }\r\n return content;\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nexport class XhrHttpClient extends HttpClient {\r\n constructor(logger) {\r\n super();\r\n this._logger = logger;\r\n }\r\n /** @inheritDoc */\r\n send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return new Promise((resolve, reject) => {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(request.method, request.url, true);\r\n xhr.withCredentials = request.withCredentials === undefined ? true : request.withCredentials;\r\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n // Explicitly setting the Content-Type header for React Native on Android platform.\r\n xhr.setRequestHeader(\"Content-Type\", \"text/plain;charset=UTF-8\");\r\n const headers = request.headers;\r\n if (headers) {\r\n Object.keys(headers)\r\n .forEach((header) => {\r\n xhr.setRequestHeader(header, headers[header]);\r\n });\r\n }\r\n if (request.responseType) {\r\n xhr.responseType = request.responseType;\r\n }\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = () => {\r\n xhr.abort();\r\n reject(new AbortError());\r\n };\r\n }\r\n if (request.timeout) {\r\n xhr.timeout = request.timeout;\r\n }\r\n xhr.onload = () => {\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = null;\r\n }\r\n if (xhr.status >= 200 && xhr.status < 300) {\r\n resolve(new HttpResponse(xhr.status, xhr.statusText, xhr.response || xhr.responseText));\r\n }\r\n else {\r\n reject(new HttpError(xhr.response || xhr.responseText || xhr.statusText, xhr.status));\r\n }\r\n };\r\n xhr.onerror = () => {\r\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${xhr.status}: ${xhr.statusText}.`);\r\n reject(new HttpError(xhr.statusText, xhr.status));\r\n };\r\n xhr.ontimeout = () => {\r\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\r\n reject(new TimeoutError());\r\n };\r\n xhr.send(request.content || \"\");\r\n });\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError } from \"./Errors\";\r\nimport { FetchHttpClient } from \"./FetchHttpClient\";\r\nimport { HttpClient } from \"./HttpClient\";\r\nimport { Platform } from \"./Utils\";\r\nimport { XhrHttpClient } from \"./XhrHttpClient\";\r\n/** Default implementation of {@link @microsoft/signalr.HttpClient}. */\r\nexport class DefaultHttpClient extends HttpClient {\r\n /** Creates a new instance of the {@link @microsoft/signalr.DefaultHttpClient}, using the provided {@link @microsoft/signalr.ILogger} to log messages. */\r\n constructor(logger) {\r\n super();\r\n if (typeof fetch !== \"undefined\" || Platform.isNode) {\r\n this._httpClient = new FetchHttpClient(logger);\r\n }\r\n else if (typeof XMLHttpRequest !== \"undefined\") {\r\n this._httpClient = new XhrHttpClient(logger);\r\n }\r\n else {\r\n throw new Error(\"No usable HttpClient found.\");\r\n }\r\n }\r\n /** @inheritDoc */\r\n send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return this._httpClient.send(request);\r\n }\r\n getCookieString(url) {\r\n return this._httpClient.getCookieString(url);\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nexport class HeaderNames {\r\n}\r\nHeaderNames.Authorization = \"Authorization\";\r\nHeaderNames.Cookie = \"Cookie\";\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// Rough polyfill of https://developer.mozilla.org/en-US/docs/Web/API/AbortController\r\n// We don't actually ever use the API being polyfilled, we always use the polyfill because\r\n// it's a very new API right now.\r\n// Not exported from index.\r\n/** @private */\r\nexport class AbortController {\r\n constructor() {\r\n this._isAborted = false;\r\n this.onabort = null;\r\n }\r\n abort() {\r\n if (!this._isAborted) {\r\n this._isAborted = true;\r\n if (this.onabort) {\r\n this.onabort();\r\n }\r\n }\r\n }\r\n get signal() {\r\n return this;\r\n }\r\n get aborted() {\r\n return this._isAborted;\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortController } from \"./AbortController\";\r\nimport { HttpError, TimeoutError } from \"./Errors\";\r\nimport { HeaderNames } from \"./HeaderNames\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, sendMessage } from \"./Utils\";\r\n// Not exported from 'index', this type is internal.\r\n/** @private */\r\nexport class LongPollingTransport {\r\n constructor(httpClient, accessTokenFactory, logger, options) {\r\n this._httpClient = httpClient;\r\n this._accessTokenFactory = accessTokenFactory;\r\n this._logger = logger;\r\n this._pollAbort = new AbortController();\r\n this._options = options;\r\n this._running = false;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n // This is an internal type, not exported from 'index' so this is really just internal.\r\n get pollAborted() {\r\n return this._pollAbort.aborted;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._url = url;\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Connecting.\");\r\n // Allow binary format on Node and Browsers that support binary content (indicated by the presence of responseType property)\r\n if (transferFormat === TransferFormat.Binary &&\r\n (typeof XMLHttpRequest !== \"undefined\" && typeof new XMLHttpRequest().responseType !== \"string\")) {\r\n throw new Error(\"Binary protocols over XmlHttpRequest not implementing advanced features are not supported.\");\r\n }\r\n const [name, value] = getUserAgentHeader();\r\n const headers = { [name]: value, ...this._options.headers };\r\n const pollOptions = {\r\n abortSignal: this._pollAbort.signal,\r\n headers,\r\n timeout: 100000,\r\n withCredentials: this._options.withCredentials,\r\n };\r\n if (transferFormat === TransferFormat.Binary) {\r\n pollOptions.responseType = \"arraybuffer\";\r\n }\r\n const token = await this._getAccessToken();\r\n this._updateHeaderToken(pollOptions, token);\r\n // Make initial long polling request\r\n // Server uses first long polling request to finish initializing connection and it returns without data\r\n const pollUrl = `${url}&_=${Date.now()}`;\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) polling: ${pollUrl}.`);\r\n const response = await this._httpClient.get(pollUrl, pollOptions);\r\n if (response.statusCode !== 200) {\r\n this._logger.log(LogLevel.Error, `(LongPolling transport) Unexpected response code: ${response.statusCode}.`);\r\n // Mark running as false so that the poll immediately ends and runs the close logic\r\n this._closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this._running = false;\r\n }\r\n else {\r\n this._running = true;\r\n }\r\n this._receiving = this._poll(this._url, pollOptions);\r\n }\r\n async _getAccessToken() {\r\n if (this._accessTokenFactory) {\r\n return await this._accessTokenFactory();\r\n }\r\n return null;\r\n }\r\n _updateHeaderToken(request, token) {\r\n if (!request.headers) {\r\n request.headers = {};\r\n }\r\n if (token) {\r\n request.headers[HeaderNames.Authorization] = `Bearer ${token}`;\r\n return;\r\n }\r\n if (request.headers[HeaderNames.Authorization]) {\r\n delete request.headers[HeaderNames.Authorization];\r\n }\r\n }\r\n async _poll(url, pollOptions) {\r\n try {\r\n while (this._running) {\r\n // We have to get the access token on each poll, in case it changes\r\n const token = await this._getAccessToken();\r\n this._updateHeaderToken(pollOptions, token);\r\n try {\r\n const pollUrl = `${url}&_=${Date.now()}`;\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) polling: ${pollUrl}.`);\r\n const response = await this._httpClient.get(pollUrl, pollOptions);\r\n if (response.statusCode === 204) {\r\n this._logger.log(LogLevel.Information, \"(LongPolling transport) Poll terminated by server.\");\r\n this._running = false;\r\n }\r\n else if (response.statusCode !== 200) {\r\n this._logger.log(LogLevel.Error, `(LongPolling transport) Unexpected response code: ${response.statusCode}.`);\r\n // Unexpected status code\r\n this._closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this._running = false;\r\n }\r\n else {\r\n // Process the response\r\n if (response.content) {\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) data received. ${getDataDetail(response.content, this._options.logMessageContent)}.`);\r\n if (this.onreceive) {\r\n this.onreceive(response.content);\r\n }\r\n }\r\n else {\r\n // This is another way timeout manifest.\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n }\r\n }\r\n catch (e) {\r\n if (!this._running) {\r\n // Log but disregard errors that occur after stopping\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) Poll errored after shutdown: ${e.message}`);\r\n }\r\n else {\r\n if (e instanceof TimeoutError) {\r\n // Ignore timeouts and reissue the poll.\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n else {\r\n // Close the connection with the error as the result.\r\n this._closeError = e;\r\n this._running = false;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n finally {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Polling complete.\");\r\n // We will reach here with pollAborted==false when the server returned a response causing the transport to stop.\r\n // If pollAborted==true then client initiated the stop and the stop method will raise the close event after DELETE is sent.\r\n if (!this.pollAborted) {\r\n this._raiseOnClose();\r\n }\r\n }\r\n }\r\n async send(data) {\r\n if (!this._running) {\r\n return Promise.reject(new Error(\"Cannot send until the transport is connected\"));\r\n }\r\n return sendMessage(this._logger, \"LongPolling\", this._httpClient, this._url, this._accessTokenFactory, data, this._options);\r\n }\r\n async stop() {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Stopping polling.\");\r\n // Tell receiving loop to stop, abort any current request, and then wait for it to finish\r\n this._running = false;\r\n this._pollAbort.abort();\r\n try {\r\n await this._receiving;\r\n // Send DELETE to clean up long polling on the server\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) sending DELETE request to ${this._url}.`);\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n const deleteOptions = {\r\n headers: { ...headers, ...this._options.headers },\r\n timeout: this._options.timeout,\r\n withCredentials: this._options.withCredentials,\r\n };\r\n const token = await this._getAccessToken();\r\n this._updateHeaderToken(deleteOptions, token);\r\n await this._httpClient.delete(this._url, deleteOptions);\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) DELETE request sent.\");\r\n }\r\n finally {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Stop finished.\");\r\n // Raise close event here instead of in polling\r\n // It needs to happen after the DELETE request is sent\r\n this._raiseOnClose();\r\n }\r\n }\r\n _raiseOnClose() {\r\n if (this.onclose) {\r\n let logMessage = \"(LongPolling transport) Firing onclose event.\";\r\n if (this._closeError) {\r\n logMessage += \" Error: \" + this._closeError;\r\n }\r\n this._logger.log(LogLevel.Trace, logMessage);\r\n this.onclose(this._closeError);\r\n }\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, Platform, sendMessage } from \"./Utils\";\r\n/** @private */\r\nexport class ServerSentEventsTransport {\r\n constructor(httpClient, accessTokenFactory, logger, options) {\r\n this._httpClient = httpClient;\r\n this._accessTokenFactory = accessTokenFactory;\r\n this._logger = logger;\r\n this._options = options;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Trace, \"(SSE transport) Connecting.\");\r\n // set url before accessTokenFactory because this.url is only for send and we set the auth header instead of the query string for send\r\n this._url = url;\r\n if (this._accessTokenFactory) {\r\n const token = await this._accessTokenFactory();\r\n if (token) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + `access_token=${encodeURIComponent(token)}`;\r\n }\r\n }\r\n return new Promise((resolve, reject) => {\r\n let opened = false;\r\n if (transferFormat !== TransferFormat.Text) {\r\n reject(new Error(\"The Server-Sent Events transport only supports the 'Text' transfer format\"));\r\n return;\r\n }\r\n let eventSource;\r\n if (Platform.isBrowser || Platform.isWebWorker) {\r\n eventSource = new this._options.EventSource(url, { withCredentials: this._options.withCredentials });\r\n }\r\n else {\r\n // Non-browser passes cookies via the dictionary\r\n const cookies = this._httpClient.getCookieString(url);\r\n const headers = {};\r\n headers.Cookie = cookies;\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n eventSource = new this._options.EventSource(url, { withCredentials: this._options.withCredentials, headers: { ...headers, ...this._options.headers } });\r\n }\r\n try {\r\n eventSource.onmessage = (e) => {\r\n if (this.onreceive) {\r\n try {\r\n this._logger.log(LogLevel.Trace, `(SSE transport) data received. ${getDataDetail(e.data, this._options.logMessageContent)}.`);\r\n this.onreceive(e.data);\r\n }\r\n catch (error) {\r\n this._close(error);\r\n return;\r\n }\r\n }\r\n };\r\n // @ts-ignore: not using event on purpose\r\n eventSource.onerror = (e) => {\r\n // EventSource doesn't give any useful information about server side closes.\r\n if (opened) {\r\n this._close();\r\n }\r\n else {\r\n reject(new Error(\"EventSource failed to connect. The connection could not be found on the server,\"\r\n + \" either the connection ID is not present on the server, or a proxy is refusing/buffering the connection.\"\r\n + \" If you have multiple servers check that sticky sessions are enabled.\"));\r\n }\r\n };\r\n eventSource.onopen = () => {\r\n this._logger.log(LogLevel.Information, `SSE connected to ${this._url}`);\r\n this._eventSource = eventSource;\r\n opened = true;\r\n resolve();\r\n };\r\n }\r\n catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n });\r\n }\r\n async send(data) {\r\n if (!this._eventSource) {\r\n return Promise.reject(new Error(\"Cannot send until the transport is connected\"));\r\n }\r\n return sendMessage(this._logger, \"SSE\", this._httpClient, this._url, this._accessTokenFactory, data, this._options);\r\n }\r\n stop() {\r\n this._close();\r\n return Promise.resolve();\r\n }\r\n _close(e) {\r\n if (this._eventSource) {\r\n this._eventSource.close();\r\n this._eventSource = undefined;\r\n if (this.onclose) {\r\n this.onclose(e);\r\n }\r\n }\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HeaderNames } from \"./HeaderNames\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, Platform } from \"./Utils\";\r\n/** @private */\r\nexport class WebSocketTransport {\r\n constructor(httpClient, accessTokenFactory, logger, logMessageContent, webSocketConstructor, headers) {\r\n this._logger = logger;\r\n this._accessTokenFactory = accessTokenFactory;\r\n this._logMessageContent = logMessageContent;\r\n this._webSocketConstructor = webSocketConstructor;\r\n this._httpClient = httpClient;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n this._headers = headers;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Trace, \"(WebSockets transport) Connecting.\");\r\n if (this._accessTokenFactory) {\r\n const token = await this._accessTokenFactory();\r\n if (token) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + `access_token=${encodeURIComponent(token)}`;\r\n }\r\n }\r\n return new Promise((resolve, reject) => {\r\n url = url.replace(/^http/, \"ws\");\r\n let webSocket;\r\n const cookies = this._httpClient.getCookieString(url);\r\n let opened = false;\r\n if (Platform.isNode) {\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n if (cookies) {\r\n headers[HeaderNames.Cookie] = `${cookies}`;\r\n }\r\n // Only pass headers when in non-browser environments\r\n webSocket = new this._webSocketConstructor(url, undefined, {\r\n headers: { ...headers, ...this._headers },\r\n });\r\n }\r\n if (!webSocket) {\r\n // Chrome is not happy with passing 'undefined' as protocol\r\n webSocket = new this._webSocketConstructor(url);\r\n }\r\n if (transferFormat === TransferFormat.Binary) {\r\n webSocket.binaryType = \"arraybuffer\";\r\n }\r\n webSocket.onopen = (_event) => {\r\n this._logger.log(LogLevel.Information, `WebSocket connected to ${url}.`);\r\n this._webSocket = webSocket;\r\n opened = true;\r\n resolve();\r\n };\r\n webSocket.onerror = (event) => {\r\n let error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = \"There was an error with the transport\";\r\n }\r\n this._logger.log(LogLevel.Information, `(WebSockets transport) ${error}.`);\r\n };\r\n webSocket.onmessage = (message) => {\r\n this._logger.log(LogLevel.Trace, `(WebSockets transport) data received. ${getDataDetail(message.data, this._logMessageContent)}.`);\r\n if (this.onreceive) {\r\n try {\r\n this.onreceive(message.data);\r\n }\r\n catch (error) {\r\n this._close(error);\r\n return;\r\n }\r\n }\r\n };\r\n webSocket.onclose = (event) => {\r\n // Don't call close handler if connection was never established\r\n // We'll reject the connect call instead\r\n if (opened) {\r\n this._close(event);\r\n }\r\n else {\r\n let error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = \"WebSocket failed to connect. The connection could not be found on the server,\"\r\n + \" either the endpoint may not be a SignalR endpoint,\"\r\n + \" the connection ID is not present on the server, or there is a proxy blocking WebSockets.\"\r\n + \" If you have multiple servers check that sticky sessions are enabled.\";\r\n }\r\n reject(new Error(error));\r\n }\r\n };\r\n });\r\n }\r\n send(data) {\r\n if (this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN) {\r\n this._logger.log(LogLevel.Trace, `(WebSockets transport) sending data. ${getDataDetail(data, this._logMessageContent)}.`);\r\n this._webSocket.send(data);\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(\"WebSocket is not in the OPEN state\");\r\n }\r\n stop() {\r\n if (this._webSocket) {\r\n // Manually invoke onclose callback inline so we know the HttpConnection was closed properly before returning\r\n // This also solves an issue where websocket.onclose could take 18+ seconds to trigger during network disconnects\r\n this._close(undefined);\r\n }\r\n return Promise.resolve();\r\n }\r\n _close(event) {\r\n // webSocket will be null if the transport did not start successfully\r\n if (this._webSocket) {\r\n // Clear websocket handlers because we are considering the socket closed now\r\n this._webSocket.onclose = () => { };\r\n this._webSocket.onmessage = () => { };\r\n this._webSocket.onerror = () => { };\r\n this._webSocket.close();\r\n this._webSocket = undefined;\r\n }\r\n this._logger.log(LogLevel.Trace, \"(WebSockets transport) socket closed.\");\r\n if (this.onclose) {\r\n if (this._isCloseEvent(event) && (event.wasClean === false || event.code !== 1000)) {\r\n this.onclose(new Error(`WebSocket closed with status code: ${event.code} (${event.reason || \"no reason given\"}).`));\r\n }\r\n else if (event instanceof Error) {\r\n this.onclose(event);\r\n }\r\n else {\r\n this.onclose();\r\n }\r\n }\r\n }\r\n _isCloseEvent(event) {\r\n return event && typeof event.wasClean === \"boolean\" && typeof event.code === \"number\";\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { DefaultHttpClient } from \"./DefaultHttpClient\";\r\nimport { AggregateErrors, DisabledTransportError, FailedToNegotiateWithServerError, FailedToStartTransportError, HttpError, UnsupportedTransportError } from \"./Errors\";\r\nimport { HeaderNames } from \"./HeaderNames\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { HttpTransportType, TransferFormat } from \"./ITransport\";\r\nimport { LongPollingTransport } from \"./LongPollingTransport\";\r\nimport { ServerSentEventsTransport } from \"./ServerSentEventsTransport\";\r\nimport { Arg, createLogger, getUserAgentHeader, Platform } from \"./Utils\";\r\nimport { WebSocketTransport } from \"./WebSocketTransport\";\r\nconst MAX_REDIRECTS = 100;\r\n/** @private */\r\nexport class HttpConnection {\r\n constructor(url, options = {}) {\r\n this._stopPromiseResolver = () => { };\r\n this.features = {};\r\n this._negotiateVersion = 1;\r\n Arg.isRequired(url, \"url\");\r\n this._logger = createLogger(options.logger);\r\n this.baseUrl = this._resolveUrl(url);\r\n options = options || {};\r\n options.logMessageContent = options.logMessageContent === undefined ? false : options.logMessageContent;\r\n if (typeof options.withCredentials === \"boolean\" || options.withCredentials === undefined) {\r\n options.withCredentials = options.withCredentials === undefined ? true : options.withCredentials;\r\n }\r\n else {\r\n throw new Error(\"withCredentials option was not a 'boolean' or 'undefined' value\");\r\n }\r\n options.timeout = options.timeout === undefined ? 100 * 1000 : options.timeout;\r\n let webSocketModule = null;\r\n let eventSourceModule = null;\r\n if (Platform.isNode && typeof require !== \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n webSocketModule = requireFunc(\"ws\");\r\n eventSourceModule = requireFunc(\"eventsource\");\r\n }\r\n if (!Platform.isNode && typeof WebSocket !== \"undefined\" && !options.WebSocket) {\r\n options.WebSocket = WebSocket;\r\n }\r\n else if (Platform.isNode && !options.WebSocket) {\r\n if (webSocketModule) {\r\n options.WebSocket = webSocketModule;\r\n }\r\n }\r\n if (!Platform.isNode && typeof EventSource !== \"undefined\" && !options.EventSource) {\r\n options.EventSource = EventSource;\r\n }\r\n else if (Platform.isNode && !options.EventSource) {\r\n if (typeof eventSourceModule !== \"undefined\") {\r\n options.EventSource = eventSourceModule;\r\n }\r\n }\r\n this._httpClient = options.httpClient || new DefaultHttpClient(this._logger);\r\n this._connectionState = \"Disconnected\" /* Disconnected */;\r\n this._connectionStarted = false;\r\n this._options = options;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n async start(transferFormat) {\r\n transferFormat = transferFormat || TransferFormat.Binary;\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Debug, `Starting connection with transfer format '${TransferFormat[transferFormat]}'.`);\r\n if (this._connectionState !== \"Disconnected\" /* Disconnected */) {\r\n return Promise.reject(new Error(\"Cannot start an HttpConnection that is not in the 'Disconnected' state.\"));\r\n }\r\n this._connectionState = \"Connecting\" /* Connecting */;\r\n this._startInternalPromise = this._startInternal(transferFormat);\r\n await this._startInternalPromise;\r\n // The TypeScript compiler thinks that connectionState must be Connecting here. The TypeScript compiler is wrong.\r\n if (this._connectionState === \"Disconnecting\" /* Disconnecting */) {\r\n // stop() was called and transitioned the client into the Disconnecting state.\r\n const message = \"Failed to start the HttpConnection before stop() was called.\";\r\n this._logger.log(LogLevel.Error, message);\r\n // We cannot await stopPromise inside startInternal since stopInternal awaits the startInternalPromise.\r\n await this._stopPromise;\r\n return Promise.reject(new Error(message));\r\n }\r\n else if (this._connectionState !== \"Connected\" /* Connected */) {\r\n // stop() was called and transitioned the client into the Disconnecting state.\r\n const message = \"HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!\";\r\n this._logger.log(LogLevel.Error, message);\r\n return Promise.reject(new Error(message));\r\n }\r\n this._connectionStarted = true;\r\n }\r\n send(data) {\r\n if (this._connectionState !== \"Connected\" /* Connected */) {\r\n return Promise.reject(new Error(\"Cannot send data if the connection is not in the 'Connected' State.\"));\r\n }\r\n if (!this._sendQueue) {\r\n this._sendQueue = new TransportSendQueue(this.transport);\r\n }\r\n // Transport will not be null if state is connected\r\n return this._sendQueue.send(data);\r\n }\r\n async stop(error) {\r\n if (this._connectionState === \"Disconnected\" /* Disconnected */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnected state.`);\r\n return Promise.resolve();\r\n }\r\n if (this._connectionState === \"Disconnecting\" /* Disconnecting */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnecting state.`);\r\n return this._stopPromise;\r\n }\r\n this._connectionState = \"Disconnecting\" /* Disconnecting */;\r\n this._stopPromise = new Promise((resolve) => {\r\n // Don't complete stop() until stopConnection() completes.\r\n this._stopPromiseResolver = resolve;\r\n });\r\n // stopInternal should never throw so just observe it.\r\n await this._stopInternal(error);\r\n await this._stopPromise;\r\n }\r\n async _stopInternal(error) {\r\n // Set error as soon as possible otherwise there is a race between\r\n // the transport closing and providing an error and the error from a close message\r\n // We would prefer the close message error.\r\n this._stopError = error;\r\n try {\r\n await this._startInternalPromise;\r\n }\r\n catch (e) {\r\n // This exception is returned to the user as a rejected Promise from the start method.\r\n }\r\n // The transport's onclose will trigger stopConnection which will run our onclose event.\r\n // The transport should always be set if currently connected. If it wasn't set, it's likely because\r\n // stop was called during start() and start() failed.\r\n if (this.transport) {\r\n try {\r\n await this.transport.stop();\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `HttpConnection.transport.stop() threw error '${e}'.`);\r\n this._stopConnection();\r\n }\r\n this.transport = undefined;\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, \"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.\");\r\n }\r\n }\r\n async _startInternal(transferFormat) {\r\n // Store the original base url and the access token factory since they may change\r\n // as part of negotiating\r\n let url = this.baseUrl;\r\n this._accessTokenFactory = this._options.accessTokenFactory;\r\n try {\r\n if (this._options.skipNegotiation) {\r\n if (this._options.transport === HttpTransportType.WebSockets) {\r\n // No need to add a connection ID in this case\r\n this.transport = this._constructTransport(HttpTransportType.WebSockets);\r\n // We should just call connect directly in this case.\r\n // No fallback or negotiate in this case.\r\n await this._startTransport(url, transferFormat);\r\n }\r\n else {\r\n throw new Error(\"Negotiation can only be skipped when using the WebSocket transport directly.\");\r\n }\r\n }\r\n else {\r\n let negotiateResponse = null;\r\n let redirects = 0;\r\n do {\r\n negotiateResponse = await this._getNegotiationResponse(url);\r\n // the user tries to stop the connection when it is being started\r\n if (this._connectionState === \"Disconnecting\" /* Disconnecting */ || this._connectionState === \"Disconnected\" /* Disconnected */) {\r\n throw new Error(\"The connection was stopped during negotiation.\");\r\n }\r\n if (negotiateResponse.error) {\r\n throw new Error(negotiateResponse.error);\r\n }\r\n if (negotiateResponse.ProtocolVersion) {\r\n throw new Error(\"Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.\");\r\n }\r\n if (negotiateResponse.url) {\r\n url = negotiateResponse.url;\r\n }\r\n if (negotiateResponse.accessToken) {\r\n // Replace the current access token factory with one that uses\r\n // the returned access token\r\n const accessToken = negotiateResponse.accessToken;\r\n this._accessTokenFactory = () => accessToken;\r\n }\r\n redirects++;\r\n } while (negotiateResponse.url && redirects < MAX_REDIRECTS);\r\n if (redirects === MAX_REDIRECTS && negotiateResponse.url) {\r\n throw new Error(\"Negotiate redirection limit exceeded.\");\r\n }\r\n await this._createTransport(url, this._options.transport, negotiateResponse, transferFormat);\r\n }\r\n if (this.transport instanceof LongPollingTransport) {\r\n this.features.inherentKeepAlive = true;\r\n }\r\n if (this._connectionState === \"Connecting\" /* Connecting */) {\r\n // Ensure the connection transitions to the connected state prior to completing this.startInternalPromise.\r\n // start() will handle the case when stop was called and startInternal exits still in the disconnecting state.\r\n this._logger.log(LogLevel.Debug, \"The HttpConnection connected successfully.\");\r\n this._connectionState = \"Connected\" /* Connected */;\r\n }\r\n // stop() is waiting on us via this.startInternalPromise so keep this.transport around so it can clean up.\r\n // This is the only case startInternal can exit in neither the connected nor disconnected state because stopConnection()\r\n // will transition to the disconnected state. start() will wait for the transition using the stopPromise.\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, \"Failed to start the connection: \" + e);\r\n this._connectionState = \"Disconnected\" /* Disconnected */;\r\n this.transport = undefined;\r\n // if start fails, any active calls to stop assume that start will complete the stop promise\r\n this._stopPromiseResolver();\r\n return Promise.reject(e);\r\n }\r\n }\r\n async _getNegotiationResponse(url) {\r\n const headers = {};\r\n if (this._accessTokenFactory) {\r\n const token = await this._accessTokenFactory();\r\n if (token) {\r\n headers[HeaderNames.Authorization] = `Bearer ${token}`;\r\n }\r\n }\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n const negotiateUrl = this._resolveNegotiateUrl(url);\r\n this._logger.log(LogLevel.Debug, `Sending negotiation request: ${negotiateUrl}.`);\r\n try {\r\n const response = await this._httpClient.post(negotiateUrl, {\r\n content: \"\",\r\n headers: { ...headers, ...this._options.headers },\r\n timeout: this._options.timeout,\r\n withCredentials: this._options.withCredentials,\r\n });\r\n if (response.statusCode !== 200) {\r\n return Promise.reject(new Error(`Unexpected status code returned from negotiate '${response.statusCode}'`));\r\n }\r\n const negotiateResponse = JSON.parse(response.content);\r\n if (!negotiateResponse.negotiateVersion || negotiateResponse.negotiateVersion < 1) {\r\n // Negotiate version 0 doesn't use connectionToken\r\n // So we set it equal to connectionId so all our logic can use connectionToken without being aware of the negotiate version\r\n negotiateResponse.connectionToken = negotiateResponse.connectionId;\r\n }\r\n return negotiateResponse;\r\n }\r\n catch (e) {\r\n let errorMessage = \"Failed to complete negotiation with the server: \" + e;\r\n if (e instanceof HttpError) {\r\n if (e.statusCode === 404) {\r\n errorMessage = errorMessage + \" Either this is not a SignalR endpoint or there is a proxy blocking the connection.\";\r\n }\r\n }\r\n this._logger.log(LogLevel.Error, errorMessage);\r\n return Promise.reject(new FailedToNegotiateWithServerError(errorMessage));\r\n }\r\n }\r\n _createConnectUrl(url, connectionToken) {\r\n if (!connectionToken) {\r\n return url;\r\n }\r\n return url + (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + `id=${connectionToken}`;\r\n }\r\n async _createTransport(url, requestedTransport, negotiateResponse, requestedTransferFormat) {\r\n let connectUrl = this._createConnectUrl(url, negotiateResponse.connectionToken);\r\n if (this._isITransport(requestedTransport)) {\r\n this._logger.log(LogLevel.Debug, \"Connection was provided an instance of ITransport, using that directly.\");\r\n this.transport = requestedTransport;\r\n await this._startTransport(connectUrl, requestedTransferFormat);\r\n this.connectionId = negotiateResponse.connectionId;\r\n return;\r\n }\r\n const transportExceptions = [];\r\n const transports = negotiateResponse.availableTransports || [];\r\n let negotiate = negotiateResponse;\r\n for (const endpoint of transports) {\r\n const transportOrError = this._resolveTransportOrError(endpoint, requestedTransport, requestedTransferFormat);\r\n if (transportOrError instanceof Error) {\r\n // Store the error and continue, we don't want to cause a re-negotiate in these cases\r\n transportExceptions.push(`${endpoint.transport} failed:`);\r\n transportExceptions.push(transportOrError);\r\n }\r\n else if (this._isITransport(transportOrError)) {\r\n this.transport = transportOrError;\r\n if (!negotiate) {\r\n try {\r\n negotiate = await this._getNegotiationResponse(url);\r\n }\r\n catch (ex) {\r\n return Promise.reject(ex);\r\n }\r\n connectUrl = this._createConnectUrl(url, negotiate.connectionToken);\r\n }\r\n try {\r\n await this._startTransport(connectUrl, requestedTransferFormat);\r\n this.connectionId = negotiate.connectionId;\r\n return;\r\n }\r\n catch (ex) {\r\n this._logger.log(LogLevel.Error, `Failed to start the transport '${endpoint.transport}': ${ex}`);\r\n negotiate = undefined;\r\n transportExceptions.push(new FailedToStartTransportError(`${endpoint.transport} failed: ${ex}`, HttpTransportType[endpoint.transport]));\r\n if (this._connectionState !== \"Connecting\" /* Connecting */) {\r\n const message = \"Failed to select transport before stop() was called.\";\r\n this._logger.log(LogLevel.Debug, message);\r\n return Promise.reject(new Error(message));\r\n }\r\n }\r\n }\r\n }\r\n if (transportExceptions.length > 0) {\r\n return Promise.reject(new AggregateErrors(`Unable to connect to the server with any of the available transports. ${transportExceptions.join(\" \")}`, transportExceptions));\r\n }\r\n return Promise.reject(new Error(\"None of the transports supported by the client are supported by the server.\"));\r\n }\r\n _constructTransport(transport) {\r\n switch (transport) {\r\n case HttpTransportType.WebSockets:\r\n if (!this._options.WebSocket) {\r\n throw new Error(\"'WebSocket' is not supported in your environment.\");\r\n }\r\n return new WebSocketTransport(this._httpClient, this._accessTokenFactory, this._logger, this._options.logMessageContent, this._options.WebSocket, this._options.headers || {});\r\n case HttpTransportType.ServerSentEvents:\r\n if (!this._options.EventSource) {\r\n throw new Error(\"'EventSource' is not supported in your environment.\");\r\n }\r\n return new ServerSentEventsTransport(this._httpClient, this._accessTokenFactory, this._logger, this._options);\r\n case HttpTransportType.LongPolling:\r\n return new LongPollingTransport(this._httpClient, this._accessTokenFactory, this._logger, this._options);\r\n default:\r\n throw new Error(`Unknown transport: ${transport}.`);\r\n }\r\n }\r\n _startTransport(url, transferFormat) {\r\n this.transport.onreceive = this.onreceive;\r\n this.transport.onclose = (e) => this._stopConnection(e);\r\n return this.transport.connect(url, transferFormat);\r\n }\r\n _resolveTransportOrError(endpoint, requestedTransport, requestedTransferFormat) {\r\n const transport = HttpTransportType[endpoint.transport];\r\n if (transport === null || transport === undefined) {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${endpoint.transport}' because it is not supported by this client.`);\r\n return new Error(`Skipping transport '${endpoint.transport}' because it is not supported by this client.`);\r\n }\r\n else {\r\n if (transportMatches(requestedTransport, transport)) {\r\n const transferFormats = endpoint.transferFormats.map((s) => TransferFormat[s]);\r\n if (transferFormats.indexOf(requestedTransferFormat) >= 0) {\r\n if ((transport === HttpTransportType.WebSockets && !this._options.WebSocket) ||\r\n (transport === HttpTransportType.ServerSentEvents && !this._options.EventSource)) {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it is not supported in your environment.'`);\r\n return new UnsupportedTransportError(`'${HttpTransportType[transport]}' is not supported in your environment.`, transport);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Selecting transport '${HttpTransportType[transport]}'.`);\r\n try {\r\n return this._constructTransport(transport);\r\n }\r\n catch (ex) {\r\n return ex;\r\n }\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it does not support the requested transfer format '${TransferFormat[requestedTransferFormat]}'.`);\r\n return new Error(`'${HttpTransportType[transport]}' does not support ${TransferFormat[requestedTransferFormat]}.`);\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it was disabled by the client.`);\r\n return new DisabledTransportError(`'${HttpTransportType[transport]}' is disabled by the client.`, transport);\r\n }\r\n }\r\n }\r\n _isITransport(transport) {\r\n return transport && typeof (transport) === \"object\" && \"connect\" in transport;\r\n }\r\n _stopConnection(error) {\r\n this._logger.log(LogLevel.Debug, `HttpConnection.stopConnection(${error}) called while in state ${this._connectionState}.`);\r\n this.transport = undefined;\r\n // If we have a stopError, it takes precedence over the error from the transport\r\n error = this._stopError || error;\r\n this._stopError = undefined;\r\n if (this._connectionState === \"Disconnected\" /* Disconnected */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection is already in the disconnected state.`);\r\n return;\r\n }\r\n if (this._connectionState === \"Connecting\" /* Connecting */) {\r\n this._logger.log(LogLevel.Warning, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection is still in the connecting state.`);\r\n throw new Error(`HttpConnection.stopConnection(${error}) was called while the connection is still in the connecting state.`);\r\n }\r\n if (this._connectionState === \"Disconnecting\" /* Disconnecting */) {\r\n // A call to stop() induced this call to stopConnection and needs to be completed.\r\n // Any stop() awaiters will be scheduled to continue after the onclose callback fires.\r\n this._stopPromiseResolver();\r\n }\r\n if (error) {\r\n this._logger.log(LogLevel.Error, `Connection disconnected with error '${error}'.`);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Information, \"Connection disconnected.\");\r\n }\r\n if (this._sendQueue) {\r\n this._sendQueue.stop().catch((e) => {\r\n this._logger.log(LogLevel.Error, `TransportSendQueue.stop() threw error '${e}'.`);\r\n });\r\n this._sendQueue = undefined;\r\n }\r\n this.connectionId = undefined;\r\n this._connectionState = \"Disconnected\" /* Disconnected */;\r\n if (this._connectionStarted) {\r\n this._connectionStarted = false;\r\n try {\r\n if (this.onclose) {\r\n this.onclose(error);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `HttpConnection.onclose(${error}) threw error '${e}'.`);\r\n }\r\n }\r\n }\r\n _resolveUrl(url) {\r\n // startsWith is not supported in IE\r\n if (url.lastIndexOf(\"https://\", 0) === 0 || url.lastIndexOf(\"http://\", 0) === 0) {\r\n return url;\r\n }\r\n if (!Platform.isBrowser) {\r\n throw new Error(`Cannot resolve '${url}'.`);\r\n }\r\n // Setting the url to the href propery of an anchor tag handles normalization\r\n // for us. There are 3 main cases.\r\n // 1. Relative path normalization e.g \"b\" -> \"http://localhost:5000/a/b\"\r\n // 2. Absolute path normalization e.g \"/a/b\" -> \"http://localhost:5000/a/b\"\r\n // 3. Networkpath reference normalization e.g \"//localhost:5000/a/b\" -> \"http://localhost:5000/a/b\"\r\n const aTag = window.document.createElement(\"a\");\r\n aTag.href = url;\r\n this._logger.log(LogLevel.Information, `Normalizing '${url}' to '${aTag.href}'.`);\r\n return aTag.href;\r\n }\r\n _resolveNegotiateUrl(url) {\r\n const index = url.indexOf(\"?\");\r\n let negotiateUrl = url.substring(0, index === -1 ? url.length : index);\r\n if (negotiateUrl[negotiateUrl.length - 1] !== \"/\") {\r\n negotiateUrl += \"/\";\r\n }\r\n negotiateUrl += \"negotiate\";\r\n negotiateUrl += index === -1 ? \"\" : url.substring(index);\r\n if (negotiateUrl.indexOf(\"negotiateVersion\") === -1) {\r\n negotiateUrl += index === -1 ? \"?\" : \"&\";\r\n negotiateUrl += \"negotiateVersion=\" + this._negotiateVersion;\r\n }\r\n return negotiateUrl;\r\n }\r\n}\r\nfunction transportMatches(requestedTransport, actualTransport) {\r\n return !requestedTransport || ((actualTransport & requestedTransport) !== 0);\r\n}\r\n/** @private */\r\nexport class TransportSendQueue {\r\n constructor(_transport) {\r\n this._transport = _transport;\r\n this._buffer = [];\r\n this._executing = true;\r\n this._sendBufferedData = new PromiseSource();\r\n this._transportResult = new PromiseSource();\r\n this._sendLoopPromise = this._sendLoop();\r\n }\r\n send(data) {\r\n this._bufferData(data);\r\n if (!this._transportResult) {\r\n this._transportResult = new PromiseSource();\r\n }\r\n return this._transportResult.promise;\r\n }\r\n stop() {\r\n this._executing = false;\r\n this._sendBufferedData.resolve();\r\n return this._sendLoopPromise;\r\n }\r\n _bufferData(data) {\r\n if (this._buffer.length && typeof (this._buffer[0]) !== typeof (data)) {\r\n throw new Error(`Expected data to be of type ${typeof (this._buffer)} but was of type ${typeof (data)}`);\r\n }\r\n this._buffer.push(data);\r\n this._sendBufferedData.resolve();\r\n }\r\n async _sendLoop() {\r\n while (true) {\r\n await this._sendBufferedData.promise;\r\n if (!this._executing) {\r\n if (this._transportResult) {\r\n this._transportResult.reject(\"Connection stopped.\");\r\n }\r\n break;\r\n }\r\n this._sendBufferedData = new PromiseSource();\r\n const transportResult = this._transportResult;\r\n this._transportResult = undefined;\r\n const data = typeof (this._buffer[0]) === \"string\" ?\r\n this._buffer.join(\"\") :\r\n TransportSendQueue._concatBuffers(this._buffer);\r\n this._buffer.length = 0;\r\n try {\r\n await this._transport.send(data);\r\n transportResult.resolve();\r\n }\r\n catch (error) {\r\n transportResult.reject(error);\r\n }\r\n }\r\n }\r\n static _concatBuffers(arrayBuffers) {\r\n const totalLength = arrayBuffers.map((b) => b.byteLength).reduce((a, b) => a + b);\r\n const result = new Uint8Array(totalLength);\r\n let offset = 0;\r\n for (const item of arrayBuffers) {\r\n result.set(new Uint8Array(item), offset);\r\n offset += item.byteLength;\r\n }\r\n return result.buffer;\r\n }\r\n}\r\nclass PromiseSource {\r\n constructor() {\r\n this.promise = new Promise((resolve, reject) => [this._resolver, this._rejecter] = [resolve, reject]);\r\n }\r\n resolve() {\r\n this._resolver();\r\n }\r\n reject(reason) {\r\n this._rejecter(reason);\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// Not exported from index\r\n/** @private */\r\nexport class TextMessageFormat {\r\n static write(output) {\r\n return `${output}${TextMessageFormat.RecordSeparator}`;\r\n }\r\n static parse(input) {\r\n if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n const messages = input.split(TextMessageFormat.RecordSeparator);\r\n messages.pop();\r\n return messages;\r\n }\r\n}\r\nTextMessageFormat.RecordSeparatorCode = 0x1e;\r\nTextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\n/** @private */\r\nexport class HandshakeProtocol {\r\n // Handshake request is always JSON\r\n writeHandshakeRequest(handshakeRequest) {\r\n return TextMessageFormat.write(JSON.stringify(handshakeRequest));\r\n }\r\n parseHandshakeResponse(data) {\r\n let messageData;\r\n let remainingData;\r\n if (isArrayBuffer(data)) {\r\n // Format is binary but still need to read JSON text from handshake response\r\n const binaryData = new Uint8Array(data);\r\n const separatorIndex = binaryData.indexOf(TextMessageFormat.RecordSeparatorCode);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n const responseLength = separatorIndex + 1;\r\n messageData = String.fromCharCode.apply(null, Array.prototype.slice.call(binaryData.slice(0, responseLength)));\r\n remainingData = (binaryData.byteLength > responseLength) ? binaryData.slice(responseLength).buffer : null;\r\n }\r\n else {\r\n const textData = data;\r\n const separatorIndex = textData.indexOf(TextMessageFormat.RecordSeparator);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n const responseLength = separatorIndex + 1;\r\n messageData = textData.substring(0, responseLength);\r\n remainingData = (textData.length > responseLength) ? textData.substring(responseLength) : null;\r\n }\r\n // At this point we should have just the single handshake message\r\n const messages = TextMessageFormat.parse(messageData);\r\n const response = JSON.parse(messages[0]);\r\n if (response.type) {\r\n throw new Error(\"Expected a handshake response from the server.\");\r\n }\r\n const responseMessage = response;\r\n // multiple messages could have arrived with handshake\r\n // return additional data to be parsed as usual, or null if all parsed\r\n return [remainingData, responseMessage];\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Defines the type of a Hub Message. */\r\nexport var MessageType;\r\n(function (MessageType) {\r\n /** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */\r\n MessageType[MessageType[\"Invocation\"] = 1] = \"Invocation\";\r\n /** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */\r\n MessageType[MessageType[\"StreamItem\"] = 2] = \"StreamItem\";\r\n /** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */\r\n MessageType[MessageType[\"Completion\"] = 3] = \"Completion\";\r\n /** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */\r\n MessageType[MessageType[\"StreamInvocation\"] = 4] = \"StreamInvocation\";\r\n /** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */\r\n MessageType[MessageType[\"CancelInvocation\"] = 5] = \"CancelInvocation\";\r\n /** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */\r\n MessageType[MessageType[\"Ping\"] = 6] = \"Ping\";\r\n /** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */\r\n MessageType[MessageType[\"Close\"] = 7] = \"Close\";\r\n})(MessageType || (MessageType = {}));\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { SubjectSubscription } from \"./Utils\";\r\n/** Stream implementation to stream items to the server. */\r\nexport class Subject {\r\n constructor() {\r\n this.observers = [];\r\n }\r\n next(item) {\r\n for (const observer of this.observers) {\r\n observer.next(item);\r\n }\r\n }\r\n error(err) {\r\n for (const observer of this.observers) {\r\n if (observer.error) {\r\n observer.error(err);\r\n }\r\n }\r\n }\r\n complete() {\r\n for (const observer of this.observers) {\r\n if (observer.complete) {\r\n observer.complete();\r\n }\r\n }\r\n }\r\n subscribe(observer) {\r\n this.observers.push(observer);\r\n return new SubjectSubscription(this, observer);\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HandshakeProtocol } from \"./HandshakeProtocol\";\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Subject } from \"./Subject\";\r\nimport { Arg, getErrorString, Platform } from \"./Utils\";\r\nconst DEFAULT_TIMEOUT_IN_MS = 30 * 1000;\r\nconst DEFAULT_PING_INTERVAL_IN_MS = 15 * 1000;\r\n/** Describes the current state of the {@link HubConnection} to the server. */\r\nexport var HubConnectionState;\r\n(function (HubConnectionState) {\r\n /** The hub connection is disconnected. */\r\n HubConnectionState[\"Disconnected\"] = \"Disconnected\";\r\n /** The hub connection is connecting. */\r\n HubConnectionState[\"Connecting\"] = \"Connecting\";\r\n /** The hub connection is connected. */\r\n HubConnectionState[\"Connected\"] = \"Connected\";\r\n /** The hub connection is disconnecting. */\r\n HubConnectionState[\"Disconnecting\"] = \"Disconnecting\";\r\n /** The hub connection is reconnecting. */\r\n HubConnectionState[\"Reconnecting\"] = \"Reconnecting\";\r\n})(HubConnectionState || (HubConnectionState = {}));\r\n/** Represents a connection to a SignalR Hub. */\r\nexport class HubConnection {\r\n constructor(connection, logger, protocol, reconnectPolicy) {\r\n this._nextKeepAlive = 0;\r\n this._freezeEventListener = () => {\r\n this._logger.log(LogLevel.Warning, \"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep\");\r\n };\r\n Arg.isRequired(connection, \"connection\");\r\n Arg.isRequired(logger, \"logger\");\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.serverTimeoutInMilliseconds = DEFAULT_TIMEOUT_IN_MS;\r\n this.keepAliveIntervalInMilliseconds = DEFAULT_PING_INTERVAL_IN_MS;\r\n this._logger = logger;\r\n this._protocol = protocol;\r\n this.connection = connection;\r\n this._reconnectPolicy = reconnectPolicy;\r\n this._handshakeProtocol = new HandshakeProtocol();\r\n this.connection.onreceive = (data) => this._processIncomingData(data);\r\n this.connection.onclose = (error) => this._connectionClosed(error);\r\n this._callbacks = {};\r\n this._methods = {};\r\n this._closedCallbacks = [];\r\n this._reconnectingCallbacks = [];\r\n this._reconnectedCallbacks = [];\r\n this._invocationId = 0;\r\n this._receivedHandshakeResponse = false;\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n this._cachedPingMessage = this._protocol.writeMessage({ type: MessageType.Ping });\r\n }\r\n /** @internal */\r\n // Using a public static factory method means we can have a private constructor and an _internal_\r\n // create method that can be used by HubConnectionBuilder. An \"internal\" constructor would just\r\n // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a\r\n // public parameter-less constructor.\r\n static create(connection, logger, protocol, reconnectPolicy) {\r\n return new HubConnection(connection, logger, protocol, reconnectPolicy);\r\n }\r\n /** Indicates the state of the {@link HubConnection} to the server. */\r\n get state() {\r\n return this._connectionState;\r\n }\r\n /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either\r\n * in the disconnected state or if the negotiation step was skipped.\r\n */\r\n get connectionId() {\r\n return this.connection ? (this.connection.connectionId || null) : null;\r\n }\r\n /** Indicates the url of the {@link HubConnection} to the server. */\r\n get baseUrl() {\r\n return this.connection.baseUrl || \"\";\r\n }\r\n /**\r\n * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or\r\n * Reconnecting states.\r\n * @param {string} url The url to connect to.\r\n */\r\n set baseUrl(url) {\r\n if (this._connectionState !== HubConnectionState.Disconnected && this._connectionState !== HubConnectionState.Reconnecting) {\r\n throw new Error(\"The HubConnection must be in the Disconnected or Reconnecting state to change the url.\");\r\n }\r\n if (!url) {\r\n throw new Error(\"The HubConnection url must be a valid url.\");\r\n }\r\n this.connection.baseUrl = url;\r\n }\r\n /** Starts the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error.\r\n */\r\n start() {\r\n this._startPromise = this._startWithStateTransitions();\r\n return this._startPromise;\r\n }\r\n async _startWithStateTransitions() {\r\n if (this._connectionState !== HubConnectionState.Disconnected) {\r\n return Promise.reject(new Error(\"Cannot start a HubConnection that is not in the 'Disconnected' state.\"));\r\n }\r\n this._connectionState = HubConnectionState.Connecting;\r\n this._logger.log(LogLevel.Debug, \"Starting HubConnection.\");\r\n try {\r\n await this._startInternal();\r\n if (Platform.isBrowser) {\r\n // Log when the browser freezes the tab so users know why their connection unexpectedly stopped working\r\n window.document.addEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n this._connectionState = HubConnectionState.Connected;\r\n this._connectionStarted = true;\r\n this._logger.log(LogLevel.Debug, \"HubConnection connected successfully.\");\r\n }\r\n catch (e) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._logger.log(LogLevel.Debug, `HubConnection failed to start successfully because of error '${e}'.`);\r\n return Promise.reject(e);\r\n }\r\n }\r\n async _startInternal() {\r\n this._stopDuringStartError = undefined;\r\n this._receivedHandshakeResponse = false;\r\n // Set up the promise before any connection is (re)started otherwise it could race with received messages\r\n const handshakePromise = new Promise((resolve, reject) => {\r\n this._handshakeResolver = resolve;\r\n this._handshakeRejecter = reject;\r\n });\r\n await this.connection.start(this._protocol.transferFormat);\r\n try {\r\n const handshakeRequest = {\r\n protocol: this._protocol.name,\r\n version: this._protocol.version,\r\n };\r\n this._logger.log(LogLevel.Debug, \"Sending handshake request.\");\r\n await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(handshakeRequest));\r\n this._logger.log(LogLevel.Information, `Using HubProtocol '${this._protocol.name}'.`);\r\n // defensively cleanup timeout in case we receive a message from the server before we finish start\r\n this._cleanupTimeout();\r\n this._resetTimeoutPeriod();\r\n this._resetKeepAliveInterval();\r\n await handshakePromise;\r\n // It's important to check the stopDuringStartError instead of just relying on the handshakePromise\r\n // being rejected on close, because this continuation can run after both the handshake completed successfully\r\n // and the connection was closed.\r\n if (this._stopDuringStartError) {\r\n // It's important to throw instead of returning a rejected promise, because we don't want to allow any state\r\n // transitions to occur between now and the calling code observing the exceptions. Returning a rejected promise\r\n // will cause the calling continuation to get scheduled to run later.\r\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\r\n throw this._stopDuringStartError;\r\n }\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Debug, `Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`);\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n // HttpConnection.stop() should not complete until after the onclose callback is invoked.\r\n // This will transition the HubConnection to the disconnected state before HttpConnection.stop() completes.\r\n await this.connection.stop(e);\r\n throw e;\r\n }\r\n }\r\n /** Stops the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error.\r\n */\r\n async stop() {\r\n // Capture the start promise before the connection might be restarted in an onclose callback.\r\n const startPromise = this._startPromise;\r\n this._stopPromise = this._stopInternal();\r\n await this._stopPromise;\r\n try {\r\n // Awaiting undefined continues immediately\r\n await startPromise;\r\n }\r\n catch (e) {\r\n // This exception is returned to the user as a rejected Promise from the start method.\r\n }\r\n }\r\n _stopInternal(error) {\r\n if (this._connectionState === HubConnectionState.Disconnected) {\r\n this._logger.log(LogLevel.Debug, `Call to HubConnection.stop(${error}) ignored because it is already in the disconnected state.`);\r\n return Promise.resolve();\r\n }\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnecting state.`);\r\n return this._stopPromise;\r\n }\r\n this._connectionState = HubConnectionState.Disconnecting;\r\n this._logger.log(LogLevel.Debug, \"Stopping HubConnection.\");\r\n if (this._reconnectDelayHandle) {\r\n // We're in a reconnect delay which means the underlying connection is currently already stopped.\r\n // Just clear the handle to stop the reconnect loop (which no one is waiting on thankfully) and\r\n // fire the onclose callbacks.\r\n this._logger.log(LogLevel.Debug, \"Connection stopped during reconnect delay. Done reconnecting.\");\r\n clearTimeout(this._reconnectDelayHandle);\r\n this._reconnectDelayHandle = undefined;\r\n this._completeClose();\r\n return Promise.resolve();\r\n }\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n this._stopDuringStartError = error || new Error(\"The connection was stopped before the hub handshake could complete.\");\r\n // HttpConnection.stop() should not complete until after either HttpConnection.start() fails\r\n // or the onclose callback is invoked. The onclose callback will transition the HubConnection\r\n // to the disconnected state if need be before HttpConnection.stop() completes.\r\n return this.connection.stop(error);\r\n }\r\n /** Invokes a streaming hub method on the server using the specified name and arguments.\r\n *\r\n * @typeparam T The type of the items returned by the server.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {IStreamResult} An object that yields results from the server as they are received.\r\n */\r\n stream(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createStreamInvocation(methodName, args, streamIds);\r\n // eslint-disable-next-line prefer-const\r\n let promiseQueue;\r\n const subject = new Subject();\r\n subject.cancelCallback = () => {\r\n const cancelInvocation = this._createCancelInvocation(invocationDescriptor.invocationId);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n return promiseQueue.then(() => {\r\n return this._sendWithProtocol(cancelInvocation);\r\n });\r\n };\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n subject.error(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n subject.error(new Error(invocationEvent.error));\r\n }\r\n else {\r\n subject.complete();\r\n }\r\n }\r\n else {\r\n subject.next((invocationEvent.item));\r\n }\r\n }\r\n };\r\n promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n subject.error(e);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n return subject;\r\n }\r\n _sendMessage(message) {\r\n this._resetKeepAliveInterval();\r\n return this.connection.send(message);\r\n }\r\n /**\r\n * Sends a js object to the server.\r\n * @param message The js object to serialize and send.\r\n */\r\n _sendWithProtocol(message) {\r\n return this._sendMessage(this._protocol.writeMessage(message));\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver.\r\n *\r\n * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still\r\n * be processing the invocation.\r\n *\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error.\r\n */\r\n send(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const sendPromise = this._sendWithProtocol(this._createInvocation(methodName, args, true, streamIds));\r\n this._launchStreams(streams, sendPromise);\r\n return sendPromise;\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments.\r\n *\r\n * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise\r\n * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of\r\n * resolving the Promise.\r\n *\r\n * @typeparam T The expected return type.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error.\r\n */\r\n invoke(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createInvocation(methodName, args, false, streamIds);\r\n const p = new Promise((resolve, reject) => {\r\n // invocationId will always have a value for a non-blocking invocation\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n reject(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n reject(new Error(invocationEvent.error));\r\n }\r\n else {\r\n resolve(invocationEvent.result);\r\n }\r\n }\r\n else {\r\n reject(new Error(`Unexpected message type: ${invocationEvent.type}`));\r\n }\r\n }\r\n };\r\n const promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n reject(e);\r\n // invocationId will always have a value for a non-blocking invocation\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n });\r\n return p;\r\n }\r\n /** Registers a handler that will be invoked when the hub method with the specified method name is invoked.\r\n *\r\n * @param {string} methodName The name of the hub method to define.\r\n * @param {Function} newMethod The handler that will be raised when the hub method is invoked.\r\n */\r\n on(methodName, newMethod) {\r\n if (!methodName || !newMethod) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n if (!this._methods[methodName]) {\r\n this._methods[methodName] = [];\r\n }\r\n // Preventing adding the same handler multiple times.\r\n if (this._methods[methodName].indexOf(newMethod) !== -1) {\r\n return;\r\n }\r\n this._methods[methodName].push(newMethod);\r\n }\r\n off(methodName, method) {\r\n if (!methodName) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n const handlers = this._methods[methodName];\r\n if (!handlers) {\r\n return;\r\n }\r\n if (method) {\r\n const removeIdx = handlers.indexOf(method);\r\n if (removeIdx !== -1) {\r\n handlers.splice(removeIdx, 1);\r\n if (handlers.length === 0) {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n }\r\n else {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection is closed.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any).\r\n */\r\n onclose(callback) {\r\n if (callback) {\r\n this._closedCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection starts reconnecting.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any).\r\n */\r\n onreconnecting(callback) {\r\n if (callback) {\r\n this._reconnectingCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection successfully reconnects.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection successfully reconnects.\r\n */\r\n onreconnected(callback) {\r\n if (callback) {\r\n this._reconnectedCallbacks.push(callback);\r\n }\r\n }\r\n _processIncomingData(data) {\r\n this._cleanupTimeout();\r\n if (!this._receivedHandshakeResponse) {\r\n data = this._processHandshakeResponse(data);\r\n this._receivedHandshakeResponse = true;\r\n }\r\n // Data may have all been read when processing handshake response\r\n if (data) {\r\n // Parse the messages\r\n const messages = this._protocol.parseMessages(data, this._logger);\r\n for (const message of messages) {\r\n switch (message.type) {\r\n case MessageType.Invocation:\r\n this._invokeClientMethod(message);\r\n break;\r\n case MessageType.StreamItem:\r\n case MessageType.Completion: {\r\n const callback = this._callbacks[message.invocationId];\r\n if (callback) {\r\n if (message.type === MessageType.Completion) {\r\n delete this._callbacks[message.invocationId];\r\n }\r\n try {\r\n callback(message);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream callback threw error: ${getErrorString(e)}`);\r\n }\r\n }\r\n break;\r\n }\r\n case MessageType.Ping:\r\n // Don't care about pings\r\n break;\r\n case MessageType.Close: {\r\n this._logger.log(LogLevel.Information, \"Close message received from server.\");\r\n const error = message.error ? new Error(\"Server returned an error on close: \" + message.error) : undefined;\r\n if (message.allowReconnect === true) {\r\n // It feels wrong not to await connection.stop() here, but processIncomingData is called as part of an onreceive callback which is not async,\r\n // this is already the behavior for serverTimeout(), and HttpConnection.Stop() should catch and log all possible exceptions.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(error);\r\n }\r\n else {\r\n // We cannot await stopInternal() here, but subsequent calls to stop() will await this if stopInternal() is still ongoing.\r\n this._stopPromise = this._stopInternal(error);\r\n }\r\n break;\r\n }\r\n default:\r\n this._logger.log(LogLevel.Warning, `Invalid message type: ${message.type}.`);\r\n break;\r\n }\r\n }\r\n }\r\n this._resetTimeoutPeriod();\r\n }\r\n _processHandshakeResponse(data) {\r\n let responseMessage;\r\n let remainingData;\r\n try {\r\n [remainingData, responseMessage] = this._handshakeProtocol.parseHandshakeResponse(data);\r\n }\r\n catch (e) {\r\n const message = \"Error parsing handshake response: \" + e;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n if (responseMessage.error) {\r\n const message = \"Server returned handshake error: \" + responseMessage.error;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, \"Server handshake complete.\");\r\n }\r\n this._handshakeResolver();\r\n return remainingData;\r\n }\r\n _resetKeepAliveInterval() {\r\n if (this.connection.features.inherentKeepAlive) {\r\n return;\r\n }\r\n // Set the time we want the next keep alive to be sent\r\n // Timer will be setup on next message receive\r\n this._nextKeepAlive = new Date().getTime() + this.keepAliveIntervalInMilliseconds;\r\n this._cleanupPingTimer();\r\n }\r\n _resetTimeoutPeriod() {\r\n if (!this.connection.features || !this.connection.features.inherentKeepAlive) {\r\n // Set the timeout timer\r\n this._timeoutHandle = setTimeout(() => this.serverTimeout(), this.serverTimeoutInMilliseconds);\r\n // Set keepAlive timer if there isn't one\r\n if (this._pingServerHandle === undefined) {\r\n let nextPing = this._nextKeepAlive - new Date().getTime();\r\n if (nextPing < 0) {\r\n nextPing = 0;\r\n }\r\n // The timer needs to be set from a networking callback to avoid Chrome timer throttling from causing timers to run once a minute\r\n this._pingServerHandle = setTimeout(async () => {\r\n if (this._connectionState === HubConnectionState.Connected) {\r\n try {\r\n await this._sendMessage(this._cachedPingMessage);\r\n }\r\n catch {\r\n // We don't care about the error. It should be seen elsewhere in the client.\r\n // The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering\r\n this._cleanupPingTimer();\r\n }\r\n }\r\n }, nextPing);\r\n }\r\n }\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n serverTimeout() {\r\n // The server hasn't talked to us in a while. It doesn't like us anymore ... :(\r\n // Terminate the connection, but we don't need to wait on the promise. This could trigger reconnecting.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(new Error(\"Server timeout elapsed without receiving a message from the server.\"));\r\n }\r\n _invokeClientMethod(invocationMessage) {\r\n const methods = this._methods[invocationMessage.target.toLowerCase()];\r\n if (methods) {\r\n try {\r\n methods.forEach((m) => m.apply(this, invocationMessage.arguments));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `A callback for the method ${invocationMessage.target.toLowerCase()} threw error '${e}'.`);\r\n }\r\n if (invocationMessage.invocationId) {\r\n // This is not supported in v1. So we return an error to avoid blocking the server waiting for the response.\r\n const message = \"Server requested a response, which is not supported in this version of the client.\";\r\n this._logger.log(LogLevel.Error, message);\r\n // We don't want to wait on the stop itself.\r\n this._stopPromise = this._stopInternal(new Error(message));\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Warning, `No client method with the name '${invocationMessage.target}' found.`);\r\n }\r\n }\r\n _connectionClosed(error) {\r\n this._logger.log(LogLevel.Debug, `HubConnection.connectionClosed(${error}) called while in state ${this._connectionState}.`);\r\n // Triggering this.handshakeRejecter is insufficient because it could already be resolved without the continuation having run yet.\r\n this._stopDuringStartError = this._stopDuringStartError || error || new Error(\"The underlying connection was closed before the hub handshake could complete.\");\r\n // If the handshake is in progress, start will be waiting for the handshake promise, so we complete it.\r\n // If it has already completed, this should just noop.\r\n if (this._handshakeResolver) {\r\n this._handshakeResolver();\r\n }\r\n this._cancelCallbacksWithError(error || new Error(\"Invocation canceled due to the underlying connection being closed.\"));\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected && this._reconnectPolicy) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._reconnect(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected) {\r\n this._completeClose(error);\r\n }\r\n // If none of the above if conditions were true were called the HubConnection must be in either:\r\n // 1. The Connecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail it.\r\n // 2. The Reconnecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail the current reconnect attempt\r\n // and potentially continue the reconnect() loop.\r\n // 3. The Disconnected state in which case we're already done.\r\n }\r\n _completeClose(error) {\r\n if (this._connectionStarted) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n if (Platform.isBrowser) {\r\n window.document.removeEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n try {\r\n this._closedCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onclose callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n }\r\n }\r\n async _reconnect(error) {\r\n const reconnectStartTime = Date.now();\r\n let previousReconnectAttempts = 0;\r\n let retryError = error !== undefined ? error : new Error(\"Attempting to reconnect due to a unknown error.\");\r\n let nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, 0, retryError);\r\n if (nextRetryDelay === null) {\r\n this._logger.log(LogLevel.Debug, \"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt.\");\r\n this._completeClose(error);\r\n return;\r\n }\r\n this._connectionState = HubConnectionState.Reconnecting;\r\n if (error) {\r\n this._logger.log(LogLevel.Information, `Connection reconnecting because of error '${error}'.`);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Information, \"Connection reconnecting.\");\r\n }\r\n if (this._reconnectingCallbacks.length !== 0) {\r\n try {\r\n this._reconnectingCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnecting callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n // Exit early if an onreconnecting callback called connection.stop().\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.\");\r\n return;\r\n }\r\n }\r\n while (nextRetryDelay !== null) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt number ${previousReconnectAttempts} will start in ${nextRetryDelay} ms.`);\r\n await new Promise((resolve) => {\r\n this._reconnectDelayHandle = setTimeout(resolve, nextRetryDelay);\r\n });\r\n this._reconnectDelayHandle = undefined;\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state during reconnect delay. Done reconnecting.\");\r\n return;\r\n }\r\n try {\r\n await this._startInternal();\r\n this._connectionState = HubConnectionState.Connected;\r\n this._logger.log(LogLevel.Information, \"HubConnection reconnected successfully.\");\r\n if (this._reconnectedCallbacks.length !== 0) {\r\n try {\r\n this._reconnectedCallbacks.forEach((c) => c.apply(this, [this.connection.connectionId]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`);\r\n }\r\n }\r\n return;\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt failed because of error '${e}'.`);\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, `Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`);\r\n // The TypeScript compiler thinks that connectionState must be Connected here. The TypeScript compiler is wrong.\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose();\r\n }\r\n return;\r\n }\r\n retryError = e instanceof Error ? e : new Error(e.toString());\r\n nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, Date.now() - reconnectStartTime, retryError);\r\n }\r\n }\r\n this._logger.log(LogLevel.Information, `Reconnect retries have been exhausted after ${Date.now() - reconnectStartTime} ms and ${previousReconnectAttempts} failed attempts. Connection disconnecting.`);\r\n this._completeClose();\r\n }\r\n _getNextRetryDelay(previousRetryCount, elapsedMilliseconds, retryReason) {\r\n try {\r\n return this._reconnectPolicy.nextRetryDelayInMilliseconds({\r\n elapsedMilliseconds,\r\n previousRetryCount,\r\n retryReason,\r\n });\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `IRetryPolicy.nextRetryDelayInMilliseconds(${previousRetryCount}, ${elapsedMilliseconds}) threw error '${e}'.`);\r\n return null;\r\n }\r\n }\r\n _cancelCallbacksWithError(error) {\r\n const callbacks = this._callbacks;\r\n this._callbacks = {};\r\n Object.keys(callbacks)\r\n .forEach((key) => {\r\n const callback = callbacks[key];\r\n try {\r\n callback(null, error);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream 'error' callback called with '${error}' threw error: ${getErrorString(e)}`);\r\n }\r\n });\r\n }\r\n _cleanupPingTimer() {\r\n if (this._pingServerHandle) {\r\n clearTimeout(this._pingServerHandle);\r\n this._pingServerHandle = undefined;\r\n }\r\n }\r\n _cleanupTimeout() {\r\n if (this._timeoutHandle) {\r\n clearTimeout(this._timeoutHandle);\r\n }\r\n }\r\n _createInvocation(methodName, args, nonblocking, streamIds) {\r\n if (nonblocking) {\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n else {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n }\r\n _launchStreams(streams, promiseQueue) {\r\n if (streams.length === 0) {\r\n return;\r\n }\r\n // Synchronize stream data so they arrive in-order on the server\r\n if (!promiseQueue) {\r\n promiseQueue = Promise.resolve();\r\n }\r\n // We want to iterate over the keys, since the keys are the stream ids\r\n // eslint-disable-next-line guard-for-in\r\n for (const streamId in streams) {\r\n streams[streamId].subscribe({\r\n complete: () => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId)));\r\n },\r\n error: (err) => {\r\n let message;\r\n if (err instanceof Error) {\r\n message = err.message;\r\n }\r\n else if (err && err.toString) {\r\n message = err.toString();\r\n }\r\n else {\r\n message = \"Unknown error\";\r\n }\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId, message)));\r\n },\r\n next: (item) => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createStreamItemMessage(streamId, item)));\r\n },\r\n });\r\n }\r\n }\r\n _replaceStreamingParams(args) {\r\n const streams = [];\r\n const streamIds = [];\r\n for (let i = 0; i < args.length; i++) {\r\n const argument = args[i];\r\n if (this._isObservable(argument)) {\r\n const streamId = this._invocationId;\r\n this._invocationId++;\r\n // Store the stream for later use\r\n streams[streamId] = argument;\r\n streamIds.push(streamId.toString());\r\n // remove stream from args\r\n args.splice(i, 1);\r\n }\r\n }\r\n return [streams, streamIds];\r\n }\r\n _isObservable(arg) {\r\n // This allows other stream implementations to just work (like rxjs)\r\n return arg && arg.subscribe && typeof arg.subscribe === \"function\";\r\n }\r\n _createStreamInvocation(methodName, args, streamIds) {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n }\r\n _createCancelInvocation(id) {\r\n return {\r\n invocationId: id,\r\n type: MessageType.CancelInvocation,\r\n };\r\n }\r\n _createStreamItemMessage(id, item) {\r\n return {\r\n invocationId: id,\r\n item,\r\n type: MessageType.StreamItem,\r\n };\r\n }\r\n _createCompletionMessage(id, error, result) {\r\n if (error) {\r\n return {\r\n error,\r\n invocationId: id,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n return {\r\n invocationId: id,\r\n result,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nconst JSON_HUB_PROTOCOL_NAME = \"json\";\r\n/** Implements the JSON Hub Protocol. */\r\nexport class JsonHubProtocol {\r\n constructor() {\r\n /** @inheritDoc */\r\n this.name = JSON_HUB_PROTOCOL_NAME;\r\n /** @inheritDoc */\r\n this.version = 1;\r\n /** @inheritDoc */\r\n this.transferFormat = TransferFormat.Text;\r\n }\r\n /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation.\r\n *\r\n * @param {string} input A string containing the serialized representation.\r\n * @param {ILogger} logger A logger that will be used to log messages that occur during parsing.\r\n */\r\n parseMessages(input, logger) {\r\n // The interface does allow \"ArrayBuffer\" to be passed in, but this implementation does not. So let's throw a useful error.\r\n if (typeof input !== \"string\") {\r\n throw new Error(\"Invalid input for JSON hub protocol. Expected a string.\");\r\n }\r\n if (!input) {\r\n return [];\r\n }\r\n if (logger === null) {\r\n logger = NullLogger.instance;\r\n }\r\n // Parse the messages\r\n const messages = TextMessageFormat.parse(input);\r\n const hubMessages = [];\r\n for (const message of messages) {\r\n const parsedMessage = JSON.parse(message);\r\n if (typeof parsedMessage.type !== \"number\") {\r\n throw new Error(\"Invalid payload.\");\r\n }\r\n switch (parsedMessage.type) {\r\n case MessageType.Invocation:\r\n this._isInvocationMessage(parsedMessage);\r\n break;\r\n case MessageType.StreamItem:\r\n this._isStreamItemMessage(parsedMessage);\r\n break;\r\n case MessageType.Completion:\r\n this._isCompletionMessage(parsedMessage);\r\n break;\r\n case MessageType.Ping:\r\n // Single value, no need to validate\r\n break;\r\n case MessageType.Close:\r\n // All optional values, no need to validate\r\n break;\r\n default:\r\n // Future protocol changes can add message types, old clients can ignore them\r\n logger.log(LogLevel.Information, \"Unknown message type '\" + parsedMessage.type + \"' ignored.\");\r\n continue;\r\n }\r\n hubMessages.push(parsedMessage);\r\n }\r\n return hubMessages;\r\n }\r\n /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it.\r\n *\r\n * @param {HubMessage} message The message to write.\r\n * @returns {string} A string containing the serialized representation of the message.\r\n */\r\n writeMessage(message) {\r\n return TextMessageFormat.write(JSON.stringify(message));\r\n }\r\n _isInvocationMessage(message) {\r\n this._assertNotEmptyString(message.target, \"Invalid payload for Invocation message.\");\r\n if (message.invocationId !== undefined) {\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for Invocation message.\");\r\n }\r\n }\r\n _isStreamItemMessage(message) {\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for StreamItem message.\");\r\n if (message.item === undefined) {\r\n throw new Error(\"Invalid payload for StreamItem message.\");\r\n }\r\n }\r\n _isCompletionMessage(message) {\r\n if (message.result && message.error) {\r\n throw new Error(\"Invalid payload for Completion message.\");\r\n }\r\n if (!message.result && message.error) {\r\n this._assertNotEmptyString(message.error, \"Invalid payload for Completion message.\");\r\n }\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for Completion message.\");\r\n }\r\n _assertNotEmptyString(value, errorMessage) {\r\n if (typeof value !== \"string\" || value === \"\") {\r\n throw new Error(errorMessage);\r\n }\r\n }\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { DefaultReconnectPolicy } from \"./DefaultReconnectPolicy\";\r\nimport { HttpConnection } from \"./HttpConnection\";\r\nimport { HubConnection } from \"./HubConnection\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { JsonHubProtocol } from \"./JsonHubProtocol\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { Arg, ConsoleLogger } from \"./Utils\";\r\nconst LogLevelNameMapping = {\r\n trace: LogLevel.Trace,\r\n debug: LogLevel.Debug,\r\n info: LogLevel.Information,\r\n information: LogLevel.Information,\r\n warn: LogLevel.Warning,\r\n warning: LogLevel.Warning,\r\n error: LogLevel.Error,\r\n critical: LogLevel.Critical,\r\n none: LogLevel.None,\r\n};\r\nfunction parseLogLevel(name) {\r\n // Case-insensitive matching via lower-casing\r\n // Yes, I know case-folding is a complicated problem in Unicode, but we only support\r\n // the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse.\r\n const mapping = LogLevelNameMapping[name.toLowerCase()];\r\n if (typeof mapping !== \"undefined\") {\r\n return mapping;\r\n }\r\n else {\r\n throw new Error(`Unknown log level: ${name}`);\r\n }\r\n}\r\n/** A builder for configuring {@link @microsoft/signalr.HubConnection} instances. */\r\nexport class HubConnectionBuilder {\r\n configureLogging(logging) {\r\n Arg.isRequired(logging, \"logging\");\r\n if (isLogger(logging)) {\r\n this.logger = logging;\r\n }\r\n else if (typeof logging === \"string\") {\r\n const logLevel = parseLogLevel(logging);\r\n this.logger = new ConsoleLogger(logLevel);\r\n }\r\n else {\r\n this.logger = new ConsoleLogger(logging);\r\n }\r\n return this;\r\n }\r\n withUrl(url, transportTypeOrOptions) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isNotEmpty(url, \"url\");\r\n this.url = url;\r\n // Flow-typing knows where it's at. Since HttpTransportType is a number and IHttpConnectionOptions is guaranteed\r\n // to be an object, we know (as does TypeScript) this comparison is all we need to figure out which overload was called.\r\n if (typeof transportTypeOrOptions === \"object\") {\r\n this.httpConnectionOptions = { ...this.httpConnectionOptions, ...transportTypeOrOptions };\r\n }\r\n else {\r\n this.httpConnectionOptions = {\r\n ...this.httpConnectionOptions,\r\n transport: transportTypeOrOptions,\r\n };\r\n }\r\n return this;\r\n }\r\n /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol.\r\n *\r\n * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.\r\n */\r\n withHubProtocol(protocol) {\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.protocol = protocol;\r\n return this;\r\n }\r\n withAutomaticReconnect(retryDelaysOrReconnectPolicy) {\r\n if (this.reconnectPolicy) {\r\n throw new Error(\"A reconnectPolicy has already been set.\");\r\n }\r\n if (!retryDelaysOrReconnectPolicy) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy();\r\n }\r\n else if (Array.isArray(retryDelaysOrReconnectPolicy)) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy(retryDelaysOrReconnectPolicy);\r\n }\r\n else {\r\n this.reconnectPolicy = retryDelaysOrReconnectPolicy;\r\n }\r\n return this;\r\n }\r\n /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder.\r\n *\r\n * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}.\r\n */\r\n build() {\r\n // If httpConnectionOptions has a logger, use it. Otherwise, override it with the one\r\n // provided to configureLogger\r\n const httpConnectionOptions = this.httpConnectionOptions || {};\r\n // If it's 'null', the user **explicitly** asked for null, don't mess with it.\r\n if (httpConnectionOptions.logger === undefined) {\r\n // If our logger is undefined or null, that's OK, the HttpConnection constructor will handle it.\r\n httpConnectionOptions.logger = this.logger;\r\n }\r\n // Now create the connection\r\n if (!this.url) {\r\n throw new Error(\"The 'HubConnectionBuilder.withUrl' method must be called before building the connection.\");\r\n }\r\n const connection = new HttpConnection(this.url, httpConnectionOptions);\r\n return HubConnection.create(connection, this.logger || NullLogger.instance, this.protocol || new JsonHubProtocol(), this.reconnectPolicy);\r\n }\r\n}\r\nfunction isLogger(logger) {\r\n return logger.log !== undefined;\r\n}\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.\r\n/** Indicates the severity of a log message.\r\n *\r\n * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.\r\n */\r\nexport var LogLevel;\r\n(function (LogLevel) {\r\n /** Log level for very low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\r\n /** Log level for low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\r\n /** Log level for informational diagnostic messages. */\r\n LogLevel[LogLevel[\"Information\"] = 2] = \"Information\";\r\n /** Log level for diagnostic messages that indicate a non-fatal problem. */\r\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\r\n /** Log level for diagnostic messages that indicate a failure in the current operation. */\r\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\r\n /** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */\r\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\r\n /** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */\r\n LogLevel[LogLevel[\"None\"] = 6] = \"None\";\r\n})(LogLevel || (LogLevel = {}));\r\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// This will be treated as a bit flag in the future, so we keep it using power-of-two values.\r\n/** Specifies a specific HTTP transport type. */\r\nexport var HttpTransportType;\r\n(function (HttpTransportType) {\r\n /** Specifies no transport preference. */\r\n HttpTransportType[HttpTransportType[\"None\"] = 0] = \"None\";\r\n /** Specifies the WebSockets transport. */\r\n HttpTransportType[HttpTransportType[\"WebSockets\"] = 1] = \"WebSockets\";\r\n /** Specifies the Server-Sent Events transport. */\r\n HttpTransportType[HttpTransportType[\"ServerSentEvents\"] = 2] = \"ServerSentEvents\";\r\n /** Specifies the Long Polling transport. */\r\n HttpTransportType[HttpTransportType[\"LongPolling\"] = 4] = \"LongPolling\";\r\n})(HttpTransportType || (HttpTransportType = {}));\r\n/** Specifies the transfer format for a connection. */\r\nexport var TransferFormat;\r\n(function (TransferFormat) {\r\n /** Specifies that only text data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Text\"] = 1] = \"Text\";\r\n /** Specifies that binary data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Binary\"] = 2] = \"Binary\";\r\n})(TransferFormat || (TransferFormat = {}));\r\n","(typeof navigator !== \"undefined\") && (function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lottie = factory());\n})(this, (function () { 'use strict';\n\n var svgNS = 'http://www.w3.org/2000/svg';\n var locationHref = '';\n var _useWebWorker = false;\n var initialDefaultFrame = -999999;\n\n var setWebWorker = function setWebWorker(flag) {\n _useWebWorker = !!flag;\n };\n\n var getWebWorker = function getWebWorker() {\n return _useWebWorker;\n };\n\n var setLocationHref = function setLocationHref(value) {\n locationHref = value;\n };\n\n var getLocationHref = function getLocationHref() {\n return locationHref;\n };\n\n function createTag(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElement(type);\n }\n\n function extendPrototype(sources, destination) {\n var i;\n var len = sources.length;\n var sourcePrototype;\n\n for (i = 0; i < len; i += 1) {\n sourcePrototype = sources[i].prototype;\n\n for (var attr in sourcePrototype) {\n if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr];\n }\n }\n }\n\n function getDescriptor(object, prop) {\n return Object.getOwnPropertyDescriptor(object, prop);\n }\n\n function createProxyFunction(prototype) {\n function ProxyFunction() {}\n\n ProxyFunction.prototype = prototype;\n return ProxyFunction;\n }\n\n // import Howl from '../../3rd_party/howler';\n var audioControllerFactory = function () {\n function AudioController(audioFactory) {\n this.audios = [];\n this.audioFactory = audioFactory;\n this._volume = 1;\n this._isMuted = false;\n }\n\n AudioController.prototype = {\n addAudio: function addAudio(audio) {\n this.audios.push(audio);\n },\n pause: function pause() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].pause();\n }\n },\n resume: function resume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].resume();\n }\n },\n setRate: function setRate(rateValue) {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].setRate(rateValue);\n }\n },\n createAudio: function createAudio(assetPath) {\n if (this.audioFactory) {\n return this.audioFactory(assetPath);\n }\n\n if (window.Howl) {\n return new window.Howl({\n src: [assetPath]\n });\n }\n\n return {\n isPlaying: false,\n play: function play() {\n this.isPlaying = true;\n },\n seek: function seek() {\n this.isPlaying = false;\n },\n playing: function playing() {},\n rate: function rate() {},\n setVolume: function setVolume() {}\n };\n },\n setAudioFactory: function setAudioFactory(audioFactory) {\n this.audioFactory = audioFactory;\n },\n setVolume: function setVolume(value) {\n this._volume = value;\n\n this._updateVolume();\n },\n mute: function mute() {\n this._isMuted = true;\n\n this._updateVolume();\n },\n unmute: function unmute() {\n this._isMuted = false;\n\n this._updateVolume();\n },\n getVolume: function getVolume() {\n return this._volume;\n },\n _updateVolume: function _updateVolume() {\n var i;\n var len = this.audios.length;\n\n for (i = 0; i < len; i += 1) {\n this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1));\n }\n }\n };\n return function () {\n return new AudioController();\n };\n }();\n\n var createTypedArray = function () {\n function createRegularArray(type, len) {\n var i = 0;\n var arr = [];\n var value;\n\n switch (type) {\n case 'int16':\n case 'uint8c':\n value = 1;\n break;\n\n default:\n value = 1.1;\n break;\n }\n\n for (i = 0; i < len; i += 1) {\n arr.push(value);\n }\n\n return arr;\n }\n\n function createTypedArrayFactory(type, len) {\n if (type === 'float32') {\n return new Float32Array(len);\n }\n\n if (type === 'int16') {\n return new Int16Array(len);\n }\n\n if (type === 'uint8c') {\n return new Uint8ClampedArray(len);\n }\n\n return createRegularArray(type, len);\n }\n\n if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {\n return createTypedArrayFactory;\n }\n\n return createRegularArray;\n }();\n\n function createSizedArray(len) {\n return Array.apply(null, {\n length: len\n });\n }\n\n function _typeof$6(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\n var subframeEnabled = true;\n var expressionsPlugin = null;\n var idPrefix$1 = '';\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var _shouldRoundValues = false;\n var bmPow = Math.pow;\n var bmSqrt = Math.sqrt;\n var bmFloor = Math.floor;\n var bmMax = Math.max;\n var bmMin = Math.min;\n var BMMath = {};\n\n (function () {\n var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2'];\n var i;\n var len = propertyNames.length;\n\n for (i = 0; i < len; i += 1) {\n BMMath[propertyNames[i]] = Math[propertyNames[i]];\n }\n })();\n\n function ProjectInterface$1() {\n return {};\n }\n\n BMMath.random = Math.random;\n\n BMMath.abs = function (val) {\n var tOfVal = _typeof$6(val);\n\n if (tOfVal === 'object' && val.length) {\n var absArr = createSizedArray(val.length);\n var i;\n var len = val.length;\n\n for (i = 0; i < len; i += 1) {\n absArr[i] = Math.abs(val[i]);\n }\n\n return absArr;\n }\n\n return Math.abs(val);\n };\n\n var defaultCurveSegments = 150;\n var degToRads = Math.PI / 180;\n var roundCorner = 0.5519;\n\n function roundValues(flag) {\n _shouldRoundValues = !!flag;\n }\n\n function bmRnd(value) {\n if (_shouldRoundValues) {\n return Math.round(value);\n }\n\n return value;\n }\n\n function styleDiv(element) {\n element.style.position = 'absolute';\n element.style.top = 0;\n element.style.left = 0;\n element.style.display = 'block';\n element.style.transformOrigin = '0 0';\n element.style.webkitTransformOrigin = '0 0';\n element.style.backfaceVisibility = 'visible';\n element.style.webkitBackfaceVisibility = 'visible';\n element.style.transformStyle = 'preserve-3d';\n element.style.webkitTransformStyle = 'preserve-3d';\n element.style.mozTransformStyle = 'preserve-3d';\n }\n\n function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) {\n this.type = type;\n this.currentTime = currentTime;\n this.totalTime = totalTime;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteEvent(type, frameMultiplier) {\n this.type = type;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) {\n this.type = type;\n this.currentLoop = currentLoop;\n this.totalLoops = totalLoops;\n this.direction = frameMultiplier < 0 ? -1 : 1;\n }\n\n function BMSegmentStartEvent(type, firstFrame, totalFrames) {\n this.type = type;\n this.firstFrame = firstFrame;\n this.totalFrames = totalFrames;\n }\n\n function BMDestroyEvent(type, target) {\n this.type = type;\n this.target = target;\n }\n\n function BMRenderFrameErrorEvent(nativeError, currentTime) {\n this.type = 'renderFrameError';\n this.nativeError = nativeError;\n this.currentTime = currentTime;\n }\n\n function BMConfigErrorEvent(nativeError) {\n this.type = 'configError';\n this.nativeError = nativeError;\n }\n\n function BMAnimationConfigErrorEvent(type, nativeError) {\n this.type = type;\n this.nativeError = nativeError;\n }\n\n var createElementID = function () {\n var _count = 0;\n return function createID() {\n _count += 1;\n return idPrefix$1 + '__lottie_element_' + _count;\n };\n }();\n\n function HSVtoRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i;\n var f;\n var p;\n var q;\n var t;\n i = Math.floor(h * 6);\n f = h * 6 - i;\n p = v * (1 - s);\n q = v * (1 - f * s);\n t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n\n default:\n break;\n }\n\n return [r, g, b];\n }\n\n function RGBtoHSV(r, g, b) {\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var d = max - min;\n var h;\n var s = max === 0 ? 0 : d / max;\n var v = max / 255;\n\n switch (max) {\n case min:\n h = 0;\n break;\n\n case r:\n h = g - b + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n\n case g:\n h = b - r + d * 2;\n h /= 6 * d;\n break;\n\n case b:\n h = r - g + d * 4;\n h /= 6 * d;\n break;\n\n default:\n break;\n }\n\n return [h, s, v];\n }\n\n function addSaturationToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[1] += offset;\n\n if (hsv[1] > 1) {\n hsv[1] = 1;\n } else if (hsv[1] <= 0) {\n hsv[1] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addBrightnessToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[2] += offset;\n\n if (hsv[2] > 1) {\n hsv[2] = 1;\n } else if (hsv[2] < 0) {\n hsv[2] = 0;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n function addHueToRGB(color, offset) {\n var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255);\n hsv[0] += offset / 360;\n\n if (hsv[0] > 1) {\n hsv[0] -= 1;\n } else if (hsv[0] < 0) {\n hsv[0] += 1;\n }\n\n return HSVtoRGB(hsv[0], hsv[1], hsv[2]);\n }\n\n var rgbToHex = function () {\n var colorMap = [];\n var i;\n var hex;\n\n for (i = 0; i < 256; i += 1) {\n hex = i.toString(16);\n colorMap[i] = hex.length === 1 ? '0' + hex : hex;\n }\n\n return function (r, g, b) {\n if (r < 0) {\n r = 0;\n }\n\n if (g < 0) {\n g = 0;\n }\n\n if (b < 0) {\n b = 0;\n }\n\n return '#' + colorMap[r] + colorMap[g] + colorMap[b];\n };\n }();\n\n var setSubframeEnabled = function setSubframeEnabled(flag) {\n subframeEnabled = !!flag;\n };\n\n var getSubframeEnabled = function getSubframeEnabled() {\n return subframeEnabled;\n };\n\n var setExpressionsPlugin = function setExpressionsPlugin(value) {\n expressionsPlugin = value;\n };\n\n var getExpressionsPlugin = function getExpressionsPlugin() {\n return expressionsPlugin;\n };\n\n var setDefaultCurveSegments = function setDefaultCurveSegments(value) {\n defaultCurveSegments = value;\n };\n\n var getDefaultCurveSegments = function getDefaultCurveSegments() {\n return defaultCurveSegments;\n };\n\n var setIdPrefix = function setIdPrefix(value) {\n idPrefix$1 = value;\n };\n\n var getIdPrefix = function getIdPrefix() {\n return idPrefix$1;\n };\n\n function createNS(type) {\n // return {appendChild:function(){},setAttribute:function(){},style:{}}\n return document.createElementNS(svgNS, type);\n }\n\n function _typeof$5(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\n\n var dataManager = function () {\n var _counterId = 1;\n var processes = [];\n var workerFn;\n var workerInstance;\n var workerProxy = {\n onmessage: function onmessage() {},\n postMessage: function postMessage(path) {\n workerFn({\n data: path\n });\n }\n };\n var _workerSelf = {\n postMessage: function postMessage(data) {\n workerProxy.onmessage({\n data: data\n });\n }\n };\n\n function createWorker(fn) {\n if (window.Worker && window.Blob && getWebWorker()) {\n var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], {\n type: 'text/javascript'\n }); // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' });\n\n var url = URL.createObjectURL(blob);\n return new Worker(url);\n }\n\n workerFn = fn;\n return workerProxy;\n }\n\n function setupWorker() {\n if (!workerInstance) {\n workerInstance = createWorker(function workerStart(e) {\n function dataFunctionManager() {\n function completeLayers(layers, comps) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if ('ks' in layerData && !layerData.completed) {\n layerData.completed = true;\n\n if (layerData.tt) {\n layers[i - 1].td = layerData.tt;\n }\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k);\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);\n }\n\n if (maskProps[j].pt.k[k].e) {\n convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);\n }\n }\n }\n }\n }\n\n if (layerData.ty === 0) {\n layerData.layers = findCompLayers(layerData.refId, comps);\n completeLayers(layerData.layers, comps);\n } else if (layerData.ty === 4) {\n completeShapes(layerData.shapes);\n } else if (layerData.ty === 5) {\n completeText(layerData);\n }\n }\n }\n }\n\n function completeChars(chars, assets) {\n if (chars) {\n var i = 0;\n var len = chars.length;\n\n for (i = 0; i < len; i += 1) {\n if (chars[i].t === 1) {\n // var compData = findComp(chars[i].data.refId, assets);\n chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); // chars[i].data.ip = 0;\n // chars[i].data.op = 99999;\n // chars[i].data.st = 0;\n // chars[i].data.sr = 1;\n // chars[i].w = compData.w;\n // chars[i].data.ks = {\n // a: { k: [0, 0, 0], a: 0 },\n // p: { k: [0, -compData.h, 0], a: 0 },\n // r: { k: 0, a: 0 },\n // s: { k: [100, 100], a: 0 },\n // o: { k: 100, a: 0 },\n // };\n\n completeLayers(chars[i].data.layers, assets);\n }\n }\n }\n }\n\n function findComp(id, comps) {\n var i = 0;\n var len = comps.length;\n\n while (i < len) {\n if (comps[i].id === id) {\n return comps[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function findCompLayers(id, comps) {\n var comp = findComp(id, comps);\n\n if (comp) {\n if (!comp.layers.__used) {\n comp.layers.__used = true;\n return comp.layers;\n }\n\n return JSON.parse(JSON.stringify(comp.layers));\n }\n\n return null;\n }\n\n function completeShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n convertPathsToAbsoluteValues(arr[i].ks.k);\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);\n }\n\n if (arr[i].ks.k[j].e) {\n convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeShapes(arr[i].it);\n }\n }\n }\n\n function convertPathsToAbsoluteValues(path) {\n var i;\n var len = path.i.length;\n\n for (i = 0; i < len; i += 1) {\n path.i[i][0] += path.v[i][0];\n path.i[i][1] += path.v[i][1];\n path.o[i][0] += path.v[i][0];\n path.o[i][1] += path.v[i][1];\n }\n }\n\n function checkVersion(minimum, animVersionString) {\n var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100];\n\n if (minimum[0] > animVersion[0]) {\n return true;\n }\n\n if (animVersion[0] > minimum[0]) {\n return false;\n }\n\n if (minimum[1] > animVersion[1]) {\n return true;\n }\n\n if (animVersion[1] > minimum[1]) {\n return false;\n }\n\n if (minimum[2] > animVersion[2]) {\n return true;\n }\n\n if (animVersion[2] > minimum[2]) {\n return false;\n }\n\n return null;\n }\n\n var checkText = function () {\n var minimumVersion = [4, 4, 14];\n\n function updateTextLayer(textLayer) {\n var documentData = textLayer.t.d;\n textLayer.t.d = {\n k: [{\n s: documentData,\n t: 0\n }]\n };\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkChars = function () {\n var minimumVersion = [4, 7, 99];\n return function (animationData) {\n if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) {\n var i;\n var len = animationData.chars.length;\n\n for (i = 0; i < len; i += 1) {\n var charData = animationData.chars[i];\n\n if (charData.data && charData.data.shapes) {\n completeShapes(charData.data.shapes);\n charData.data.ip = 0;\n charData.data.op = 99999;\n charData.data.st = 0;\n charData.data.sr = 1;\n charData.data.ks = {\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n }\n };\n\n if (!animationData.chars[i].t) {\n charData.data.shapes.push({\n ty: 'no'\n });\n charData.data.shapes[0].it.push({\n p: {\n k: [0, 0],\n a: 0\n },\n s: {\n k: [100, 100],\n a: 0\n },\n a: {\n k: [0, 0],\n a: 0\n },\n r: {\n k: 0,\n a: 0\n },\n o: {\n k: 100,\n a: 0\n },\n sk: {\n k: 0,\n a: 0\n },\n sa: {\n k: 0,\n a: 0\n },\n ty: 'tr'\n });\n }\n }\n }\n }\n };\n }();\n\n var checkPathProperties = function () {\n var minimumVersion = [5, 7, 15];\n\n function updateTextLayer(textLayer) {\n var pathData = textLayer.t.p;\n\n if (typeof pathData.a === 'number') {\n pathData.a = {\n a: 0,\n k: pathData.a\n };\n }\n\n if (typeof pathData.p === 'number') {\n pathData.p = {\n a: 0,\n k: pathData.p\n };\n }\n\n if (typeof pathData.r === 'number') {\n pathData.r = {\n a: 0,\n k: pathData.r\n };\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 5) {\n updateTextLayer(layers[i]);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkColors = function () {\n var minimumVersion = [4, 1, 9];\n\n function iterateShapes(shapes) {\n var i;\n var len = shapes.length;\n var j;\n var jLen;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n iterateShapes(shapes[i].it);\n } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') {\n if (shapes[i].c.k && shapes[i].c.k[0].i) {\n jLen = shapes[i].c.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[i].c.k[j].s) {\n shapes[i].c.k[j].s[0] /= 255;\n shapes[i].c.k[j].s[1] /= 255;\n shapes[i].c.k[j].s[2] /= 255;\n shapes[i].c.k[j].s[3] /= 255;\n }\n\n if (shapes[i].c.k[j].e) {\n shapes[i].c.k[j].e[0] /= 255;\n shapes[i].c.k[j].e[1] /= 255;\n shapes[i].c.k[j].e[2] /= 255;\n shapes[i].c.k[j].e[3] /= 255;\n }\n }\n } else {\n shapes[i].c.k[0] /= 255;\n shapes[i].c.k[1] /= 255;\n shapes[i].c.k[2] /= 255;\n shapes[i].c.k[3] /= 255;\n }\n }\n }\n }\n\n function iterateLayers(layers) {\n var i;\n var len = layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (layers[i].ty === 4) {\n iterateShapes(layers[i].shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n var checkShapes = function () {\n var minimumVersion = [4, 4, 18];\n\n function completeClosingShapes(arr) {\n var i;\n var len = arr.length;\n var j;\n var jLen;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (arr[i].ty === 'sh') {\n if (arr[i].ks.k.i) {\n arr[i].ks.k.c = arr[i].closed;\n } else {\n jLen = arr[i].ks.k.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (arr[i].ks.k[j].s) {\n arr[i].ks.k[j].s[0].c = arr[i].closed;\n }\n\n if (arr[i].ks.k[j].e) {\n arr[i].ks.k[j].e[0].c = arr[i].closed;\n }\n }\n }\n } else if (arr[i].ty === 'gr') {\n completeClosingShapes(arr[i].it);\n }\n }\n }\n\n function iterateLayers(layers) {\n var layerData;\n var i;\n var len = layers.length;\n var j;\n var jLen;\n var k;\n var kLen;\n\n for (i = 0; i < len; i += 1) {\n layerData = layers[i];\n\n if (layerData.hasMask) {\n var maskProps = layerData.masksProperties;\n jLen = maskProps.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (maskProps[j].pt.k.i) {\n maskProps[j].pt.k.c = maskProps[j].cl;\n } else {\n kLen = maskProps[j].pt.k.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (maskProps[j].pt.k[k].s) {\n maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;\n }\n\n if (maskProps[j].pt.k[k].e) {\n maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;\n }\n }\n }\n }\n }\n\n if (layerData.ty === 4) {\n completeClosingShapes(layerData.shapes);\n }\n }\n }\n\n return function (animationData) {\n if (checkVersion(minimumVersion, animationData.v)) {\n iterateLayers(animationData.layers);\n\n if (animationData.assets) {\n var i;\n var len = animationData.assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (animationData.assets[i].layers) {\n iterateLayers(animationData.assets[i].layers);\n }\n }\n }\n }\n };\n }();\n\n function completeData(animationData) {\n if (animationData.__complete) {\n return;\n }\n\n checkColors(animationData);\n checkText(animationData);\n checkChars(animationData);\n checkPathProperties(animationData);\n checkShapes(animationData);\n completeLayers(animationData.layers, animationData.assets);\n completeChars(animationData.chars, animationData.assets);\n animationData.__complete = true;\n }\n\n function completeText(data) {\n if (data.t.a.length === 0 && !('m' in data.t.p)) {// data.singleShape = true;\n }\n }\n\n var moduleOb = {};\n moduleOb.completeData = completeData;\n moduleOb.checkColors = checkColors;\n moduleOb.checkChars = checkChars;\n moduleOb.checkPathProperties = checkPathProperties;\n moduleOb.checkShapes = checkShapes;\n moduleOb.completeLayers = completeLayers;\n return moduleOb;\n }\n\n if (!_workerSelf.dataManager) {\n _workerSelf.dataManager = dataFunctionManager();\n }\n\n if (!_workerSelf.assetLoader) {\n _workerSelf.assetLoader = function () {\n function formatResponse(xhr) {\n // using typeof doubles the time of execution of this method,\n // so if available, it's better to use the header to validate the type\n var contentTypeHeader = xhr.getResponseHeader('content-type');\n\n if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) {\n return xhr.response;\n }\n\n if (xhr.response && _typeof$5(xhr.response) === 'object') {\n return xhr.response;\n }\n\n if (xhr.response && typeof xhr.response === 'string') {\n return JSON.parse(xhr.response);\n }\n\n if (xhr.responseText) {\n return JSON.parse(xhr.responseText);\n }\n\n return null;\n }\n\n function loadAsset(path, fullPath, callback, errorCallback) {\n var response;\n var xhr = new XMLHttpRequest(); // set responseType after calling open or IE will break.\n\n try {\n // This crashes on Android WebView prior to KitKat\n xhr.responseType = 'json';\n } catch (err) {} // eslint-disable-line no-empty\n\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n response = formatResponse(xhr);\n callback(response);\n } else {\n try {\n response = formatResponse(xhr);\n callback(response);\n } catch (err) {\n if (errorCallback) {\n errorCallback(err);\n }\n }\n }\n }\n };\n\n try {\n xhr.open('GET', path, true);\n } catch (error) {\n xhr.open('GET', fullPath + '/' + path, true);\n }\n\n xhr.send();\n }\n\n return {\n load: loadAsset\n };\n }();\n }\n\n if (e.data.type === 'loadAnimation') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.dataManager.completeData(data);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n } else if (e.data.type === 'complete') {\n var animation = e.data.animation;\n\n _workerSelf.dataManager.completeData(animation);\n\n _workerSelf.postMessage({\n id: e.data.id,\n payload: animation,\n status: 'success'\n });\n } else if (e.data.type === 'loadData') {\n _workerSelf.assetLoader.load(e.data.path, e.data.fullPath, function (data) {\n _workerSelf.postMessage({\n id: e.data.id,\n payload: data,\n status: 'success'\n });\n }, function () {\n _workerSelf.postMessage({\n id: e.data.id,\n status: 'error'\n });\n });\n }\n });\n\n workerInstance.onmessage = function (event) {\n var data = event.data;\n var id = data.id;\n var process = processes[id];\n processes[id] = null;\n\n if (data.status === 'success') {\n process.onComplete(data.payload);\n } else if (process.onError) {\n process.onError();\n }\n };\n }\n }\n\n function createProcess(onComplete, onError) {\n _counterId += 1;\n var id = 'processId_' + _counterId;\n processes[id] = {\n onComplete: onComplete,\n onError: onError\n };\n return id;\n }\n\n function loadAnimation(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadAnimation',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function loadData(path, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'loadData',\n path: path,\n fullPath: window.location.origin + window.location.pathname,\n id: processId\n });\n }\n\n function completeAnimation(anim, onComplete, onError) {\n setupWorker();\n var processId = createProcess(onComplete, onError);\n workerInstance.postMessage({\n type: 'complete',\n animation: anim,\n id: processId\n });\n }\n\n return {\n loadAnimation: loadAnimation,\n loadData: loadData,\n completeAnimation: completeAnimation\n };\n }();\n\n var ImagePreloader = function () {\n var proxyImage = function () {\n var canvas = createTag('canvas');\n canvas.width = 1;\n canvas.height = 1;\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return canvas;\n }();\n\n function imageLoaded() {\n this.loadedAssets += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function footageLoaded() {\n this.loadedFootagesCount += 1;\n\n if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) {\n if (this.imagesLoadedCb) {\n this.imagesLoadedCb(null);\n }\n }\n }\n\n function getAssetsPath(assetData, assetsPath, originalPath) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = assetsPath + imagePath;\n } else {\n path = originalPath;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n }\n\n function testImageLoaded(img) {\n var _count = 0;\n var intervalId = setInterval(function () {\n var box = img.getBBox();\n\n if (box.width || _count > 500) {\n this._imageLoaded();\n\n clearInterval(intervalId);\n }\n\n _count += 1;\n }.bind(this), 50);\n }\n\n function createImageData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createNS('image');\n\n if (isSafari) {\n this.testImageLoaded(img);\n } else {\n img.addEventListener('load', this._imageLoaded, false);\n }\n\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\n\n if (this._elementHelper.append) {\n this._elementHelper.append(img);\n } else {\n this._elementHelper.appendChild(img);\n }\n\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createImgData(assetData) {\n var path = getAssetsPath(assetData, this.assetsPath, this.path);\n var img = createTag('img');\n img.crossOrigin = 'anonymous';\n img.addEventListener('load', this._imageLoaded, false);\n img.addEventListener('error', function () {\n ob.img = proxyImage;\n\n this._imageLoaded();\n }.bind(this), false);\n img.src = path;\n var ob = {\n img: img,\n assetData: assetData\n };\n return ob;\n }\n\n function createFootageData(data) {\n var ob = {\n assetData: data\n };\n var path = getAssetsPath(data, this.assetsPath, this.path);\n dataManager.loadData(path, function (footageData) {\n ob.img = footageData;\n\n this._footageLoaded();\n }.bind(this), function () {\n ob.img = {};\n\n this._footageLoaded();\n }.bind(this));\n return ob;\n }\n\n function loadAssets(assets, cb) {\n this.imagesLoadedCb = cb;\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (!assets[i].layers) {\n if (!assets[i].t || assets[i].t === 'seq') {\n this.totalImages += 1;\n this.images.push(this._createImageData(assets[i]));\n } else if (assets[i].t === 3) {\n this.totalFootages += 1;\n this.images.push(this.createFootageData(assets[i]));\n }\n }\n }\n }\n\n function setPath(path) {\n this.path = path || '';\n }\n\n function setAssetsPath(path) {\n this.assetsPath = path || '';\n }\n\n function getAsset(assetData) {\n var i = 0;\n var len = this.images.length;\n\n while (i < len) {\n if (this.images[i].assetData === assetData) {\n return this.images[i].img;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function destroy() {\n this.imagesLoadedCb = null;\n this.images.length = 0;\n }\n\n function loadedImages() {\n return this.totalImages === this.loadedAssets;\n }\n\n function loadedFootages() {\n return this.totalFootages === this.loadedFootagesCount;\n }\n\n function setCacheType(type, elementHelper) {\n if (type === 'svg') {\n this._elementHelper = elementHelper;\n this._createImageData = this.createImageData.bind(this);\n } else {\n this._createImageData = this.createImgData.bind(this);\n }\n }\n\n function ImagePreloaderFactory() {\n this._imageLoaded = imageLoaded.bind(this);\n this._footageLoaded = footageLoaded.bind(this);\n this.testImageLoaded = testImageLoaded.bind(this);\n this.createFootageData = createFootageData.bind(this);\n this.assetsPath = '';\n this.path = '';\n this.totalImages = 0;\n this.totalFootages = 0;\n this.loadedAssets = 0;\n this.loadedFootagesCount = 0;\n this.imagesLoadedCb = null;\n this.images = [];\n }\n\n ImagePreloaderFactory.prototype = {\n loadAssets: loadAssets,\n setAssetsPath: setAssetsPath,\n setPath: setPath,\n loadedImages: loadedImages,\n loadedFootages: loadedFootages,\n destroy: destroy,\n getAsset: getAsset,\n createImgData: createImgData,\n createImageData: createImageData,\n imageLoaded: imageLoaded,\n footageLoaded: footageLoaded,\n setCacheType: setCacheType\n };\n return ImagePreloaderFactory;\n }();\n\n function BaseEvent() {}\n\n BaseEvent.prototype = {\n triggerEvent: function triggerEvent(eventName, args) {\n if (this._cbs[eventName]) {\n var callbacks = this._cbs[eventName];\n\n for (var i = 0; i < callbacks.length; i += 1) {\n callbacks[i](args);\n }\n }\n },\n addEventListener: function addEventListener(eventName, callback) {\n if (!this._cbs[eventName]) {\n this._cbs[eventName] = [];\n }\n\n this._cbs[eventName].push(callback);\n\n return function () {\n this.removeEventListener(eventName, callback);\n }.bind(this);\n },\n removeEventListener: function removeEventListener(eventName, callback) {\n if (!callback) {\n this._cbs[eventName] = null;\n } else if (this._cbs[eventName]) {\n var i = 0;\n var len = this._cbs[eventName].length;\n\n while (i < len) {\n if (this._cbs[eventName][i] === callback) {\n this._cbs[eventName].splice(i, 1);\n\n i -= 1;\n len -= 1;\n }\n\n i += 1;\n }\n\n if (!this._cbs[eventName].length) {\n this._cbs[eventName] = null;\n }\n }\n }\n };\n\n var markerParser = function () {\n function parsePayloadLines(payload) {\n var lines = payload.split('\\r\\n');\n var keys = {};\n var line;\n var keysCount = 0;\n\n for (var i = 0; i < lines.length; i += 1) {\n line = lines[i].split(':');\n\n if (line.length === 2) {\n keys[line[0]] = line[1].trim();\n keysCount += 1;\n }\n }\n\n if (keysCount === 0) {\n throw new Error();\n }\n\n return keys;\n }\n\n return function (_markers) {\n var markers = [];\n\n for (var i = 0; i < _markers.length; i += 1) {\n var _marker = _markers[i];\n var markerData = {\n time: _marker.tm,\n duration: _marker.dr\n };\n\n try {\n markerData.payload = JSON.parse(_markers[i].cm);\n } catch (_) {\n try {\n markerData.payload = parsePayloadLines(_markers[i].cm);\n } catch (__) {\n markerData.payload = {\n name: _markers[i].cm\n };\n }\n }\n\n markers.push(markerData);\n }\n\n return markers;\n };\n }();\n\n var ProjectInterface = function () {\n function registerComposition(comp) {\n this.compositions.push(comp);\n }\n\n return function () {\n function _thisProjectFunction(name) {\n var i = 0;\n var len = this.compositions.length;\n\n while (i < len) {\n if (this.compositions[i].data && this.compositions[i].data.nm === name) {\n if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) {\n this.compositions[i].prepareFrame(this.currentFrame);\n }\n\n return this.compositions[i].compInterface;\n }\n\n i += 1;\n }\n\n return null;\n }\n\n _thisProjectFunction.compositions = [];\n _thisProjectFunction.currentFrame = 0;\n _thisProjectFunction.registerComposition = registerComposition;\n return _thisProjectFunction;\n };\n }();\n\n var renderers = {};\n\n var registerRenderer = function registerRenderer(key, value) {\n renderers[key] = value;\n };\n\n function getRenderer(key) {\n return renderers[key];\n }\n\n function _typeof$4(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\n\n var AnimationItem = function AnimationItem() {\n this._cbs = [];\n this.name = '';\n this.path = '';\n this.isLoaded = false;\n this.currentFrame = 0;\n this.currentRawFrame = 0;\n this.firstFrame = 0;\n this.totalFrames = 0;\n this.frameRate = 0;\n this.frameMult = 0;\n this.playSpeed = 1;\n this.playDirection = 1;\n this.playCount = 0;\n this.animationData = {};\n this.assets = [];\n this.isPaused = true;\n this.autoplay = false;\n this.loop = true;\n this.renderer = null;\n this.animationID = createElementID();\n this.assetsPath = '';\n this.timeCompleted = 0;\n this.segmentPos = 0;\n this.isSubframeEnabled = getSubframeEnabled();\n this.segments = [];\n this._idle = true;\n this._completedLoop = false;\n this.projectInterface = ProjectInterface();\n this.imagePreloader = new ImagePreloader();\n this.audioController = audioControllerFactory();\n this.markers = [];\n this.configAnimation = this.configAnimation.bind(this);\n this.onSetupError = this.onSetupError.bind(this);\n this.onSegmentComplete = this.onSegmentComplete.bind(this);\n this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0);\n };\n\n extendPrototype([BaseEvent], AnimationItem);\n\n AnimationItem.prototype.setParams = function (params) {\n if (params.wrapper || params.container) {\n this.wrapper = params.wrapper || params.container;\n }\n\n var animType = 'svg';\n\n if (params.animType) {\n animType = params.animType;\n } else if (params.renderer) {\n animType = params.renderer;\n }\n\n var RendererClass = getRenderer(animType);\n this.renderer = new RendererClass(this, params.rendererSettings);\n this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs);\n this.renderer.setProjectInterface(this.projectInterface);\n this.animType = animType;\n\n if (params.loop === '' || params.loop === null || params.loop === undefined || params.loop === true) {\n this.loop = true;\n } else if (params.loop === false) {\n this.loop = false;\n } else {\n this.loop = parseInt(params.loop, 10);\n }\n\n this.autoplay = 'autoplay' in params ? params.autoplay : true;\n this.name = params.name ? params.name : '';\n this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true;\n this.assetsPath = params.assetsPath;\n this.initialSegment = params.initialSegment;\n\n if (params.audioFactory) {\n this.audioController.setAudioFactory(params.audioFactory);\n }\n\n if (params.animationData) {\n this.setupAnimation(params.animationData);\n } else if (params.path) {\n if (params.path.lastIndexOf('\\\\') !== -1) {\n this.path = params.path.substr(0, params.path.lastIndexOf('\\\\') + 1);\n } else {\n this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1);\n }\n\n this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1);\n this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json'));\n dataManager.loadAnimation(params.path, this.configAnimation, this.onSetupError);\n }\n };\n\n AnimationItem.prototype.onSetupError = function () {\n this.trigger('data_failed');\n };\n\n AnimationItem.prototype.setupAnimation = function (data) {\n dataManager.completeAnimation(data, this.configAnimation);\n };\n\n AnimationItem.prototype.setData = function (wrapper, animationData) {\n if (animationData) {\n if (_typeof$4(animationData) !== 'object') {\n animationData = JSON.parse(animationData);\n }\n }\n\n var params = {\n wrapper: wrapper,\n animationData: animationData\n };\n var wrapperAttributes = wrapper.attributes;\n params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-path').value : wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';\n params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('bm-type').value : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';\n var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-loop').value : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-loop').value : wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';\n\n if (loop === 'false') {\n params.loop = false;\n } else if (loop === 'true') {\n params.loop = true;\n } else if (loop !== '') {\n params.loop = parseInt(loop, 10);\n }\n\n var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-autoplay').value : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-autoplay').value : wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;\n params.autoplay = autoplay !== 'false';\n params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-name').value : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value : '';\n var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-anim-prerender').value : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary\n ? wrapperAttributes.getNamedItem('data-bm-prerender').value : wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';\n\n if (prerender === 'false') {\n params.prerender = false;\n }\n\n this.setParams(params);\n };\n\n AnimationItem.prototype.includeLayers = function (data) {\n if (data.op > this.animationData.op) {\n this.animationData.op = data.op;\n this.totalFrames = Math.floor(data.op - this.animationData.ip);\n }\n\n var layers = this.animationData.layers;\n var i;\n var len = layers.length;\n var newLayers = data.layers;\n var j;\n var jLen = newLayers.length;\n\n for (j = 0; j < jLen; j += 1) {\n i = 0;\n\n while (i < len) {\n if (layers[i].id === newLayers[j].id) {\n layers[i] = newLayers[j];\n break;\n }\n\n i += 1;\n }\n }\n\n if (data.chars || data.fonts) {\n this.renderer.globalData.fontManager.addChars(data.chars);\n this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);\n }\n\n if (data.assets) {\n len = data.assets.length;\n\n for (i = 0; i < len; i += 1) {\n this.animationData.assets.push(data.assets[i]);\n }\n }\n\n this.animationData.__complete = false;\n dataManager.completeAnimation(this.animationData, this.onSegmentComplete);\n };\n\n AnimationItem.prototype.onSegmentComplete = function (data) {\n this.animationData = data;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.loadNextSegment = function () {\n var segments = this.animationData.segments;\n\n if (!segments || segments.length === 0 || !this.autoloadSegments) {\n this.trigger('data_ready');\n this.timeCompleted = this.totalFrames;\n return;\n }\n\n var segment = segments.shift();\n this.timeCompleted = segment.time * this.frameRate;\n var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json';\n this.segmentPos += 1;\n dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () {\n this.trigger('data_failed');\n }.bind(this));\n };\n\n AnimationItem.prototype.loadSegments = function () {\n var segments = this.animationData.segments;\n\n if (!segments) {\n this.timeCompleted = this.totalFrames;\n }\n\n this.loadNextSegment();\n };\n\n AnimationItem.prototype.imagesLoaded = function () {\n this.trigger('loaded_images');\n this.checkLoaded();\n };\n\n AnimationItem.prototype.preloadImages = function () {\n this.imagePreloader.setAssetsPath(this.assetsPath);\n this.imagePreloader.setPath(this.path);\n this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));\n };\n\n AnimationItem.prototype.configAnimation = function (animData) {\n if (!this.renderer) {\n return;\n }\n\n try {\n this.animationData = animData;\n\n if (this.initialSegment) {\n this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]);\n this.firstFrame = Math.round(this.initialSegment[0]);\n } else {\n this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);\n this.firstFrame = Math.round(this.animationData.ip);\n }\n\n this.renderer.configAnimation(animData);\n\n if (!animData.assets) {\n animData.assets = [];\n }\n\n this.assets = this.animationData.assets;\n this.frameRate = this.animationData.fr;\n this.frameMult = this.animationData.fr / 1000;\n this.renderer.searchExtraCompositions(animData.assets);\n this.markers = markerParser(animData.markers || []);\n this.trigger('config_ready');\n this.preloadImages();\n this.loadSegments();\n this.updaFrameModifier();\n this.waitForFontsLoaded();\n\n if (this.isPaused) {\n this.audioController.pause();\n }\n } catch (error) {\n this.triggerConfigError(error);\n }\n };\n\n AnimationItem.prototype.waitForFontsLoaded = function () {\n if (!this.renderer) {\n return;\n }\n\n if (this.renderer.globalData.fontManager.isLoaded) {\n this.checkLoaded();\n } else {\n setTimeout(this.waitForFontsLoaded.bind(this), 20);\n }\n };\n\n AnimationItem.prototype.checkLoaded = function () {\n if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') && this.imagePreloader.loadedFootages()) {\n this.isLoaded = true;\n var expressionsPlugin = getExpressionsPlugin();\n\n if (expressionsPlugin) {\n expressionsPlugin.initExpressions(this);\n }\n\n this.renderer.initItems();\n setTimeout(function () {\n this.trigger('DOMLoaded');\n }.bind(this), 0);\n this.gotoFrame();\n\n if (this.autoplay) {\n this.play();\n }\n }\n };\n\n AnimationItem.prototype.resize = function () {\n this.renderer.updateContainerSize();\n };\n\n AnimationItem.prototype.setSubframe = function (flag) {\n this.isSubframeEnabled = !!flag;\n };\n\n AnimationItem.prototype.gotoFrame = function () {\n this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise\n\n if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) {\n this.currentFrame = this.timeCompleted;\n }\n\n this.trigger('enterFrame');\n this.renderFrame();\n this.trigger('drawnFrame');\n };\n\n AnimationItem.prototype.renderFrame = function () {\n if (this.isLoaded === false || !this.renderer) {\n return;\n }\n\n try {\n this.renderer.renderFrame(this.currentFrame + this.firstFrame);\n } catch (error) {\n this.triggerRenderFrameError(error);\n }\n };\n\n AnimationItem.prototype.play = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.isPaused = false;\n this.trigger('_pause');\n this.audioController.resume();\n\n if (this._idle) {\n this._idle = false;\n this.trigger('_active');\n }\n }\n };\n\n AnimationItem.prototype.pause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === false) {\n this.isPaused = true;\n this.trigger('_play');\n this._idle = true;\n this.trigger('_idle');\n this.audioController.pause();\n }\n };\n\n AnimationItem.prototype.togglePause = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n if (this.isPaused === true) {\n this.play();\n } else {\n this.pause();\n }\n };\n\n AnimationItem.prototype.stop = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.pause();\n this.playCount = 0;\n this._completedLoop = false;\n this.setCurrentRawFrameValue(0);\n };\n\n AnimationItem.prototype.getMarkerData = function (markerName) {\n var marker;\n\n for (var i = 0; i < this.markers.length; i += 1) {\n marker = this.markers[i];\n\n if (marker.payload && marker.payload.name === markerName) {\n return marker;\n }\n }\n\n return null;\n };\n\n AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n this.goToAndStop(marker.time, true);\n }\n } else if (isFrame) {\n this.setCurrentRawFrameValue(value);\n } else {\n this.setCurrentRawFrameValue(value * this.frameModifier);\n }\n\n this.pause();\n };\n\n AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {\n if (name && this.name !== name) {\n return;\n }\n\n var numValue = Number(value);\n\n if (isNaN(numValue)) {\n var marker = this.getMarkerData(value);\n\n if (marker) {\n if (!marker.duration) {\n this.goToAndStop(marker.time, true);\n } else {\n this.playSegments([marker.time, marker.time + marker.duration], true);\n }\n }\n } else {\n this.goToAndStop(numValue, isFrame, name);\n }\n\n this.play();\n };\n\n AnimationItem.prototype.advanceTime = function (value) {\n if (this.isPaused === true || this.isLoaded === false) {\n return;\n }\n\n var nextValue = this.currentRawFrame + value * this.frameModifier;\n var _isComplete = false; // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.\n // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.\n\n if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {\n if (!this.loop || this.playCount === this.loop) {\n if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) {\n _isComplete = true;\n nextValue = this.totalFrames - 1;\n }\n } else if (nextValue >= this.totalFrames) {\n this.playCount += 1;\n\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n this.setCurrentRawFrameValue(nextValue % this.totalFrames);\n this._completedLoop = true;\n this.trigger('loopComplete');\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n } else if (nextValue < 0) {\n if (!this.checkSegments(nextValue % this.totalFrames)) {\n if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {\n // eslint-disable-line no-plusplus\n this.setCurrentRawFrameValue(this.totalFrames + nextValue % this.totalFrames);\n\n if (!this._completedLoop) {\n this._completedLoop = true;\n } else {\n this.trigger('loopComplete');\n }\n } else {\n _isComplete = true;\n nextValue = 0;\n }\n }\n } else {\n this.setCurrentRawFrameValue(nextValue);\n }\n\n if (_isComplete) {\n this.setCurrentRawFrameValue(nextValue);\n this.pause();\n this.trigger('complete');\n }\n };\n\n AnimationItem.prototype.adjustSegment = function (arr, offset) {\n this.playCount = 0;\n\n if (arr[1] < arr[0]) {\n if (this.frameModifier > 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(-1);\n }\n }\n\n this.totalFrames = arr[0] - arr[1];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[1];\n this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);\n } else if (arr[1] > arr[0]) {\n if (this.frameModifier < 0) {\n if (this.playSpeed < 0) {\n this.setSpeed(-this.playSpeed);\n } else {\n this.setDirection(1);\n }\n }\n\n this.totalFrames = arr[1] - arr[0];\n this.timeCompleted = this.totalFrames;\n this.firstFrame = arr[0];\n this.setCurrentRawFrameValue(0.001 + offset);\n }\n\n this.trigger('segmentStart');\n };\n\n AnimationItem.prototype.setSegment = function (init, end) {\n var pendingFrame = -1;\n\n if (this.isPaused) {\n if (this.currentRawFrame + this.firstFrame < init) {\n pendingFrame = init;\n } else if (this.currentRawFrame + this.firstFrame > end) {\n pendingFrame = end - init;\n }\n }\n\n this.firstFrame = init;\n this.totalFrames = end - init;\n this.timeCompleted = this.totalFrames;\n\n if (pendingFrame !== -1) {\n this.goToAndStop(pendingFrame, true);\n }\n };\n\n AnimationItem.prototype.playSegments = function (arr, forceFlag) {\n if (forceFlag) {\n this.segments.length = 0;\n }\n\n if (_typeof$4(arr[0]) === 'object') {\n var i;\n var len = arr.length;\n\n for (i = 0; i < len; i += 1) {\n this.segments.push(arr[i]);\n }\n } else {\n this.segments.push(arr);\n }\n\n if (this.segments.length && forceFlag) {\n this.adjustSegment(this.segments.shift(), 0);\n }\n\n if (this.isPaused) {\n this.play();\n }\n };\n\n AnimationItem.prototype.resetSegments = function (forceFlag) {\n this.segments.length = 0;\n this.segments.push([this.animationData.ip, this.animationData.op]);\n\n if (forceFlag) {\n this.checkSegments(0);\n }\n };\n\n AnimationItem.prototype.checkSegments = function (offset) {\n if (this.segments.length) {\n this.adjustSegment(this.segments.shift(), offset);\n return true;\n }\n\n return false;\n };\n\n AnimationItem.prototype.destroy = function (name) {\n if (name && this.name !== name || !this.renderer) {\n return;\n }\n\n this.renderer.destroy();\n this.imagePreloader.destroy();\n this.trigger('destroy');\n this._cbs = null;\n this.onEnterFrame = null;\n this.onLoopComplete = null;\n this.onComplete = null;\n this.onSegmentStart = null;\n this.onDestroy = null;\n this.renderer = null;\n this.renderer = null;\n this.imagePreloader = null;\n this.projectInterface = null;\n };\n\n AnimationItem.prototype.setCurrentRawFrameValue = function (value) {\n this.currentRawFrame = value;\n this.gotoFrame();\n };\n\n AnimationItem.prototype.setSpeed = function (val) {\n this.playSpeed = val;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setDirection = function (val) {\n this.playDirection = val < 0 ? -1 : 1;\n this.updaFrameModifier();\n };\n\n AnimationItem.prototype.setVolume = function (val, name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.setVolume(val);\n };\n\n AnimationItem.prototype.getVolume = function () {\n return this.audioController.getVolume();\n };\n\n AnimationItem.prototype.mute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.mute();\n };\n\n AnimationItem.prototype.unmute = function (name) {\n if (name && this.name !== name) {\n return;\n }\n\n this.audioController.unmute();\n };\n\n AnimationItem.prototype.updaFrameModifier = function () {\n this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;\n this.audioController.setRate(this.playSpeed * this.playDirection);\n };\n\n AnimationItem.prototype.getPath = function () {\n return this.path;\n };\n\n AnimationItem.prototype.getAssetsPath = function (assetData) {\n var path = '';\n\n if (assetData.e) {\n path = assetData.p;\n } else if (this.assetsPath) {\n var imagePath = assetData.p;\n\n if (imagePath.indexOf('images/') !== -1) {\n imagePath = imagePath.split('/')[1];\n }\n\n path = this.assetsPath + imagePath;\n } else {\n path = this.path;\n path += assetData.u ? assetData.u : '';\n path += assetData.p;\n }\n\n return path;\n };\n\n AnimationItem.prototype.getAssetData = function (id) {\n var i = 0;\n var len = this.assets.length;\n\n while (i < len) {\n if (id === this.assets[i].id) {\n return this.assets[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n AnimationItem.prototype.hide = function () {\n this.renderer.hide();\n };\n\n AnimationItem.prototype.show = function () {\n this.renderer.show();\n };\n\n AnimationItem.prototype.getDuration = function (isFrame) {\n return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;\n };\n\n AnimationItem.prototype.updateDocumentData = function (path, documentData, index) {\n try {\n var element = this.renderer.getElementByPath(path);\n element.updateDocumentData(documentData, index);\n } catch (error) {// TODO: decide how to handle catch case\n }\n };\n\n AnimationItem.prototype.trigger = function (name) {\n if (this._cbs && this._cbs[name]) {\n switch (name) {\n case 'enterFrame':\n this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier));\n break;\n\n case 'drawnFrame':\n this.drawnFrameEvent.currentTime = this.currentFrame;\n this.drawnFrameEvent.totalTime = this.totalFrames;\n this.drawnFrameEvent.direction = this.frameModifier;\n this.triggerEvent(name, this.drawnFrameEvent);\n break;\n\n case 'loopComplete':\n this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n break;\n\n case 'complete':\n this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult));\n break;\n\n case 'segmentStart':\n this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n break;\n\n case 'destroy':\n this.triggerEvent(name, new BMDestroyEvent(name, this));\n break;\n\n default:\n this.triggerEvent(name);\n }\n }\n\n if (name === 'enterFrame' && this.onEnterFrame) {\n this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult));\n }\n\n if (name === 'loopComplete' && this.onLoopComplete) {\n this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult));\n }\n\n if (name === 'complete' && this.onComplete) {\n this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult));\n }\n\n if (name === 'segmentStart' && this.onSegmentStart) {\n this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames));\n }\n\n if (name === 'destroy' && this.onDestroy) {\n this.onDestroy.call(this, new BMDestroyEvent(name, this));\n }\n };\n\n AnimationItem.prototype.triggerRenderFrameError = function (nativeError) {\n var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n AnimationItem.prototype.triggerConfigError = function (nativeError) {\n var error = new BMConfigErrorEvent(nativeError, this.currentFrame);\n this.triggerEvent('error', error);\n\n if (this.onError) {\n this.onError.call(this, error);\n }\n };\n\n var animationManager = function () {\n var moduleOb = {};\n var registeredAnimations = [];\n var initTime = 0;\n var len = 0;\n var playingAnimationsNum = 0;\n var _stopped = true;\n var _isFrozen = false;\n\n function removeElement(ev) {\n var i = 0;\n var animItem = ev.target;\n\n while (i < len) {\n if (registeredAnimations[i].animation === animItem) {\n registeredAnimations.splice(i, 1);\n i -= 1;\n len -= 1;\n\n if (!animItem.isPaused) {\n subtractPlayingCount();\n }\n }\n\n i += 1;\n }\n }\n\n function registerAnimation(element, animationData) {\n if (!element) {\n return null;\n }\n\n var i = 0;\n\n while (i < len) {\n if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) {\n return registeredAnimations[i].animation;\n }\n\n i += 1;\n }\n\n var animItem = new AnimationItem();\n setupAnimation(animItem, element);\n animItem.setData(element, animationData);\n return animItem;\n }\n\n function getRegisteredAnimations() {\n var i;\n var lenAnims = registeredAnimations.length;\n var animations = [];\n\n for (i = 0; i < lenAnims; i += 1) {\n animations.push(registeredAnimations[i].animation);\n }\n\n return animations;\n }\n\n function addPlayingCount() {\n playingAnimationsNum += 1;\n activate();\n }\n\n function subtractPlayingCount() {\n playingAnimationsNum -= 1;\n }\n\n function setupAnimation(animItem, element) {\n animItem.addEventListener('destroy', removeElement);\n animItem.addEventListener('_active', addPlayingCount);\n animItem.addEventListener('_idle', subtractPlayingCount);\n registeredAnimations.push({\n elem: element,\n animation: animItem\n });\n len += 1;\n }\n\n function loadAnimation(params) {\n var animItem = new AnimationItem();\n setupAnimation(animItem, null);\n animItem.setParams(params);\n return animItem;\n }\n\n function setSpeed(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setSpeed(val, animation);\n }\n }\n\n function setDirection(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setDirection(val, animation);\n }\n }\n\n function play(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.play(animation);\n }\n }\n\n function resume(nowTime) {\n var elapsedTime = nowTime - initTime;\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.advanceTime(elapsedTime);\n }\n\n initTime = nowTime;\n\n if (playingAnimationsNum && !_isFrozen) {\n window.requestAnimationFrame(resume);\n } else {\n _stopped = true;\n }\n }\n\n function first(nowTime) {\n initTime = nowTime;\n window.requestAnimationFrame(resume);\n }\n\n function pause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.pause(animation);\n }\n }\n\n function goToAndStop(value, isFrame, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.goToAndStop(value, isFrame, animation);\n }\n }\n\n function stop(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.stop(animation);\n }\n }\n\n function togglePause(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.togglePause(animation);\n }\n }\n\n function destroy(animation) {\n var i;\n\n for (i = len - 1; i >= 0; i -= 1) {\n registeredAnimations[i].animation.destroy(animation);\n }\n }\n\n function searchAnimations(animationData, standalone, renderer) {\n var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), [].slice.call(document.getElementsByClassName('bodymovin')));\n var i;\n var lenAnims = animElements.length;\n\n for (i = 0; i < lenAnims; i += 1) {\n if (renderer) {\n animElements[i].setAttribute('data-bm-type', renderer);\n }\n\n registerAnimation(animElements[i], animationData);\n }\n\n if (standalone && lenAnims === 0) {\n if (!renderer) {\n renderer = 'svg';\n }\n\n var body = document.getElementsByTagName('body')[0];\n body.innerText = '';\n var div = createTag('div');\n div.style.width = '100%';\n div.style.height = '100%';\n div.setAttribute('data-bm-type', renderer);\n body.appendChild(div);\n registerAnimation(div, animationData);\n }\n }\n\n function resize() {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.resize();\n }\n }\n\n function activate() {\n if (!_isFrozen && playingAnimationsNum) {\n if (_stopped) {\n window.requestAnimationFrame(first);\n _stopped = false;\n }\n }\n }\n\n function freeze() {\n _isFrozen = true;\n }\n\n function unfreeze() {\n _isFrozen = false;\n activate();\n }\n\n function setVolume(val, animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.setVolume(val, animation);\n }\n }\n\n function mute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.mute(animation);\n }\n }\n\n function unmute(animation) {\n var i;\n\n for (i = 0; i < len; i += 1) {\n registeredAnimations[i].animation.unmute(animation);\n }\n }\n\n moduleOb.registerAnimation = registerAnimation;\n moduleOb.loadAnimation = loadAnimation;\n moduleOb.setSpeed = setSpeed;\n moduleOb.setDirection = setDirection;\n moduleOb.play = play;\n moduleOb.pause = pause;\n moduleOb.stop = stop;\n moduleOb.togglePause = togglePause;\n moduleOb.searchAnimations = searchAnimations;\n moduleOb.resize = resize; // moduleOb.start = start;\n\n moduleOb.goToAndStop = goToAndStop;\n moduleOb.destroy = destroy;\n moduleOb.freeze = freeze;\n moduleOb.unfreeze = unfreeze;\n moduleOb.setVolume = setVolume;\n moduleOb.mute = mute;\n moduleOb.unmute = unmute;\n moduleOb.getRegisteredAnimations = getRegisteredAnimations;\n return moduleOb;\n }();\n\n /* eslint-disable */\n var BezierFactory = function () {\n /**\r\n * BezierEasing - use bezier curve for transition easing function\r\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\r\n *\r\n * Credits: is based on Firefox's nsSMILKeySpline.cpp\r\n * Usage:\r\n * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])\r\n * spline.get(x) => returns the easing value | x must be in [0, 1] range\r\n *\r\n */\n var ob = {};\n ob.getBezierEasing = getBezierEasing;\n var beziers = {};\n\n function getBezierEasing(a, b, c, d, nm) {\n var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\\./g, 'p');\n\n if (beziers[str]) {\n return beziers[str];\n }\n\n var bezEasing = new BezierEasing([a, b, c, d]);\n beziers[str] = bezEasing;\n return bezEasing;\n } // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\n\n var NEWTON_ITERATIONS = 4;\n var NEWTON_MIN_SLOPE = 0.001;\n var SUBDIVISION_PRECISION = 0.0000001;\n var SUBDIVISION_MAX_ITERATIONS = 10;\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n var float32ArraySupported = typeof Float32Array === 'function';\n\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n\n function C(aA1) {\n return 3.0 * aA1;\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) return aGuessT;\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n }\n /**\r\n * points is an array of [ mX1, mY1, mX2, mY2 ]\r\n */\n\n\n function BezierEasing(points) {\n this._p = points;\n this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n this._precomputed = false;\n this.get = this.get.bind(this);\n }\n\n BezierEasing.prototype = {\n get: function get(x) {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n if (!this._precomputed) this._precompute();\n if (mX1 === mY1 && mX2 === mY2) return x; // linear\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\n if (x === 0) return 0;\n if (x === 1) return 1;\n return calcBezier(this._getTForX(x), mY1, mY2);\n },\n // Private part\n _precompute: function _precompute() {\n var mX1 = this._p[0],\n mY1 = this._p[1],\n mX2 = this._p[2],\n mY2 = this._p[3];\n this._precomputed = true;\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n this._calcSampleValues();\n }\n },\n _calcSampleValues: function _calcSampleValues() {\n var mX1 = this._p[0],\n mX2 = this._p[2];\n\n for (var i = 0; i < kSplineTableSize; ++i) {\n this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n },\n\n /**\r\n * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.\r\n */\n _getTForX: function _getTForX(aX) {\n var mX1 = this._p[0],\n mX2 = this._p[2],\n mSampleValues = this._mSampleValues;\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n\n if (initialSlope === 0.0) {\n return guessForT;\n }\n\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n };\n return ob;\n }();\n\n var pooling = function () {\n function _double(arr) {\n return arr.concat(createSizedArray(arr.length));\n }\n\n return {\n \"double\": _double\n };\n }();\n\n var poolFactory = function () {\n return function (initialLength, _create, _release) {\n var _length = 0;\n var _maxLength = initialLength;\n var pool = createSizedArray(_maxLength);\n var ob = {\n newElement: newElement,\n release: release\n };\n\n function newElement() {\n var element;\n\n if (_length) {\n _length -= 1;\n element = pool[_length];\n } else {\n element = _create();\n }\n\n return element;\n }\n\n function release(element) {\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n if (_release) {\n _release(element);\n }\n\n pool[_length] = element;\n _length += 1;\n }\n\n return ob;\n };\n }();\n\n var bezierLengthPool = function () {\n function create() {\n return {\n addedLength: 0,\n percents: createTypedArray('float32', getDefaultCurveSegments()),\n lengths: createTypedArray('float32', getDefaultCurveSegments())\n };\n }\n\n return poolFactory(8, create);\n }();\n\n var segmentsLengthPool = function () {\n function create() {\n return {\n lengths: [],\n totalLength: 0\n };\n }\n\n function release(element) {\n var i;\n var len = element.lengths.length;\n\n for (i = 0; i < len; i += 1) {\n bezierLengthPool.release(element.lengths[i]);\n }\n\n element.lengths.length = 0;\n }\n\n return poolFactory(8, create, release);\n }();\n\n function bezFunction() {\n var math = Math;\n\n function pointOnLine2D(x1, y1, x2, y2, x3, y3) {\n var det1 = x1 * y2 + y1 * x3 + x2 * y3 - x3 * y2 - y3 * x1 - x2 * y1;\n return det1 > -0.001 && det1 < 0.001;\n }\n\n function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) {\n if (z1 === 0 && z2 === 0 && z3 === 0) {\n return pointOnLine2D(x1, y1, x2, y2, x3, y3);\n }\n\n var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2));\n var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2));\n var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2));\n var diffDist;\n\n if (dist1 > dist2) {\n if (dist1 > dist3) {\n diffDist = dist1 - dist2 - dist3;\n } else {\n diffDist = dist3 - dist2 - dist1;\n }\n } else if (dist3 > dist2) {\n diffDist = dist3 - dist2 - dist1;\n } else {\n diffDist = dist2 - dist1 - dist3;\n }\n\n return diffDist > -0.0001 && diffDist < 0.0001;\n }\n\n var getBezierLength = function () {\n return function (pt1, pt2, pt3, pt4) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point = [];\n var lastPoint = [];\n var lengthData = bezierLengthPool.newElement();\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint[i] !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n\n lastPoint[i] = point[i];\n }\n\n if (ptDistance) {\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n }\n\n lengthData.percents[k] = perc;\n lengthData.lengths[k] = addedLength;\n }\n\n lengthData.addedLength = addedLength;\n return lengthData;\n };\n }();\n\n function getSegmentsLength(shapeData) {\n var segmentsLength = segmentsLengthPool.newElement();\n var closed = shapeData.c;\n var pathV = shapeData.v;\n var pathO = shapeData.o;\n var pathI = shapeData.i;\n var i;\n var len = shapeData._length;\n var lengths = segmentsLength.lengths;\n var totalLength = 0;\n\n for (i = 0; i < len - 1; i += 1) {\n lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]);\n totalLength += lengths[i].addedLength;\n }\n\n if (closed && len) {\n lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]);\n totalLength += lengths[i].addedLength;\n }\n\n segmentsLength.totalLength = totalLength;\n return segmentsLength;\n }\n\n function BezierData(length) {\n this.segmentLength = 0;\n this.points = new Array(length);\n }\n\n function PointData(partial, point) {\n this.partialLength = partial;\n this.point = point;\n }\n\n var buildBezierData = function () {\n var storedData = {};\n return function (pt1, pt2, pt3, pt4) {\n var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\\./g, 'p');\n\n if (!storedData[bezierName]) {\n var curveSegments = getDefaultCurveSegments();\n var k;\n var i;\n var len;\n var ptCoord;\n var perc;\n var addedLength = 0;\n var ptDistance;\n var point;\n var lastPoint = null;\n\n if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) {\n curveSegments = 2;\n }\n\n var bezierData = new BezierData(curveSegments);\n len = pt3.length;\n\n for (k = 0; k < curveSegments; k += 1) {\n point = createSizedArray(len);\n perc = k / (curveSegments - 1);\n ptDistance = 0;\n\n for (i = 0; i < len; i += 1) {\n ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i];\n point[i] = ptCoord;\n\n if (lastPoint !== null) {\n ptDistance += bmPow(point[i] - lastPoint[i], 2);\n }\n }\n\n ptDistance = bmSqrt(ptDistance);\n addedLength += ptDistance;\n bezierData.points[k] = new PointData(ptDistance, point);\n lastPoint = point;\n }\n\n bezierData.segmentLength = addedLength;\n storedData[bezierName] = bezierData;\n }\n\n return storedData[bezierName];\n };\n }();\n\n function getDistancePerc(perc, bezierData) {\n var percents = bezierData.percents;\n var lengths = bezierData.lengths;\n var len = percents.length;\n var initPos = bmFloor((len - 1) * perc);\n var lengthPos = perc * bezierData.addedLength;\n var lPerc = 0;\n\n if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) {\n return percents[initPos];\n }\n\n var dir = lengths[initPos] > lengthPos ? -1 : 1;\n var flag = true;\n\n while (flag) {\n if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) {\n lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]);\n flag = false;\n } else {\n initPos += dir;\n }\n\n if (initPos < 0 || initPos >= len - 1) {\n // FIX for TypedArrays that don't store floating point values with enough accuracy\n if (initPos === len - 1) {\n return percents[initPos];\n }\n\n flag = false;\n }\n }\n\n return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc;\n }\n\n function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {\n var t1 = getDistancePerc(percent, bezierData);\n var u1 = 1 - t1;\n var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000;\n var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000;\n return [ptX, ptY];\n }\n\n var bezierSegmentPoints = createTypedArray('float32', 8);\n\n function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) {\n if (startPerc < 0) {\n startPerc = 0;\n } else if (startPerc > 1) {\n startPerc = 1;\n }\n\n var t0 = getDistancePerc(startPerc, bezierData);\n endPerc = endPerc > 1 ? 1 : endPerc;\n var t1 = getDistancePerc(endPerc, bezierData);\n var i;\n var len = pt1.length;\n var u0 = 1 - t0;\n var u1 = 1 - t1;\n var u0u0u0 = u0 * u0 * u0;\n var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase\n\n var t0t0t0 = t0 * t0 * t0; //\n\n var u0u0u1 = u0 * u0 * u1;\n var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase\n\n var t0t0t1 = t0 * t0 * t1; //\n\n var u0u1u1 = u0 * u1 * u1;\n var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase\n\n var t0t1t1 = t0 * t1 * t1; //\n\n var u1u1u1 = u1 * u1 * u1;\n var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase\n\n var t1t1t1 = t1 * t1 * t1;\n\n for (i = 0; i < len; i += 1) {\n bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n\n bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase\n }\n\n return bezierSegmentPoints;\n }\n\n return {\n getSegmentsLength: getSegmentsLength,\n getNewSegment: getNewSegment,\n getPointInSegment: getPointInSegment,\n buildBezierData: buildBezierData,\n pointOnLine2D: pointOnLine2D,\n pointOnLine3D: pointOnLine3D\n };\n }\n\n var bez = bezFunction();\n\n var PropertyFactory = function () {\n var initFrame = initialDefaultFrame;\n var mathAbs = Math.abs;\n\n function interpolateValue(frameNum, caching) {\n var offsetTime = this.offsetTime;\n var newValue;\n\n if (this.propType === 'multidimensional') {\n newValue = createTypedArray('float32', this.pv.length);\n }\n\n var iterationIndex = caching.lastIndex;\n var i = iterationIndex;\n var len = this.keyframes.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = this.keyframes[i];\n nextKeyData = this.keyframes[i + 1];\n\n if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) {\n if (keyData.h) {\n keyData = nextKeyData;\n }\n\n iterationIndex = 0;\n break;\n }\n\n if (nextKeyData.t - offsetTime > frameNum) {\n iterationIndex = i;\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n iterationIndex = 0;\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n var k;\n var kLen;\n var perc;\n var jLen;\n var j;\n var fnc;\n var nextKeyTime = nextKeyData.t - offsetTime;\n var keyTime = keyData.t - offsetTime;\n var endValue;\n\n if (keyData.to) {\n if (!keyframeMetadata.bezierData) {\n keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);\n }\n\n var bezierData = keyframeMetadata.bezierData;\n\n if (frameNum >= nextKeyTime || frameNum < keyTime) {\n var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;\n kLen = bezierData.points[ind].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[ind].point[k];\n } // caching._lastKeyframeIndex = -1;\n\n } else {\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n var distanceInLine = bezierData.segmentLength * perc;\n var segmentPerc;\n var addedLength = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastAddedLength : 0;\n j = caching.lastFrame < frameNum && caching._lastKeyframeIndex === i ? caching._lastPoint : 0;\n flag = true;\n jLen = bezierData.points.length;\n\n while (flag) {\n addedLength += bezierData.points[j].partialLength;\n\n if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k];\n }\n\n break;\n } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {\n segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;\n kLen = bezierData.points[j].point.length;\n\n for (k = 0; k < kLen; k += 1) {\n newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;\n }\n\n break;\n }\n\n if (j < jLen - 1) {\n j += 1;\n } else {\n flag = false;\n }\n }\n\n caching._lastPoint = j;\n caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;\n caching._lastKeyframeIndex = i;\n }\n } else {\n var outX;\n var outY;\n var inX;\n var inY;\n var keyValue;\n len = keyData.s.length;\n endValue = nextKeyData.s || keyData.e;\n\n if (this.sh && keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n newValue[0] = endValue[0];\n newValue[1] = endValue[1];\n newValue[2] = endValue[2];\n } else if (frameNum <= keyTime) {\n newValue[0] = keyData.s[0];\n newValue[1] = keyData.s[1];\n newValue[2] = keyData.s[2];\n } else {\n var quatStart = createQuaternion(keyData.s);\n var quatEnd = createQuaternion(endValue);\n var time = (frameNum - keyTime) / (nextKeyTime - keyTime);\n quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));\n }\n } else {\n for (i = 0; i < len; i += 1) {\n if (keyData.h !== 1) {\n if (frameNum >= nextKeyTime) {\n perc = 1;\n } else if (frameNum < keyTime) {\n perc = 0;\n } else {\n if (keyData.o.x.constructor === Array) {\n if (!keyframeMetadata.__fnct) {\n keyframeMetadata.__fnct = [];\n }\n\n if (!keyframeMetadata.__fnct[i]) {\n outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i];\n outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i];\n inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i];\n inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i];\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyframeMetadata.__fnct[i] = fnc;\n } else {\n fnc = keyframeMetadata.__fnct[i];\n }\n } else if (!keyframeMetadata.__fnct) {\n outX = keyData.o.x;\n outY = keyData.o.y;\n inX = keyData.i.x;\n inY = keyData.i.y;\n fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;\n keyData.keyframeMetadata = fnc;\n } else {\n fnc = keyframeMetadata.__fnct;\n }\n\n perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));\n }\n }\n\n endValue = nextKeyData.s || keyData.e;\n keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;\n\n if (this.propType === 'multidimensional') {\n newValue[i] = keyValue;\n } else {\n newValue = keyValue;\n }\n }\n }\n }\n\n caching.lastIndex = iterationIndex;\n return newValue;\n } // based on @Toji's https://github.com/toji/gl-matrix/\n\n\n function slerp(a, b, t) {\n var out = [];\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n var bx = b[0];\n var by = b[1];\n var bz = b[2];\n var bw = b[3];\n var omega;\n var cosom;\n var sinom;\n var scale0;\n var scale1;\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n\n if (1.0 - cosom > 0.000001) {\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n scale0 = 1.0 - t;\n scale1 = t;\n }\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n }\n\n function quaternionToEuler(out, quat) {\n var qx = quat[0];\n var qy = quat[1];\n var qz = quat[2];\n var qw = quat[3];\n var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz);\n var attitude = Math.asin(2 * qx * qy + 2 * qz * qw);\n var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz);\n out[0] = heading / degToRads;\n out[1] = attitude / degToRads;\n out[2] = bank / degToRads;\n }\n\n function createQuaternion(values) {\n var heading = values[0] * degToRads;\n var attitude = values[1] * degToRads;\n var bank = values[2] * degToRads;\n var c1 = Math.cos(heading / 2);\n var c2 = Math.cos(attitude / 2);\n var c3 = Math.cos(bank / 2);\n var s1 = Math.sin(heading / 2);\n var s2 = Math.sin(attitude / 2);\n var s3 = Math.sin(bank / 2);\n var w = c1 * c2 * c3 - s1 * s2 * s3;\n var x = s1 * s2 * c3 + c1 * c2 * s3;\n var y = s1 * c2 * c3 + c1 * s2 * s3;\n var z = c1 * s2 * c3 - s1 * c2 * s3;\n return [x, y, z, w];\n }\n\n function getValueAtCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n\n if (!(frameNum === this._caching.lastFrame || this._caching.lastFrame !== initFrame && (this._caching.lastFrame >= endTime && frameNum >= endTime || this._caching.lastFrame < initTime && frameNum < initTime))) {\n if (this._caching.lastFrame >= frameNum) {\n this._caching._lastKeyframeIndex = -1;\n this._caching.lastIndex = 0;\n }\n\n var renderResult = this.interpolateValue(frameNum, this._caching);\n this.pv = renderResult;\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function setVValue(val) {\n var multipliedValue;\n\n if (this.propType === 'unidimensional') {\n multipliedValue = val * this.mult;\n\n if (mathAbs(this.v - multipliedValue) > 0.00001) {\n this.v = multipliedValue;\n this._mdf = true;\n }\n } else {\n var i = 0;\n var len = this.v.length;\n\n while (i < len) {\n multipliedValue = val[i] * this.mult;\n\n if (mathAbs(this.v[i] - multipliedValue) > 0.00001) {\n this.v[i] = multipliedValue;\n this._mdf = true;\n }\n\n i += 1;\n }\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = this._isFirstFrame;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = this.kf ? this.pv : this.data.k;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this._isFirstFrame = false;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n function ValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.mult = mult || 1;\n this.data = data;\n this.v = mult ? data.k * mult : data.k;\n this.pv = data.k;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.vel = 0;\n this.effectsSequence = [];\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function MultiDimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n this.mult = mult || 1;\n this.data = data;\n this._mdf = false;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.k = false;\n this.kf = false;\n this.frameId = -1;\n var i;\n var len = data.k.length;\n this.v = createTypedArray('float32', len);\n this.pv = createTypedArray('float32', len);\n this.vel = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n this.v[i] = data.k[i] * this.mult;\n this.pv[i] = data.k[i];\n }\n\n this._isFirstFrame = true;\n this.effectsSequence = [];\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.addEffect = addEffect;\n }\n\n function KeyframedValueProperty(elem, data, mult, container) {\n this.propType = 'unidimensional';\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.frameId = -1;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: 0,\n _lastKeyframeIndex: -1\n };\n this.k = true;\n this.kf = true;\n this.data = data;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.v = initFrame;\n this.pv = initFrame;\n this._isFirstFrame = true;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.addEffect = addEffect;\n }\n\n function KeyframedMultidimensionalProperty(elem, data, mult, container) {\n this.propType = 'multidimensional';\n var i;\n var len = data.k.length;\n var s;\n var e;\n var to;\n var ti;\n\n for (i = 0; i < len - 1; i += 1) {\n if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) {\n s = data.k[i].s;\n e = data.k[i + 1].s;\n to = data.k[i].to;\n ti = data.k[i].ti;\n\n if (s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1]) || s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2])) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n\n if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {\n if (s.length === 2 || s[2] === e[2] && to[2] === 0 && ti[2] === 0) {\n data.k[i].to = null;\n data.k[i].ti = null;\n }\n }\n }\n }\n\n this.effectsSequence = [getValueAtCurrentTime.bind(this)];\n this.data = data;\n this.keyframes = data.k;\n this.keyframesMetadata = [];\n this.offsetTime = elem.data.st;\n this.k = true;\n this.kf = true;\n this._isFirstFrame = true;\n this.mult = mult || 1;\n this.elem = elem;\n this.container = container;\n this.comp = elem.comp;\n this.getValue = processEffectsSequence;\n this.setVValue = setVValue;\n this.interpolateValue = interpolateValue;\n this.frameId = -1;\n var arrLen = data.k[0].s.length;\n this.v = createTypedArray('float32', arrLen);\n this.pv = createTypedArray('float32', arrLen);\n\n for (i = 0; i < arrLen; i += 1) {\n this.v[i] = initFrame;\n this.pv[i] = initFrame;\n }\n\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0,\n value: createTypedArray('float32', arrLen)\n };\n this.addEffect = addEffect;\n }\n\n function getProp(elem, data, type, mult, container) {\n var p;\n\n if (!data.k.length) {\n p = new ValueProperty(elem, data, mult, container);\n } else if (typeof data.k[0] === 'number') {\n p = new MultiDimensionalProperty(elem, data, mult, container);\n } else {\n switch (type) {\n case 0:\n p = new KeyframedValueProperty(elem, data, mult, container);\n break;\n\n case 1:\n p = new KeyframedMultidimensionalProperty(elem, data, mult, container);\n break;\n\n default:\n break;\n }\n }\n\n if (p.effectsSequence.length) {\n container.addDynamicProperty(p);\n }\n\n return p;\n }\n\n var ob = {\n getProp: getProp\n };\n return ob;\n }();\n\n function DynamicPropertyContainer() {}\n\n DynamicPropertyContainer.prototype = {\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n this.container.addDynamicProperty(this);\n this._isAnimated = true;\n }\n },\n iterateDynamicProperties: function iterateDynamicProperties() {\n this._mdf = false;\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this._mdf = true;\n }\n }\n },\n initDynamicPropertyContainer: function initDynamicPropertyContainer(container) {\n this.container = container;\n this.dynamicProperties = [];\n this._mdf = false;\n this._isAnimated = false;\n }\n };\n\n var pointPool = function () {\n function create() {\n return createTypedArray('float32', 2);\n }\n\n return poolFactory(8, create);\n }();\n\n function ShapePath() {\n this.c = false;\n this._length = 0;\n this._maxLength = 8;\n this.v = createSizedArray(this._maxLength);\n this.o = createSizedArray(this._maxLength);\n this.i = createSizedArray(this._maxLength);\n }\n\n ShapePath.prototype.setPathData = function (closed, len) {\n this.c = closed;\n this.setLength(len);\n var i = 0;\n\n while (i < len) {\n this.v[i] = pointPool.newElement();\n this.o[i] = pointPool.newElement();\n this.i[i] = pointPool.newElement();\n i += 1;\n }\n };\n\n ShapePath.prototype.setLength = function (len) {\n while (this._maxLength < len) {\n this.doubleArrayLength();\n }\n\n this._length = len;\n };\n\n ShapePath.prototype.doubleArrayLength = function () {\n this.v = this.v.concat(createSizedArray(this._maxLength));\n this.i = this.i.concat(createSizedArray(this._maxLength));\n this.o = this.o.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n };\n\n ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) {\n var arr;\n this._length = Math.max(this._length, pos + 1);\n\n if (this._length >= this._maxLength) {\n this.doubleArrayLength();\n }\n\n switch (type) {\n case 'v':\n arr = this.v;\n break;\n\n case 'i':\n arr = this.i;\n break;\n\n case 'o':\n arr = this.o;\n break;\n\n default:\n arr = [];\n break;\n }\n\n if (!arr[pos] || arr[pos] && !replace) {\n arr[pos] = pointPool.newElement();\n }\n\n arr[pos][0] = x;\n arr[pos][1] = y;\n };\n\n ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) {\n this.setXYAt(vX, vY, 'v', pos, replace);\n this.setXYAt(oX, oY, 'o', pos, replace);\n this.setXYAt(iX, iY, 'i', pos, replace);\n };\n\n ShapePath.prototype.reverse = function () {\n var newPath = new ShapePath();\n newPath.setPathData(this.c, this._length);\n var vertices = this.v;\n var outPoints = this.o;\n var inPoints = this.i;\n var init = 0;\n\n if (this.c) {\n newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);\n init = 1;\n }\n\n var cnt = this._length - 1;\n var len = this._length;\n var i;\n\n for (i = init; i < len; i += 1) {\n newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);\n cnt -= 1;\n }\n\n return newPath;\n };\n\n var shapePool = function () {\n function create() {\n return new ShapePath();\n }\n\n function release(shapePath) {\n var len = shapePath._length;\n var i;\n\n for (i = 0; i < len; i += 1) {\n pointPool.release(shapePath.v[i]);\n pointPool.release(shapePath.i[i]);\n pointPool.release(shapePath.o[i]);\n shapePath.v[i] = null;\n shapePath.i[i] = null;\n shapePath.o[i] = null;\n }\n\n shapePath._length = 0;\n shapePath.c = false;\n }\n\n function clone(shape) {\n var cloned = factory.newElement();\n var i;\n var len = shape._length === undefined ? shape.v.length : shape._length;\n cloned.setLength(len);\n cloned.c = shape.c;\n\n for (i = 0; i < len; i += 1) {\n cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i);\n }\n\n return cloned;\n }\n\n var factory = poolFactory(4, create, release);\n factory.clone = clone;\n return factory;\n }();\n\n function ShapeCollection() {\n this._length = 0;\n this._maxLength = 4;\n this.shapes = createSizedArray(this._maxLength);\n }\n\n ShapeCollection.prototype.addShape = function (shapeData) {\n if (this._length === this._maxLength) {\n this.shapes = this.shapes.concat(createSizedArray(this._maxLength));\n this._maxLength *= 2;\n }\n\n this.shapes[this._length] = shapeData;\n this._length += 1;\n };\n\n ShapeCollection.prototype.releaseShapes = function () {\n var i;\n\n for (i = 0; i < this._length; i += 1) {\n shapePool.release(this.shapes[i]);\n }\n\n this._length = 0;\n };\n\n var shapeCollectionPool = function () {\n var ob = {\n newShapeCollection: newShapeCollection,\n release: release\n };\n var _length = 0;\n var _maxLength = 4;\n var pool = createSizedArray(_maxLength);\n\n function newShapeCollection() {\n var shapeCollection;\n\n if (_length) {\n _length -= 1;\n shapeCollection = pool[_length];\n } else {\n shapeCollection = new ShapeCollection();\n }\n\n return shapeCollection;\n }\n\n function release(shapeCollection) {\n var i;\n var len = shapeCollection._length;\n\n for (i = 0; i < len; i += 1) {\n shapePool.release(shapeCollection.shapes[i]);\n }\n\n shapeCollection._length = 0;\n\n if (_length === _maxLength) {\n pool = pooling[\"double\"](pool);\n _maxLength *= 2;\n }\n\n pool[_length] = shapeCollection;\n _length += 1;\n }\n\n return ob;\n }();\n\n var ShapePropertyFactory = function () {\n var initFrame = -999999;\n\n function interpolateShape(frameNum, previousValue, caching) {\n var iterationIndex = caching.lastIndex;\n var keyPropS;\n var keyPropE;\n var isHold;\n var j;\n var k;\n var jLen;\n var kLen;\n var perc;\n var vertexValue;\n var kf = this.keyframes;\n\n if (frameNum < kf[0].t - this.offsetTime) {\n keyPropS = kf[0].s[0];\n isHold = true;\n iterationIndex = 0;\n } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) {\n keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];\n /* if(kf[kf.length - 1].s){\r\n keyPropS = kf[kf.length - 1].s[0];\r\n }else{\r\n keyPropS = kf[kf.length - 2].e[0];\r\n } */\n\n isHold = true;\n } else {\n var i = iterationIndex;\n var len = kf.length - 1;\n var flag = true;\n var keyData;\n var nextKeyData;\n var keyframeMetadata;\n\n while (flag) {\n keyData = kf[i];\n nextKeyData = kf[i + 1];\n\n if (nextKeyData.t - this.offsetTime > frameNum) {\n break;\n }\n\n if (i < len - 1) {\n i += 1;\n } else {\n flag = false;\n }\n }\n\n keyframeMetadata = this.keyframesMetadata[i] || {};\n isHold = keyData.h === 1;\n iterationIndex = i;\n\n if (!isHold) {\n if (frameNum >= nextKeyData.t - this.offsetTime) {\n perc = 1;\n } else if (frameNum < keyData.t - this.offsetTime) {\n perc = 0;\n } else {\n var fnc;\n\n if (keyframeMetadata.__fnct) {\n fnc = keyframeMetadata.__fnct;\n } else {\n fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get;\n keyframeMetadata.__fnct = fnc;\n }\n\n perc = fnc((frameNum - (keyData.t - this.offsetTime)) / (nextKeyData.t - this.offsetTime - (keyData.t - this.offsetTime)));\n }\n\n keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];\n }\n\n keyPropS = keyData.s[0];\n }\n\n jLen = previousValue._length;\n kLen = keyPropS.i[0].length;\n caching.lastIndex = iterationIndex;\n\n for (j = 0; j < jLen; j += 1) {\n for (k = 0; k < kLen; k += 1) {\n vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc;\n previousValue.i[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc;\n previousValue.o[j][k] = vertexValue;\n vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc;\n previousValue.v[j][k] = vertexValue;\n }\n }\n }\n\n function interpolateShapeCurrentTime() {\n var frameNum = this.comp.renderedFrame - this.offsetTime;\n var initTime = this.keyframes[0].t - this.offsetTime;\n var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;\n var lastFrame = this._caching.lastFrame;\n\n if (!(lastFrame !== initFrame && (lastFrame < initTime && frameNum < initTime || lastFrame > endTime && frameNum > endTime))) {\n /// /\n this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;\n this.interpolateShape(frameNum, this.pv, this._caching); /// /\n }\n\n this._caching.lastFrame = frameNum;\n return this.pv;\n }\n\n function resetShape() {\n this.paths = this.localShapeCollection;\n }\n\n function shapesEqual(shape1, shape2) {\n if (shape1._length !== shape2._length || shape1.c !== shape2.c) {\n return false;\n }\n\n var i;\n var len = shape1._length;\n\n for (i = 0; i < len; i += 1) {\n if (shape1.v[i][0] !== shape2.v[i][0] || shape1.v[i][1] !== shape2.v[i][1] || shape1.o[i][0] !== shape2.o[i][0] || shape1.o[i][1] !== shape2.o[i][1] || shape1.i[i][0] !== shape2.i[i][0] || shape1.i[i][1] !== shape2.i[i][1]) {\n return false;\n }\n }\n\n return true;\n }\n\n function setVValue(newPath) {\n if (!shapesEqual(this.v, newPath)) {\n this.v = shapePool.clone(newPath);\n this.localShapeCollection.releaseShapes();\n this.localShapeCollection.addShape(this.v);\n this._mdf = true;\n this.paths = this.localShapeCollection;\n }\n }\n\n function processEffectsSequence() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (!this.effectsSequence.length) {\n this._mdf = false;\n return;\n }\n\n if (this.lock) {\n this.setVValue(this.pv);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var finalValue;\n\n if (this.kf) {\n finalValue = this.pv;\n } else if (this.data.ks) {\n finalValue = this.data.ks.k;\n } else {\n finalValue = this.data.pt.k;\n }\n\n var i;\n var len = this.effectsSequence.length;\n\n for (i = 0; i < len; i += 1) {\n finalValue = this.effectsSequence[i](finalValue);\n }\n\n this.setVValue(finalValue);\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n }\n\n function ShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.container = elem;\n this.elem = elem;\n this.data = data;\n this.k = false;\n this.kf = false;\n this._mdf = false;\n var pathData = type === 3 ? data.pt.k : data.ks.k;\n this.v = shapePool.clone(pathData);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.reset = resetShape;\n this.effectsSequence = [];\n }\n\n function addEffect(effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.container.addDynamicProperty(this);\n }\n\n ShapeProperty.prototype.interpolateShape = interpolateShape;\n ShapeProperty.prototype.getValue = processEffectsSequence;\n ShapeProperty.prototype.setVValue = setVValue;\n ShapeProperty.prototype.addEffect = addEffect;\n\n function KeyframedShapeProperty(elem, data, type) {\n this.propType = 'shape';\n this.comp = elem.comp;\n this.elem = elem;\n this.container = elem;\n this.offsetTime = elem.data.st;\n this.keyframes = type === 3 ? data.pt.k : data.ks.k;\n this.keyframesMetadata = [];\n this.k = true;\n this.kf = true;\n var len = this.keyframes[0].s[0].i.length;\n this.v = shapePool.newElement();\n this.v.setPathData(this.keyframes[0].s[0].c, len);\n this.pv = shapePool.clone(this.v);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.paths.addShape(this.v);\n this.lastFrame = initFrame;\n this.reset = resetShape;\n this._caching = {\n lastFrame: initFrame,\n lastIndex: 0\n };\n this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];\n }\n\n KeyframedShapeProperty.prototype.getValue = processEffectsSequence;\n KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;\n KeyframedShapeProperty.prototype.setVValue = setVValue;\n KeyframedShapeProperty.prototype.addEffect = addEffect;\n\n var EllShapeProperty = function () {\n var cPoint = roundCorner;\n\n function EllShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 4);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.paths = this.localShapeCollection;\n this.localShapeCollection.addShape(this.v);\n this.d = data.d;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertEllToPath();\n }\n }\n\n EllShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertEllToPath();\n }\n },\n convertEllToPath: function convertEllToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var s0 = this.s.v[0] / 2;\n var s1 = this.s.v[1] / 2;\n\n var _cw = this.d !== 3;\n\n var _v = this.v;\n _v.v[0][0] = p0;\n _v.v[0][1] = p1 - s1;\n _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.v[1][1] = p1;\n _v.v[2][0] = p0;\n _v.v[2][1] = p1 + s1;\n _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.v[3][1] = p1;\n _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.i[0][1] = p1 - s1;\n _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.i[1][1] = p1 - s1 * cPoint;\n _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.i[2][1] = p1 + s1;\n _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.i[3][1] = p1 + s1 * cPoint;\n _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;\n _v.o[0][1] = p1 - s1;\n _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;\n _v.o[1][1] = p1 + s1 * cPoint;\n _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;\n _v.o[2][1] = p1 + s1;\n _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;\n _v.o[3][1] = p1 - s1 * cPoint;\n }\n };\n extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory);\n return EllShapePropertyFactory;\n }();\n\n var StarShapeProperty = function () {\n function StarShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.setPathData(true, 0);\n this.elem = elem;\n this.comp = elem.comp;\n this.data = data;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n\n if (data.sy === 1) {\n this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this);\n this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this);\n this.convertToPath = this.convertStarToPath;\n } else {\n this.convertToPath = this.convertPolygonToPath;\n }\n\n this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this);\n this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this);\n this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this);\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertToPath();\n }\n }\n\n StarShapePropertyFactory.prototype = {\n reset: resetShape,\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertToPath();\n }\n },\n convertStarToPath: function convertStarToPath() {\n var numPts = Math.floor(this.pt.v) * 2;\n var angle = Math.PI * 2 / numPts;\n /* this.v.v.length = numPts;\r\n this.v.i.length = numPts;\r\n this.v.o.length = numPts; */\n\n var longFlag = true;\n var longRad = this.or.v;\n var shortRad = this.ir.v;\n var longRound = this.os.v;\n var shortRound = this.is.v;\n var longPerimSegment = 2 * Math.PI * longRad / (numPts * 2);\n var shortPerimSegment = 2 * Math.PI * shortRad / (numPts * 2);\n var i;\n var rad;\n var roundness;\n var perimSegment;\n var currentAng = -Math.PI / 2;\n currentAng += this.r.v;\n var dir = this.data.d === 3 ? -1 : 1;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n rad = longFlag ? longRad : shortRad;\n roundness = longFlag ? longRound : shortRound;\n perimSegment = longFlag ? longPerimSegment : shortPerimSegment;\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n /* this.v.v[i] = [x,y];\r\n this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];\r\n this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];\r\n this.v._length = numPts; */\n\n longFlag = !longFlag;\n currentAng += angle * dir;\n }\n },\n convertPolygonToPath: function convertPolygonToPath() {\n var numPts = Math.floor(this.pt.v);\n var angle = Math.PI * 2 / numPts;\n var rad = this.or.v;\n var roundness = this.os.v;\n var perimSegment = 2 * Math.PI * rad / (numPts * 4);\n var i;\n var currentAng = -Math.PI * 0.5;\n var dir = this.data.d === 3 ? -1 : 1;\n currentAng += this.r.v;\n this.v._length = 0;\n\n for (i = 0; i < numPts; i += 1) {\n var x = rad * Math.cos(currentAng);\n var y = rad * Math.sin(currentAng);\n var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y);\n var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y);\n x += +this.p.v[0];\n y += +this.p.v[1];\n this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true);\n currentAng += angle * dir;\n }\n\n this.paths.length = 0;\n this.paths[0] = this.v;\n }\n };\n extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory);\n return StarShapePropertyFactory;\n }();\n\n var RectShapeProperty = function () {\n function RectShapePropertyFactory(elem, data) {\n this.v = shapePool.newElement();\n this.v.c = true;\n this.localShapeCollection = shapeCollectionPool.newShapeCollection();\n this.localShapeCollection.addShape(this.v);\n this.paths = this.localShapeCollection;\n this.elem = elem;\n this.comp = elem.comp;\n this.frameId = -1;\n this.d = data.d;\n this.initDynamicPropertyContainer(elem);\n this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this);\n this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this);\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.k = false;\n this.convertRectToPath();\n }\n }\n\n RectShapePropertyFactory.prototype = {\n convertRectToPath: function convertRectToPath() {\n var p0 = this.p.v[0];\n var p1 = this.p.v[1];\n var v0 = this.s.v[0] / 2;\n var v1 = this.s.v[1] / 2;\n var round = bmMin(v0, v1, this.r.v);\n var cPoint = round * (1 - roundCorner);\n this.v._length = 0;\n\n if (this.d === 2 || this.d === 1) {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true);\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2);\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3);\n }\n } else {\n this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true);\n\n if (round !== 0) {\n this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true);\n this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true);\n this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true);\n this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true);\n this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true);\n this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true);\n } else {\n this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true);\n this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true);\n this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true);\n }\n }\n },\n getValue: function getValue() {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n\n if (this._mdf) {\n this.convertRectToPath();\n }\n },\n reset: resetShape\n };\n extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory);\n return RectShapePropertyFactory;\n }();\n\n function getShapeProp(elem, data, type) {\n var prop;\n\n if (type === 3 || type === 4) {\n var dataProp = type === 3 ? data.pt : data.ks;\n var keys = dataProp.k;\n\n if (keys.length) {\n prop = new KeyframedShapeProperty(elem, data, type);\n } else {\n prop = new ShapeProperty(elem, data, type);\n }\n } else if (type === 5) {\n prop = new RectShapeProperty(elem, data);\n } else if (type === 6) {\n prop = new EllShapeProperty(elem, data);\n } else if (type === 7) {\n prop = new StarShapeProperty(elem, data);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n }\n\n function getConstructorFunction() {\n return ShapeProperty;\n }\n\n function getKeyframedConstructorFunction() {\n return KeyframedShapeProperty;\n }\n\n var ob = {};\n ob.getShapeProp = getShapeProp;\n ob.getConstructorFunction = getConstructorFunction;\n ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;\n return ob;\n }();\n\n /*!\r\n Transformation Matrix v2.0\r\n (c) Epistemex 2014-2015\r\n www.epistemex.com\r\n By Ken Fyrstenberg\r\n Contributions by leeoniya.\r\n License: MIT, header required.\r\n */\n\n /**\r\n * 2D transformation matrix object initialized with identity matrix.\r\n *\r\n * The matrix can synchronize a canvas context by supplying the context\r\n * as an argument, or later apply current absolute transform to an\r\n * existing context.\r\n *\r\n * All values are handled as floating point values.\r\n *\r\n * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix\r\n * @prop {number} a - scale x\r\n * @prop {number} b - shear y\r\n * @prop {number} c - shear x\r\n * @prop {number} d - scale y\r\n * @prop {number} e - translate x\r\n * @prop {number} f - translate y\r\n * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context\r\n * @constructor\r\n */\n\n var Matrix = function () {\n var _cos = Math.cos;\n var _sin = Math.sin;\n var _tan = Math.tan;\n var _rnd = Math.round;\n\n function reset() {\n this.props[0] = 1;\n this.props[1] = 0;\n this.props[2] = 0;\n this.props[3] = 0;\n this.props[4] = 0;\n this.props[5] = 1;\n this.props[6] = 0;\n this.props[7] = 0;\n this.props[8] = 0;\n this.props[9] = 0;\n this.props[10] = 1;\n this.props[11] = 0;\n this.props[12] = 0;\n this.props[13] = 0;\n this.props[14] = 0;\n this.props[15] = 1;\n return this;\n }\n\n function rotate(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function rotateX(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateY(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1);\n }\n\n function rotateZ(angle) {\n if (angle === 0) {\n return this;\n }\n\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n\n function shear(sx, sy) {\n return this._t(1, sy, sx, 1, 0, 0);\n }\n\n function skew(ax, ay) {\n return this.shear(_tan(ax), _tan(ay));\n }\n\n function skewFromAxis(ax, angle) {\n var mCos = _cos(angle);\n\n var mSin = _sin(angle);\n\n return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);\n }\n\n function scale(sx, sy, sz) {\n if (!sz && sz !== 0) {\n sz = 1;\n }\n\n if (sx === 1 && sy === 1 && sz === 1) {\n return this;\n }\n\n return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);\n }\n\n function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {\n this.props[0] = a;\n this.props[1] = b;\n this.props[2] = c;\n this.props[3] = d;\n this.props[4] = e;\n this.props[5] = f;\n this.props[6] = g;\n this.props[7] = h;\n this.props[8] = i;\n this.props[9] = j;\n this.props[10] = k;\n this.props[11] = l;\n this.props[12] = m;\n this.props[13] = n;\n this.props[14] = o;\n this.props[15] = p;\n return this;\n }\n\n function translate(tx, ty, tz) {\n tz = tz || 0;\n\n if (tx !== 0 || ty !== 0 || tz !== 0) {\n return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1);\n }\n\n return this;\n }\n\n function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {\n var _p = this.props;\n\n if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) {\n // NOTE: commenting this condition because TurboFan deoptimizes code when present\n // if(m2 !== 0 || n2 !== 0 || o2 !== 0){\n _p[12] = _p[12] * a2 + _p[15] * m2;\n _p[13] = _p[13] * f2 + _p[15] * n2;\n _p[14] = _p[14] * k2 + _p[15] * o2;\n _p[15] *= p2; // }\n\n this._identityCalculated = false;\n return this;\n }\n\n var a1 = _p[0];\n var b1 = _p[1];\n var c1 = _p[2];\n var d1 = _p[3];\n var e1 = _p[4];\n var f1 = _p[5];\n var g1 = _p[6];\n var h1 = _p[7];\n var i1 = _p[8];\n var j1 = _p[9];\n var k1 = _p[10];\n var l1 = _p[11];\n var m1 = _p[12];\n var n1 = _p[13];\n var o1 = _p[14];\n var p1 = _p[15];\n /* matrix order (canvas compatible):\r\n * ace\r\n * bdf\r\n * 001\r\n */\n\n _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;\n _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2;\n _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2;\n _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2;\n _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2;\n _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2;\n _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2;\n _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2;\n _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2;\n _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2;\n _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2;\n _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2;\n _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2;\n _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2;\n _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2;\n _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2;\n this._identityCalculated = false;\n return this;\n }\n\n function isIdentity() {\n if (!this._identityCalculated) {\n this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);\n this._identityCalculated = true;\n }\n\n return this._identity;\n }\n\n function equals(matr) {\n var i = 0;\n\n while (i < 16) {\n if (matr.props[i] !== this.props[i]) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n }\n\n function clone(matr) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n matr.props[i] = this.props[i];\n }\n\n return matr;\n }\n\n function cloneFromProps(props) {\n var i;\n\n for (i = 0; i < 16; i += 1) {\n this.props[i] = props[i];\n }\n }\n\n function applyToPoint(x, y, z) {\n return {\n x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],\n y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],\n z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]\n };\n /* return {\r\n x: x * me.a + y * me.c + me.e,\r\n y: x * me.b + y * me.d + me.f\r\n }; */\n }\n\n function applyToX(x, y, z) {\n return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];\n }\n\n function applyToY(x, y, z) {\n return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];\n }\n\n function applyToZ(x, y, z) {\n return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];\n }\n\n function getInverseMatrix() {\n var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];\n var a = this.props[5] / determinant;\n var b = -this.props[1] / determinant;\n var c = -this.props[4] / determinant;\n var d = this.props[0] / determinant;\n var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant;\n var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant;\n var inverseMatrix = new Matrix();\n inverseMatrix.props[0] = a;\n inverseMatrix.props[1] = b;\n inverseMatrix.props[4] = c;\n inverseMatrix.props[5] = d;\n inverseMatrix.props[12] = e;\n inverseMatrix.props[13] = f;\n return inverseMatrix;\n }\n\n function inversePoint(pt) {\n var inverseMatrix = this.getInverseMatrix();\n return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0);\n }\n\n function inversePoints(pts) {\n var i;\n var len = pts.length;\n var retPts = [];\n\n for (i = 0; i < len; i += 1) {\n retPts[i] = inversePoint(pts[i]);\n }\n\n return retPts;\n }\n\n function applyToTriplePoints(pt1, pt2, pt3) {\n var arr = createTypedArray('float32', 6);\n\n if (this.isIdentity()) {\n arr[0] = pt1[0];\n arr[1] = pt1[1];\n arr[2] = pt2[0];\n arr[3] = pt2[1];\n arr[4] = pt3[0];\n arr[5] = pt3[1];\n } else {\n var p0 = this.props[0];\n var p1 = this.props[1];\n var p4 = this.props[4];\n var p5 = this.props[5];\n var p12 = this.props[12];\n var p13 = this.props[13];\n arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;\n arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;\n arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;\n arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;\n arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;\n arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;\n }\n\n return arr;\n }\n\n function applyToPointArray(x, y, z) {\n var arr;\n\n if (this.isIdentity()) {\n arr = [x, y, z];\n } else {\n arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];\n }\n\n return arr;\n }\n\n function applyToPointStringified(x, y) {\n if (this.isIdentity()) {\n return x + ',' + y;\n }\n\n var _p = this.props;\n return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;\n }\n\n function toCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var i = 0;\n var props = this.props;\n var cssValue = 'matrix3d(';\n var v = 10000;\n\n while (i < 16) {\n cssValue += _rnd(props[i] * v) / v;\n cssValue += i === 15 ? ')' : ',';\n i += 1;\n }\n\n return cssValue;\n }\n\n function roundMatrixProperty(val) {\n var v = 10000;\n\n if (val < 0.000001 && val > 0 || val > -0.000001 && val < 0) {\n return _rnd(val * v) / v;\n }\n\n return val;\n }\n\n function to2dCSS() {\n // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.\n\n /* if(this.isIdentity()) {\r\n return '';\r\n } */\n var props = this.props;\n\n var _a = roundMatrixProperty(props[0]);\n\n var _b = roundMatrixProperty(props[1]);\n\n var _c = roundMatrixProperty(props[4]);\n\n var _d = roundMatrixProperty(props[5]);\n\n var _e = roundMatrixProperty(props[12]);\n\n var _f = roundMatrixProperty(props[13]);\n\n return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')';\n }\n\n return function () {\n this.reset = reset;\n this.rotate = rotate;\n this.rotateX = rotateX;\n this.rotateY = rotateY;\n this.rotateZ = rotateZ;\n this.skew = skew;\n this.skewFromAxis = skewFromAxis;\n this.shear = shear;\n this.scale = scale;\n this.setTransform = setTransform;\n this.translate = translate;\n this.transform = transform;\n this.applyToPoint = applyToPoint;\n this.applyToX = applyToX;\n this.applyToY = applyToY;\n this.applyToZ = applyToZ;\n this.applyToPointArray = applyToPointArray;\n this.applyToTriplePoints = applyToTriplePoints;\n this.applyToPointStringified = applyToPointStringified;\n this.toCSS = toCSS;\n this.to2dCSS = to2dCSS;\n this.clone = clone;\n this.cloneFromProps = cloneFromProps;\n this.equals = equals;\n this.inversePoints = inversePoints;\n this.inversePoint = inversePoint;\n this.getInverseMatrix = getInverseMatrix;\n this._t = this.transform;\n this.isIdentity = isIdentity;\n this._identity = true;\n this._identityCalculated = false;\n this.props = createTypedArray('float32', 16);\n this.reset();\n };\n }();\n\n function _typeof$3(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\n var lottie = {};\n var standalone = '__[STANDALONE]__';\n var animationData = '__[ANIMATIONDATA]__';\n var renderer = '';\n\n function setLocation(href) {\n setLocationHref(href);\n }\n\n function searchAnimations() {\n if (standalone === true) {\n animationManager.searchAnimations(animationData, standalone, renderer);\n } else {\n animationManager.searchAnimations();\n }\n }\n\n function setSubframeRendering(flag) {\n setSubframeEnabled(flag);\n }\n\n function setPrefix(prefix) {\n setIdPrefix(prefix);\n }\n\n function loadAnimation(params) {\n if (standalone === true) {\n params.animationData = JSON.parse(animationData);\n }\n\n return animationManager.loadAnimation(params);\n }\n\n function setQuality(value) {\n if (typeof value === 'string') {\n switch (value) {\n case 'high':\n setDefaultCurveSegments(200);\n break;\n\n default:\n case 'medium':\n setDefaultCurveSegments(50);\n break;\n\n case 'low':\n setDefaultCurveSegments(10);\n break;\n }\n } else if (!isNaN(value) && value > 1) {\n setDefaultCurveSegments(value);\n }\n\n if (getDefaultCurveSegments() >= 50) {\n roundValues(false);\n } else {\n roundValues(true);\n }\n }\n\n function inBrowser() {\n return typeof navigator !== 'undefined';\n }\n\n function installPlugin(type, plugin) {\n if (type === 'expressions') {\n setExpressionsPlugin(plugin);\n }\n }\n\n function getFactory(name) {\n switch (name) {\n case 'propertyFactory':\n return PropertyFactory;\n\n case 'shapePropertyFactory':\n return ShapePropertyFactory;\n\n case 'matrix':\n return Matrix;\n\n default:\n return null;\n }\n }\n\n lottie.play = animationManager.play;\n lottie.pause = animationManager.pause;\n lottie.setLocationHref = setLocation;\n lottie.togglePause = animationManager.togglePause;\n lottie.setSpeed = animationManager.setSpeed;\n lottie.setDirection = animationManager.setDirection;\n lottie.stop = animationManager.stop;\n lottie.searchAnimations = searchAnimations;\n lottie.registerAnimation = animationManager.registerAnimation;\n lottie.loadAnimation = loadAnimation;\n lottie.setSubframeRendering = setSubframeRendering;\n lottie.resize = animationManager.resize; // lottie.start = start;\n\n lottie.goToAndStop = animationManager.goToAndStop;\n lottie.destroy = animationManager.destroy;\n lottie.setQuality = setQuality;\n lottie.inBrowser = inBrowser;\n lottie.installPlugin = installPlugin;\n lottie.freeze = animationManager.freeze;\n lottie.unfreeze = animationManager.unfreeze;\n lottie.setVolume = animationManager.setVolume;\n lottie.mute = animationManager.mute;\n lottie.unmute = animationManager.unmute;\n lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations;\n lottie.useWebWorker = setWebWorker;\n lottie.setIDPrefix = setPrefix;\n lottie.__getFactory = getFactory;\n lottie.version = '5.9.6';\n\n function checkReady() {\n if (document.readyState === 'complete') {\n clearInterval(readyStateCheckInterval);\n searchAnimations();\n }\n }\n\n function getQueryVariable(variable) {\n var vars = queryString.split('&');\n\n for (var i = 0; i < vars.length; i += 1) {\n var pair = vars[i].split('=');\n\n if (decodeURIComponent(pair[0]) == variable) {\n // eslint-disable-line eqeqeq\n return decodeURIComponent(pair[1]);\n }\n }\n\n return null;\n }\n\n var queryString = '';\n\n if (standalone) {\n var scripts = document.getElementsByTagName('script');\n var index = scripts.length - 1;\n var myScript = scripts[index] || {\n src: ''\n };\n queryString = myScript.src ? myScript.src.replace(/^[^\\?]+\\??/, '') : ''; // eslint-disable-line no-useless-escape\n\n renderer = getQueryVariable('renderer');\n }\n\n var readyStateCheckInterval = setInterval(checkReady, 100); // this adds bodymovin to the window object for backwards compatibility\n\n try {\n if (!((typeof exports === \"undefined\" ? \"undefined\" : _typeof$3(exports)) === 'object' && typeof module !== 'undefined') && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef\n ) {\n window.bodymovin = lottie;\n }\n } catch (err) {//\n }\n\n var ShapeModifiers = function () {\n var ob = {};\n var modifiers = {};\n ob.registerModifier = registerModifier;\n ob.getModifier = getModifier;\n\n function registerModifier(nm, factory) {\n if (!modifiers[nm]) {\n modifiers[nm] = factory;\n }\n }\n\n function getModifier(nm, elem, data) {\n return new modifiers[nm](elem, data);\n }\n\n return ob;\n }();\n\n function ShapeModifier() {}\n\n ShapeModifier.prototype.initModifierProperties = function () {};\n\n ShapeModifier.prototype.addShapeToModifier = function () {};\n\n ShapeModifier.prototype.addShape = function (data) {\n if (!this.closed) {\n // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.\n data.sh.container.addDynamicProperty(data.sh);\n var shapeData = {\n shape: data.sh,\n data: data,\n localShapeCollection: shapeCollectionPool.newShapeCollection()\n };\n this.shapes.push(shapeData);\n this.addShapeToModifier(shapeData);\n\n if (this._isAnimated) {\n data.setAsAnimated();\n }\n }\n };\n\n ShapeModifier.prototype.init = function (elem, data) {\n this.shapes = [];\n this.elem = elem;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, data);\n this.frameId = initialDefaultFrame;\n this.closed = false;\n this.k = false;\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n ShapeModifier.prototype.processKeys = function () {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n extendPrototype([DynamicPropertyContainer], ShapeModifier);\n\n function TrimModifier() {}\n\n extendPrototype([ShapeModifier], TrimModifier);\n\n TrimModifier.prototype.initModifierProperties = function (elem, data) {\n this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);\n this.sValue = 0;\n this.eValue = 0;\n this.getValue = this.processKeys;\n this.m = data.m;\n this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;\n };\n\n TrimModifier.prototype.addShapeToModifier = function (shapeData) {\n shapeData.pathsData = [];\n };\n\n TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) {\n var segments = [];\n\n if (e <= 1) {\n segments.push({\n s: s,\n e: e\n });\n } else if (s >= 1) {\n segments.push({\n s: s - 1,\n e: e - 1\n });\n } else {\n segments.push({\n s: s,\n e: 1\n });\n segments.push({\n s: 0,\n e: e - 1\n });\n }\n\n var shapeSegments = [];\n var i;\n var len = segments.length;\n var segmentOb;\n\n for (i = 0; i < len; i += 1) {\n segmentOb = segments[i];\n\n if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) {\n var shapeS;\n var shapeE;\n\n if (segmentOb.s * totalModifierLength <= addedLength) {\n shapeS = 0;\n } else {\n shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;\n }\n\n if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) {\n shapeE = 1;\n } else {\n shapeE = (segmentOb.e * totalModifierLength - addedLength) / shapeLength;\n }\n\n shapeSegments.push([shapeS, shapeE]);\n }\n }\n\n if (!shapeSegments.length) {\n shapeSegments.push([0, 0]);\n }\n\n return shapeSegments;\n };\n\n TrimModifier.prototype.releasePathsData = function (pathsData) {\n var i;\n var len = pathsData.length;\n\n for (i = 0; i < len; i += 1) {\n segmentsLengthPool.release(pathsData[i]);\n }\n\n pathsData.length = 0;\n return pathsData;\n };\n\n TrimModifier.prototype.processShapes = function (_isFirstFrame) {\n var s;\n var e;\n\n if (this._mdf || _isFirstFrame) {\n var o = this.o.v % 360 / 360;\n\n if (o < 0) {\n o += 1;\n }\n\n if (this.s.v > 1) {\n s = 1 + o;\n } else if (this.s.v < 0) {\n s = 0 + o;\n } else {\n s = this.s.v + o;\n }\n\n if (this.e.v > 1) {\n e = 1 + o;\n } else if (this.e.v < 0) {\n e = 0 + o;\n } else {\n e = this.e.v + o;\n }\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n s = Math.round(s * 10000) * 0.0001;\n e = Math.round(e * 10000) * 0.0001;\n this.sValue = s;\n this.eValue = e;\n } else {\n s = this.sValue;\n e = this.eValue;\n }\n\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var pathsData;\n var pathData;\n var totalShapeLength;\n var totalModifierLength = 0;\n\n if (e === s) {\n for (i = 0; i < len; i += 1) {\n this.shapes[i].localShapeCollection.releaseShapes();\n this.shapes[i].shape._mdf = true;\n this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;\n\n if (this._mdf) {\n this.shapes[i].pathsData.length = 0;\n }\n }\n } else if (!(e === 1 && s === 0 || e === 0 && s === 1)) {\n var segments = [];\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i]; // if shape hasn't changed and trim properties haven't changed, cached previous path can be used\n\n if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {\n shapeData.shape.paths = shapeData.localShapeCollection;\n } else {\n shapePaths = shapeData.shape.paths;\n jLen = shapePaths._length;\n totalShapeLength = 0;\n\n if (!shapeData.shape._mdf && shapeData.pathsData.length) {\n totalShapeLength = shapeData.totalShapeLength;\n } else {\n pathsData = this.releasePathsData(shapeData.pathsData);\n\n for (j = 0; j < jLen; j += 1) {\n pathData = bez.getSegmentsLength(shapePaths.shapes[j]);\n pathsData.push(pathData);\n totalShapeLength += pathData.totalLength;\n }\n\n shapeData.totalShapeLength = totalShapeLength;\n shapeData.pathsData = pathsData;\n }\n\n totalModifierLength += totalShapeLength;\n shapeData.shape._mdf = true;\n }\n }\n\n var shapeS = s;\n var shapeE = e;\n var addedLength = 0;\n var edges;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shapeData = this.shapes[i];\n\n if (shapeData.shape._mdf) {\n localShapeCollection = shapeData.localShapeCollection;\n localShapeCollection.releaseShapes(); // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group\n\n if (this.m === 2 && len > 1) {\n edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);\n addedLength += shapeData.totalShapeLength;\n } else {\n edges = [[shapeS, shapeE]];\n }\n\n jLen = edges.length;\n\n for (j = 0; j < jLen; j += 1) {\n shapeS = edges[j][0];\n shapeE = edges[j][1];\n segments.length = 0;\n\n if (shapeE <= 1) {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength * shapeE\n });\n } else if (shapeS >= 1) {\n segments.push({\n s: shapeData.totalShapeLength * (shapeS - 1),\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n } else {\n segments.push({\n s: shapeData.totalShapeLength * shapeS,\n e: shapeData.totalShapeLength\n });\n segments.push({\n s: 0,\n e: shapeData.totalShapeLength * (shapeE - 1)\n });\n }\n\n var newShapesData = this.addShapes(shapeData, segments[0]);\n\n if (segments[0].s !== segments[0].e) {\n if (segments.length > 1) {\n var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];\n\n if (lastShapeInCollection.c) {\n var lastShape = newShapesData.pop();\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1], lastShape);\n } else {\n this.addPaths(newShapesData, localShapeCollection);\n newShapesData = this.addShapes(shapeData, segments[1]);\n }\n }\n\n this.addPaths(newShapesData, localShapeCollection);\n }\n }\n\n shapeData.shape.paths = localShapeCollection;\n }\n }\n } else if (this._mdf) {\n for (i = 0; i < len; i += 1) {\n // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.\n // Don't remove this even if it's losing cached info.\n this.shapes[i].pathsData.length = 0;\n this.shapes[i].shape._mdf = true;\n }\n }\n };\n\n TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) {\n var i;\n var len = newPaths.length;\n\n for (i = 0; i < len; i += 1) {\n localShapeCollection.addShape(newPaths[i]);\n }\n };\n\n TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) {\n shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);\n shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);\n }\n\n shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) {\n shapePath.setXYAt(points[1], points[5], 'o', pos);\n shapePath.setXYAt(points[2], points[6], 'i', pos + 1);\n\n if (newShape) {\n shapePath.setXYAt(points[0], points[4], 'v', pos);\n }\n\n shapePath.setXYAt(points[3], points[7], 'v', pos + 1);\n };\n\n TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) {\n var pathsData = shapeData.pathsData;\n var shapePaths = shapeData.shape.paths.shapes;\n var i;\n var len = shapeData.shape.paths._length;\n var j;\n var jLen;\n var addedLength = 0;\n var currentLengthData;\n var segmentCount;\n var lengths;\n var segment;\n var shapes = [];\n var initPos;\n var newShape = true;\n\n if (!shapePath) {\n shapePath = shapePool.newElement();\n segmentCount = 0;\n initPos = 0;\n } else {\n segmentCount = shapePath._length;\n initPos = shapePath._length;\n }\n\n shapes.push(shapePath);\n\n for (i = 0; i < len; i += 1) {\n lengths = pathsData[i].lengths;\n shapePath.c = shapePaths[i].c;\n jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;\n\n for (j = 1; j < jLen; j += 1) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength + currentLengthData.addedLength < shapeSegment.s) {\n addedLength += currentLengthData.addedLength;\n shapePath.c = false;\n } else if (addedLength > shapeSegment.e) {\n shapePath.c = false;\n break;\n } else {\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n }\n\n if (shapePaths[i].c && lengths.length) {\n currentLengthData = lengths[j - 1];\n\n if (addedLength <= shapeSegment.e) {\n var segmentLength = lengths[j - 1].addedLength;\n\n if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {\n this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);\n newShape = false;\n } else {\n segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);\n this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);\n\n newShape = false;\n shapePath.c = false;\n }\n } else {\n shapePath.c = false;\n }\n\n addedLength += currentLengthData.addedLength;\n segmentCount += 1;\n }\n\n if (shapePath._length) {\n shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);\n shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1);\n }\n\n if (addedLength > shapeSegment.e) {\n break;\n }\n\n if (i < len - 1) {\n shapePath = shapePool.newElement();\n newShape = true;\n shapes.push(shapePath);\n segmentCount = 0;\n }\n }\n\n return shapes;\n };\n\n function PuckerAndBloatModifier() {}\n\n extendPrototype([ShapeModifier], PuckerAndBloatModifier);\n\n PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this);\n this._isAnimated = !!this.amount.effectsSequence.length;\n };\n\n PuckerAndBloatModifier.prototype.processPath = function (path, amount) {\n var percent = amount / 100;\n var centerPoint = [0, 0];\n var pathLength = path._length;\n var i = 0;\n\n for (i = 0; i < pathLength; i += 1) {\n centerPoint[0] += path.v[i][0];\n centerPoint[1] += path.v[i][1];\n }\n\n centerPoint[0] /= pathLength;\n centerPoint[1] /= pathLength;\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < pathLength; i += 1) {\n vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent;\n vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent;\n oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent;\n oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent;\n iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent;\n iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i);\n }\n\n return clonedPath;\n };\n\n PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var amount = this.amount.v;\n\n if (amount !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], amount));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n var TransformPropertyFactory = function () {\n var defaultVector = [0, 0];\n\n function applyToMatrix(mat) {\n var _mdf = this._mdf;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || _mdf;\n\n if (this.a) {\n mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.s) {\n mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk) {\n mat.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r) {\n mat.rotate(-this.r.v);\n } else {\n mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.data.p.s) {\n if (this.data.p.z) {\n mat.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n mat.translate(this.px.v, this.py.v, 0);\n }\n } else {\n mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n function processKeys(forceRender) {\n if (this.elem.globalData.frameId === this.frameId) {\n return;\n }\n\n if (this._isDirty) {\n this.precalculateMatrix();\n this._isDirty = false;\n }\n\n this.iterateDynamicProperties();\n\n if (this._mdf || forceRender) {\n var frameRate;\n this.v.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n }\n\n if (this.appliedTransformations < 2) {\n this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n this.v.skewFromAxis(-this.sk.v, this.sa.v);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n this.v.rotate(-this.r.v);\n } else if (!this.r && this.appliedTransformations < 4) {\n this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n }\n\n if (this.autoOriented) {\n var v1;\n var v2;\n frameRate = this.elem.globalData.frameRate;\n\n if (this.p && this.p.keyframes && this.p.getValueAtTime) {\n if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) {\n v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0);\n v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);\n } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {\n v1 = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / frameRate, 0);\n v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);\n } else {\n v1 = this.p.pv;\n v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);\n }\n } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {\n v1 = [];\n v2 = [];\n var px = this.px;\n var py = this.py;\n\n if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) {\n v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0);\n v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0);\n v2[0] = px.getValueAtTime(px.keyframes[0].t / frameRate, 0);\n v2[1] = py.getValueAtTime(py.keyframes[0].t / frameRate, 0);\n } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {\n v1[0] = px.getValueAtTime(px.keyframes[px.keyframes.length - 1].t / frameRate, 0);\n v1[1] = py.getValueAtTime(py.keyframes[py.keyframes.length - 1].t / frameRate, 0);\n v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0);\n v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0);\n } else {\n v1 = [px.pv, py.pv];\n v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime);\n v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime);\n }\n } else {\n v2 = defaultVector;\n v1 = v2;\n }\n\n this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));\n }\n\n if (this.data.p && this.data.p.s) {\n if (this.data.p.z) {\n this.v.translate(this.px.v, this.py.v, -this.pz.v);\n } else {\n this.v.translate(this.px.v, this.py.v, 0);\n }\n } else {\n this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);\n }\n }\n\n this.frameId = this.elem.globalData.frameId;\n }\n\n function precalculateMatrix() {\n if (!this.a.k) {\n this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);\n this.appliedTransformations = 1;\n } else {\n return;\n }\n\n if (!this.s.effectsSequence.length) {\n this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);\n this.appliedTransformations = 2;\n } else {\n return;\n }\n\n if (this.sk) {\n if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {\n this.pre.skewFromAxis(-this.sk.v, this.sa.v);\n this.appliedTransformations = 3;\n } else {\n return;\n }\n }\n\n if (this.r) {\n if (!this.r.effectsSequence.length) {\n this.pre.rotate(-this.r.v);\n this.appliedTransformations = 4;\n }\n } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {\n this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);\n this.appliedTransformations = 4;\n }\n }\n\n function autoOrient() {//\n // var prevP = this.getValueAtTime();\n }\n\n function addDynamicProperty(prop) {\n this._addDynamicProperty(prop);\n\n this.elem.addDynamicProperty(prop);\n this._isDirty = true;\n }\n\n function TransformProperty(elem, data, container) {\n this.elem = elem;\n this.frameId = -1;\n this.propType = 'transform';\n this.data = data;\n this.v = new Matrix(); // Precalculated matrix with non animated properties\n\n this.pre = new Matrix();\n this.appliedTransformations = 0;\n this.initDynamicPropertyContainer(container || elem);\n\n if (data.p && data.p.s) {\n this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this);\n this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this);\n\n if (data.p.z) {\n this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this);\n }\n } else {\n this.p = PropertyFactory.getProp(elem, data.p || {\n k: [0, 0, 0]\n }, 1, 0, this);\n }\n\n if (data.rx) {\n this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);\n this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);\n this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);\n\n if (data.or.k[0].ti) {\n var i;\n var len = data.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.or.k[i].to = null;\n data.or.k[i].ti = null;\n }\n }\n\n this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); // sh Indicates it needs to be capped between -180 and 180\n\n this.or.sh = true;\n } else {\n this.r = PropertyFactory.getProp(elem, data.r || {\n k: 0\n }, 0, degToRads, this);\n }\n\n if (data.sk) {\n this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);\n this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);\n }\n\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: [0, 0, 0]\n }, 1, 0, this);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: [100, 100, 100]\n }, 1, 0.01, this); // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.\n\n if (data.o) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem);\n } else {\n this.o = {\n _mdf: false,\n v: 1\n };\n }\n\n this._isDirty = true;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n }\n\n TransformProperty.prototype = {\n applyToMatrix: applyToMatrix,\n getValue: processKeys,\n precalculateMatrix: precalculateMatrix,\n autoOrient: autoOrient\n };\n extendPrototype([DynamicPropertyContainer], TransformProperty);\n TransformProperty.prototype.addDynamicProperty = addDynamicProperty;\n TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;\n\n function getTransformProperty(elem, data, container) {\n return new TransformProperty(elem, data, container);\n }\n\n return {\n getTransformProperty: getTransformProperty\n };\n }();\n\n function RepeaterModifier() {}\n\n extendPrototype([ShapeModifier], RepeaterModifier);\n\n RepeaterModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.c = PropertyFactory.getProp(elem, data.c, 0, null, this);\n this.o = PropertyFactory.getProp(elem, data.o, 0, null, this);\n this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this);\n this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this);\n this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this);\n this.data = data;\n\n if (!this.dynamicProperties.length) {\n this.getValue(true);\n }\n\n this._isAnimated = !!this.dynamicProperties.length;\n this.pMatrix = new Matrix();\n this.rMatrix = new Matrix();\n this.sMatrix = new Matrix();\n this.tMatrix = new Matrix();\n this.matrix = new Matrix();\n };\n\n RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) {\n var dir = inv ? -1 : 1;\n var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);\n var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);\n pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);\n rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n rMatrix.rotate(-transform.r.v * dir * perc);\n rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);\n sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY);\n sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);\n };\n\n RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) {\n this.elem = elem;\n this.arr = arr;\n this.pos = pos;\n this.elemsData = elemsData;\n this._currentCopies = 0;\n this._elements = [];\n this._groups = [];\n this.frameId = -1;\n this.initDynamicPropertyContainer(elem);\n this.initModifierProperties(elem, arr[pos]);\n\n while (pos > 0) {\n pos -= 1; // this._elements.unshift(arr.splice(pos,1)[0]);\n\n this._elements.unshift(arr[pos]);\n }\n\n if (this.dynamicProperties.length) {\n this.k = true;\n } else {\n this.getValue(true);\n }\n };\n\n RepeaterModifier.prototype.resetElements = function (elements) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._processed = false;\n\n if (elements[i].ty === 'gr') {\n this.resetElements(elements[i].it);\n }\n }\n };\n\n RepeaterModifier.prototype.cloneElements = function (elements) {\n var newElements = JSON.parse(JSON.stringify(elements));\n this.resetElements(newElements);\n return newElements;\n };\n\n RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) {\n var i;\n var len = elements.length;\n\n for (i = 0; i < len; i += 1) {\n elements[i]._render = renderFlag;\n\n if (elements[i].ty === 'gr') {\n this.changeGroupRender(elements[i].it, renderFlag);\n }\n }\n };\n\n RepeaterModifier.prototype.processShapes = function (_isFirstFrame) {\n var items;\n var itemsTransform;\n var i;\n var dir;\n var cont;\n var hasReloaded = false;\n\n if (this._mdf || _isFirstFrame) {\n var copies = Math.ceil(this.c.v);\n\n if (this._groups.length < copies) {\n while (this._groups.length < copies) {\n var group = {\n it: this.cloneElements(this._elements),\n ty: 'gr'\n };\n group.it.push({\n a: {\n a: 0,\n ix: 1,\n k: [0, 0]\n },\n nm: 'Transform',\n o: {\n a: 0,\n ix: 7,\n k: 100\n },\n p: {\n a: 0,\n ix: 2,\n k: [0, 0]\n },\n r: {\n a: 1,\n ix: 6,\n k: [{\n s: 0,\n e: 0,\n t: 0\n }, {\n s: 0,\n e: 0,\n t: 1\n }]\n },\n s: {\n a: 0,\n ix: 3,\n k: [100, 100]\n },\n sa: {\n a: 0,\n ix: 5,\n k: 0\n },\n sk: {\n a: 0,\n ix: 4,\n k: 0\n },\n ty: 'tr'\n });\n this.arr.splice(0, 0, group);\n\n this._groups.splice(0, 0, group);\n\n this._currentCopies += 1;\n }\n\n this.elem.reloadShapes();\n hasReloaded = true;\n }\n\n cont = 0;\n var renderFlag;\n\n for (i = 0; i <= this._groups.length - 1; i += 1) {\n renderFlag = cont < copies;\n this._groups[i]._render = renderFlag;\n this.changeGroupRender(this._groups[i].it, renderFlag);\n\n if (!renderFlag) {\n var elems = this.elemsData[i].it;\n var transformData = elems[elems.length - 1];\n\n if (transformData.transform.op.v !== 0) {\n transformData.transform.op._mdf = true;\n transformData.transform.op.v = 0;\n } else {\n transformData.transform.op._mdf = false;\n }\n }\n\n cont += 1;\n }\n\n this._currentCopies = copies; /// /\n\n var offset = this.o.v;\n var offsetModulo = offset % 1;\n var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n var pProps = this.pMatrix.props;\n var rProps = this.rMatrix.props;\n var sProps = this.sMatrix.props;\n this.pMatrix.reset();\n this.rMatrix.reset();\n this.sMatrix.reset();\n this.tMatrix.reset();\n this.matrix.reset();\n var iteration = 0;\n\n if (offset > 0) {\n while (iteration < roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n iteration += 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);\n iteration += offsetModulo;\n }\n } else if (offset < 0) {\n while (iteration > roundOffset) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);\n iteration -= 1;\n }\n\n if (offsetModulo) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true);\n iteration -= offsetModulo;\n }\n }\n\n i = this.data.m === 1 ? 0 : this._currentCopies - 1;\n dir = this.data.m === 1 ? 1 : -1;\n cont = this._currentCopies;\n var j;\n var jLen;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n jLen = itemsTransform.length;\n items[items.length - 1].transform.mProps._mdf = true;\n items[items.length - 1].transform.op._mdf = true;\n items[items.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));\n\n if (iteration !== 0) {\n if (i !== 0 && dir === 1 || i !== this._currentCopies - 1 && dir === -1) {\n this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);\n }\n\n this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]);\n this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]);\n this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]);\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n\n this.matrix.reset();\n } else {\n this.matrix.reset();\n\n for (j = 0; j < jLen; j += 1) {\n itemsTransform[j] = this.matrix.props[j];\n }\n }\n\n iteration += 1;\n cont -= 1;\n i += dir;\n }\n } else {\n cont = this._currentCopies;\n i = 0;\n dir = 1;\n\n while (cont) {\n items = this.elemsData[i].it;\n itemsTransform = items[items.length - 1].transform.mProps.v.props;\n items[items.length - 1].transform.mProps._mdf = false;\n items[items.length - 1].transform.op._mdf = false;\n cont -= 1;\n i += dir;\n }\n }\n\n return hasReloaded;\n };\n\n RepeaterModifier.prototype.addShape = function () {};\n\n function RoundCornersModifier() {}\n\n extendPrototype([ShapeModifier], RoundCornersModifier);\n\n RoundCornersModifier.prototype.initModifierProperties = function (elem, data) {\n this.getValue = this.processKeys;\n this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this);\n this._isAnimated = !!this.rd.effectsSequence.length;\n };\n\n RoundCornersModifier.prototype.processPath = function (path, round) {\n var clonedPath = shapePool.newElement();\n clonedPath.c = path.c;\n var i;\n var len = path._length;\n var currentV;\n var currentI;\n var currentO;\n var closerV;\n var distance;\n var newPosPerc;\n var index = 0;\n var vX;\n var vY;\n var oX;\n var oY;\n var iX;\n var iY;\n\n for (i = 0; i < len; i += 1) {\n currentV = path.v[i];\n currentO = path.o[i];\n currentI = path.i[i];\n\n if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) {\n if ((i === 0 || i === len - 1) && !path.c) {\n clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index);\n /* clonedPath.v[index] = currentV;\r\n clonedPath.o[index] = currentO;\r\n clonedPath.i[index] = currentI; */\n\n index += 1;\n } else {\n if (i === 0) {\n closerV = path.v[len - 1];\n } else {\n closerV = path.v[i - 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = iX;\n iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc;\n vY = iY;\n oX = vX - (vX - currentV[0]) * roundCorner;\n oY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n\n if (i === len - 1) {\n closerV = path.v[0];\n } else {\n closerV = path.v[i + 1];\n }\n\n distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2));\n newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0;\n oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc;\n vX = oX;\n oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc;\n vY = oY;\n iX = vX - (vX - currentV[0]) * roundCorner;\n iY = vY - (vY - currentV[1]) * roundCorner;\n clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index);\n index += 1;\n }\n } else {\n clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index);\n index += 1;\n }\n }\n\n return clonedPath;\n };\n\n RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) {\n var shapePaths;\n var i;\n var len = this.shapes.length;\n var j;\n var jLen;\n var rd = this.rd.v;\n\n if (rd !== 0) {\n var shapeData;\n var localShapeCollection;\n\n for (i = 0; i < len; i += 1) {\n shapeData = this.shapes[i];\n localShapeCollection = shapeData.localShapeCollection;\n\n if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) {\n localShapeCollection.releaseShapes();\n shapeData.shape._mdf = true;\n shapePaths = shapeData.shape.paths.shapes;\n jLen = shapeData.shape.paths._length;\n\n for (j = 0; j < jLen; j += 1) {\n localShapeCollection.addShape(this.processPath(shapePaths[j], rd));\n }\n }\n\n shapeData.shape.paths = shapeData.localShapeCollection;\n }\n }\n\n if (!this.dynamicProperties.length) {\n this._mdf = false;\n }\n };\n\n function getFontProperties(fontData) {\n var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];\n var fWeight = 'normal';\n var fStyle = 'normal';\n var len = styles.length;\n var styleName;\n\n for (var i = 0; i < len; i += 1) {\n styleName = styles[i].toLowerCase();\n\n switch (styleName) {\n case 'italic':\n fStyle = 'italic';\n break;\n\n case 'bold':\n fWeight = '700';\n break;\n\n case 'black':\n fWeight = '900';\n break;\n\n case 'medium':\n fWeight = '500';\n break;\n\n case 'regular':\n case 'normal':\n fWeight = '400';\n break;\n\n case 'light':\n case 'thin':\n fWeight = '200';\n break;\n\n default:\n break;\n }\n }\n\n return {\n style: fStyle,\n weight: fontData.fWeight || fWeight\n };\n }\n\n var FontManager = function () {\n var maxWaitingTime = 5000;\n var emptyChar = {\n w: 0,\n size: 0,\n shapes: [],\n data: {\n shapes: []\n }\n };\n var combinedCharacters = []; // Hindi characters\n\n combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);\n var surrogateModifiers = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];\n var zeroWidthJoiner = [65039, 8205];\n\n function trimFontOptions(font) {\n var familyArray = font.split(',');\n var i;\n var len = familyArray.length;\n var enabledFamilies = [];\n\n for (i = 0; i < len; i += 1) {\n if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') {\n enabledFamilies.push(familyArray[i]);\n }\n }\n\n return enabledFamilies.join(',');\n }\n\n function setUpNode(font, family) {\n var parentNode = createTag('span'); // Node is invisible to screen readers.\n\n parentNode.setAttribute('aria-hidden', true);\n parentNode.style.fontFamily = family;\n var node = createTag('span'); // Characters that vary significantly among different fonts\n\n node.innerText = 'giItT1WQy@!-/#'; // Visible - so we can measure it - but not on the screen\n\n parentNode.style.position = 'absolute';\n parentNode.style.left = '-10000px';\n parentNode.style.top = '-10000px'; // Large font size makes even subtle changes obvious\n\n parentNode.style.fontSize = '300px'; // Reset any font properties\n\n parentNode.style.fontVariant = 'normal';\n parentNode.style.fontStyle = 'normal';\n parentNode.style.fontWeight = 'normal';\n parentNode.style.letterSpacing = '0';\n parentNode.appendChild(node);\n document.body.appendChild(parentNode); // Remember width with no applied web font\n\n var width = node.offsetWidth;\n node.style.fontFamily = trimFontOptions(font) + ', ' + family;\n return {\n node: node,\n w: width,\n parent: parentNode\n };\n }\n\n function checkLoadedFonts() {\n var i;\n var len = this.fonts.length;\n var node;\n var w;\n var loadedCount = len;\n\n for (i = 0; i < len; i += 1) {\n if (this.fonts[i].loaded) {\n loadedCount -= 1;\n } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) {\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].monoCase.node;\n w = this.fonts[i].monoCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n } else {\n node = this.fonts[i].sansCase.node;\n w = this.fonts[i].sansCase.w;\n\n if (node.offsetWidth !== w) {\n loadedCount -= 1;\n this.fonts[i].loaded = true;\n }\n }\n\n if (this.fonts[i].loaded) {\n this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);\n this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);\n }\n }\n }\n\n if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) {\n setTimeout(this.checkLoadedFontsBinded, 20);\n } else {\n setTimeout(this.setIsLoadedBinded, 10);\n }\n }\n\n function createHelper(fontData, def) {\n var engine = document.body && def ? 'svg' : 'canvas';\n var helper;\n var fontProps = getFontProperties(fontData);\n\n if (engine === 'svg') {\n var tHelper = createNS('text');\n tHelper.style.fontSize = '100px'; // tHelper.style.fontFamily = fontData.fFamily;\n\n tHelper.setAttribute('font-family', fontData.fFamily);\n tHelper.setAttribute('font-style', fontProps.style);\n tHelper.setAttribute('font-weight', fontProps.weight);\n tHelper.textContent = '1';\n\n if (fontData.fClass) {\n tHelper.style.fontFamily = 'inherit';\n tHelper.setAttribute('class', fontData.fClass);\n } else {\n tHelper.style.fontFamily = fontData.fFamily;\n }\n\n def.appendChild(tHelper);\n helper = tHelper;\n } else {\n var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d');\n tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily;\n helper = tCanvasHelper;\n }\n\n function measure(text) {\n if (engine === 'svg') {\n helper.textContent = text;\n return helper.getComputedTextLength();\n }\n\n return helper.measureText(text).width;\n }\n\n return {\n measureText: measure\n };\n }\n\n function addFonts(fontData, defs) {\n if (!fontData) {\n this.isLoaded = true;\n return;\n }\n\n if (this.chars) {\n this.isLoaded = true;\n this.fonts = fontData.list;\n return;\n }\n\n if (!document.body) {\n this.isLoaded = true;\n fontData.list.forEach(function (data) {\n data.helper = createHelper(data);\n data.cache = {};\n });\n this.fonts = fontData.list;\n return;\n }\n\n var fontArr = fontData.list;\n var i;\n var len = fontArr.length;\n var _pendingFonts = len;\n\n for (i = 0; i < len; i += 1) {\n var shouldLoadFont = true;\n var loadedSelector;\n var j;\n fontArr[i].loaded = false;\n fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace');\n fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif');\n\n if (!fontArr[i].fPath) {\n fontArr[i].loaded = true;\n _pendingFonts -= 1;\n } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) {\n loadedSelector = document.querySelectorAll('style[f-forigin=\"p\"][f-family=\"' + fontArr[i].fFamily + '\"], style[f-origin=\"3\"][f-family=\"' + fontArr[i].fFamily + '\"]');\n\n if (loadedSelector.length > 0) {\n shouldLoadFont = false;\n }\n\n if (shouldLoadFont) {\n var s = createTag('style');\n s.setAttribute('f-forigin', fontArr[i].fOrigin);\n s.setAttribute('f-origin', fontArr[i].origin);\n s.setAttribute('f-family', fontArr[i].fFamily);\n s.type = 'text/css';\n s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + \"; font-style: normal; src: url('\" + fontArr[i].fPath + \"');}\";\n defs.appendChild(s);\n }\n } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) {\n loadedSelector = document.querySelectorAll('link[f-forigin=\"g\"], link[f-origin=\"1\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var l = createTag('link');\n l.setAttribute('f-forigin', fontArr[i].fOrigin);\n l.setAttribute('f-origin', fontArr[i].origin);\n l.type = 'text/css';\n l.rel = 'stylesheet';\n l.href = fontArr[i].fPath;\n document.body.appendChild(l);\n }\n } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) {\n loadedSelector = document.querySelectorAll('script[f-forigin=\"t\"], script[f-origin=\"2\"]');\n\n for (j = 0; j < loadedSelector.length; j += 1) {\n if (fontArr[i].fPath === loadedSelector[j].src) {\n // Font is already loaded\n shouldLoadFont = false;\n }\n }\n\n if (shouldLoadFont) {\n var sc = createTag('link');\n sc.setAttribute('f-forigin', fontArr[i].fOrigin);\n sc.setAttribute('f-origin', fontArr[i].origin);\n sc.setAttribute('rel', 'stylesheet');\n sc.setAttribute('href', fontArr[i].fPath);\n defs.appendChild(sc);\n }\n }\n\n fontArr[i].helper = createHelper(fontArr[i], defs);\n fontArr[i].cache = {};\n this.fonts.push(fontArr[i]);\n }\n\n if (_pendingFonts === 0) {\n this.isLoaded = true;\n } else {\n // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.\n // Adding this timeout seems to fix it\n setTimeout(this.checkLoadedFonts.bind(this), 100);\n }\n }\n\n function addChars(chars) {\n if (!chars) {\n return;\n }\n\n if (!this.chars) {\n this.chars = [];\n }\n\n var i;\n var len = chars.length;\n var j;\n var jLen = this.chars.length;\n var found;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n found = false;\n\n while (j < jLen) {\n if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) {\n found = true;\n }\n\n j += 1;\n }\n\n if (!found) {\n this.chars.push(chars[i]);\n jLen += 1;\n }\n }\n }\n\n function getCharData(_char, style, font) {\n var i = 0;\n var len = this.chars.length;\n\n while (i < len) {\n if (this.chars[i].ch === _char && this.chars[i].style === style && this.chars[i].fFamily === font) {\n return this.chars[i];\n }\n\n i += 1;\n }\n\n if ((typeof _char === 'string' && _char.charCodeAt(0) !== 13 || !_char) && console && console.warn // eslint-disable-line no-console\n && !this._warned) {\n this._warned = true;\n console.warn('Missing character from exported characters list: ', _char, style, font); // eslint-disable-line no-console\n }\n\n return emptyChar;\n }\n\n function measureText(_char2, fontName, size) {\n var fontData = this.getFontByName(fontName);\n\n var index = _char2.charCodeAt(0);\n\n if (!fontData.cache[index + 1]) {\n var tHelper = fontData.helper;\n\n if (_char2 === ' ') {\n var doubleSize = tHelper.measureText('|' + _char2 + '|');\n var singleSize = tHelper.measureText('||');\n fontData.cache[index + 1] = (doubleSize - singleSize) / 100;\n } else {\n fontData.cache[index + 1] = tHelper.measureText(_char2) / 100;\n }\n }\n\n return fontData.cache[index + 1] * size;\n }\n\n function getFontByName(name) {\n var i = 0;\n var len = this.fonts.length;\n\n while (i < len) {\n if (this.fonts[i].fName === name) {\n return this.fonts[i];\n }\n\n i += 1;\n }\n\n return this.fonts[0];\n }\n\n function isModifier(firstCharCode, secondCharCode) {\n var sum = firstCharCode.toString(16) + secondCharCode.toString(16);\n return surrogateModifiers.indexOf(sum) !== -1;\n }\n\n function isZeroWidthJoiner(firstCharCode, secondCharCode) {\n if (!secondCharCode) {\n return firstCharCode === zeroWidthJoiner[1];\n }\n\n return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1];\n }\n\n function isCombinedCharacter(_char3) {\n return combinedCharacters.indexOf(_char3) !== -1;\n }\n\n function setIsLoaded() {\n this.isLoaded = true;\n }\n\n var Font = function Font() {\n this.fonts = [];\n this.chars = null;\n this.typekitLoaded = 0;\n this.isLoaded = false;\n this._warned = false;\n this.initTime = Date.now();\n this.setIsLoadedBinded = this.setIsLoaded.bind(this);\n this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);\n };\n\n Font.isModifier = isModifier;\n Font.isZeroWidthJoiner = isZeroWidthJoiner;\n Font.isCombinedCharacter = isCombinedCharacter;\n var fontPrototype = {\n addChars: addChars,\n addFonts: addFonts,\n getCharData: getCharData,\n getFontByName: getFontByName,\n measureText: measureText,\n checkLoadedFonts: checkLoadedFonts,\n setIsLoaded: setIsLoaded\n };\n Font.prototype = fontPrototype;\n return Font;\n }();\n\n function RenderableElement() {}\n\n RenderableElement.prototype = {\n initRenderable: function initRenderable() {\n // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange\n this.isInRange = false; // layer's display state\n\n this.hidden = false; // If layer's transparency equals 0, it can be hidden\n\n this.isTransparent = false; // list of animated components\n\n this.renderableComponents = [];\n },\n addRenderableComponent: function addRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) === -1) {\n this.renderableComponents.push(component);\n }\n },\n removeRenderableComponent: function removeRenderableComponent(component) {\n if (this.renderableComponents.indexOf(component) !== -1) {\n this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);\n }\n },\n prepareRenderableFrame: function prepareRenderableFrame(num) {\n this.checkLayerLimits(num);\n },\n checkTransparency: function checkTransparency() {\n if (this.finalTransform.mProp.o.v <= 0) {\n if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) {\n this.isTransparent = true;\n this.hide();\n }\n } else if (this.isTransparent) {\n this.isTransparent = false;\n this.show();\n }\n },\n\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n *\r\n */\n checkLayerLimits: function checkLayerLimits(num) {\n if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) {\n if (this.isInRange !== true) {\n this.globalData._mdf = true;\n this._mdf = true;\n this.isInRange = true;\n this.show();\n }\n } else if (this.isInRange !== false) {\n this.globalData._mdf = true;\n this.isInRange = false;\n this.hide();\n }\n },\n renderRenderable: function renderRenderable() {\n var i;\n var len = this.renderableComponents.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderableComponents[i].renderFrame(this._isFirstFrame);\n }\n /* this.maskManager.renderFrame(this.finalTransform.mat);\r\n this.renderableEffectsManager.renderFrame(this._isFirstFrame); */\n\n },\n sourceRectAtTime: function sourceRectAtTime() {\n return {\n top: 0,\n left: 0,\n width: 100,\n height: 100\n };\n },\n getLayerSize: function getLayerSize() {\n if (this.data.ty === 5) {\n return {\n w: this.data.textData.width,\n h: this.data.textData.height\n };\n }\n\n return {\n w: this.data.width,\n h: this.data.height\n };\n }\n };\n\n var MaskManagerInterface = function () {\n function MaskInterface(mask, data) {\n this._mask = mask;\n this._data = data;\n }\n\n Object.defineProperty(MaskInterface.prototype, 'maskPath', {\n get: function get() {\n if (this._mask.prop.k) {\n this._mask.prop.getValue();\n }\n\n return this._mask.prop;\n }\n });\n Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {\n get: function get() {\n if (this._mask.op.k) {\n this._mask.op.getValue();\n }\n\n return this._mask.op.v * 100;\n }\n });\n\n var MaskManager = function MaskManager(maskManager) {\n var _masksInterfaces = createSizedArray(maskManager.viewData.length);\n\n var i;\n var len = maskManager.viewData.length;\n\n for (i = 0; i < len; i += 1) {\n _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);\n }\n\n var maskFunction = function maskFunction(name) {\n i = 0;\n\n while (i < len) {\n if (maskManager.masksProperties[i].nm === name) {\n return _masksInterfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n return maskFunction;\n };\n\n return MaskManager;\n }();\n\n var ExpressionPropertyInterface = function () {\n var defaultUnidimensionalValue = {\n pv: 0,\n v: 0,\n mult: 1\n };\n var defaultMultidimensionalValue = {\n pv: [0, 0, 0],\n v: [0, 0, 0],\n mult: 1\n };\n\n function completeProperty(expressionValue, property, type) {\n Object.defineProperty(expressionValue, 'velocity', {\n get: function get() {\n return property.getVelocityAtTime(property.comp.currentFrame);\n }\n });\n expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;\n\n expressionValue.key = function (pos) {\n if (!expressionValue.numKeys) {\n return 0;\n }\n\n var value = '';\n\n if ('s' in property.keyframes[pos - 1]) {\n value = property.keyframes[pos - 1].s;\n } else if ('e' in property.keyframes[pos - 2]) {\n value = property.keyframes[pos - 2].e;\n } else {\n value = property.keyframes[pos - 2].s;\n }\n\n var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers\n\n valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate;\n valueProp.value = type === 'unidimensional' ? value[0] : value;\n return valueProp;\n };\n\n expressionValue.valueAtTime = property.getValueAtTime;\n expressionValue.speedAtTime = property.getSpeedAtTime;\n expressionValue.velocityAtTime = property.getVelocityAtTime;\n expressionValue.propertyGroup = property.propertyGroup;\n }\n\n function UnidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultUnidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var val = property.pv * mult;\n var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n val = property.v * mult;\n\n if (expressionValue.value !== val) {\n expressionValue = new Number(val); // eslint-disable-line no-new-wrappers\n\n expressionValue.value = val;\n completeProperty(expressionValue, property, 'unidimensional');\n }\n\n return expressionValue;\n };\n }\n\n function MultidimensionalPropertyInterface(property) {\n if (!property || !('pv' in property)) {\n property = defaultMultidimensionalValue;\n }\n\n var mult = 1 / property.mult;\n var len = property.data && property.data.l || property.pv.length;\n var expressionValue = createTypedArray('float32', len);\n var arrValue = createTypedArray('float32', len);\n expressionValue.value = arrValue;\n completeProperty(expressionValue, property, 'multidimensional');\n return function () {\n if (property.k) {\n property.getValue();\n }\n\n for (var i = 0; i < len; i += 1) {\n arrValue[i] = property.v[i] * mult;\n expressionValue[i] = arrValue[i];\n }\n\n return expressionValue;\n };\n } // TODO: try to avoid using this getter\n\n\n function defaultGetter() {\n return defaultUnidimensionalValue;\n }\n\n return function (property) {\n if (!property) {\n return defaultGetter;\n }\n\n if (property.propType === 'unidimensional') {\n return UnidimensionalPropertyInterface(property);\n }\n\n return MultidimensionalPropertyInterface(property);\n };\n }();\n\n var TransformExpressionInterface = function () {\n return function (transform) {\n function _thisFunction(name) {\n switch (name) {\n case 'scale':\n case 'Scale':\n case 'ADBE Scale':\n case 6:\n return _thisFunction.scale;\n\n case 'rotation':\n case 'Rotation':\n case 'ADBE Rotation':\n case 'ADBE Rotate Z':\n case 10:\n return _thisFunction.rotation;\n\n case 'ADBE Rotate X':\n return _thisFunction.xRotation;\n\n case 'ADBE Rotate Y':\n return _thisFunction.yRotation;\n\n case 'position':\n case 'Position':\n case 'ADBE Position':\n case 2:\n return _thisFunction.position;\n\n case 'ADBE Position_0':\n return _thisFunction.xPosition;\n\n case 'ADBE Position_1':\n return _thisFunction.yPosition;\n\n case 'ADBE Position_2':\n return _thisFunction.zPosition;\n\n case 'anchorPoint':\n case 'AnchorPoint':\n case 'Anchor Point':\n case 'ADBE AnchorPoint':\n case 1:\n return _thisFunction.anchorPoint;\n\n case 'opacity':\n case 'Opacity':\n case 11:\n return _thisFunction.opacity;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisFunction, 'rotation', {\n get: ExpressionPropertyInterface(transform.r || transform.rz)\n });\n Object.defineProperty(_thisFunction, 'zRotation', {\n get: ExpressionPropertyInterface(transform.rz || transform.r)\n });\n Object.defineProperty(_thisFunction, 'xRotation', {\n get: ExpressionPropertyInterface(transform.rx)\n });\n Object.defineProperty(_thisFunction, 'yRotation', {\n get: ExpressionPropertyInterface(transform.ry)\n });\n Object.defineProperty(_thisFunction, 'scale', {\n get: ExpressionPropertyInterface(transform.s)\n });\n\n var _px;\n\n var _py;\n\n var _pz;\n\n var _transformFactory;\n\n if (transform.p) {\n _transformFactory = ExpressionPropertyInterface(transform.p);\n } else {\n _px = ExpressionPropertyInterface(transform.px);\n _py = ExpressionPropertyInterface(transform.py);\n\n if (transform.pz) {\n _pz = ExpressionPropertyInterface(transform.pz);\n }\n }\n\n Object.defineProperty(_thisFunction, 'position', {\n get: function get() {\n if (transform.p) {\n return _transformFactory();\n }\n\n return [_px(), _py(), _pz ? _pz() : 0];\n }\n });\n Object.defineProperty(_thisFunction, 'xPosition', {\n get: ExpressionPropertyInterface(transform.px)\n });\n Object.defineProperty(_thisFunction, 'yPosition', {\n get: ExpressionPropertyInterface(transform.py)\n });\n Object.defineProperty(_thisFunction, 'zPosition', {\n get: ExpressionPropertyInterface(transform.pz)\n });\n Object.defineProperty(_thisFunction, 'anchorPoint', {\n get: ExpressionPropertyInterface(transform.a)\n });\n Object.defineProperty(_thisFunction, 'opacity', {\n get: ExpressionPropertyInterface(transform.o)\n });\n Object.defineProperty(_thisFunction, 'skew', {\n get: ExpressionPropertyInterface(transform.sk)\n });\n Object.defineProperty(_thisFunction, 'skewAxis', {\n get: ExpressionPropertyInterface(transform.sa)\n });\n Object.defineProperty(_thisFunction, 'orientation', {\n get: ExpressionPropertyInterface(transform.or)\n });\n return _thisFunction;\n };\n }();\n\n var LayerExpressionInterface = function () {\n function getMatrix(time) {\n var toWorldMat = new Matrix();\n\n if (time !== undefined) {\n var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time);\n\n propMatrix.clone(toWorldMat);\n } else {\n var transformMat = this._elem.finalTransform.mProp;\n transformMat.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat;\n }\n\n function toWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.applyPoint(toWorldMat, arr);\n }\n\n function toWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.applyPoint(toWorldMat, arr);\n }\n\n function fromWorldVec(arr, time) {\n var toWorldMat = this.getMatrix(time);\n toWorldMat.props[12] = 0;\n toWorldMat.props[13] = 0;\n toWorldMat.props[14] = 0;\n return this.invertPoint(toWorldMat, arr);\n }\n\n function fromWorld(arr, time) {\n var toWorldMat = this.getMatrix(time);\n return this.invertPoint(toWorldMat, arr);\n }\n\n function applyPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0);\n }\n\n function invertPoint(matrix, arr) {\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix);\n }\n }\n\n return matrix.inversePoint(arr);\n }\n\n function fromComp(arr) {\n var toWorldMat = new Matrix();\n toWorldMat.reset();\n\n this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);\n\n if (this._elem.hierarchy && this._elem.hierarchy.length) {\n var i;\n var len = this._elem.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n return toWorldMat.inversePoint(arr);\n }\n\n function sampleImage() {\n return [1, 1, 1, 1];\n }\n\n return function (elem) {\n var transformInterface;\n\n function _registerMaskInterface(maskManager) {\n _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);\n }\n\n function _registerEffectsInterface(effects) {\n _thisLayerFunction.effect = effects;\n }\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Root Vectors Group':\n case 'Contents':\n case 2:\n return _thisLayerFunction.shapeInterface;\n\n case 1:\n case 6:\n case 'Transform':\n case 'transform':\n case 'ADBE Transform Group':\n return transformInterface;\n\n case 4:\n case 'ADBE Effect Parade':\n case 'effects':\n case 'Effects':\n return _thisLayerFunction.effect;\n\n case 'ADBE Text Properties':\n return _thisLayerFunction.textInterface;\n\n default:\n return null;\n }\n }\n\n _thisLayerFunction.getMatrix = getMatrix;\n _thisLayerFunction.invertPoint = invertPoint;\n _thisLayerFunction.applyPoint = applyPoint;\n _thisLayerFunction.toWorld = toWorld;\n _thisLayerFunction.toWorldVec = toWorldVec;\n _thisLayerFunction.fromWorld = fromWorld;\n _thisLayerFunction.fromWorldVec = fromWorldVec;\n _thisLayerFunction.toComp = toWorld;\n _thisLayerFunction.fromComp = fromComp;\n _thisLayerFunction.sampleImage = sampleImage;\n _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);\n _thisLayerFunction._elem = elem;\n transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);\n var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');\n Object.defineProperties(_thisLayerFunction, {\n hasParent: {\n get: function get() {\n return elem.hierarchy.length;\n }\n },\n parent: {\n get: function get() {\n return elem.hierarchy[0].layerInterface;\n }\n },\n rotation: getDescriptor(transformInterface, 'rotation'),\n scale: getDescriptor(transformInterface, 'scale'),\n position: getDescriptor(transformInterface, 'position'),\n opacity: getDescriptor(transformInterface, 'opacity'),\n anchorPoint: anchorPointDescriptor,\n anchor_point: anchorPointDescriptor,\n transform: {\n get: function get() {\n return transformInterface;\n }\n },\n active: {\n get: function get() {\n return elem.isInRange;\n }\n }\n });\n _thisLayerFunction.startTime = elem.data.st;\n _thisLayerFunction.index = elem.data.ind;\n _thisLayerFunction.source = elem.data.refId;\n _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;\n _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;\n _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate;\n _thisLayerFunction._name = elem.data.nm;\n _thisLayerFunction.registerMaskInterface = _registerMaskInterface;\n _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;\n return _thisLayerFunction;\n };\n }();\n\n var propertyGroupFactory = function () {\n return function (interfaceFunction, parentPropertyGroup) {\n return function (val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return parentPropertyGroup(val - 1);\n };\n };\n }();\n\n var PropertyInterface = function () {\n return function (propertyName, propertyGroup) {\n var interfaceFunction = {\n _name: propertyName\n };\n\n function _propertyGroup(val) {\n val = val === undefined ? 1 : val;\n\n if (val <= 0) {\n return interfaceFunction;\n }\n\n return propertyGroup(val - 1);\n }\n\n return _propertyGroup;\n };\n }();\n\n var EffectsExpressionInterface = function () {\n var ob = {\n createEffectsInterface: createEffectsInterface\n };\n\n function createEffectsInterface(elem, propertyGroup) {\n if (elem.effectsManager) {\n var effectElements = [];\n var effectsData = elem.data.ef;\n var i;\n var len = elem.effectsManager.effectElements.length;\n\n for (i = 0; i < len; i += 1) {\n effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem));\n }\n\n var effects = elem.data.ef || [];\n\n var groupInterface = function groupInterface(name) {\n i = 0;\n len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n return effectElements[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n Object.defineProperty(groupInterface, 'numProperties', {\n get: function get() {\n return effects.length;\n }\n });\n return groupInterface;\n }\n\n return null;\n }\n\n function createGroupInterface(data, elements, propertyGroup, elem) {\n function groupInterface(name) {\n var effects = data.ef;\n var i = 0;\n var len = effects.length;\n\n while (i < len) {\n if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) {\n if (effects[i].ty === 5) {\n return effectElements[i];\n }\n\n return effectElements[i]();\n }\n\n i += 1;\n }\n\n throw new Error();\n }\n\n var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup);\n\n var effectElements = [];\n var i;\n var len = data.ef.length;\n\n for (i = 0; i < len; i += 1) {\n if (data.ef[i].ty === 5) {\n effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem));\n } else {\n effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup));\n }\n }\n\n if (data.mn === 'ADBE Color Control') {\n Object.defineProperty(groupInterface, 'color', {\n get: function get() {\n return effectElements[0]();\n }\n });\n }\n\n Object.defineProperties(groupInterface, {\n numProperties: {\n get: function get() {\n return data.np;\n }\n },\n _name: {\n value: data.nm\n },\n propertyGroup: {\n value: _propertyGroup\n }\n });\n groupInterface.enabled = data.en !== 0;\n groupInterface.active = groupInterface.enabled;\n return groupInterface;\n }\n\n function createValueInterface(element, type, elem, propertyGroup) {\n var expressionProperty = ExpressionPropertyInterface(element.p);\n\n function interfaceFunction() {\n if (type === 10) {\n return elem.comp.compInterface(element.p.v);\n }\n\n return expressionProperty();\n }\n\n if (element.p.setGroupProperty) {\n element.p.setGroupProperty(PropertyInterface('', propertyGroup));\n }\n\n return interfaceFunction;\n }\n\n return ob;\n }();\n\n var CompExpressionInterface = function () {\n return function (comp) {\n function _thisLayerFunction(name) {\n var i = 0;\n var len = comp.layers.length;\n\n while (i < len) {\n if (comp.layers[i].nm === name || comp.layers[i].ind === name) {\n return comp.elements[i].layerInterface;\n }\n\n i += 1;\n }\n\n return null; // return {active:false};\n }\n\n Object.defineProperty(_thisLayerFunction, '_name', {\n value: comp.data.nm\n });\n _thisLayerFunction.layer = _thisLayerFunction;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;\n _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;\n _thisLayerFunction.pixelAspect = 1;\n _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;\n _thisLayerFunction.displayStartTime = 0;\n _thisLayerFunction.numLayers = comp.layers.length;\n return _thisLayerFunction;\n };\n }();\n\n var ShapePathInterface = function () {\n return function pathInterfaceFactory(shape, view, propertyGroup) {\n var prop = view.sh;\n\n function interfaceFunction(val) {\n if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) {\n return interfaceFunction.path;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n prop.setGroupProperty(PropertyInterface('Path', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n path: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n shape: {\n get: function get() {\n if (prop.k) {\n prop.getValue();\n }\n\n return prop;\n }\n },\n _name: {\n value: shape.nm\n },\n ix: {\n value: shape.ix\n },\n propertyIndex: {\n value: shape.ix\n },\n mn: {\n value: shape.mn\n },\n propertyGroup: {\n value: propertyGroup\n }\n });\n return interfaceFunction;\n };\n }();\n\n var ShapeExpressionInterface = function () {\n function iterateElements(shapes, view, propertyGroup) {\n var arr = [];\n var i;\n var len = shapes ? shapes.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (shapes[i].ty === 'gr') {\n arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'fl') {\n arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'st') {\n arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tm') {\n arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'tr') {// arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));\n } else if (shapes[i].ty === 'el') {\n arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sr') {\n arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'sh') {\n arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rc') {\n arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rd') {\n arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'rp') {\n arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else if (shapes[i].ty === 'gf') {\n arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup));\n } else {\n arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup));\n }\n }\n\n return arr;\n }\n\n function contentsInterfaceFactory(shape, view, propertyGroup) {\n var interfaces;\n\n var interfaceFunction = function _interfaceFunction(value) {\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n if (typeof value === 'number') {\n return interfaces[value - 1];\n }\n\n return null;\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);\n interfaceFunction.numProperties = interfaces.length;\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.transform = transformInterface;\n interfaceFunction.propertyIndex = shape.cix;\n interfaceFunction._name = shape.nm;\n return interfaceFunction;\n }\n\n function groupInterfaceFactory(shape, view, propertyGroup) {\n var interfaceFunction = function _interfaceFunction(value) {\n switch (value) {\n case 'ADBE Vectors Group':\n case 'Contents':\n case 2:\n return interfaceFunction.content;\n // Not necessary for now. Keeping them here in case a new case appears\n // case 'ADBE Vector Transform Group':\n // case 3:\n\n default:\n return interfaceFunction.transform;\n }\n };\n\n interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup);\n var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup);\n interfaceFunction.content = content;\n interfaceFunction.transform = transformInterface;\n Object.defineProperty(interfaceFunction, '_name', {\n get: function get() {\n return shape.nm;\n }\n }); // interfaceFunction.content = interfaceFunction;\n\n interfaceFunction.numProperties = shape.np;\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.nm = shape.nm;\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function fillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function gradientFillInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === 'Start Point' || val === 'start point') {\n return interfaceFunction.startPoint;\n }\n\n if (val === 'End Point' || val === 'end point') {\n return interfaceFunction.endPoint;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n startPoint: {\n get: ExpressionPropertyInterface(view.s)\n },\n endPoint: {\n get: ExpressionPropertyInterface(view.e)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n type: {\n get: function get() {\n return 'a';\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup));\n return interfaceFunction;\n }\n\n function defaultInterfaceFactory() {\n function interfaceFunction() {\n return null;\n }\n\n return interfaceFunction;\n }\n\n function strokeInterfaceFactory(shape, view, propertyGroup) {\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup);\n\n function addPropertyToDashOb(i) {\n Object.defineProperty(dashOb, shape.d[i].nm, {\n get: ExpressionPropertyInterface(view.d.dataProps[i].p)\n });\n }\n\n var i;\n var len = shape.d ? shape.d.length : 0;\n var dashOb = {};\n\n for (i = 0; i < len; i += 1) {\n addPropertyToDashOb(i);\n view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);\n }\n\n function interfaceFunction(val) {\n if (val === 'Color' || val === 'color') {\n return interfaceFunction.color;\n }\n\n if (val === 'Opacity' || val === 'opacity') {\n return interfaceFunction.opacity;\n }\n\n if (val === 'Stroke Width' || val === 'stroke width') {\n return interfaceFunction.strokeWidth;\n }\n\n return null;\n }\n\n Object.defineProperties(interfaceFunction, {\n color: {\n get: ExpressionPropertyInterface(view.c)\n },\n opacity: {\n get: ExpressionPropertyInterface(view.o)\n },\n strokeWidth: {\n get: ExpressionPropertyInterface(view.w)\n },\n dash: {\n get: function get() {\n return dashOb;\n }\n },\n _name: {\n value: shape.nm\n },\n mn: {\n value: shape.mn\n }\n });\n view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup));\n return interfaceFunction;\n }\n\n function trimInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(val) {\n if (val === shape.e.ix || val === 'End' || val === 'end') {\n return interfaceFunction.end;\n }\n\n if (val === shape.s.ix) {\n return interfaceFunction.start;\n }\n\n if (val === shape.o.ix) {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup));\n view.e.setGroupProperty(PropertyInterface('End', _propertyGroup));\n view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n interfaceFunction.propertyIndex = shape.ix;\n interfaceFunction.propertyGroup = propertyGroup;\n Object.defineProperties(interfaceFunction, {\n start: {\n get: ExpressionPropertyInterface(view.s)\n },\n end: {\n get: ExpressionPropertyInterface(view.e)\n },\n offset: {\n get: ExpressionPropertyInterface(view.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function transformInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.a.ix === value || value === 'Anchor Point') {\n return interfaceFunction.anchorPoint;\n }\n\n if (shape.o.ix === value || value === 'Opacity') {\n return interfaceFunction.opacity;\n }\n\n if (shape.p.ix === value || value === 'Position') {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') {\n return interfaceFunction.rotation;\n }\n\n if (shape.s.ix === value || value === 'Scale') {\n return interfaceFunction.scale;\n }\n\n if (shape.sk && shape.sk.ix === value || value === 'Skew') {\n return interfaceFunction.skew;\n }\n\n if (shape.sa && shape.sa.ix === value || value === 'Skew Axis') {\n return interfaceFunction.skewAxis;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup));\n view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup));\n view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (view.transform.mProps.sk) {\n view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup));\n view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup));\n }\n\n view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n opacity: {\n get: ExpressionPropertyInterface(view.transform.mProps.o)\n },\n position: {\n get: ExpressionPropertyInterface(view.transform.mProps.p)\n },\n anchorPoint: {\n get: ExpressionPropertyInterface(view.transform.mProps.a)\n },\n scale: {\n get: ExpressionPropertyInterface(view.transform.mProps.s)\n },\n rotation: {\n get: ExpressionPropertyInterface(view.transform.mProps.r)\n },\n skew: {\n get: ExpressionPropertyInterface(view.transform.mProps.sk)\n },\n skewAxis: {\n get: ExpressionPropertyInterface(view.transform.mProps.sa)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.ty = 'tr';\n interfaceFunction.mn = shape.mn;\n interfaceFunction.propertyGroup = propertyGroup;\n return interfaceFunction;\n }\n\n function ellipseInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.s.ix === value) {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n interfaceFunction.propertyIndex = shape.ix;\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function starInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.rotation;\n }\n\n if (shape.pt.ix === value) {\n return interfaceFunction.points;\n }\n\n if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') {\n return interfaceFunction.outerRadius;\n }\n\n if (shape.os.ix === value) {\n return interfaceFunction.outerRoundness;\n }\n\n if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) {\n return interfaceFunction.innerRadius;\n }\n\n if (shape.is && shape.is.ix === value) {\n return interfaceFunction.innerRoundness;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup));\n prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup));\n prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup));\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n\n if (shape.ir) {\n prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup));\n prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup));\n }\n\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n rotation: {\n get: ExpressionPropertyInterface(prop.r)\n },\n points: {\n get: ExpressionPropertyInterface(prop.pt)\n },\n outerRadius: {\n get: ExpressionPropertyInterface(prop.or)\n },\n outerRoundness: {\n get: ExpressionPropertyInterface(prop.os)\n },\n innerRadius: {\n get: ExpressionPropertyInterface(prop.ir)\n },\n innerRoundness: {\n get: ExpressionPropertyInterface(prop.is)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function rectInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.p.ix === value) {\n return interfaceFunction.position;\n }\n\n if (shape.r.ix === value) {\n return interfaceFunction.roundness;\n }\n\n if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') {\n return interfaceFunction.size;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;\n interfaceFunction.propertyIndex = shape.ix;\n prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup));\n prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup));\n prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n position: {\n get: ExpressionPropertyInterface(prop.p)\n },\n roundness: {\n get: ExpressionPropertyInterface(prop.r)\n },\n size: {\n get: ExpressionPropertyInterface(prop.s)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function roundedInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.r.ix === value || value === 'Round Corners 1') {\n return interfaceFunction.radius;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n radius: {\n get: ExpressionPropertyInterface(prop.rd)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n function repeaterInterfaceFactory(shape, view, propertyGroup) {\n function interfaceFunction(value) {\n if (shape.c.ix === value || value === 'Copies') {\n return interfaceFunction.copies;\n }\n\n if (shape.o.ix === value || value === 'Offset') {\n return interfaceFunction.offset;\n }\n\n return null;\n }\n\n var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup);\n\n var prop = view;\n interfaceFunction.propertyIndex = shape.ix;\n prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup));\n prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup));\n Object.defineProperties(interfaceFunction, {\n copies: {\n get: ExpressionPropertyInterface(prop.c)\n },\n offset: {\n get: ExpressionPropertyInterface(prop.o)\n },\n _name: {\n value: shape.nm\n }\n });\n interfaceFunction.mn = shape.mn;\n return interfaceFunction;\n }\n\n return function (shapes, view, propertyGroup) {\n var interfaces;\n\n function _interfaceFunction(value) {\n if (typeof value === 'number') {\n value = value === undefined ? 1 : value;\n\n if (value === 0) {\n return propertyGroup;\n }\n\n return interfaces[value - 1];\n }\n\n var i = 0;\n var len = interfaces.length;\n\n while (i < len) {\n if (interfaces[i]._name === value) {\n return interfaces[i];\n }\n\n i += 1;\n }\n\n return null;\n }\n\n function parentGroupWrapper() {\n return propertyGroup;\n }\n\n _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper);\n interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup);\n _interfaceFunction.numProperties = interfaces.length;\n _interfaceFunction._name = 'Contents';\n return _interfaceFunction;\n };\n }();\n\n var TextExpressionInterface = function () {\n return function (elem) {\n var _prevValue;\n\n var _sourceText;\n\n function _thisLayerFunction(name) {\n switch (name) {\n case 'ADBE Text Document':\n return _thisLayerFunction.sourceText;\n\n default:\n return null;\n }\n }\n\n Object.defineProperty(_thisLayerFunction, 'sourceText', {\n get: function get() {\n elem.textProperty.getValue();\n var stringValue = elem.textProperty.currentData.t;\n\n if (stringValue !== _prevValue) {\n elem.textProperty.currentData.t = _prevValue;\n _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers\n // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive\n\n _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers\n }\n\n return _sourceText;\n }\n });\n return _thisLayerFunction;\n };\n }();\n\n var getBlendMode = function () {\n var blendModeEnums = {\n 0: 'source-over',\n 1: 'multiply',\n 2: 'screen',\n 3: 'overlay',\n 4: 'darken',\n 5: 'lighten',\n 6: 'color-dodge',\n 7: 'color-burn',\n 8: 'hard-light',\n 9: 'soft-light',\n 10: 'difference',\n 11: 'exclusion',\n 12: 'hue',\n 13: 'saturation',\n 14: 'color',\n 15: 'luminosity'\n };\n return function (mode) {\n return blendModeEnums[mode] || '';\n };\n }();\n\n function SliderEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function AngleEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function ColorEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function PointEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container);\n }\n\n function LayerIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function MaskIndexEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function CheckboxEffect(data, elem, container) {\n this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container);\n }\n\n function NoValueEffect() {\n this.p = {};\n }\n\n function EffectsManager(data, element) {\n var effects = data.ef || [];\n this.effectElements = [];\n var i;\n var len = effects.length;\n var effectItem;\n\n for (i = 0; i < len; i += 1) {\n effectItem = new GroupEffect(effects[i], element);\n this.effectElements.push(effectItem);\n }\n }\n\n function GroupEffect(data, element) {\n this.init(data, element);\n }\n\n extendPrototype([DynamicPropertyContainer], GroupEffect);\n GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;\n\n GroupEffect.prototype.init = function (data, element) {\n this.data = data;\n this.effectElements = [];\n this.initDynamicPropertyContainer(element);\n var i;\n var len = this.data.ef.length;\n var eff;\n var effects = this.data.ef;\n\n for (i = 0; i < len; i += 1) {\n eff = null;\n\n switch (effects[i].ty) {\n case 0:\n eff = new SliderEffect(effects[i], element, this);\n break;\n\n case 1:\n eff = new AngleEffect(effects[i], element, this);\n break;\n\n case 2:\n eff = new ColorEffect(effects[i], element, this);\n break;\n\n case 3:\n eff = new PointEffect(effects[i], element, this);\n break;\n\n case 4:\n case 7:\n eff = new CheckboxEffect(effects[i], element, this);\n break;\n\n case 10:\n eff = new LayerIndexEffect(effects[i], element, this);\n break;\n\n case 11:\n eff = new MaskIndexEffect(effects[i], element, this);\n break;\n\n case 5:\n eff = new EffectsManager(effects[i], element, this);\n break;\n // case 6:\n\n default:\n eff = new NoValueEffect(effects[i], element, this);\n break;\n }\n\n if (eff) {\n this.effectElements.push(eff);\n }\n }\n };\n\n function BaseElement() {}\n\n BaseElement.prototype = {\n checkMasks: function checkMasks() {\n if (!this.data.hasMask) {\n return false;\n }\n\n var i = 0;\n var len = this.data.masksProperties.length;\n\n while (i < len) {\n if (this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false) {\n return true;\n }\n\n i += 1;\n }\n\n return false;\n },\n initExpressions: function initExpressions() {\n this.layerInterface = LayerExpressionInterface(this);\n\n if (this.data.hasMask && this.maskManager) {\n this.layerInterface.registerMaskInterface(this.maskManager);\n }\n\n var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface);\n this.layerInterface.registerEffectsInterface(effectsInterface);\n\n if (this.data.ty === 0 || this.data.xt) {\n this.compInterface = CompExpressionInterface(this);\n } else if (this.data.ty === 4) {\n this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface);\n this.layerInterface.content = this.layerInterface.shapeInterface;\n } else if (this.data.ty === 5) {\n this.layerInterface.textInterface = TextExpressionInterface(this);\n this.layerInterface.text = this.layerInterface.textInterface;\n }\n },\n setBlendMode: function setBlendMode() {\n var blendModeValue = getBlendMode(this.data.bm);\n var elem = this.baseElement || this.layerElement;\n elem.style['mix-blend-mode'] = blendModeValue;\n },\n initBaseData: function initBaseData(data, globalData, comp) {\n this.globalData = globalData;\n this.comp = comp;\n this.data = data;\n this.layerId = createElementID(); // Stretch factor for old animations missing this property.\n\n if (!this.data.sr) {\n this.data.sr = 1;\n } // effects manager\n\n\n this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties);\n },\n getType: function getType() {\n return this.type;\n },\n sourceRectAtTime: function sourceRectAtTime() {}\n };\n\n /**\r\n * @file\r\n * Handles element's layer frame update.\r\n * Checks layer in point and out point\r\n *\r\n */\n function FrameElement() {}\n\n FrameElement.prototype = {\n /**\r\n * @function\r\n * Initializes frame related properties.\r\n *\r\n */\n initFrame: function initFrame() {\n // set to true when inpoint is rendered\n this._isFirstFrame = false; // list of animated properties\n\n this.dynamicProperties = []; // If layer has been modified in current tick this will be true\n\n this._mdf = false;\n },\n\n /**\r\n * @function\r\n * Calculates all dynamic values\r\n *\r\n * @param {number} num\r\n * current frame number in Layer's time\r\n * @param {boolean} isVisible\r\n * if layers is currently in range\r\n *\r\n */\n prepareProperties: function prepareProperties(num, isVisible) {\n var i;\n var len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (isVisible || this._isParent && this.dynamicProperties[i].propType === 'transform') {\n this.dynamicProperties[i].getValue();\n\n if (this.dynamicProperties[i]._mdf) {\n this.globalData._mdf = true;\n this._mdf = true;\n }\n }\n }\n },\n addDynamicProperty: function addDynamicProperty(prop) {\n if (this.dynamicProperties.indexOf(prop) === -1) {\n this.dynamicProperties.push(prop);\n }\n }\n };\n\n function _typeof$2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\n\n var FootageInterface = function () {\n var outlineInterfaceFactory = function outlineInterfaceFactory(elem) {\n var currentPropertyName = '';\n var currentProperty = elem.getFootageData();\n\n function init() {\n currentPropertyName = '';\n currentProperty = elem.getFootageData();\n return searchProperty;\n }\n\n function searchProperty(value) {\n if (currentProperty[value]) {\n currentPropertyName = value;\n currentProperty = currentProperty[value];\n\n if (_typeof$2(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n var propertyNameIndex = value.indexOf(currentPropertyName);\n\n if (propertyNameIndex !== -1) {\n var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10);\n currentProperty = currentProperty[index];\n\n if (_typeof$2(currentProperty) === 'object') {\n return searchProperty;\n }\n\n return currentProperty;\n }\n\n return '';\n }\n\n return init;\n };\n\n var dataInterfaceFactory = function dataInterfaceFactory(elem) {\n function interfaceFunction(value) {\n if (value === 'Outline') {\n return interfaceFunction.outlineInterface();\n }\n\n return null;\n }\n\n interfaceFunction._name = 'Outline';\n interfaceFunction.outlineInterface = outlineInterfaceFactory(elem);\n return interfaceFunction;\n };\n\n return function (elem) {\n function _interfaceFunction(value) {\n if (value === 'Data') {\n return _interfaceFunction.dataInterface;\n }\n\n return null;\n }\n\n _interfaceFunction._name = 'Data';\n _interfaceFunction.dataInterface = dataInterfaceFactory(elem);\n return _interfaceFunction;\n };\n }();\n\n function FootageElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.footageData = globalData.imageLoader.getAsset(this.assetData);\n this.initBaseData(data, globalData, comp);\n }\n\n FootageElement.prototype.prepareFrame = function () {};\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement);\n\n FootageElement.prototype.getBaseElement = function () {\n return null;\n };\n\n FootageElement.prototype.renderFrame = function () {};\n\n FootageElement.prototype.destroy = function () {};\n\n FootageElement.prototype.initExpressions = function () {\n this.layerInterface = FootageInterface(this);\n };\n\n FootageElement.prototype.getFootageData = function () {\n return this.footageData;\n };\n\n function AudioElement(data, globalData, comp) {\n this.initFrame();\n this.initRenderable();\n this.assetData = globalData.getAssetData(data.refId);\n this.initBaseData(data, globalData, comp);\n this._isPlaying = false;\n this._canPlay = false;\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.audio = this.globalData.audioController.createAudio(assetPath);\n this._currentTime = 0;\n this.globalData.audioController.addAudio(this);\n this._volumeMultiplier = 1;\n this._volume = 1;\n this._previousVolume = null;\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {\n k: [100]\n }, 1, 0.01, this);\n }\n\n AudioElement.prototype.prepareFrame = function (num) {\n this.prepareRenderableFrame(num, true);\n this.prepareProperties(num, true);\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n this._currentTime = timeRemapped;\n } else {\n this._currentTime = num / this.data.sr;\n }\n\n this._volume = this.lv.v[0];\n var totalVolume = this._volume * this._volumeMultiplier;\n\n if (this._previousVolume !== totalVolume) {\n this._previousVolume = totalVolume;\n this.audio.volume(totalVolume);\n }\n };\n\n extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement);\n\n AudioElement.prototype.renderFrame = function () {\n if (this.isInRange && this._canPlay) {\n if (!this._isPlaying) {\n this.audio.play();\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n this._isPlaying = true;\n } else if (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1) {\n this.audio.seek(this._currentTime / this.globalData.frameRate);\n }\n }\n };\n\n AudioElement.prototype.show = function () {// this.audio.play()\n };\n\n AudioElement.prototype.hide = function () {\n this.audio.pause();\n this._isPlaying = false;\n };\n\n AudioElement.prototype.pause = function () {\n this.audio.pause();\n this._isPlaying = false;\n this._canPlay = false;\n };\n\n AudioElement.prototype.resume = function () {\n this._canPlay = true;\n };\n\n AudioElement.prototype.setRate = function (rateValue) {\n this.audio.rate(rateValue);\n };\n\n AudioElement.prototype.volume = function (volumeValue) {\n this._volumeMultiplier = volumeValue;\n this._previousVolume = volumeValue * this._volume;\n this.audio.volume(this._previousVolume);\n };\n\n AudioElement.prototype.getBaseElement = function () {\n return null;\n };\n\n AudioElement.prototype.destroy = function () {};\n\n AudioElement.prototype.sourceRectAtTime = function () {};\n\n AudioElement.prototype.initExpressions = function () {};\n\n function BaseRenderer() {}\n\n BaseRenderer.prototype.checkLayers = function (num) {\n var i;\n var len = this.layers.length;\n var data;\n this.completeLayers = true;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (!this.elements[i]) {\n data = this.layers[i];\n\n if (data.ip - data.st <= num - this.layers[i].st && data.op - data.st > num - this.layers[i].st) {\n this.buildItem(i);\n }\n }\n\n this.completeLayers = this.elements[i] ? this.completeLayers : false;\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.createItem = function (layer) {\n switch (layer.ty) {\n case 2:\n return this.createImage(layer);\n\n case 0:\n return this.createComp(layer);\n\n case 1:\n return this.createSolid(layer);\n\n case 3:\n return this.createNull(layer);\n\n case 4:\n return this.createShape(layer);\n\n case 5:\n return this.createText(layer);\n\n case 6:\n return this.createAudio(layer);\n\n case 13:\n return this.createCamera(layer);\n\n case 15:\n return this.createFootage(layer);\n\n default:\n return this.createNull(layer);\n }\n };\n\n BaseRenderer.prototype.createCamera = function () {\n throw new Error('You\\'re using a 3d camera. Try the html renderer.');\n };\n\n BaseRenderer.prototype.createAudio = function (data) {\n return new AudioElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.createFootage = function (data) {\n return new FootageElement(data, this.globalData, this);\n };\n\n BaseRenderer.prototype.buildAllItems = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n this.buildItem(i);\n }\n\n this.checkPendingElements();\n };\n\n BaseRenderer.prototype.includeLayers = function (newLayers) {\n this.completeLayers = false;\n var i;\n var len = newLayers.length;\n var j;\n var jLen = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n j = 0;\n\n while (j < jLen) {\n if (this.layers[j].id === newLayers[i].id) {\n this.layers[j] = newLayers[i];\n break;\n }\n\n j += 1;\n }\n }\n };\n\n BaseRenderer.prototype.setProjectInterface = function (pInterface) {\n this.globalData.projectInterface = pInterface;\n };\n\n BaseRenderer.prototype.initItems = function () {\n if (!this.globalData.progressiveLoad) {\n this.buildAllItems();\n }\n };\n\n BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) {\n var elements = this.elements;\n var layers = this.layers;\n var i = 0;\n var len = layers.length;\n\n while (i < len) {\n if (layers[i].ind == parentName) {\n // eslint-disable-line eqeqeq\n if (!elements[i] || elements[i] === true) {\n this.buildItem(i);\n this.addPendingElement(element);\n } else {\n hierarchy.push(elements[i]);\n elements[i].setAsParent();\n\n if (layers[i].parent !== undefined) {\n this.buildElementParenting(element, layers[i].parent, hierarchy);\n } else {\n element.setHierarchy(hierarchy);\n }\n }\n }\n\n i += 1;\n }\n };\n\n BaseRenderer.prototype.addPendingElement = function (element) {\n this.pendingElements.push(element);\n };\n\n BaseRenderer.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i]);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n BaseRenderer.prototype.getElementByPath = function (path) {\n var pathValue = path.shift();\n var element;\n\n if (typeof pathValue === 'number') {\n element = this.elements[pathValue];\n } else {\n var i;\n var len = this.elements.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i].data.nm === pathValue) {\n element = this.elements[i];\n break;\n }\n }\n }\n\n if (path.length === 0) {\n return element;\n }\n\n return element.getElementByPath(path);\n };\n\n BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) {\n this.globalData.fontManager = new FontManager();\n this.globalData.fontManager.addChars(animData.chars);\n this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);\n this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);\n this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);\n this.globalData.imageLoader = this.animationItem.imagePreloader;\n this.globalData.audioController = this.animationItem.audioController;\n this.globalData.frameId = 0;\n this.globalData.frameRate = animData.fr;\n this.globalData.nm = animData.nm;\n this.globalData.compSize = {\n w: animData.w,\n h: animData.h\n };\n };\n\n function TransformElement() {}\n\n TransformElement.prototype = {\n initTransform: function initTransform() {\n this.finalTransform = {\n mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {\n o: 0\n },\n _matMdf: false,\n _opMdf: false,\n mat: new Matrix()\n };\n\n if (this.data.ao) {\n this.finalTransform.mProp.autoOriented = true;\n } // TODO: check TYPE 11: Guided elements\n\n\n if (this.data.ty !== 11) {// this.createElements();\n }\n },\n renderTransform: function renderTransform() {\n this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;\n this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;\n\n if (this.hierarchy) {\n var mat;\n var finalMat = this.finalTransform.mat;\n var i = 0;\n var len = this.hierarchy.length; // Checking if any of the transformation matrices in the hierarchy chain has changed.\n\n if (!this.finalTransform._matMdf) {\n while (i < len) {\n if (this.hierarchy[i].finalTransform.mProp._mdf) {\n this.finalTransform._matMdf = true;\n break;\n }\n\n i += 1;\n }\n }\n\n if (this.finalTransform._matMdf) {\n mat = this.finalTransform.mProp.v.props;\n finalMat.cloneFromProps(mat);\n\n for (i = 0; i < len; i += 1) {\n mat = this.hierarchy[i].finalTransform.mProp.v.props;\n finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);\n }\n }\n }\n },\n globalToLocal: function globalToLocal(pt) {\n var transforms = [];\n transforms.push(this.finalTransform);\n var flag = true;\n var comp = this.comp;\n\n while (flag) {\n if (comp.finalTransform) {\n if (comp.data.hasMask) {\n transforms.splice(0, 0, comp.finalTransform);\n }\n\n comp = comp.comp;\n } else {\n flag = false;\n }\n }\n\n var i;\n var len = transforms.length;\n var ptNew;\n\n for (i = 0; i < len; i += 1) {\n ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);\n\n pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];\n }\n\n return pt;\n },\n mHelper: new Matrix()\n };\n\n function MaskElement(data, element, globalData) {\n this.data = data;\n this.element = element;\n this.globalData = globalData;\n this.storedData = [];\n this.masksProperties = this.data.masksProperties || [];\n this.maskElement = null;\n var defs = this.globalData.defs;\n var i;\n var len = this.masksProperties ? this.masksProperties.length : 0;\n this.viewData = createSizedArray(len);\n this.solidPath = '';\n var path;\n var properties = this.masksProperties;\n var count = 0;\n var currentMasks = [];\n var j;\n var jLen;\n var layerId = createElementID();\n var rect;\n var expansor;\n var feMorph;\n var x;\n var maskType = 'clipPath';\n var maskRef = 'clip-path';\n\n for (i = 0; i < len; i += 1) {\n if (properties[i].mode !== 'a' && properties[i].mode !== 'n' || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) {\n maskType = 'mask';\n maskRef = 'mask';\n }\n\n if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) {\n rect = createNS('rect');\n rect.setAttribute('fill', '#ffffff');\n rect.setAttribute('width', this.element.comp.data.w || 0);\n rect.setAttribute('height', this.element.comp.data.h || 0);\n currentMasks.push(rect);\n } else {\n rect = null;\n }\n\n path = createNS('path');\n\n if (properties[i].mode === 'n') {\n // TODO move this to a factory or to a constructor\n this.viewData[i] = {\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n elem: path,\n lastPath: ''\n };\n defs.appendChild(path);\n } else {\n count += 1;\n path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff');\n path.setAttribute('clip-rule', 'nonzero');\n var filterID;\n\n if (properties[i].x.k !== 0) {\n maskType = 'mask';\n maskRef = 'mask';\n x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element);\n filterID = createElementID();\n expansor = createNS('filter');\n expansor.setAttribute('id', filterID);\n feMorph = createNS('feMorphology');\n feMorph.setAttribute('operator', 'erode');\n feMorph.setAttribute('in', 'SourceGraphic');\n feMorph.setAttribute('radius', '0');\n expansor.appendChild(feMorph);\n defs.appendChild(expansor);\n path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff');\n } else {\n feMorph = null;\n x = null;\n } // TODO move this to a factory or to a constructor\n\n\n this.storedData[i] = {\n elem: path,\n x: x,\n expan: feMorph,\n lastPath: '',\n lastOperator: '',\n filterId: filterID,\n lastRadius: 0\n };\n\n if (properties[i].mode === 'i') {\n jLen = currentMasks.length;\n var g = createNS('g');\n\n for (j = 0; j < jLen; j += 1) {\n g.appendChild(currentMasks[j]);\n }\n\n var mask = createNS('mask');\n mask.setAttribute('mask-type', 'alpha');\n mask.setAttribute('id', layerId + '_' + count);\n mask.appendChild(path);\n defs.appendChild(mask);\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')');\n currentMasks.length = 0;\n currentMasks.push(g);\n } else {\n currentMasks.push(path);\n }\n\n if (properties[i].inv && !this.solidPath) {\n this.solidPath = this.createLayerSolidPath();\n } // TODO move this to a factory or to a constructor\n\n\n this.viewData[i] = {\n elem: path,\n lastPath: '',\n op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element),\n prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3),\n invRect: rect\n };\n\n if (!this.viewData[i].prop.k) {\n this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n }\n }\n\n this.maskElement = createNS(maskType);\n len = currentMasks.length;\n\n for (i = 0; i < len; i += 1) {\n this.maskElement.appendChild(currentMasks[i]);\n }\n\n if (count > 0) {\n this.maskElement.setAttribute('id', layerId);\n this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')');\n defs.appendChild(this.maskElement);\n }\n\n if (this.viewData.length) {\n this.element.addRenderableComponent(this);\n }\n }\n\n MaskElement.prototype.getMaskProperty = function (pos) {\n return this.viewData[pos].prop;\n };\n\n MaskElement.prototype.renderFrame = function (isFirstFrame) {\n var finalMat = this.element.finalTransform.mat;\n var i;\n var len = this.masksProperties.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.viewData[i].prop._mdf || isFirstFrame) {\n this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]);\n }\n\n if (this.viewData[i].op._mdf || isFirstFrame) {\n this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v);\n }\n\n if (this.masksProperties[i].mode !== 'n') {\n if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) {\n this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS());\n }\n\n if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) {\n var feMorph = this.storedData[i].expan;\n\n if (this.storedData[i].x.v < 0) {\n if (this.storedData[i].lastOperator !== 'erode') {\n this.storedData[i].lastOperator = 'erode';\n this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')');\n }\n\n feMorph.setAttribute('radius', -this.storedData[i].x.v);\n } else {\n if (this.storedData[i].lastOperator !== 'dilate') {\n this.storedData[i].lastOperator = 'dilate';\n this.storedData[i].elem.setAttribute('filter', null);\n }\n\n this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2);\n }\n }\n }\n }\n };\n\n MaskElement.prototype.getMaskelement = function () {\n return this.maskElement;\n };\n\n MaskElement.prototype.createLayerSolidPath = function () {\n var path = 'M0,0 ';\n path += ' h' + this.globalData.compSize.w;\n path += ' v' + this.globalData.compSize.h;\n path += ' h-' + this.globalData.compSize.w;\n path += ' v-' + this.globalData.compSize.h + ' ';\n return path;\n };\n\n MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) {\n var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n var i;\n var len;\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[i][0]+','+pathNodes.i[i][1] + \" \"+pathNodes.v[i][0]+','+pathNodes.v[i][1];\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1];\n } // pathString += \" C\"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + \" \"+pathNodes.i[0][0]+','+pathNodes.i[0][1] + \" \"+pathNodes.v[0][0]+','+pathNodes.v[0][1];\n\n\n if (pathNodes.c && len > 1) {\n pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1];\n } // pathNodes.__renderedString = pathString;\n\n\n if (viewData.lastPath !== pathString) {\n var pathShapeValue = '';\n\n if (viewData.elem) {\n if (pathNodes.c) {\n pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;\n }\n\n viewData.elem.setAttribute('d', pathShapeValue);\n }\n\n viewData.lastPath = pathString;\n }\n };\n\n MaskElement.prototype.destroy = function () {\n this.element = null;\n this.globalData = null;\n this.maskElement = null;\n this.data = null;\n this.masksProperties = null;\n };\n\n var filtersFactory = function () {\n var ob = {};\n ob.createFilter = createFilter;\n ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;\n\n function createFilter(filId, skipCoordinates) {\n var fil = createNS('filter');\n fil.setAttribute('id', filId);\n\n if (skipCoordinates !== true) {\n fil.setAttribute('filterUnits', 'objectBoundingBox');\n fil.setAttribute('x', '0%');\n fil.setAttribute('y', '0%');\n fil.setAttribute('width', '100%');\n fil.setAttribute('height', '100%');\n }\n\n return fil;\n }\n\n function createAlphaToLuminanceFilter() {\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1');\n return feColorMatrix;\n }\n\n return ob;\n }();\n\n var featureSupport = function () {\n var ob = {\n maskType: true\n };\n\n if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)) {\n ob.maskType = false;\n }\n\n return ob;\n }();\n\n var registeredEffects = {};\n var idPrefix = 'filter_result_';\n\n function SVGEffects(elem) {\n var i;\n var source = 'SourceGraphic';\n var len = elem.data.ef ? elem.data.ef.length : 0;\n var filId = createElementID();\n var fil = filtersFactory.createFilter(filId, true);\n var count = 0;\n this.filters = [];\n var filterManager;\n\n for (i = 0; i < len; i += 1) {\n filterManager = null;\n var type = elem.data.ef[i].ty;\n\n if (registeredEffects[type]) {\n var Effect = registeredEffects[type].effect;\n filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source);\n source = idPrefix + count;\n\n if (registeredEffects[type].countsAsEffect) {\n count += 1;\n }\n }\n\n if (filterManager) {\n this.filters.push(filterManager);\n }\n }\n\n if (count) {\n elem.globalData.defs.appendChild(fil);\n elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n\n if (this.filters.length) {\n elem.addRenderableComponent(this);\n }\n }\n\n SVGEffects.prototype.renderFrame = function (_isFirstFrame) {\n var i;\n var len = this.filters.length;\n\n for (i = 0; i < len; i += 1) {\n this.filters[i].renderFrame(_isFirstFrame);\n }\n };\n\n function registerEffect(id, effect, countsAsEffect) {\n registeredEffects[id] = {\n effect: effect,\n countsAsEffect: countsAsEffect\n };\n }\n\n function SVGBaseElement() {}\n\n SVGBaseElement.prototype = {\n initRendererElement: function initRendererElement() {\n this.layerElement = createNS('g');\n },\n createContainerElements: function createContainerElements() {\n this.matteElement = createNS('g');\n this.transformedElement = this.layerElement;\n this.maskedElement = this.layerElement;\n this._sizeChanged = false;\n var layerElementParent = null; // If this layer acts as a mask for the following layer\n\n var filId;\n var fil;\n var gg;\n\n if (this.data.td) {\n if (this.data.td == 3 || this.data.td == 1) {\n // eslint-disable-line eqeqeq\n var masker = createNS('mask');\n masker.setAttribute('id', this.layerId);\n masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq\n\n masker.appendChild(this.layerElement);\n layerElementParent = masker;\n this.globalData.defs.appendChild(masker); // This is only for IE and Edge when mask if of type alpha\n\n if (!featureSupport.maskType && this.data.td == 1) {\n // eslint-disable-line eqeqeq\n masker.setAttribute('mask-type', 'luminance');\n filId = createElementID();\n fil = filtersFactory.createFilter(filId);\n this.globalData.defs.appendChild(fil);\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n gg.appendChild(this.layerElement);\n layerElementParent = gg;\n masker.appendChild(gg);\n gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n }\n } else if (this.data.td == 2) {\n // eslint-disable-line eqeqeq\n var maskGroup = createNS('mask');\n maskGroup.setAttribute('id', this.layerId);\n maskGroup.setAttribute('mask-type', 'alpha');\n var maskGrouper = createNS('g');\n maskGroup.appendChild(maskGrouper);\n filId = createElementID();\n fil = filtersFactory.createFilter(filId); /// /\n // This solution doesn't work on Android when meta tag with viewport attribute is set\n\n /* var feColorMatrix = createNS('feColorMatrix');\r\n feColorMatrix.setAttribute('type', 'matrix');\r\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\r\n feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');\r\n fil.appendChild(feColorMatrix); */\n /// /\n\n var feCTr = createNS('feComponentTransfer');\n feCTr.setAttribute('in', 'SourceGraphic');\n fil.appendChild(feCTr);\n var feFunc = createNS('feFuncA');\n feFunc.setAttribute('type', 'table');\n feFunc.setAttribute('tableValues', '1.0 0.0');\n feCTr.appendChild(feFunc); /// /\n\n this.globalData.defs.appendChild(fil);\n var alphaRect = createNS('rect');\n alphaRect.setAttribute('width', this.comp.data.w);\n alphaRect.setAttribute('height', this.comp.data.h);\n alphaRect.setAttribute('x', '0');\n alphaRect.setAttribute('y', '0');\n alphaRect.setAttribute('fill', '#ffffff');\n alphaRect.setAttribute('opacity', '0');\n maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')');\n maskGrouper.appendChild(alphaRect);\n maskGrouper.appendChild(this.layerElement);\n layerElementParent = maskGrouper;\n\n if (!featureSupport.maskType) {\n maskGroup.setAttribute('mask-type', 'luminance');\n fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());\n gg = createNS('g');\n maskGrouper.appendChild(alphaRect);\n gg.appendChild(this.layerElement);\n layerElementParent = gg;\n maskGrouper.appendChild(gg);\n }\n\n this.globalData.defs.appendChild(maskGroup);\n }\n } else if (this.data.tt) {\n this.matteElement.appendChild(this.layerElement);\n layerElementParent = this.matteElement;\n this.baseElement = this.matteElement;\n } else {\n this.baseElement = this.layerElement;\n }\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n } // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped\n\n\n if (this.data.ty === 0 && !this.data.hd) {\n var cp = createNS('clipPath');\n var pt = createNS('path');\n pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');\n var clipId = createElementID();\n cp.setAttribute('id', clipId);\n cp.appendChild(pt);\n this.globalData.defs.appendChild(cp);\n\n if (this.checkMasks()) {\n var cpGroup = createNS('g');\n cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n cpGroup.appendChild(this.layerElement);\n this.transformedElement = cpGroup;\n\n if (layerElementParent) {\n layerElementParent.appendChild(this.transformedElement);\n } else {\n this.baseElement = this.transformedElement;\n }\n } else {\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')');\n }\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n if (this.finalTransform._matMdf) {\n this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());\n }\n\n if (this.finalTransform._opMdf) {\n this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);\n }\n },\n destroyBaseElement: function destroyBaseElement() {\n this.layerElement = null;\n this.matteElement = null;\n this.maskManager.destroy();\n },\n getBaseElement: function getBaseElement() {\n if (this.data.hd) {\n return null;\n }\n\n return this.baseElement;\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n this.renderableEffectsManager = new SVGEffects(this);\n },\n setMatte: function setMatte(id) {\n if (!this.matteElement) {\n return;\n }\n\n this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n }\n };\n\n /**\r\n * @file\r\n * Handles AE's layer parenting property.\r\n *\r\n */\n function HierarchyElement() {}\n\n HierarchyElement.prototype = {\n /**\r\n * @function\r\n * Initializes hierarchy properties\r\n *\r\n */\n initHierarchy: function initHierarchy() {\n // element's parent list\n this.hierarchy = []; // if element is parent of another layer _isParent will be true\n\n this._isParent = false;\n this.checkParenting();\n },\n\n /**\r\n * @function\r\n * Sets layer's hierarchy.\r\n * @param {array} hierarch\r\n * layer's parent list\r\n *\r\n */\n setHierarchy: function setHierarchy(hierarchy) {\n this.hierarchy = hierarchy;\n },\n\n /**\r\n * @function\r\n * Sets layer as parent.\r\n *\r\n */\n setAsParent: function setAsParent() {\n this._isParent = true;\n },\n\n /**\r\n * @function\r\n * Searches layer's parenting chain\r\n *\r\n */\n checkParenting: function checkParenting() {\n if (this.data.parent !== undefined) {\n this.comp.buildElementParenting(this, this.data.parent, []);\n }\n }\n };\n\n function RenderableDOMElement() {}\n\n (function () {\n var _prototype = {\n initElement: function initElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n },\n hide: function hide() {\n // console.log('HIDE', this);\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'none';\n this.hidden = true;\n }\n },\n show: function show() {\n // console.log('SHOW', this);\n if (this.isInRange && !this.isTransparent) {\n if (!this.data.hd) {\n var elem = this.baseElement || this.layerElement;\n elem.style.display = 'block';\n }\n\n this.hidden = false;\n this._isFirstFrame = true;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n renderInnerContent: function renderInnerContent() {},\n prepareFrame: function prepareFrame(num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n this.checkTransparency();\n },\n destroy: function destroy() {\n this.innerElem = null;\n this.destroyBaseElement();\n }\n };\n extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);\n })();\n\n function IImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.initElement(data, globalData, comp);\n this.sourceRect = {\n top: 0,\n left: 0,\n width: this.assetData.w,\n height: this.assetData.h\n };\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement);\n\n IImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n this.innerElem = createNS('image');\n this.innerElem.setAttribute('width', this.assetData.w + 'px');\n this.innerElem.setAttribute('height', this.assetData.h + 'px');\n this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);\n this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.innerElem);\n };\n\n IImageElement.prototype.sourceRectAtTime = function () {\n return this.sourceRect;\n };\n\n function ProcessedElement(element, position) {\n this.elem = element;\n this.pos = position;\n }\n\n function IShapeElement() {}\n\n IShapeElement.prototype = {\n addShapeToModifiers: function addShapeToModifiers(data) {\n var i;\n var len = this.shapeModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapeModifiers[i].addShape(data);\n }\n },\n isShapeInAnimatedModifiers: function isShapeInAnimatedModifiers(data) {\n var i = 0;\n var len = this.shapeModifiers.length;\n\n while (i < len) {\n if (this.shapeModifiers[i].isAnimatedWithShape(data)) {\n return true;\n }\n }\n\n return false;\n },\n renderModifiers: function renderModifiers() {\n if (!this.shapeModifiers.length) {\n return;\n }\n\n var i;\n var len = this.shapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.shapes[i].sh.reset();\n }\n\n len = this.shapeModifiers.length;\n var shouldBreakProcess;\n\n for (i = len - 1; i >= 0; i -= 1) {\n shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); // workaround to fix cases where a repeater resets the shape so the following processes get called twice\n // TODO: find a better solution for this\n\n if (shouldBreakProcess) {\n break;\n }\n }\n },\n searchProcessedElement: function searchProcessedElement(elem) {\n var elements = this.processedElements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i].elem === elem) {\n return elements[i].pos;\n }\n\n i += 1;\n }\n\n return 0;\n },\n addProcessedElement: function addProcessedElement(elem, pos) {\n var elements = this.processedElements;\n var i = elements.length;\n\n while (i) {\n i -= 1;\n\n if (elements[i].elem === elem) {\n elements[i].pos = pos;\n return;\n }\n }\n\n elements.push(new ProcessedElement(elem, pos));\n },\n prepareFrame: function prepareFrame(num) {\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n }\n };\n\n var lineCapEnum = {\n 1: 'butt',\n 2: 'round',\n 3: 'square'\n };\n var lineJoinEnum = {\n 1: 'miter',\n 2: 'round',\n 3: 'bevel'\n };\n\n function SVGShapeData(transformers, level, shape) {\n this.caches = [];\n this.styles = [];\n this.transformers = transformers;\n this.lStr = '';\n this.sh = shape;\n this.lvl = level; // TODO find if there are some cases where _isAnimated can be false.\n // For now, since shapes add up with other shapes. They have to be calculated every time.\n // One way of finding out is checking if all styles associated to this shape depend only of this shape\n\n this._isAnimated = !!shape.k; // TODO: commenting this for now since all shapes are animated\n\n var i = 0;\n var len = transformers.length;\n\n while (i < len) {\n if (transformers[i].mProps.dynamicProperties.length) {\n this._isAnimated = true;\n break;\n }\n\n i += 1;\n }\n }\n\n SVGShapeData.prototype.setAsAnimated = function () {\n this._isAnimated = true;\n };\n\n function SVGStyleData(data, level) {\n this.data = data;\n this.type = data.ty;\n this.d = '';\n this.lvl = level;\n this._mdf = false;\n this.closed = data.hd === true;\n this.pElem = createNS('path');\n this.msElem = null;\n }\n\n SVGStyleData.prototype.reset = function () {\n this.d = '';\n this._mdf = false;\n };\n\n function DashProperty(elem, data, renderer, container) {\n this.elem = elem;\n this.frameId = -1;\n this.dataProps = createSizedArray(data.length);\n this.renderer = renderer;\n this.k = false;\n this.dashStr = '';\n this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0);\n this.dashoffset = createTypedArray('float32', 1);\n this.initDynamicPropertyContainer(container);\n var i;\n var len = data.length || 0;\n var prop;\n\n for (i = 0; i < len; i += 1) {\n prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this);\n this.k = prop.k || this.k;\n this.dataProps[i] = {\n n: data[i].n,\n p: prop\n };\n }\n\n if (!this.k) {\n this.getValue(true);\n }\n\n this._isAnimated = this.k;\n }\n\n DashProperty.prototype.getValue = function (forceRender) {\n if (this.elem.globalData.frameId === this.frameId && !forceRender) {\n return;\n }\n\n this.frameId = this.elem.globalData.frameId;\n this.iterateDynamicProperties();\n this._mdf = this._mdf || forceRender;\n\n if (this._mdf) {\n var i = 0;\n var len = this.dataProps.length;\n\n if (this.renderer === 'svg') {\n this.dashStr = '';\n }\n\n for (i = 0; i < len; i += 1) {\n if (this.dataProps[i].n !== 'o') {\n if (this.renderer === 'svg') {\n this.dashStr += ' ' + this.dataProps[i].p.v;\n } else {\n this.dashArray[i] = this.dataProps[i].p.v;\n }\n } else {\n this.dashoffset[0] = this.dataProps[i].p.v;\n }\n }\n }\n };\n\n extendPrototype([DynamicPropertyContainer], DashProperty);\n\n function SVGStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);\n\n function SVGFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGFillStyleData);\n\n function SVGNoStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.style = styleOb;\n }\n\n extendPrototype([DynamicPropertyContainer], SVGNoStyleData);\n\n function GradientProperty(elem, data, container) {\n this.data = data;\n this.c = createTypedArray('uint8c', data.p * 4);\n var cLength = data.k.k[0].s ? data.k.k[0].s.length - data.p * 4 : data.k.k.length - data.p * 4;\n this.o = createTypedArray('float32', cLength);\n this._cmdf = false;\n this._omdf = false;\n this._collapsable = this.checkCollapsable();\n this._hasOpacity = cLength;\n this.initDynamicPropertyContainer(container);\n this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this);\n this.k = this.prop.k;\n this.getValue(true);\n }\n\n GradientProperty.prototype.comparePoints = function (values, points) {\n var i = 0;\n var len = this.o.length / 2;\n var diff;\n\n while (i < len) {\n diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]);\n\n if (diff > 0.01) {\n return false;\n }\n\n i += 1;\n }\n\n return true;\n };\n\n GradientProperty.prototype.checkCollapsable = function () {\n if (this.o.length / 2 !== this.c.length / 4) {\n return false;\n }\n\n if (this.data.k.k[0].s) {\n var i = 0;\n var len = this.data.k.k.length;\n\n while (i < len) {\n if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {\n return false;\n }\n\n i += 1;\n }\n } else if (!this.comparePoints(this.data.k.k, this.data.p)) {\n return false;\n }\n\n return true;\n };\n\n GradientProperty.prototype.getValue = function (forceRender) {\n this.prop.getValue();\n this._mdf = false;\n this._cmdf = false;\n this._omdf = false;\n\n if (this.prop._mdf || forceRender) {\n var i;\n var len = this.data.p * 4;\n var mult;\n var val;\n\n for (i = 0; i < len; i += 1) {\n mult = i % 4 === 0 ? 100 : 255;\n val = Math.round(this.prop.v[i] * mult);\n\n if (this.c[i] !== val) {\n this.c[i] = val;\n this._cmdf = !forceRender;\n }\n }\n\n if (this.o.length) {\n len = this.prop.v.length;\n\n for (i = this.data.p * 4; i < len; i += 1) {\n mult = i % 2 === 0 ? 100 : 1;\n val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i];\n\n if (this.o[i - this.data.p * 4] !== val) {\n this.o[i - this.data.p * 4] = val;\n this._omdf = !forceRender;\n }\n }\n }\n\n this._mdf = !forceRender;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], GradientProperty);\n\n function SVGGradientFillStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.initGradientData(elem, data, styleOb);\n }\n\n SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) {\n this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);\n this.s = PropertyFactory.getProp(elem, data.s, 1, null, this);\n this.e = PropertyFactory.getProp(elem, data.e, 1, null, this);\n this.h = PropertyFactory.getProp(elem, data.h || {\n k: 0\n }, 0, 0.01, this);\n this.a = PropertyFactory.getProp(elem, data.a || {\n k: 0\n }, 0, degToRads, this);\n this.g = new GradientProperty(elem, data.g, this);\n this.style = styleOb;\n this.stops = [];\n this.setGradientData(styleOb.pElem, data);\n this.setGradientOpacity(data, styleOb);\n this._isAnimated = !!this._isAnimated;\n };\n\n SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) {\n var gradientId = createElementID();\n var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n gfill.setAttribute('id', gradientId);\n gfill.setAttribute('spreadMethod', 'pad');\n gfill.setAttribute('gradientUnits', 'userSpaceOnUse');\n var stops = [];\n var stop;\n var j;\n var jLen;\n jLen = data.g.p * 4;\n\n for (j = 0; j < jLen; j += 4) {\n stop = createNS('stop');\n gfill.appendChild(stop);\n stops.push(stop);\n }\n\n pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')');\n this.gf = gfill;\n this.cst = stops;\n };\n\n SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) {\n if (this.g._hasOpacity && !this.g._collapsable) {\n var stop;\n var j;\n var jLen;\n var mask = createNS('mask');\n var maskElement = createNS('path');\n mask.appendChild(maskElement);\n var opacityId = createElementID();\n var maskId = createElementID();\n mask.setAttribute('id', maskId);\n var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');\n opFill.setAttribute('id', opacityId);\n opFill.setAttribute('spreadMethod', 'pad');\n opFill.setAttribute('gradientUnits', 'userSpaceOnUse');\n jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;\n var stops = this.stops;\n\n for (j = data.g.p * 4; j < jLen; j += 2) {\n stop = createNS('stop');\n stop.setAttribute('stop-color', 'rgb(255,255,255)');\n opFill.appendChild(stop);\n stops.push(stop);\n }\n\n maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')');\n\n if (data.ty === 'gs') {\n maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n\n if (data.lj === 1) {\n maskElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n this.of = opFill;\n this.ms = mask;\n this.ost = stops;\n this.maskId = maskId;\n styleOb.msElem = maskElement;\n }\n };\n\n extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);\n\n function SVGGradientStrokeStyleData(elem, data, styleOb) {\n this.initDynamicPropertyContainer(elem);\n this.getValue = this.iterateDynamicProperties;\n this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);\n this.d = new DashProperty(elem, data.d || {}, 'svg', this);\n this.initGradientData(elem, data, styleOb);\n this._isAnimated = !!this._isAnimated;\n }\n\n extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);\n\n function ShapeGroupData() {\n this.it = [];\n this.prevViewData = [];\n this.gr = createNS('g');\n }\n\n function SVGTransformData(mProps, op, container) {\n this.transform = {\n mProps: mProps,\n op: op,\n container: container\n };\n this.elements = [];\n this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;\n }\n\n var buildShapeString = function buildShapeString(pathNodes, length, closed, mat) {\n if (length === 0) {\n return '';\n }\n\n var _o = pathNodes.o;\n var _i = pathNodes.i;\n var _v = pathNodes.v;\n var i;\n var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n\n for (i = 1; i < length; i += 1) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]);\n }\n\n if (closed && length) {\n shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]);\n shapeString += 'z';\n }\n\n return shapeString;\n };\n\n var SVGElementsRenderer = function () {\n var _identityMatrix = new Matrix();\n\n var _matrixHelper = new Matrix();\n\n var ob = {\n createRenderFunction: createRenderFunction\n };\n\n function createRenderFunction(data) {\n switch (data.ty) {\n case 'fl':\n return renderFill;\n\n case 'gf':\n return renderGradient;\n\n case 'gs':\n return renderGradientStroke;\n\n case 'st':\n return renderStroke;\n\n case 'sh':\n case 'el':\n case 'rc':\n case 'sr':\n return renderPath;\n\n case 'tr':\n return renderContentTransform;\n\n case 'no':\n return renderNoop;\n\n default:\n return null;\n }\n }\n\n function renderContentTransform(styleData, itemData, isFirstFrame) {\n if (isFirstFrame || itemData.transform.op._mdf) {\n itemData.transform.container.setAttribute('opacity', itemData.transform.op.v);\n }\n\n if (isFirstFrame || itemData.transform.mProps._mdf) {\n itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS());\n }\n }\n\n function renderNoop() {}\n\n function renderPath(styleData, itemData, isFirstFrame) {\n var j;\n var jLen;\n var pathStringTransformed;\n var redraw;\n var pathNodes;\n var l;\n var lLen = itemData.styles.length;\n var lvl = itemData.lvl;\n var paths;\n var mat;\n var props;\n var iterations;\n var k;\n\n for (l = 0; l < lLen; l += 1) {\n redraw = itemData.sh._mdf || isFirstFrame;\n\n if (itemData.styles[l].lvl < lvl) {\n mat = _matrixHelper.reset();\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (!redraw && iterations > 0) {\n redraw = itemData.transformers[k].mProps._mdf || redraw;\n iterations -= 1;\n k -= 1;\n }\n\n if (redraw) {\n iterations = lvl - itemData.styles[l].lvl;\n k = itemData.transformers.length - 1;\n\n while (iterations > 0) {\n props = itemData.transformers[k].mProps.v.props;\n mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\n iterations -= 1;\n k -= 1;\n }\n }\n } else {\n mat = _identityMatrix;\n }\n\n paths = itemData.sh.paths;\n jLen = paths._length;\n\n if (redraw) {\n pathStringTransformed = '';\n\n for (j = 0; j < jLen; j += 1) {\n pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes._length) {\n pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);\n }\n }\n\n itemData.caches[l] = pathStringTransformed;\n } else {\n pathStringTransformed = itemData.caches[l];\n }\n\n itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;\n itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;\n }\n }\n\n function renderFill(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('fill-opacity', itemData.o.v);\n }\n }\n\n function renderGradientStroke(styleData, itemData, isFirstFrame) {\n renderGradient(styleData, itemData, isFirstFrame);\n renderStroke(styleData, itemData, isFirstFrame);\n }\n\n function renderGradient(styleData, itemData, isFirstFrame) {\n var gfill = itemData.gf;\n var hasOpacity = itemData.g._hasOpacity;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (itemData.o._mdf || isFirstFrame) {\n var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';\n itemData.style.pElem.setAttribute(attr, itemData.o.v);\n }\n\n if (itemData.s._mdf || isFirstFrame) {\n var attr1 = styleData.t === 1 ? 'x1' : 'cx';\n var attr2 = attr1 === 'x1' ? 'y1' : 'cy';\n gfill.setAttribute(attr1, pt1[0]);\n gfill.setAttribute(attr2, pt1[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute(attr1, pt1[0]);\n itemData.of.setAttribute(attr2, pt1[1]);\n }\n }\n\n var stops;\n var i;\n var len;\n var stop;\n\n if (itemData.g._cmdf || isFirstFrame) {\n stops = itemData.cst;\n var cValues = itemData.g.c;\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n stop.setAttribute('offset', cValues[i * 4] + '%');\n stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')');\n }\n }\n\n if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {\n var oValues = itemData.g.o;\n\n if (itemData.g._collapsable) {\n stops = itemData.cst;\n } else {\n stops = itemData.ost;\n }\n\n len = stops.length;\n\n for (i = 0; i < len; i += 1) {\n stop = stops[i];\n\n if (!itemData.g._collapsable) {\n stop.setAttribute('offset', oValues[i * 2] + '%');\n }\n\n stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);\n }\n }\n\n if (styleData.t === 1) {\n if (itemData.e._mdf || isFirstFrame) {\n gfill.setAttribute('x2', pt2[0]);\n gfill.setAttribute('y2', pt2[1]);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('x2', pt2[0]);\n itemData.of.setAttribute('y2', pt2[1]);\n }\n }\n } else {\n var rad;\n\n if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n gfill.setAttribute('r', rad);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('r', rad);\n }\n }\n\n if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {\n if (!rad) {\n rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n }\n\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n gfill.setAttribute('fx', x);\n gfill.setAttribute('fy', y);\n\n if (hasOpacity && !itemData.g._collapsable) {\n itemData.of.setAttribute('fx', x);\n itemData.of.setAttribute('fy', y);\n }\n } // gfill.setAttribute('fy','200');\n\n }\n }\n\n function renderStroke(styleData, itemData, isFirstFrame) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || isFirstFrame) && d.dashStr) {\n styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);\n styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);\n }\n\n if (itemData.c && (itemData.c._mdf || isFirstFrame)) {\n styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')');\n }\n\n if (itemData.o._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);\n }\n\n if (itemData.w._mdf || isFirstFrame) {\n styleElem.pElem.setAttribute('stroke-width', itemData.w.v);\n\n if (styleElem.msElem) {\n styleElem.msElem.setAttribute('stroke-width', itemData.w.v);\n }\n }\n }\n\n return ob;\n }();\n\n function SVGShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = []; // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement);\n\n SVGShapeElement.prototype.initSecondaryElement = function () {};\n\n SVGShapeElement.prototype.identityMatrix = new Matrix();\n\n SVGShapeElement.prototype.buildExpressionInterface = function () {};\n\n SVGShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n };\n /*\r\n This method searches for multiple shapes that affect a single element and one of them is animated\r\n */\n\n\n SVGShapeElement.prototype.filterUniqueShapes = function () {\n var i;\n var len = this.shapes.length;\n var shape;\n var j;\n var jLen = this.stylesList.length;\n var style;\n var tempShapes = [];\n var areAnimated = false;\n\n for (j = 0; j < jLen; j += 1) {\n style = this.stylesList[j];\n areAnimated = false;\n tempShapes.length = 0;\n\n for (i = 0; i < len; i += 1) {\n shape = this.shapes[i];\n\n if (shape.styles.indexOf(style) !== -1) {\n tempShapes.push(shape);\n areAnimated = shape._isAnimated || areAnimated;\n }\n }\n\n if (tempShapes.length > 1 && areAnimated) {\n this.setShapesAsAnimated(tempShapes);\n }\n }\n };\n\n SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) {\n var i;\n var len = shapes.length;\n\n for (i = 0; i < len; i += 1) {\n shapes[i].setAsAnimated();\n }\n };\n\n SVGShapeElement.prototype.createStyleElement = function (data, level) {\n // TODO: prevent drawing of hidden styles\n var elementData;\n var styleOb = new SVGStyleData(data, level);\n var pathElement = styleOb.pElem;\n\n if (data.ty === 'st') {\n elementData = new SVGStrokeStyleData(this, data, styleOb);\n } else if (data.ty === 'fl') {\n elementData = new SVGFillStyleData(this, data, styleOb);\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;\n elementData = new GradientConstructor(this, data, styleOb);\n this.globalData.defs.appendChild(elementData.gf);\n\n if (elementData.maskId) {\n this.globalData.defs.appendChild(elementData.ms);\n this.globalData.defs.appendChild(elementData.of);\n pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')');\n }\n } else if (data.ty === 'no') {\n elementData = new SVGNoStyleData(this, data, styleOb);\n }\n\n if (data.ty === 'st' || data.ty === 'gs') {\n pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]);\n pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]);\n pathElement.setAttribute('fill-opacity', '0');\n\n if (data.lj === 1) {\n pathElement.setAttribute('stroke-miterlimit', data.ml);\n }\n }\n\n if (data.r === 2) {\n pathElement.setAttribute('fill-rule', 'evenodd');\n }\n\n if (data.ln) {\n pathElement.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n pathElement.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n this.stylesList.push(styleOb);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createGroupElement = function (data) {\n var elementData = new ShapeGroupData();\n\n if (data.ln) {\n elementData.gr.setAttribute('id', data.ln);\n }\n\n if (data.cl) {\n elementData.gr.setAttribute('class', data.cl);\n }\n\n if (data.bm) {\n elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);\n }\n\n return elementData;\n };\n\n SVGShapeElement.prototype.createTransformElement = function (data, container) {\n var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this);\n var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) {\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this);\n var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n this.addToAnimatedContents(data, elementData);\n return elementData;\n };\n\n SVGShapeElement.prototype.addToAnimatedContents = function (data, element) {\n var i = 0;\n var len = this.animatedContents.length;\n\n while (i < len) {\n if (this.animatedContents[i].element === element) {\n return;\n }\n\n i += 1;\n }\n\n this.animatedContents.push({\n fn: SVGElementsRenderer.createRenderFunction(data),\n element: element,\n data: data\n });\n };\n\n SVGShapeElement.prototype.setElementStyles = function (elementData) {\n var arr = elementData.styles;\n var j;\n var jLen = this.stylesList.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (!this.stylesList[j].closed) {\n arr.push(this.stylesList[j]);\n }\n }\n };\n\n SVGShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true);\n this.filterUniqueShapes();\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n };\n\n SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) {\n var ownTransformers = [].concat(transformers);\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var currentTransform;\n var modifier;\n var processedPos;\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._render = render;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], level);\n } else {\n itemsData[i].style.closed = false;\n }\n\n if (arr[i]._render) {\n if (itemsData[i].style.pElem.parentNode !== container) {\n container.appendChild(itemsData[i].style.pElem);\n }\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render);\n\n if (arr[i]._render) {\n if (itemsData[i].gr.parentNode !== container) {\n container.appendChild(itemsData[i].gr);\n }\n }\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n itemsData[i] = this.createTransformElement(arr[i], container);\n }\n\n currentTransform = itemsData[i].transform;\n ownTransformers.push(currentTransform);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);\n }\n\n this.setElementStyles(itemsData[i]);\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n render = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n len = ownStyles.length;\n\n for (i = 0; i < len; i += 1) {\n ownStyles[i].closed = true;\n }\n\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n SVGShapeElement.prototype.renderInnerContent = function () {\n this.renderModifiers();\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n this.stylesList[i].reset();\n }\n\n this.renderShape();\n\n for (i = 0; i < len; i += 1) {\n if (this.stylesList[i]._mdf || this._isFirstFrame) {\n if (this.stylesList[i].msElem) {\n this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); // Adding M0 0 fixes same mask bug on all browsers\n\n this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;\n }\n\n this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');\n }\n }\n };\n\n SVGShapeElement.prototype.renderShape = function () {\n var i;\n var len = this.animatedContents.length;\n var animatedContent;\n\n for (i = 0; i < len; i += 1) {\n animatedContent = this.animatedContents[i];\n\n if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {\n animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);\n }\n }\n };\n\n SVGShapeElement.prototype.destroy = function () {\n this.destroyBaseElement();\n this.shapesData = null;\n this.itemsData = null;\n };\n\n function LetterProps(o, sw, sc, fc, m, p) {\n this.o = o;\n this.sw = sw;\n this.sc = sc;\n this.fc = fc;\n this.m = m;\n this.p = p;\n this._mdf = {\n o: true,\n sw: !!sw,\n sc: !!sc,\n fc: !!fc,\n m: true,\n p: true\n };\n }\n\n LetterProps.prototype.update = function (o, sw, sc, fc, m, p) {\n this._mdf.o = false;\n this._mdf.sw = false;\n this._mdf.sc = false;\n this._mdf.fc = false;\n this._mdf.m = false;\n this._mdf.p = false;\n var updated = false;\n\n if (this.o !== o) {\n this.o = o;\n this._mdf.o = true;\n updated = true;\n }\n\n if (this.sw !== sw) {\n this.sw = sw;\n this._mdf.sw = true;\n updated = true;\n }\n\n if (this.sc !== sc) {\n this.sc = sc;\n this._mdf.sc = true;\n updated = true;\n }\n\n if (this.fc !== fc) {\n this.fc = fc;\n this._mdf.fc = true;\n updated = true;\n }\n\n if (this.m !== m) {\n this.m = m;\n this._mdf.m = true;\n updated = true;\n }\n\n if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {\n this.p = p;\n this._mdf.p = true;\n updated = true;\n }\n\n return updated;\n };\n\n function TextProperty(elem, data) {\n this._frameId = initialDefaultFrame;\n this.pv = '';\n this.v = '';\n this.kf = false;\n this._isFirstFrame = true;\n this._mdf = false;\n this.data = data;\n this.elem = elem;\n this.comp = this.elem.comp;\n this.keysIndex = 0;\n this.canResize = false;\n this.minimumFontSize = 1;\n this.effectsSequence = [];\n this.currentData = {\n ascent: 0,\n boxWidth: this.defaultBoxWidth,\n f: '',\n fStyle: '',\n fWeight: '',\n fc: '',\n j: '',\n justifyOffset: '',\n l: [],\n lh: 0,\n lineWidths: [],\n ls: '',\n of: '',\n s: '',\n sc: '',\n sw: 0,\n t: 0,\n tr: 0,\n sz: 0,\n ps: null,\n fillColorAnim: false,\n strokeColorAnim: false,\n strokeWidthAnim: false,\n yOffset: 0,\n finalSize: 0,\n finalText: [],\n finalLineHeight: 0,\n __complete: false\n };\n this.copyData(this.currentData, this.data.d.k[0].s);\n\n if (!this.searchProperty()) {\n this.completeTextData(this.currentData);\n }\n }\n\n TextProperty.prototype.defaultBoxWidth = [0, 0];\n\n TextProperty.prototype.copyData = function (obj, data) {\n for (var s in data) {\n if (Object.prototype.hasOwnProperty.call(data, s)) {\n obj[s] = data[s];\n }\n }\n\n return obj;\n };\n\n TextProperty.prototype.setCurrentData = function (data) {\n if (!data.__complete) {\n this.completeTextData(data);\n }\n\n this.currentData = data;\n this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;\n this._mdf = true;\n };\n\n TextProperty.prototype.searchProperty = function () {\n return this.searchKeyframes();\n };\n\n TextProperty.prototype.searchKeyframes = function () {\n this.kf = this.data.d.k.length > 1;\n\n if (this.kf) {\n this.addEffect(this.getKeyframeValue.bind(this));\n }\n\n return this.kf;\n };\n\n TextProperty.prototype.addEffect = function (effectFunction) {\n this.effectsSequence.push(effectFunction);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.getValue = function (_finalValue) {\n if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {\n return;\n }\n\n this.currentData.t = this.data.d.k[this.keysIndex].s.t;\n var currentValue = this.currentData;\n var currentIndex = this.keysIndex;\n\n if (this.lock) {\n this.setCurrentData(this.currentData);\n return;\n }\n\n this.lock = true;\n this._mdf = false;\n var i;\n var len = this.effectsSequence.length;\n var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;\n\n for (i = 0; i < len; i += 1) {\n // Checking if index changed to prevent creating a new object every time the expression updates.\n if (currentIndex !== this.keysIndex) {\n finalValue = this.effectsSequence[i](finalValue, finalValue.t);\n } else {\n finalValue = this.effectsSequence[i](this.currentData, finalValue.t);\n }\n }\n\n if (currentValue !== finalValue) {\n this.setCurrentData(finalValue);\n }\n\n this.v = this.currentData;\n this.pv = this.v;\n this.lock = false;\n this.frameId = this.elem.globalData.frameId;\n };\n\n TextProperty.prototype.getKeyframeValue = function () {\n var textKeys = this.data.d.k;\n var frameNum = this.elem.comp.renderedFrame;\n var i = 0;\n var len = textKeys.length;\n\n while (i <= len - 1) {\n if (i === len - 1 || textKeys[i + 1].t > frameNum) {\n break;\n }\n\n i += 1;\n }\n\n if (this.keysIndex !== i) {\n this.keysIndex = i;\n }\n\n return this.data.d.k[this.keysIndex].s;\n };\n\n TextProperty.prototype.buildFinalText = function (text) {\n var charactersArray = [];\n var i = 0;\n var len = text.length;\n var charCode;\n var secondCharCode;\n var shouldCombine = false;\n\n while (i < len) {\n charCode = text.charCodeAt(i);\n\n if (FontManager.isCombinedCharacter(charCode)) {\n charactersArray[charactersArray.length - 1] += text.charAt(i);\n } else if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n secondCharCode = text.charCodeAt(i + 1);\n\n if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) {\n if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) {\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\n shouldCombine = false;\n } else {\n charactersArray.push(text.substr(i, 2));\n }\n\n i += 1;\n } else {\n charactersArray.push(text.charAt(i));\n }\n } else if (charCode > 0xDBFF) {\n secondCharCode = text.charCodeAt(i + 1);\n\n if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) {\n shouldCombine = true;\n charactersArray[charactersArray.length - 1] += text.substr(i, 2);\n i += 1;\n } else {\n charactersArray.push(text.charAt(i));\n }\n } else if (FontManager.isZeroWidthJoiner(charCode)) {\n charactersArray[charactersArray.length - 1] += text.charAt(i);\n shouldCombine = true;\n } else {\n charactersArray.push(text.charAt(i));\n }\n\n i += 1;\n }\n\n return charactersArray;\n };\n\n TextProperty.prototype.completeTextData = function (documentData) {\n documentData.__complete = true;\n var fontManager = this.elem.globalData.fontManager;\n var data = this.data;\n var letters = [];\n var i;\n var len;\n var newLineFlag;\n var index = 0;\n var val;\n var anchorGrouping = data.m.g;\n var currentSize = 0;\n var currentPos = 0;\n var currentLine = 0;\n var lineWidths = [];\n var lineWidth = 0;\n var maxLineWidth = 0;\n var j;\n var jLen;\n var fontData = fontManager.getFontByName(documentData.f);\n var charData;\n var cLength = 0;\n var fontProps = getFontProperties(fontData);\n documentData.fWeight = fontProps.weight;\n documentData.fStyle = fontProps.style;\n documentData.finalSize = documentData.s;\n documentData.finalText = this.buildFinalText(documentData.t);\n len = documentData.finalText.length;\n documentData.finalLineHeight = documentData.lh;\n var trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var charCode;\n\n if (documentData.sz) {\n var flag = true;\n var boxWidth = documentData.sz[0];\n var boxHeight = documentData.sz[1];\n var currentHeight;\n var finalText;\n\n while (flag) {\n finalText = this.buildFinalText(documentData.t);\n currentHeight = 0;\n lineWidth = 0;\n len = finalText.length;\n trackingOffset = documentData.tr / 1000 * documentData.finalSize;\n var lastSpaceIndex = -1;\n\n for (i = 0; i < len; i += 1) {\n charCode = finalText[i].charCodeAt(0);\n newLineFlag = false;\n\n if (finalText[i] === ' ') {\n lastSpaceIndex = i;\n } else if (charCode === 13 || charCode === 3) {\n lineWidth = 0;\n newLineFlag = true;\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;\n cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);\n }\n\n if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') {\n if (lastSpaceIndex === -1) {\n len += 1;\n } else {\n i = lastSpaceIndex;\n }\n\n currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2;\n finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\\r'); // finalText = finalText.substr(0,i) + \"\\r\" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);\n\n lastSpaceIndex = -1;\n lineWidth = 0;\n } else {\n lineWidth += cLength;\n lineWidth += trackingOffset;\n }\n }\n\n currentHeight += fontData.ascent * documentData.finalSize / 100;\n\n if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {\n documentData.finalSize -= 1;\n documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;\n } else {\n documentData.finalText = finalText;\n len = documentData.finalText.length;\n flag = false;\n }\n }\n }\n\n lineWidth = -trackingOffset;\n cLength = 0;\n var uncollapsedSpaces = 0;\n var currentChar;\n\n for (i = 0; i < len; i += 1) {\n newLineFlag = false;\n currentChar = documentData.finalText[i];\n charCode = currentChar.charCodeAt(0);\n\n if (charCode === 13 || charCode === 3) {\n uncollapsedSpaces = 0;\n lineWidths.push(lineWidth);\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidth = -2 * trackingOffset;\n val = '';\n newLineFlag = true;\n currentLine += 1;\n } else {\n val = currentChar;\n }\n\n if (fontManager.chars) {\n charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);\n cLength = newLineFlag ? 0 : charData.w * documentData.finalSize / 100;\n } else {\n // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);\n // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;\n cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);\n } //\n\n\n if (currentChar === ' ') {\n uncollapsedSpaces += cLength + trackingOffset;\n } else {\n lineWidth += cLength + trackingOffset + uncollapsedSpaces;\n uncollapsedSpaces = 0;\n }\n\n letters.push({\n l: cLength,\n an: cLength,\n add: currentSize,\n n: newLineFlag,\n anIndexes: [],\n val: val,\n line: currentLine,\n animatorJustifyOffset: 0\n });\n\n if (anchorGrouping == 2) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || val === ' ' || i === len - 1) {\n if (val === '' || val === ' ') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n index += 1;\n currentSize = 0;\n }\n } else if (anchorGrouping == 3) {\n // eslint-disable-line eqeqeq\n currentSize += cLength;\n\n if (val === '' || i === len - 1) {\n if (val === '') {\n currentSize -= cLength;\n }\n\n while (currentPos <= i) {\n letters[currentPos].an = currentSize;\n letters[currentPos].ind = index;\n letters[currentPos].extra = cLength;\n currentPos += 1;\n }\n\n currentSize = 0;\n index += 1;\n }\n } else {\n letters[index].ind = index;\n letters[index].extra = 0;\n index += 1;\n }\n }\n\n documentData.l = letters;\n maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;\n lineWidths.push(lineWidth);\n\n if (documentData.sz) {\n documentData.boxWidth = documentData.sz[0];\n documentData.justifyOffset = 0;\n } else {\n documentData.boxWidth = maxLineWidth;\n\n switch (documentData.j) {\n case 1:\n documentData.justifyOffset = -documentData.boxWidth;\n break;\n\n case 2:\n documentData.justifyOffset = -documentData.boxWidth / 2;\n break;\n\n default:\n documentData.justifyOffset = 0;\n }\n }\n\n documentData.lineWidths = lineWidths;\n var animators = data.a;\n var animatorData;\n var letterData;\n jLen = animators.length;\n var based;\n var ind;\n var indexes = [];\n\n for (j = 0; j < jLen; j += 1) {\n animatorData = animators[j];\n\n if (animatorData.a.sc) {\n documentData.strokeColorAnim = true;\n }\n\n if (animatorData.a.sw) {\n documentData.strokeWidthAnim = true;\n }\n\n if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) {\n documentData.fillColorAnim = true;\n }\n\n ind = 0;\n based = animatorData.s.b;\n\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n letterData.anIndexes[j] = ind;\n\n if (based == 1 && letterData.val !== '' || based == 2 && letterData.val !== '' && letterData.val !== ' ' || based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1) || based == 4 && (letterData.n || i == len - 1)) {\n // eslint-disable-line eqeqeq\n if (animatorData.s.rn === 1) {\n indexes.push(ind);\n }\n\n ind += 1;\n }\n }\n\n data.a[j].s.totalChars = ind;\n var currentInd = -1;\n var newInd;\n\n if (animatorData.s.rn === 1) {\n for (i = 0; i < len; i += 1) {\n letterData = letters[i];\n\n if (currentInd != letterData.anIndexes[j]) {\n // eslint-disable-line eqeqeq\n currentInd = letterData.anIndexes[j];\n newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0];\n }\n\n letterData.anIndexes[j] = newInd;\n }\n }\n }\n\n documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2;\n documentData.ls = documentData.ls || 0;\n documentData.ascent = fontData.ascent * documentData.finalSize / 100;\n };\n\n TextProperty.prototype.updateDocumentData = function (newData, index) {\n index = index === undefined ? this.keysIndex : index;\n var dData = this.copyData({}, this.data.d.k[index].s);\n dData = this.copyData(dData, newData);\n this.data.d.k[index].s = dData;\n this.recalculate(index);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.recalculate = function (index) {\n var dData = this.data.d.k[index].s;\n dData.__complete = false;\n this.keysIndex = 0;\n this._isFirstFrame = true;\n this.getValue(dData);\n };\n\n TextProperty.prototype.canResizeFont = function (_canResize) {\n this.canResize = _canResize;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n TextProperty.prototype.setMinimumFontSize = function (_fontValue) {\n this.minimumFontSize = Math.floor(_fontValue) || 1;\n this.recalculate(this.keysIndex);\n this.elem.addDynamicProperty(this);\n };\n\n var TextSelectorProp = function () {\n var max = Math.max;\n var min = Math.min;\n var floor = Math.floor;\n\n function TextSelectorPropFactory(elem, data) {\n this._currentTextLength = -1;\n this.k = false;\n this.data = data;\n this.elem = elem;\n this.comp = elem.comp;\n this.finalS = 0;\n this.finalE = 0;\n this.initDynamicPropertyContainer(elem);\n this.s = PropertyFactory.getProp(elem, data.s || {\n k: 0\n }, 0, 0, this);\n\n if ('e' in data) {\n this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this);\n } else {\n this.e = {\n v: 100\n };\n }\n\n this.o = PropertyFactory.getProp(elem, data.o || {\n k: 0\n }, 0, 0, this);\n this.xe = PropertyFactory.getProp(elem, data.xe || {\n k: 0\n }, 0, 0, this);\n this.ne = PropertyFactory.getProp(elem, data.ne || {\n k: 0\n }, 0, 0, this);\n this.sm = PropertyFactory.getProp(elem, data.sm || {\n k: 100\n }, 0, 0, this);\n this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this);\n\n if (!this.dynamicProperties.length) {\n this.getValue();\n }\n }\n\n TextSelectorPropFactory.prototype = {\n getMult: function getMult(ind) {\n if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) {\n this.getValue();\n }\n\n var x1 = 0;\n var y1 = 0;\n var x2 = 1;\n var y2 = 1;\n\n if (this.ne.v > 0) {\n x1 = this.ne.v / 100.0;\n } else {\n y1 = -this.ne.v / 100.0;\n }\n\n if (this.xe.v > 0) {\n x2 = 1.0 - this.xe.v / 100.0;\n } else {\n y2 = 1.0 + this.xe.v / 100.0;\n }\n\n var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get;\n var mult = 0;\n var s = this.finalS;\n var e = this.finalE;\n var type = this.data.sh;\n\n if (type === 2) {\n if (e === s) {\n mult = ind >= e ? 1 : 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 3) {\n if (e === s) {\n mult = ind >= e ? 0 : 1;\n } else {\n mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n }\n\n mult = easer(mult);\n } else if (type === 4) {\n if (e === s) {\n mult = 0;\n } else {\n mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1));\n\n if (mult < 0.5) {\n mult *= 2;\n } else {\n mult = 1 - 2 * (mult - 0.5);\n }\n }\n\n mult = easer(mult);\n } else if (type === 5) {\n if (e === s) {\n mult = 0;\n } else {\n var tot = e - s;\n /* ind += 0.5;\r\n mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */\n\n ind = min(max(0, ind + 0.5 - s), e - s);\n var x = -tot / 2 + ind;\n var a = tot / 2;\n mult = Math.sqrt(1 - x * x / (a * a));\n }\n\n mult = easer(mult);\n } else if (type === 6) {\n if (e === s) {\n mult = 0;\n } else {\n ind = min(max(0, ind + 0.5 - s), e - s);\n mult = (1 + Math.cos(Math.PI + Math.PI * 2 * ind / (e - s))) / 2; // eslint-disable-line\n }\n\n mult = easer(mult);\n } else {\n if (ind >= floor(s)) {\n if (ind - s < 0) {\n mult = max(0, min(min(e, 1) - (s - ind), 1));\n } else {\n mult = max(0, min(e - ind, 1));\n }\n }\n\n mult = easer(mult);\n } // Smoothness implementation.\n // The smoothness represents a reduced range of the original [0; 1] range.\n // if smoothness is 25%, the new range will be [0.375; 0.625]\n // Steps are:\n // - find the lower value of the new range (threshold)\n // - if multiplier is smaller than that value, floor it to 0\n // - if it is larger,\n // - subtract the threshold\n // - divide it by the smoothness (this will return the range to [0; 1])\n // Note: If it doesn't work on some scenarios, consider applying it before the easer.\n\n\n if (this.sm.v !== 100) {\n var smoothness = this.sm.v * 0.01;\n\n if (smoothness === 0) {\n smoothness = 0.00000001;\n }\n\n var threshold = 0.5 - smoothness * 0.5;\n\n if (mult < threshold) {\n mult = 0;\n } else {\n mult = (mult - threshold) / smoothness;\n\n if (mult > 1) {\n mult = 1;\n }\n }\n }\n\n return mult * this.a.v;\n },\n getValue: function getValue(newCharsFlag) {\n this.iterateDynamicProperties();\n this._mdf = newCharsFlag || this._mdf;\n this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;\n\n if (newCharsFlag && this.data.r === 2) {\n this.e.v = this._currentTextLength;\n }\n\n var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;\n var o = this.o.v / divisor;\n var s = this.s.v / divisor + o;\n var e = this.e.v / divisor + o;\n\n if (s > e) {\n var _s = s;\n s = e;\n e = _s;\n }\n\n this.finalS = s;\n this.finalE = e;\n }\n };\n extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory);\n\n function getTextSelectorProp(elem, data, arr) {\n return new TextSelectorPropFactory(elem, data, arr);\n }\n\n return {\n getTextSelectorProp: getTextSelectorProp\n };\n }();\n\n function TextAnimatorDataProperty(elem, animatorProps, container) {\n var defaultData = {\n propType: false\n };\n var getProp = PropertyFactory.getProp;\n var textAnimatorAnimatables = animatorProps.a;\n this.a = {\n r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData,\n rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData,\n ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData,\n sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData,\n sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData,\n s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData,\n a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData,\n o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData,\n p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData,\n sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData,\n sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData,\n fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData,\n fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData,\n fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData,\n fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData,\n t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData\n };\n this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container);\n this.s.t = animatorProps.s.t;\n }\n\n function TextAnimatorProperty(textData, renderType, elem) {\n this._isFirstFrame = true;\n this._hasMaskedPath = false;\n this._frameId = -1;\n this._textData = textData;\n this._renderType = renderType;\n this._elem = elem;\n this._animatorsData = createSizedArray(this._textData.a.length);\n this._pathData = {};\n this._moreOptions = {\n alignment: {}\n };\n this.renderedLetters = [];\n this.lettersChangedFlag = false;\n this.initDynamicPropertyContainer(elem);\n }\n\n TextAnimatorProperty.prototype.searchProperties = function () {\n var i;\n var len = this._textData.a.length;\n var animatorProps;\n var getProp = PropertyFactory.getProp;\n\n for (i = 0; i < len; i += 1) {\n animatorProps = this._textData.a[i];\n this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);\n }\n\n if (this._textData.p && 'm' in this._textData.p) {\n this._pathData = {\n a: getProp(this._elem, this._textData.p.a, 0, 0, this),\n f: getProp(this._elem, this._textData.p.f, 0, 0, this),\n l: getProp(this._elem, this._textData.p.l, 0, 0, this),\n r: getProp(this._elem, this._textData.p.r, 0, 0, this),\n p: getProp(this._elem, this._textData.p.p, 0, 0, this),\n m: this._elem.maskManager.getMaskProperty(this._textData.p.m)\n };\n this._hasMaskedPath = true;\n } else {\n this._hasMaskedPath = false;\n }\n\n this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this);\n };\n\n TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) {\n this.lettersChangedFlag = lettersChangedFlag;\n\n if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {\n return;\n }\n\n this._isFirstFrame = false;\n var alignment = this._moreOptions.alignment.v;\n var animators = this._animatorsData;\n var textData = this._textData;\n var matrixHelper = this.mHelper;\n var renderType = this._renderType;\n var renderedLettersCount = this.renderedLetters.length;\n var xPos;\n var yPos;\n var i;\n var len;\n var letters = documentData.l;\n var pathInfo;\n var currentLength;\n var currentPoint;\n var segmentLength;\n var flag;\n var pointInd;\n var segmentInd;\n var prevPoint;\n var points;\n var segments;\n var partialLength;\n var totalLength;\n var perc;\n var tanAngle;\n var mask;\n\n if (this._hasMaskedPath) {\n mask = this._pathData.m;\n\n if (!this._pathData.n || this._pathData._mdf) {\n var paths = mask.v;\n\n if (this._pathData.r.v) {\n paths = paths.reverse();\n } // TODO: release bezier data cached from previous pathInfo: this._pathData.pi\n\n\n pathInfo = {\n tLength: 0,\n segments: []\n };\n len = paths._length - 1;\n var bezierData;\n totalLength = 0;\n\n for (i = 0; i < len; i += 1) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[i + 1], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n i = len;\n\n if (mask.v.c) {\n bezierData = bez.buildBezierData(paths.v[i], paths.v[0], [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);\n pathInfo.tLength += bezierData.segmentLength;\n pathInfo.segments.push(bezierData);\n totalLength += bezierData.segmentLength;\n }\n\n this._pathData.pi = pathInfo;\n }\n\n pathInfo = this._pathData.pi;\n currentLength = this._pathData.f.v;\n segmentInd = 0;\n pointInd = 1;\n segmentLength = 0;\n flag = true;\n segments = pathInfo.segments;\n\n if (currentLength < 0 && mask.v.c) {\n if (pathInfo.tLength < Math.abs(currentLength)) {\n currentLength = -Math.abs(currentLength) % pathInfo.tLength;\n }\n\n segmentInd = segments.length - 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n\n while (currentLength < 0) {\n currentLength += points[pointInd].partialLength;\n pointInd -= 1;\n\n if (pointInd < 0) {\n segmentInd -= 1;\n points = segments[segmentInd].points;\n pointInd = points.length - 1;\n }\n }\n }\n\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n\n len = letters.length;\n xPos = 0;\n yPos = 0;\n var yOff = documentData.finalSize * 1.2 * 0.714;\n var firstLine = true;\n var animatorProps;\n var animatorSelector;\n var j;\n var jLen;\n var letterValue;\n jLen = animators.length;\n var mult;\n var ind = -1;\n var offf;\n var xPathPos;\n var yPathPos;\n var initPathPos = currentLength;\n var initSegmentInd = segmentInd;\n var initPointInd = pointInd;\n var currentLine = -1;\n var elemOpacity;\n var sc;\n var sw;\n var fc;\n var k;\n var letterSw;\n var letterSc;\n var letterFc;\n var letterM = '';\n var letterP = this.defaultPropsArray;\n var letterO; //\n\n if (documentData.j === 2 || documentData.j === 1) {\n var animatorJustifyOffset = 0;\n var animatorFirstCharOffset = 0;\n var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;\n var lastIndex = 0;\n var isNewLine = true;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n\n animatorJustifyOffset = 0;\n isNewLine = true;\n } else {\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n if (isNewLine && documentData.j === 2) {\n animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;\n }\n\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult;\n } else {\n animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult;\n }\n }\n }\n\n isNewLine = false;\n }\n }\n\n if (animatorJustifyOffset) {\n animatorJustifyOffset += animatorFirstCharOffset;\n }\n\n while (lastIndex < i) {\n letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;\n lastIndex += 1;\n }\n } //\n\n\n for (i = 0; i < len; i += 1) {\n matrixHelper.reset();\n elemOpacity = 1;\n\n if (letters[i].n) {\n xPos = 0;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n currentLength = initPathPos;\n firstLine = false;\n\n if (this._hasMaskedPath) {\n segmentInd = initSegmentInd;\n pointInd = initPointInd;\n points = segments[segmentInd].points;\n prevPoint = points[pointInd - 1];\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n segmentLength = 0;\n }\n\n letterM = '';\n letterFc = '';\n letterSw = '';\n letterO = '';\n letterP = this.defaultPropsArray;\n } else {\n if (this._hasMaskedPath) {\n if (currentLine !== letters[i].line) {\n switch (documentData.j) {\n case 1:\n currentLength += totalLength - documentData.lineWidths[letters[i].line];\n break;\n\n case 2:\n currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2;\n break;\n\n default:\n break;\n }\n\n currentLine = letters[i].line;\n }\n\n if (ind !== letters[i].ind) {\n if (letters[ind]) {\n currentLength += letters[ind].extra;\n }\n\n currentLength += letters[i].an / 2;\n ind = letters[i].ind;\n }\n\n currentLength += alignment[0] * letters[i].an * 0.005;\n var animatorOffset = 0;\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.p.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.p.v[0] * mult;\n }\n }\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n animatorOffset += animatorProps.a.v[0] * mult[0];\n } else {\n animatorOffset += animatorProps.a.v[0] * mult;\n }\n }\n }\n\n flag = true; // Force alignment only works with a single line for now\n\n if (this._pathData.a.v) {\n currentLength = letters[0].an * 0.5 + (totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind / (len - 1);\n currentLength += this._pathData.f.v;\n }\n\n while (flag) {\n if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {\n perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;\n xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;\n yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -(alignment[1] * yOff) * 0.01);\n flag = false;\n } else if (points) {\n segmentLength += currentPoint.partialLength;\n pointInd += 1;\n\n if (pointInd >= points.length) {\n pointInd = 0;\n segmentInd += 1;\n\n if (!segments[segmentInd]) {\n if (mask.v.c) {\n pointInd = 0;\n segmentInd = 0;\n points = segments[segmentInd].points;\n } else {\n segmentLength -= currentPoint.partialLength;\n points = null;\n }\n } else {\n points = segments[segmentInd].points;\n }\n }\n\n if (points) {\n prevPoint = currentPoint;\n currentPoint = points[pointInd];\n partialLength = currentPoint.partialLength;\n }\n }\n }\n\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0);\n } else {\n offf = letters[i].an / 2 - letters[i].add;\n matrixHelper.translate(-offf, 0, 0); // Grouping alignment\n\n matrixHelper.translate(-alignment[0] * letters[i].an * 0.005, -alignment[1] * yOff * 0.01, 0);\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.t.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean \"isNewLine\"\n\n if (xPos !== 0 || documentData.j !== 0) {\n if (this._hasMaskedPath) {\n if (mult.length) {\n currentLength += animatorProps.t.v * mult[0];\n } else {\n currentLength += animatorProps.t.v * mult;\n }\n } else if (mult.length) {\n xPos += animatorProps.t.v * mult[0];\n } else {\n xPos += animatorProps.t.v * mult;\n }\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n sw = documentData.sw || 0;\n }\n\n if (documentData.strokeColorAnim) {\n if (documentData.sc) {\n sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];\n } else {\n sc = [0, 0, 0];\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.a.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]);\n } else {\n matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.s.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (mult.length) {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult[0], 1 + (animatorProps.s.v[1] - 1) * mult[1], 1);\n } else {\n matrixHelper.scale(1 + (animatorProps.s.v[0] - 1) * mult, 1 + (animatorProps.s.v[1] - 1) * mult, 1);\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (animatorProps.sk.propType) {\n if (mult.length) {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);\n } else {\n matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);\n }\n }\n\n if (animatorProps.r.propType) {\n if (mult.length) {\n matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);\n } else {\n matrixHelper.rotateZ(-animatorProps.r.v * mult);\n }\n }\n\n if (animatorProps.ry.propType) {\n if (mult.length) {\n matrixHelper.rotateY(animatorProps.ry.v * mult[1]);\n } else {\n matrixHelper.rotateY(animatorProps.ry.v * mult);\n }\n }\n\n if (animatorProps.rx.propType) {\n if (mult.length) {\n matrixHelper.rotateX(animatorProps.rx.v * mult[0]);\n } else {\n matrixHelper.rotateX(animatorProps.rx.v * mult);\n }\n }\n\n if (animatorProps.o.propType) {\n if (mult.length) {\n elemOpacity += (animatorProps.o.v * mult[0] - elemOpacity) * mult[0];\n } else {\n elemOpacity += (animatorProps.o.v * mult - elemOpacity) * mult;\n }\n }\n\n if (documentData.strokeWidthAnim && animatorProps.sw.propType) {\n if (mult.length) {\n sw += animatorProps.sw.v * mult[0];\n } else {\n sw += animatorProps.sw.v * mult;\n }\n }\n\n if (documentData.strokeColorAnim && animatorProps.sc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0];\n } else {\n sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult;\n }\n }\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n if (animatorProps.fc.propType) {\n for (k = 0; k < 3; k += 1) {\n if (mult.length) {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0];\n } else {\n fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult;\n }\n }\n }\n\n if (animatorProps.fh.propType) {\n if (mult.length) {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]);\n } else {\n fc = addHueToRGB(fc, animatorProps.fh.v * mult);\n }\n }\n\n if (animatorProps.fs.propType) {\n if (mult.length) {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]);\n } else {\n fc = addSaturationToRGB(fc, animatorProps.fs.v * mult);\n }\n }\n\n if (animatorProps.fb.propType) {\n if (mult.length) {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]);\n } else {\n fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult);\n }\n }\n }\n }\n\n for (j = 0; j < jLen; j += 1) {\n animatorProps = animators[j].a;\n\n if (animatorProps.p.propType) {\n animatorSelector = animators[j].s;\n mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);\n\n if (this._hasMaskedPath) {\n if (mult.length) {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);\n } else {\n matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n } else if (mult.length) {\n matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);\n } else {\n matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);\n }\n }\n }\n\n if (documentData.strokeWidthAnim) {\n letterSw = sw < 0 ? 0 : sw;\n }\n\n if (documentData.strokeColorAnim) {\n letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')';\n }\n\n if (documentData.fillColorAnim && documentData.fc) {\n letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')';\n }\n\n if (this._hasMaskedPath) {\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(0, alignment[1] * yOff * 0.01 + yPos, 0);\n\n if (this._pathData.p.v) {\n tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);\n var rot = Math.atan(tanAngle) * 180 / Math.PI;\n\n if (currentPoint.point[0] < prevPoint.point[0]) {\n rot += 180;\n }\n\n matrixHelper.rotate(-rot * Math.PI / 180);\n }\n\n matrixHelper.translate(xPathPos, yPathPos, 0);\n currentLength -= alignment[0] * letters[i].an * 0.005;\n\n if (letters[i + 1] && ind !== letters[i + 1].ind) {\n currentLength += letters[i].an / 2;\n currentLength += documentData.tr * 0.001 * documentData.finalSize;\n }\n } else {\n matrixHelper.translate(xPos, yPos, 0);\n\n if (documentData.ps) {\n // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(0, -documentData.ls);\n matrixHelper.translate(offf, 0, 0);\n matrixHelper.translate(alignment[0] * letters[i].an * 0.005, alignment[1] * yOff * 0.01, 0);\n xPos += letters[i].l + documentData.tr * 0.001 * documentData.finalSize;\n }\n\n if (renderType === 'html') {\n letterM = matrixHelper.toCSS();\n } else if (renderType === 'svg') {\n letterM = matrixHelper.to2dCSS();\n } else {\n letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]];\n }\n\n letterO = elemOpacity;\n }\n\n if (renderedLettersCount <= i) {\n letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP);\n this.renderedLetters.push(letterValue);\n renderedLettersCount += 1;\n this.lettersChangedFlag = true;\n } else {\n letterValue = this.renderedLetters[i];\n this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;\n }\n }\n };\n\n TextAnimatorProperty.prototype.getValue = function () {\n if (this._elem.globalData.frameId === this._frameId) {\n return;\n }\n\n this._frameId = this._elem.globalData.frameId;\n this.iterateDynamicProperties();\n };\n\n TextAnimatorProperty.prototype.mHelper = new Matrix();\n TextAnimatorProperty.prototype.defaultPropsArray = [];\n extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);\n\n function ITextElement() {}\n\n ITextElement.prototype.initElement = function (data, globalData, comp) {\n this.lettersChangedFlag = true;\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);\n this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n this.initRenderable();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n this.createContent();\n this.hide();\n this.textAnimator.searchProperties(this.dynamicProperties);\n };\n\n ITextElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n\n if (this.textProperty._mdf || this.textProperty._isFirstFrame) {\n this.buildNewText();\n this.textProperty._isFirstFrame = false;\n this.textProperty._mdf = false;\n }\n };\n\n ITextElement.prototype.createPathShape = function (matrixHelper, shapes) {\n var j;\n var jLen = shapes.length;\n var pathNodes;\n var shapeStr = '';\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n pathNodes = shapes[j].ks.k;\n shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);\n }\n }\n\n return shapeStr;\n };\n\n ITextElement.prototype.updateDocumentData = function (newData, index) {\n this.textProperty.updateDocumentData(newData, index);\n };\n\n ITextElement.prototype.canResizeFont = function (_canResize) {\n this.textProperty.canResizeFont(_canResize);\n };\n\n ITextElement.prototype.setMinimumFontSize = function (_fontSize) {\n this.textProperty.setMinimumFontSize(_fontSize);\n };\n\n ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) {\n if (documentData.ps) {\n matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0);\n }\n\n matrixHelper.translate(0, -documentData.ls, 0);\n\n switch (documentData.j) {\n case 1:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0);\n break;\n\n case 2:\n matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0);\n break;\n\n default:\n break;\n }\n\n matrixHelper.translate(xPos, yPos, 0);\n };\n\n ITextElement.prototype.buildColor = function (colorData) {\n return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')';\n };\n\n ITextElement.prototype.emptyProp = new LetterProps();\n\n ITextElement.prototype.destroy = function () {};\n\n var emptyShapeData = {\n shapes: []\n };\n\n function SVGTextLottieElement(data, globalData, comp) {\n this.textSpans = [];\n this.renderType = 'svg';\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement);\n\n SVGTextLottieElement.prototype.createContent = function () {\n if (this.data.singleShape && !this.globalData.fontManager.chars) {\n this.textContainer = createNS('text');\n }\n };\n\n SVGTextLottieElement.prototype.buildTextContents = function (textArray) {\n var i = 0;\n var len = textArray.length;\n var textContents = [];\n var currentTextContent = '';\n\n while (i < len) {\n if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {\n textContents.push(currentTextContent);\n currentTextContent = '';\n } else {\n currentTextContent += textArray[i];\n }\n\n i += 1;\n }\n\n textContents.push(currentTextContent);\n return textContents;\n };\n\n SVGTextLottieElement.prototype.buildShapeData = function (data, scale) {\n // data should probably be cloned to apply scale separately to each instance of a text on different layers\n // but since text internal content gets only rendered once and then it's never rerendered,\n // it's probably safe not to clone data and reuse always the same instance even if the object is mutated.\n // Avoiding cloning is preferred since cloning each character shape data is expensive\n if (data.shapes && data.shapes.length) {\n var shape = data.shapes[0];\n\n if (shape.it) {\n var shapeItem = shape.it[shape.it.length - 1];\n\n if (shapeItem.s) {\n shapeItem.s.k[0] = scale;\n shapeItem.s.k[1] = scale;\n }\n }\n }\n\n return data;\n };\n\n SVGTextLottieElement.prototype.buildNewText = function () {\n this.addDynamicProperty(this);\n var i;\n var len;\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);\n\n if (documentData.fc) {\n this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));\n } else {\n this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');\n }\n\n if (documentData.sc) {\n this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));\n this.layerElement.setAttribute('stroke-width', documentData.sw);\n }\n\n this.layerElement.setAttribute('font-size', documentData.finalSize);\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (fontData.fClass) {\n this.layerElement.setAttribute('class', fontData.fClass);\n } else {\n this.layerElement.setAttribute('font-family', fontData.fFamily);\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n this.layerElement.setAttribute('font-style', fStyle);\n this.layerElement.setAttribute('font-weight', fWeight);\n }\n\n this.layerElement.setAttribute('aria-label', documentData.t);\n var letters = documentData.l || [];\n var usesGlyphs = !!this.globalData.fontManager.chars;\n len = letters.length;\n var tSpan;\n var matrixHelper = this.mHelper;\n var shapeStr = '';\n var singleShape = this.data.singleShape;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n\n if (singleShape && !usesGlyphs && !documentData.sz) {\n var tElement = this.textContainer;\n var justify = 'start';\n\n switch (documentData.j) {\n case 1:\n justify = 'end';\n break;\n\n case 2:\n justify = 'middle';\n break;\n\n default:\n justify = 'start';\n break;\n }\n\n tElement.setAttribute('text-anchor', justify);\n tElement.setAttribute('letter-spacing', trackingOffset);\n var textContent = this.buildTextContents(documentData.finalText);\n len = textContent.length;\n yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;\n\n for (i = 0; i < len; i += 1) {\n tSpan = this.textSpans[i].span || createNS('tspan');\n tSpan.textContent = textContent[i];\n tSpan.setAttribute('x', 0);\n tSpan.setAttribute('y', yPos);\n tSpan.style.display = 'inherit';\n tElement.appendChild(tSpan);\n\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n glyph: null\n };\n }\n\n this.textSpans[i].span = tSpan;\n yPos += documentData.finalLineHeight;\n }\n\n this.layerElement.appendChild(tElement);\n } else {\n var cachedSpansLength = this.textSpans.length;\n var charData;\n\n for (i = 0; i < len; i += 1) {\n if (!this.textSpans[i]) {\n this.textSpans[i] = {\n span: null,\n childSpan: null,\n glyph: null\n };\n }\n\n if (!usesGlyphs || !singleShape || i === 0) {\n tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text');\n\n if (cachedSpansLength <= i) {\n tSpan.setAttribute('stroke-linecap', 'butt');\n tSpan.setAttribute('stroke-linejoin', 'round');\n tSpan.setAttribute('stroke-miterlimit', '4');\n this.textSpans[i].span = tSpan;\n\n if (usesGlyphs) {\n var childSpan = createNS('g');\n tSpan.appendChild(childSpan);\n this.textSpans[i].childSpan = childSpan;\n }\n\n this.textSpans[i].span = tSpan;\n this.layerElement.appendChild(tSpan);\n }\n\n tSpan.style.display = 'inherit';\n }\n\n matrixHelper.reset();\n\n if (singleShape) {\n if (letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n xPos += letters[i].l || 0; // xPos += letters[i].val === ' ' ? 0 : trackingOffset;\n\n xPos += trackingOffset;\n }\n\n if (usesGlyphs) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var glyphElement; // t === 1 means the character has been replaced with an animated shaped\n\n if (charData.t === 1) {\n glyphElement = new SVGCompElement(charData.data, this.globalData, this);\n } else {\n var data = emptyShapeData;\n\n if (charData.data && charData.data.shapes) {\n data = this.buildShapeData(charData.data, documentData.finalSize);\n }\n\n glyphElement = new SVGShapeElement(data, this.globalData, this);\n }\n\n if (this.textSpans[i].glyph) {\n var glyph = this.textSpans[i].glyph;\n this.textSpans[i].childSpan.removeChild(glyph.layerElement);\n glyph.destroy();\n }\n\n this.textSpans[i].glyph = glyphElement;\n glyphElement._debug = true;\n glyphElement.prepareFrame(0);\n glyphElement.renderFrame();\n this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); // when using animated shapes, the layer will be scaled instead of replacing the internal scale\n // this might have issues with strokes and might need a different solution\n\n if (charData.t === 1) {\n this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')');\n }\n } else {\n if (singleShape) {\n tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')');\n }\n\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n } //\n\n }\n\n if (singleShape && tSpan) {\n tSpan.setAttribute('d', shapeStr);\n }\n }\n\n while (i < this.textSpans.length) {\n this.textSpans[i].span.style.display = 'none';\n i += 1;\n }\n\n this._sizeChanged = true;\n };\n\n SVGTextLottieElement.prototype.sourceRectAtTime = function () {\n this.prepareFrame(this.comp.renderedFrame - this.data.st);\n this.renderInnerContent();\n\n if (this._sizeChanged) {\n this._sizeChanged = false;\n var textBox = this.layerElement.getBBox();\n this.bbox = {\n top: textBox.y,\n left: textBox.x,\n width: textBox.width,\n height: textBox.height\n };\n }\n\n return this.bbox;\n };\n\n SVGTextLottieElement.prototype.getValue = function () {\n var i;\n var len = this.textSpans.length;\n var glyphElement;\n this.renderedFrame = this.comp.renderedFrame;\n\n for (i = 0; i < len; i += 1) {\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st);\n\n if (glyphElement._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n SVGTextLottieElement.prototype.renderInnerContent = function () {\n if (!this.data.singleShape || this._mdf) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) {\n this._sizeChanged = true;\n var i;\n var len;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var glyphElement;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n textSpan = this.textSpans[i].span;\n glyphElement = this.textSpans[i].glyph;\n\n if (glyphElement) {\n glyphElement.renderFrame();\n }\n\n if (renderedLetter._mdf.m) {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n\n if (renderedLetter._mdf.o) {\n textSpan.setAttribute('opacity', renderedLetter.o);\n }\n\n if (renderedLetter._mdf.sw) {\n textSpan.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter._mdf.sc) {\n textSpan.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter._mdf.fc) {\n textSpan.setAttribute('fill', renderedLetter.fc);\n }\n }\n }\n }\n }\n };\n\n function ISolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([IImageElement], ISolidElement);\n\n ISolidElement.prototype.createContent = function () {\n var rect = createNS('rect'); /// /rect.style.width = this.data.sw;\n /// /rect.style.height = this.data.sh;\n /// /rect.style.fill = this.data.sc;\n\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.layerElement.appendChild(rect);\n };\n\n function NullElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initFrame();\n this.initTransform(data, globalData, comp);\n this.initHierarchy();\n }\n\n NullElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n NullElement.prototype.renderFrame = function () {};\n\n NullElement.prototype.getBaseElement = function () {\n return null;\n };\n\n NullElement.prototype.destroy = function () {};\n\n NullElement.prototype.sourceRectAtTime = function () {};\n\n NullElement.prototype.hide = function () {};\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);\n\n function SVGRendererBase() {}\n\n extendPrototype([BaseRenderer], SVGRendererBase);\n\n SVGRendererBase.prototype.createNull = function (data) {\n return new NullElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createShape = function (data) {\n return new SVGShapeElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createText = function (data) {\n return new SVGTextLottieElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createImage = function (data) {\n return new IImageElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.createSolid = function (data) {\n return new ISolidElement(data, this.globalData, this);\n };\n\n SVGRendererBase.prototype.configAnimation = function (animData) {\n this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n if (this.renderConfig.viewBoxSize) {\n this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize);\n } else {\n this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h);\n }\n\n if (!this.renderConfig.viewBoxOnly) {\n this.svgElement.setAttribute('width', animData.w);\n this.svgElement.setAttribute('height', animData.h);\n this.svgElement.style.width = '100%';\n this.svgElement.style.height = '100%';\n this.svgElement.style.transform = 'translate3d(0,0,0)';\n this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility;\n }\n\n if (this.renderConfig.width) {\n this.svgElement.setAttribute('width', this.renderConfig.width);\n }\n\n if (this.renderConfig.height) {\n this.svgElement.setAttribute('height', this.renderConfig.height);\n }\n\n if (this.renderConfig.className) {\n this.svgElement.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.svgElement.setAttribute('id', this.renderConfig.id);\n }\n\n if (this.renderConfig.focusable !== undefined) {\n this.svgElement.setAttribute('focusable', this.renderConfig.focusable);\n }\n\n this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); // this.layerElement.style.transform = 'translate3d(0,0,0)';\n // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = \"0px 0px 0px\";\n\n this.animationItem.wrapper.appendChild(this.svgElement); // Mask animation\n\n var defs = this.globalData.defs;\n this.setupGlobalData(animData, defs);\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.data = animData;\n var maskElement = createNS('clipPath');\n var rect = createNS('rect');\n rect.setAttribute('width', animData.w);\n rect.setAttribute('height', animData.h);\n rect.setAttribute('x', 0);\n rect.setAttribute('y', 0);\n var maskId = createElementID();\n maskElement.setAttribute('id', maskId);\n maskElement.appendChild(rect);\n this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')');\n defs.appendChild(maskElement);\n this.layers = animData.layers;\n this.elements = createSizedArray(animData.layers.length);\n };\n\n SVGRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.layerElement = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n SVGRendererBase.prototype.updateContainerSize = function () {};\n\n SVGRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n elements[pos] = true;\n var element = this.createItem(this.layers[pos]);\n elements[pos] = element;\n\n if (getExpressionsPlugin()) {\n if (this.layers[pos].ty === 0) {\n this.globalData.projectInterface.registerComposition(element);\n }\n\n element.initExpressions();\n }\n\n this.appendElementInPos(element, pos);\n\n if (this.layers[pos].tt) {\n if (!this.elements[pos - 1] || this.elements[pos - 1] === true) {\n this.buildItem(pos - 1);\n this.addPendingElement(element);\n } else {\n element.setMatte(elements[pos - 1].layerId);\n }\n }\n };\n\n SVGRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n\n if (element.data.tt) {\n var i = 0;\n var len = this.elements.length;\n\n while (i < len) {\n if (this.elements[i] === element) {\n element.setMatte(this.elements[i - 1].layerId);\n break;\n }\n\n i += 1;\n }\n }\n }\n };\n\n SVGRendererBase.prototype.renderFrame = function (num) {\n if (this.renderedFrame === num || this.destroyed) {\n return;\n }\n\n if (num === null) {\n num = this.renderedFrame;\n } else {\n this.renderedFrame = num;\n } // console.log('-------');\n // console.log('FRAME ',num);\n\n\n this.globalData.frameNum = num;\n this.globalData.frameId += 1;\n this.globalData.projectInterface.currentFrame = num;\n this.globalData._mdf = false;\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n }\n };\n\n SVGRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newElement = element.getBaseElement();\n\n if (!newElement) {\n return;\n }\n\n var i = 0;\n var nextElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) {\n nextElement = this.elements[i].getBaseElement();\n }\n\n i += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(newElement, nextElement);\n } else {\n this.layerElement.appendChild(newElement);\n }\n };\n\n SVGRendererBase.prototype.hide = function () {\n this.layerElement.style.display = 'none';\n };\n\n SVGRendererBase.prototype.show = function () {\n this.layerElement.style.display = 'block';\n };\n\n function ICompElement() {}\n\n extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);\n\n ICompElement.prototype.initElement = function (data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initTransform(data, globalData, comp);\n this.initRenderable();\n this.initHierarchy();\n this.initRendererElement();\n this.createContainerElements();\n this.createRenderableComponents();\n\n if (this.data.xt || !globalData.progressiveLoad) {\n this.buildAllItems();\n }\n\n this.hide();\n };\n /* ICompElement.prototype.hide = function(){\r\n if(!this.hidden){\r\n this.hideElement();\r\n var i,len = this.elements.length;\r\n for( i = 0; i < len; i+=1 ){\r\n if(this.elements[i]){\r\n this.elements[i].hide();\r\n }\r\n }\r\n }\r\n }; */\n\n\n ICompElement.prototype.prepareFrame = function (num) {\n this._mdf = false;\n this.prepareRenderableFrame(num);\n this.prepareProperties(num, this.isInRange);\n\n if (!this.isInRange && !this.data.xt) {\n return;\n }\n\n if (!this.tm._placeholder) {\n var timeRemapped = this.tm.v;\n\n if (timeRemapped === this.data.op) {\n timeRemapped = this.data.op - 1;\n }\n\n this.renderedFrame = timeRemapped;\n } else {\n this.renderedFrame = num / this.data.sr;\n }\n\n var i;\n var len = this.elements.length;\n\n if (!this.completeLayers) {\n this.checkLayers(this.renderedFrame);\n } // This iteration needs to be backwards because of how expressions connect between each other\n\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);\n\n if (this.elements[i]._mdf) {\n this._mdf = true;\n }\n }\n }\n };\n\n ICompElement.prototype.renderInnerContent = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n ICompElement.prototype.setElements = function (elems) {\n this.elements = elems;\n };\n\n ICompElement.prototype.getElements = function () {\n return this.elements;\n };\n\n ICompElement.prototype.destroyElements = function () {\n var i;\n var len = this.layers.length;\n\n for (i = 0; i < len; i += 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n };\n\n ICompElement.prototype.destroy = function () {\n this.destroyElements();\n this.destroyBaseElement();\n };\n\n function SVGCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = true;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement);\n\n SVGCompElement.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function SVGRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.svgElement = createNS('svg');\n var ariaLabel = '';\n\n if (config && config.title) {\n var titleElement = createNS('title');\n var titleId = createElementID();\n titleElement.setAttribute('id', titleId);\n titleElement.textContent = config.title;\n this.svgElement.appendChild(titleElement);\n ariaLabel += titleId;\n }\n\n if (config && config.description) {\n var descElement = createNS('desc');\n var descId = createElementID();\n descElement.setAttribute('id', descId);\n descElement.textContent = config.description;\n this.svgElement.appendChild(descElement);\n ariaLabel += ' ' + descId;\n }\n\n if (ariaLabel) {\n this.svgElement.setAttribute('aria-labelledby', ariaLabel);\n }\n\n var defs = createNS('defs');\n this.svgElement.appendChild(defs);\n var maskElement = createNS('g');\n this.svgElement.appendChild(maskElement);\n this.layerElement = maskElement;\n this.renderConfig = {\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n progressiveLoad: config && config.progressiveLoad || false,\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n viewBoxOnly: config && config.viewBoxOnly || false,\n viewBoxSize: config && config.viewBoxSize || false,\n className: config && config.className || '',\n id: config && config.id || '',\n focusable: config && config.focusable,\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '100%',\n height: config && config.filterSize && config.filterSize.height || '100%',\n x: config && config.filterSize && config.filterSize.x || '0%',\n y: config && config.filterSize && config.filterSize.y || '0%'\n },\n width: config && config.width,\n height: config && config.height\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n defs: defs,\n renderConfig: this.renderConfig\n };\n this.elements = [];\n this.pendingElements = [];\n this.destroyed = false;\n this.rendererType = 'svg';\n }\n\n extendPrototype([SVGRendererBase], SVGRenderer);\n\n SVGRenderer.prototype.createComp = function (data) {\n return new SVGCompElement(data, this.globalData, this);\n };\n\n function CVContextData() {\n this.saved = [];\n this.cArrPos = 0;\n this.cTr = new Matrix();\n this.cO = 1;\n var i;\n var len = 15;\n this.savedOp = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n this.saved[i] = createTypedArray('float32', 16);\n }\n\n this._length = len;\n }\n\n CVContextData.prototype.duplicate = function () {\n var newLength = this._length * 2;\n var currentSavedOp = this.savedOp;\n this.savedOp = createTypedArray('float32', newLength);\n this.savedOp.set(currentSavedOp);\n var i = 0;\n\n for (i = this._length; i < newLength; i += 1) {\n this.saved[i] = createTypedArray('float32', 16);\n }\n\n this._length = newLength;\n };\n\n CVContextData.prototype.reset = function () {\n this.cArrPos = 0;\n this.cTr.reset();\n this.cO = 1;\n };\n\n function ShapeTransformManager() {\n this.sequences = {};\n this.sequenceList = [];\n this.transform_key_count = 0;\n }\n\n ShapeTransformManager.prototype = {\n addTransformSequence: function addTransformSequence(transforms) {\n var i;\n var len = transforms.length;\n var key = '_';\n\n for (i = 0; i < len; i += 1) {\n key += transforms[i].transform.key + '_';\n }\n\n var sequence = this.sequences[key];\n\n if (!sequence) {\n sequence = {\n transforms: [].concat(transforms),\n finalTransform: new Matrix(),\n _mdf: false\n };\n this.sequences[key] = sequence;\n this.sequenceList.push(sequence);\n }\n\n return sequence;\n },\n processSequence: function processSequence(sequence, isFirstFrame) {\n var i = 0;\n var len = sequence.transforms.length;\n var _mdf = isFirstFrame;\n\n while (i < len && !isFirstFrame) {\n if (sequence.transforms[i].transform.mProps._mdf) {\n _mdf = true;\n break;\n }\n\n i += 1;\n }\n\n if (_mdf) {\n var props;\n sequence.finalTransform.reset();\n\n for (i = len - 1; i >= 0; i -= 1) {\n props = sequence.transforms[i].transform.mProps.v.props;\n sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]);\n }\n }\n\n sequence._mdf = _mdf;\n },\n processSequences: function processSequences(isFirstFrame) {\n var i;\n var len = this.sequenceList.length;\n\n for (i = 0; i < len; i += 1) {\n this.processSequence(this.sequenceList[i], isFirstFrame);\n }\n },\n getNewKey: function getNewKey() {\n this.transform_key_count += 1;\n return '_' + this.transform_key_count;\n }\n };\n\n function CVEffects() {}\n\n CVEffects.prototype.renderFrame = function () {};\n\n function CVMaskElement(data, element) {\n this.data = data;\n this.element = element;\n this.masksProperties = this.data.masksProperties || [];\n this.viewData = createSizedArray(this.masksProperties.length);\n var i;\n var len = this.masksProperties.length;\n var hasMasks = false;\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n hasMasks = true;\n }\n\n this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3);\n }\n\n this.hasMasks = hasMasks;\n\n if (hasMasks) {\n this.element.addRenderableComponent(this);\n }\n }\n\n CVMaskElement.prototype.renderFrame = function () {\n if (!this.hasMasks) {\n return;\n }\n\n var transform = this.element.finalTransform.mat;\n var ctx = this.element.canvasContext;\n var i;\n var len = this.masksProperties.length;\n var pt;\n var pts;\n var data;\n ctx.beginPath();\n\n for (i = 0; i < len; i += 1) {\n if (this.masksProperties[i].mode !== 'n') {\n if (this.masksProperties[i].inv) {\n ctx.moveTo(0, 0);\n ctx.lineTo(this.element.globalData.compSize.w, 0);\n ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);\n ctx.lineTo(0, this.element.globalData.compSize.h);\n ctx.lineTo(0, 0);\n }\n\n data = this.viewData[i].v;\n pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0);\n ctx.moveTo(pt[0], pt[1]);\n var j;\n var jLen = data._length;\n\n for (j = 1; j < jLen; j += 1) {\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n\n pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);\n ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);\n }\n }\n\n this.element.globalData.renderer.save(true);\n ctx.clip();\n };\n\n CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;\n\n CVMaskElement.prototype.destroy = function () {\n this.element = null;\n };\n\n function CVBaseElement() {}\n\n CVBaseElement.prototype = {\n createElements: function createElements() {},\n initRendererElement: function initRendererElement() {},\n createContainerElements: function createContainerElements() {\n this.canvasContext = this.globalData.canvasContext;\n this.renderableEffectsManager = new CVEffects(this);\n },\n createContent: function createContent() {},\n setBlendMode: function setBlendMode() {\n var globalData = this.globalData;\n\n if (globalData.blendMode !== this.data.bm) {\n globalData.blendMode = this.data.bm;\n var blendModeValue = getBlendMode(this.data.bm);\n globalData.canvasContext.globalCompositeOperation = blendModeValue;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new CVMaskElement(this.data, this);\n },\n hideElement: function hideElement() {\n if (!this.hidden && (!this.isInRange || this.isTransparent)) {\n this.hidden = true;\n }\n },\n showElement: function showElement() {\n if (this.isInRange && !this.isTransparent) {\n this.hidden = false;\n this._isFirstFrame = true;\n this.maskManager._isFirstFrame = true;\n }\n },\n renderFrame: function renderFrame() {\n if (this.hidden || this.data.hd) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.setBlendMode();\n var forceRealStack = this.data.ty === 0;\n this.globalData.renderer.save(forceRealStack);\n this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);\n this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);\n this.renderInnerContent();\n this.globalData.renderer.restore(forceRealStack);\n\n if (this.maskManager.hasMasks) {\n this.globalData.renderer.restore(true);\n }\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.canvasContext = null;\n this.data = null;\n this.globalData = null;\n this.maskManager.destroy();\n },\n mHelper: new Matrix()\n };\n CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;\n CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;\n\n function CVShapeData(element, data, styles, transformsManager) {\n this.styledShapes = [];\n this.tr = [0, 0, 0, 0, 0, 0];\n var ty = 4;\n\n if (data.ty === 'rc') {\n ty = 5;\n } else if (data.ty === 'el') {\n ty = 6;\n } else if (data.ty === 'sr') {\n ty = 7;\n }\n\n this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element);\n var i;\n var len = styles.length;\n var styledShape;\n\n for (i = 0; i < len; i += 1) {\n if (!styles[i].closed) {\n styledShape = {\n transforms: transformsManager.addTransformSequence(styles[i].transforms),\n trNodes: []\n };\n this.styledShapes.push(styledShape);\n styles[i].elements.push(styledShape);\n }\n }\n }\n\n CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;\n\n function CVShapeElement(data, globalData, comp) {\n this.shapes = [];\n this.shapesData = data.shapes;\n this.stylesList = [];\n this.itemsData = [];\n this.prevViewData = [];\n this.shapeModifiers = [];\n this.processedElements = [];\n this.transformsManager = new ShapeTransformManager();\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement);\n CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;\n CVShapeElement.prototype.transformHelper = {\n opacity: 1,\n _opMdf: false\n };\n CVShapeElement.prototype.dashResetter = [];\n\n CVShapeElement.prototype.createContent = function () {\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n };\n\n CVShapeElement.prototype.createStyleElement = function (data, transforms) {\n var styleElem = {\n data: data,\n type: data.ty,\n preTransforms: this.transformsManager.addTransformSequence(transforms),\n transforms: [],\n elements: [],\n closed: data.hd === true\n };\n var elementData = {};\n\n if (data.ty === 'fl' || data.ty === 'st') {\n elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this);\n\n if (!elementData.c.k) {\n styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')';\n }\n } else if (data.ty === 'gf' || data.ty === 'gs') {\n elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this);\n elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this);\n elementData.h = PropertyFactory.getProp(this, data.h || {\n k: 0\n }, 0, 0.01, this);\n elementData.a = PropertyFactory.getProp(this, data.a || {\n k: 0\n }, 0, degToRads, this);\n elementData.g = new GradientProperty(this, data.g, this);\n }\n\n elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this);\n\n if (data.ty === 'st' || data.ty === 'gs') {\n styleElem.lc = lineCapEnum[data.lc || 2];\n styleElem.lj = lineJoinEnum[data.lj || 2];\n\n if (data.lj == 1) {\n // eslint-disable-line eqeqeq\n styleElem.ml = data.ml;\n }\n\n elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this);\n\n if (!elementData.w.k) {\n styleElem.wi = elementData.w.v;\n }\n\n if (data.d) {\n var d = new DashProperty(this, data.d, 'canvas', this);\n elementData.d = d;\n\n if (!elementData.d.k) {\n styleElem.da = elementData.d.dashArray;\n styleElem[\"do\"] = elementData.d.dashoffset[0];\n }\n }\n } else {\n styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';\n }\n\n this.stylesList.push(styleElem);\n elementData.style = styleElem;\n return elementData;\n };\n\n CVShapeElement.prototype.createGroupElement = function () {\n var elementData = {\n it: [],\n prevViewData: []\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createTransformElement = function (data) {\n var elementData = {\n transform: {\n opacity: 1,\n _opMdf: false,\n key: this.transformsManager.getNewKey(),\n op: PropertyFactory.getProp(this, data.o, 0, 0.01, this),\n mProps: TransformPropertyFactory.getTransformProperty(this, data, this)\n }\n };\n return elementData;\n };\n\n CVShapeElement.prototype.createShapeElement = function (data) {\n var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);\n this.shapes.push(elementData);\n this.addShapeToModifiers(elementData);\n return elementData;\n };\n\n CVShapeElement.prototype.reloadShapes = function () {\n this._isFirstFrame = true;\n var i;\n var len = this.itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n this.prevViewData[i] = this.itemsData[i];\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []);\n len = this.dynamicProperties.length;\n\n for (i = 0; i < len; i += 1) {\n this.dynamicProperties[i].getValue();\n }\n\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n };\n\n CVShapeElement.prototype.addTransformToStyleList = function (transform) {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.push(transform);\n }\n }\n };\n\n CVShapeElement.prototype.removeTransformFromStyleList = function () {\n var i;\n var len = this.stylesList.length;\n\n for (i = 0; i < len; i += 1) {\n if (!this.stylesList[i].closed) {\n this.stylesList[i].transforms.pop();\n }\n }\n };\n\n CVShapeElement.prototype.closeStyles = function (styles) {\n var i;\n var len = styles.length;\n\n for (i = 0; i < len; i += 1) {\n styles[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) {\n var i;\n var len = arr.length - 1;\n var j;\n var jLen;\n var ownStyles = [];\n var ownModifiers = [];\n var processedPos;\n var modifier;\n var currentTransform;\n var ownTransforms = [].concat(transforms);\n\n for (i = len; i >= 0; i -= 1) {\n processedPos = this.searchProcessedElement(arr[i]);\n\n if (!processedPos) {\n arr[i]._shouldRender = shouldRender;\n } else {\n itemsData[i] = prevViewData[processedPos - 1];\n }\n\n if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') {\n if (!processedPos) {\n itemsData[i] = this.createStyleElement(arr[i], ownTransforms);\n } else {\n itemsData[i].style.closed = false;\n }\n\n ownStyles.push(itemsData[i].style);\n } else if (arr[i].ty === 'gr') {\n if (!processedPos) {\n itemsData[i] = this.createGroupElement(arr[i]);\n } else {\n jLen = itemsData[i].it.length;\n\n for (j = 0; j < jLen; j += 1) {\n itemsData[i].prevViewData[j] = itemsData[i].it[j];\n }\n }\n\n this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms);\n } else if (arr[i].ty === 'tr') {\n if (!processedPos) {\n currentTransform = this.createTransformElement(arr[i]);\n itemsData[i] = currentTransform;\n }\n\n ownTransforms.push(itemsData[i]);\n this.addTransformToStyleList(itemsData[i]);\n } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') {\n if (!processedPos) {\n itemsData[i] = this.createShapeElement(arr[i]);\n }\n } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n modifier.init(this, arr[i]);\n itemsData[i] = modifier;\n this.shapeModifiers.push(modifier);\n } else {\n modifier = itemsData[i];\n modifier.closed = false;\n }\n\n ownModifiers.push(modifier);\n } else if (arr[i].ty === 'rp') {\n if (!processedPos) {\n modifier = ShapeModifiers.getModifier(arr[i].ty);\n itemsData[i] = modifier;\n modifier.init(this, arr, i, itemsData);\n this.shapeModifiers.push(modifier);\n shouldRender = false;\n } else {\n modifier = itemsData[i];\n modifier.closed = true;\n }\n\n ownModifiers.push(modifier);\n }\n\n this.addProcessedElement(arr[i], i + 1);\n }\n\n this.removeTransformFromStyleList();\n this.closeStyles(ownStyles);\n len = ownModifiers.length;\n\n for (i = 0; i < len; i += 1) {\n ownModifiers[i].closed = true;\n }\n };\n\n CVShapeElement.prototype.renderInnerContent = function () {\n this.transformHelper.opacity = 1;\n this.transformHelper._opMdf = false;\n this.renderModifiers();\n this.transformsManager.processSequences(this._isFirstFrame);\n this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true);\n };\n\n CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) {\n if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {\n groupTransform.opacity = parentTransform.opacity;\n groupTransform.opacity *= groupTransform.op.v;\n groupTransform._opMdf = true;\n }\n };\n\n CVShapeElement.prototype.drawLayer = function () {\n var i;\n var len = this.stylesList.length;\n var j;\n var jLen;\n var k;\n var kLen;\n var elems;\n var nodes;\n var renderer = this.globalData.renderer;\n var ctx = this.globalData.canvasContext;\n var type;\n var currentStyle;\n\n for (i = 0; i < len; i += 1) {\n currentStyle = this.stylesList[i];\n type = currentStyle.type; // Skipping style when\n // Stroke width equals 0\n // style should not be rendered (extra unused repeaters)\n // current opacity equals 0\n // global opacity equals 0\n\n if (!((type === 'st' || type === 'gs') && currentStyle.wi === 0 || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) {\n renderer.save();\n elems = currentStyle.elements;\n\n if (type === 'st' || type === 'gs') {\n ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;\n ctx.lineWidth = currentStyle.wi;\n ctx.lineCap = currentStyle.lc;\n ctx.lineJoin = currentStyle.lj;\n ctx.miterLimit = currentStyle.ml || 0;\n } else {\n ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;\n }\n\n renderer.ctxOpacity(currentStyle.coOp);\n\n if (type !== 'st' && type !== 'gs') {\n ctx.beginPath();\n }\n\n renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);\n jLen = elems.length;\n\n for (j = 0; j < jLen; j += 1) {\n if (type === 'st' || type === 'gs') {\n ctx.beginPath();\n\n if (currentStyle.da) {\n ctx.setLineDash(currentStyle.da);\n ctx.lineDashOffset = currentStyle[\"do\"];\n }\n }\n\n nodes = elems[j].trNodes;\n kLen = nodes.length;\n\n for (k = 0; k < kLen; k += 1) {\n if (nodes[k].t === 'm') {\n ctx.moveTo(nodes[k].p[0], nodes[k].p[1]);\n } else if (nodes[k].t === 'c') {\n ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]);\n } else {\n ctx.closePath();\n }\n }\n\n if (type === 'st' || type === 'gs') {\n ctx.stroke();\n\n if (currentStyle.da) {\n ctx.setLineDash(this.dashResetter);\n }\n }\n }\n\n if (type !== 'st' && type !== 'gs') {\n ctx.fill(currentStyle.r);\n }\n\n renderer.restore();\n }\n }\n };\n\n CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) {\n var i;\n var len = items.length - 1;\n var groupTransform;\n groupTransform = parentTransform;\n\n for (i = len; i >= 0; i -= 1) {\n if (items[i].ty === 'tr') {\n groupTransform = data[i].transform;\n this.renderShapeTransform(parentTransform, groupTransform);\n } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') {\n this.renderPath(items[i], data[i]);\n } else if (items[i].ty === 'fl') {\n this.renderFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'st') {\n this.renderStroke(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gf' || items[i].ty === 'gs') {\n this.renderGradientFill(items[i], data[i], groupTransform);\n } else if (items[i].ty === 'gr') {\n this.renderShape(groupTransform, items[i].it, data[i].it);\n } else if (items[i].ty === 'tm') {//\n }\n }\n\n if (isMain) {\n this.drawLayer();\n }\n };\n\n CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) {\n if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {\n var shapeNodes = styledShape.trNodes;\n var paths = shape.paths;\n var i;\n var len;\n var j;\n var jLen = paths._length;\n shapeNodes.length = 0;\n var groupTransformMat = styledShape.transforms.finalTransform;\n\n for (j = 0; j < jLen; j += 1) {\n var pathNodes = paths.shapes[j];\n\n if (pathNodes && pathNodes.v) {\n len = pathNodes._length;\n\n for (i = 1; i < len; i += 1) {\n if (i === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])\n });\n }\n\n if (len === 1) {\n shapeNodes.push({\n t: 'm',\n p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)\n });\n }\n\n if (pathNodes.c && len) {\n shapeNodes.push({\n t: 'c',\n pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])\n });\n shapeNodes.push({\n t: 'z'\n });\n }\n }\n }\n\n styledShape.trNodes = shapeNodes;\n }\n };\n\n CVShapeElement.prototype.renderPath = function (pathData, itemData) {\n if (pathData.hd !== true && pathData._shouldRender) {\n var i;\n var len = itemData.styledShapes.length;\n\n for (i = 0; i < len; i += 1) {\n this.renderStyledShape(itemData.styledShapes[i], itemData.sh);\n }\n }\n };\n\n CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n };\n\n CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var grd;\n\n if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf)) {\n var ctx = this.globalData.canvasContext;\n var pt1 = itemData.s.v;\n var pt2 = itemData.e.v;\n\n if (styleData.t === 1) {\n grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);\n } else {\n var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));\n var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);\n var percent = itemData.h.v;\n\n if (percent >= 1) {\n percent = 0.99;\n } else if (percent <= -1) {\n percent = -0.99;\n }\n\n var dist = rad * percent;\n var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];\n var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];\n grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);\n }\n\n var i;\n var len = styleData.g.p;\n var cValues = itemData.g.c;\n var opacity = 1;\n\n for (i = 0; i < len; i += 1) {\n if (itemData.g._hasOpacity && itemData.g._collapsable) {\n opacity = itemData.g.o[i * 2 + 1];\n }\n\n grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')');\n }\n\n styleElem.grd = grd;\n }\n\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n };\n\n CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) {\n var styleElem = itemData.style;\n var d = itemData.d;\n\n if (d && (d._mdf || this._isFirstFrame)) {\n styleElem.da = d.dashArray;\n styleElem[\"do\"] = d.dashoffset[0];\n }\n\n if (itemData.c._mdf || this._isFirstFrame) {\n styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')';\n }\n\n if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {\n styleElem.coOp = itemData.o.v * groupTransform.opacity;\n }\n\n if (itemData.w._mdf || this._isFirstFrame) {\n styleElem.wi = itemData.w.v;\n }\n };\n\n CVShapeElement.prototype.destroy = function () {\n this.shapesData = null;\n this.globalData = null;\n this.canvasContext = null;\n this.stylesList.length = 0;\n this.itemsData.length = 0;\n };\n\n function CVTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.yOffset = 0;\n this.fillColorAnim = false;\n this.strokeColorAnim = false;\n this.strokeWidthAnim = false;\n this.stroke = false;\n this.fill = false;\n this.justifyOffset = 0;\n this.currentRender = null;\n this.renderType = 'canvas';\n this.values = {\n fill: 'rgba(0,0,0,0)',\n stroke: 'rgba(0,0,0,0)',\n sWidth: 0,\n fValue: ''\n };\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement);\n CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');\n\n CVTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var hasFill = false;\n\n if (documentData.fc) {\n hasFill = true;\n this.values.fill = this.buildColor(documentData.fc);\n } else {\n this.values.fill = 'rgba(0,0,0,0)';\n }\n\n this.fill = hasFill;\n var hasStroke = false;\n\n if (documentData.sc) {\n hasStroke = true;\n this.values.stroke = this.buildColor(documentData.sc);\n this.values.sWidth = documentData.sw;\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n var i;\n var len;\n var letters = documentData.l;\n var matrixHelper = this.mHelper;\n this.stroke = hasStroke;\n this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily;\n len = documentData.finalText.length; // this.tHelper.font = this.values.fValue;\n\n var charData;\n var shapeData;\n var k;\n var kLen;\n var shapes;\n var j;\n var jLen;\n var pathNodes;\n var commands;\n var pathArr;\n var singleShape = this.data.singleShape;\n var trackingOffset = documentData.tr * 0.001 * documentData.finalSize;\n var xPos = 0;\n var yPos = 0;\n var firstLine = true;\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n shapeData = charData && charData.data || {};\n matrixHelper.reset();\n\n if (singleShape && letters[i].n) {\n xPos = -trackingOffset;\n yPos += documentData.yOffset;\n yPos += firstLine ? 1 : 0;\n firstLine = false;\n }\n\n shapes = shapeData.shapes ? shapeData.shapes[0].it : [];\n jLen = shapes.length;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n\n if (singleShape) {\n this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);\n }\n\n commands = createSizedArray(jLen - 1);\n var commandsCounter = 0;\n\n for (j = 0; j < jLen; j += 1) {\n if (shapes[j].ty === 'sh') {\n kLen = shapes[j].ks.k.i.length;\n pathNodes = shapes[j].ks.k;\n pathArr = [];\n\n for (k = 1; k < kLen; k += 1) {\n if (k === 1) {\n pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0));\n }\n\n pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0));\n commands[commandsCounter] = pathArr;\n commandsCounter += 1;\n }\n }\n\n if (singleShape) {\n xPos += letters[i].l;\n xPos += trackingOffset;\n }\n\n if (this.textSpans[cnt]) {\n this.textSpans[cnt].elem = commands;\n } else {\n this.textSpans[cnt] = {\n elem: commands\n };\n }\n\n cnt += 1;\n }\n };\n\n CVTextElement.prototype.renderInnerContent = function () {\n var ctx = this.canvasContext;\n ctx.font = this.values.fValue;\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 4;\n\n if (!this.data.singleShape) {\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n }\n\n var i;\n var len;\n var j;\n var jLen;\n var k;\n var kLen;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var lastFill = null;\n var lastStroke = null;\n var lastStrokeW = null;\n var commands;\n var pathArr;\n\n for (i = 0; i < len; i += 1) {\n if (!letters[i].n) {\n renderedLetter = renderedLetters[i];\n\n if (renderedLetter) {\n this.globalData.renderer.save();\n this.globalData.renderer.ctxTransform(renderedLetter.p);\n this.globalData.renderer.ctxOpacity(renderedLetter.o);\n }\n\n if (this.fill) {\n if (renderedLetter && renderedLetter.fc) {\n if (lastFill !== renderedLetter.fc) {\n lastFill = renderedLetter.fc;\n ctx.fillStyle = renderedLetter.fc;\n }\n } else if (lastFill !== this.values.fill) {\n lastFill = this.values.fill;\n ctx.fillStyle = this.values.fill;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n this.globalData.canvasContext.fill(); /// ctx.fillText(this.textSpans[i].val,0,0);\n }\n\n if (this.stroke) {\n if (renderedLetter && renderedLetter.sw) {\n if (lastStrokeW !== renderedLetter.sw) {\n lastStrokeW = renderedLetter.sw;\n ctx.lineWidth = renderedLetter.sw;\n }\n } else if (lastStrokeW !== this.values.sWidth) {\n lastStrokeW = this.values.sWidth;\n ctx.lineWidth = this.values.sWidth;\n }\n\n if (renderedLetter && renderedLetter.sc) {\n if (lastStroke !== renderedLetter.sc) {\n lastStroke = renderedLetter.sc;\n ctx.strokeStyle = renderedLetter.sc;\n }\n } else if (lastStroke !== this.values.stroke) {\n lastStroke = this.values.stroke;\n ctx.strokeStyle = this.values.stroke;\n }\n\n commands = this.textSpans[i].elem;\n jLen = commands.length;\n this.globalData.canvasContext.beginPath();\n\n for (j = 0; j < jLen; j += 1) {\n pathArr = commands[j];\n kLen = pathArr.length;\n this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);\n\n for (k = 2; k < kLen; k += 6) {\n this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);\n }\n }\n\n this.globalData.canvasContext.closePath();\n this.globalData.canvasContext.stroke(); /// ctx.strokeText(letters[i].val,0,0);\n }\n\n if (renderedLetter) {\n this.globalData.renderer.restore();\n }\n }\n }\n };\n\n function CVImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.img = globalData.imageLoader.getAsset(this.assetData);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);\n CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVImageElement.prototype.createContent = function () {\n if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {\n var canvas = createTag('canvas');\n canvas.width = this.assetData.w;\n canvas.height = this.assetData.h;\n var ctx = canvas.getContext('2d');\n var imgW = this.img.width;\n var imgH = this.img.height;\n var imgRel = imgW / imgH;\n var canvasRel = this.assetData.w / this.assetData.h;\n var widthCrop;\n var heightCrop;\n var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;\n\n if (imgRel > canvasRel && par === 'xMidYMid slice' || imgRel < canvasRel && par !== 'xMidYMid slice') {\n heightCrop = imgH;\n widthCrop = heightCrop * canvasRel;\n } else {\n widthCrop = imgW;\n heightCrop = widthCrop / canvasRel;\n }\n\n ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h);\n this.img = canvas;\n }\n };\n\n CVImageElement.prototype.renderInnerContent = function () {\n this.canvasContext.drawImage(this.img, 0, 0);\n };\n\n CVImageElement.prototype.destroy = function () {\n this.img = null;\n };\n\n function CVSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);\n CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;\n CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;\n\n CVSolidElement.prototype.renderInnerContent = function () {\n var ctx = this.canvasContext;\n ctx.fillStyle = this.data.sc;\n ctx.fillRect(0, 0, this.data.sw, this.data.sh); //\n };\n\n function CanvasRendererBase(animationItem, config) {\n this.animationItem = animationItem;\n this.renderConfig = {\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\n context: config && config.context || null,\n progressiveLoad: config && config.progressiveLoad || false,\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n className: config && config.className || '',\n id: config && config.id || ''\n };\n this.renderConfig.dpr = config && config.dpr || 1;\n\n if (this.animationItem.wrapper) {\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\n }\n\n this.renderedFrame = -1;\n this.globalData = {\n frameNum: -1,\n _mdf: false,\n renderConfig: this.renderConfig,\n currentGlobalAlpha: -1\n };\n this.contextData = new CVContextData();\n this.elements = [];\n this.pendingElements = [];\n this.transformMat = new Matrix();\n this.completeLayers = false;\n this.rendererType = 'canvas';\n }\n\n extendPrototype([BaseRenderer], CanvasRendererBase);\n\n CanvasRendererBase.prototype.createShape = function (data) {\n return new CVShapeElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createText = function (data) {\n return new CVTextElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createImage = function (data) {\n return new CVImageElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createSolid = function (data) {\n return new CVSolidElement(data, this.globalData, this);\n };\n\n CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n CanvasRendererBase.prototype.ctxTransform = function (props) {\n if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) {\n return;\n }\n\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]);\n return;\n }\n\n this.transformMat.cloneFromProps(props);\n var cProps = this.contextData.cTr.props;\n this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);\n\n this.contextData.cTr.cloneFromProps(this.transformMat.props);\n var trProps = this.contextData.cTr.props;\n this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]);\n };\n\n CanvasRendererBase.prototype.ctxOpacity = function (op) {\n /* if(op === 1){\r\n return;\r\n } */\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.globalAlpha *= op < 0 ? 0 : op;\n this.globalData.currentGlobalAlpha = this.contextData.cO;\n return;\n }\n\n this.contextData.cO *= op < 0 ? 0 : op;\n\n if (this.globalData.currentGlobalAlpha !== this.contextData.cO) {\n this.canvasContext.globalAlpha = this.contextData.cO;\n this.globalData.currentGlobalAlpha = this.contextData.cO;\n }\n };\n\n CanvasRendererBase.prototype.reset = function () {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n this.contextData.reset();\n };\n\n CanvasRendererBase.prototype.save = function (actionFlag) {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.save();\n return;\n }\n\n if (actionFlag) {\n this.canvasContext.save();\n }\n\n var props = this.contextData.cTr.props;\n\n if (this.contextData._length <= this.contextData.cArrPos) {\n this.contextData.duplicate();\n }\n\n var i;\n var arr = this.contextData.saved[this.contextData.cArrPos];\n\n for (i = 0; i < 16; i += 1) {\n arr[i] = props[i];\n }\n\n this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;\n this.contextData.cArrPos += 1;\n };\n\n CanvasRendererBase.prototype.restore = function (actionFlag) {\n if (!this.renderConfig.clearCanvas) {\n this.canvasContext.restore();\n return;\n }\n\n if (actionFlag) {\n this.canvasContext.restore();\n this.globalData.blendMode = 'source-over';\n }\n\n this.contextData.cArrPos -= 1;\n var popped = this.contextData.saved[this.contextData.cArrPos];\n var i;\n var arr = this.contextData.cTr.props;\n\n for (i = 0; i < 16; i += 1) {\n arr[i] = popped[i];\n }\n\n this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]);\n popped = this.contextData.savedOp[this.contextData.cArrPos];\n this.contextData.cO = popped;\n\n if (this.globalData.currentGlobalAlpha !== popped) {\n this.canvasContext.globalAlpha = popped;\n this.globalData.currentGlobalAlpha = popped;\n }\n };\n\n CanvasRendererBase.prototype.configAnimation = function (animData) {\n if (this.animationItem.wrapper) {\n this.animationItem.container = createTag('canvas');\n var containerStyle = this.animationItem.container.style;\n containerStyle.width = '100%';\n containerStyle.height = '100%';\n var origin = '0px 0px 0px';\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n containerStyle['-webkit-transform'] = origin;\n containerStyle.contentVisibility = this.renderConfig.contentVisibility;\n this.animationItem.wrapper.appendChild(this.animationItem.container);\n this.canvasContext = this.animationItem.container.getContext('2d');\n\n if (this.renderConfig.className) {\n this.animationItem.container.setAttribute('class', this.renderConfig.className);\n }\n\n if (this.renderConfig.id) {\n this.animationItem.container.setAttribute('id', this.renderConfig.id);\n }\n } else {\n this.canvasContext = this.renderConfig.context;\n }\n\n this.data = animData;\n this.layers = animData.layers;\n this.transformCanvas = {\n w: animData.w,\n h: animData.h,\n sx: 0,\n sy: 0,\n tx: 0,\n ty: 0\n };\n this.setupGlobalData(animData, document.body);\n this.globalData.canvasContext = this.canvasContext;\n this.globalData.renderer = this;\n this.globalData.isDashed = false;\n this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;\n this.globalData.transformCanvas = this.transformCanvas;\n this.elements = createSizedArray(animData.layers.length);\n this.updateContainerSize();\n };\n\n CanvasRendererBase.prototype.updateContainerSize = function () {\n this.reset();\n var elementWidth;\n var elementHeight;\n\n if (this.animationItem.wrapper && this.animationItem.container) {\n elementWidth = this.animationItem.wrapper.offsetWidth;\n elementHeight = this.animationItem.wrapper.offsetHeight;\n this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr);\n this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr);\n } else {\n elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;\n elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;\n }\n\n var elementRel;\n var animationRel;\n\n if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) {\n var par = this.renderConfig.preserveAspectRatio.split(' ');\n var fillType = par[1] || 'meet';\n var pos = par[0] || 'xMidYMid';\n var xPos = pos.substr(0, 4);\n var yPos = pos.substr(4);\n elementRel = elementWidth / elementHeight;\n animationRel = this.transformCanvas.w / this.transformCanvas.h;\n\n if (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n } else {\n this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n }\n\n if (xPos === 'xMid' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2 * this.renderConfig.dpr;\n } else if (xPos === 'xMax' && (animationRel < elementRel && fillType === 'meet' || animationRel > elementRel && fillType === 'slice')) {\n this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.tx = 0;\n }\n\n if (yPos === 'YMid' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2 * this.renderConfig.dpr;\n } else if (yPos === 'YMax' && (animationRel > elementRel && fillType === 'meet' || animationRel < elementRel && fillType === 'slice')) {\n this.transformCanvas.ty = (elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) * this.renderConfig.dpr;\n } else {\n this.transformCanvas.ty = 0;\n }\n } else if (this.renderConfig.preserveAspectRatio === 'none') {\n this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr);\n this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr);\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n } else {\n this.transformCanvas.sx = this.renderConfig.dpr;\n this.transformCanvas.sy = this.renderConfig.dpr;\n this.transformCanvas.tx = 0;\n this.transformCanvas.ty = 0;\n }\n\n this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1];\n /* var i, len = this.elements.length;\r\n for(i=0;i= 0; i -= 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n\n this.elements.length = 0;\n this.globalData.canvasContext = null;\n this.animationItem.container = null;\n this.destroyed = true;\n };\n\n CanvasRendererBase.prototype.renderFrame = function (num, forceRender) {\n if (this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender || this.destroyed || num === -1) {\n return;\n }\n\n this.renderedFrame = num;\n this.globalData.frameNum = num - this.animationItem._isFirstFrame;\n this.globalData.frameId += 1;\n this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;\n this.globalData.projectInterface.currentFrame = num; // console.log('--------');\n // console.log('NEW: ',num);\n\n var i;\n var len = this.layers.length;\n\n if (!this.completeLayers) {\n this.checkLayers(num);\n }\n\n for (i = 0; i < len; i += 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].prepareFrame(num - this.layers[i].st);\n }\n }\n\n if (this.globalData._mdf) {\n if (this.renderConfig.clearCanvas === true) {\n this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);\n } else {\n this.save();\n }\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n\n if (this.renderConfig.clearCanvas !== true) {\n this.restore();\n }\n }\n };\n\n CanvasRendererBase.prototype.buildItem = function (pos) {\n var elements = this.elements;\n\n if (elements[pos] || this.layers[pos].ty === 99) {\n return;\n }\n\n var element = this.createItem(this.layers[pos], this, this.globalData);\n elements[pos] = element;\n element.initExpressions();\n /* if(this.layers[pos].ty === 0){\r\n element.resize(this.globalData.transformCanvas);\r\n } */\n };\n\n CanvasRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n CanvasRendererBase.prototype.hide = function () {\n this.animationItem.container.style.display = 'none';\n };\n\n CanvasRendererBase.prototype.show = function () {\n this.animationItem.container.style.display = 'block';\n };\n\n function CVCompElement(data, globalData, comp) {\n this.completeLayers = false;\n this.layers = data.layers;\n this.pendingElements = [];\n this.elements = createSizedArray(this.layers.length);\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement);\n\n CVCompElement.prototype.renderInnerContent = function () {\n var ctx = this.canvasContext;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(this.data.w, 0);\n ctx.lineTo(this.data.w, this.data.h);\n ctx.lineTo(0, this.data.h);\n ctx.lineTo(0, 0);\n ctx.clip();\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.completeLayers || this.elements[i]) {\n this.elements[i].renderFrame();\n }\n }\n };\n\n CVCompElement.prototype.destroy = function () {\n var i;\n var len = this.layers.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n if (this.elements[i]) {\n this.elements[i].destroy();\n }\n }\n\n this.layers = null;\n this.elements = null;\n };\n\n CVCompElement.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function CanvasRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.renderConfig = {\n clearCanvas: config && config.clearCanvas !== undefined ? config.clearCanvas : true,\n context: config && config.context || null,\n progressiveLoad: config && config.progressiveLoad || false,\n preserveAspectRatio: config && config.preserveAspectRatio || 'xMidYMid meet',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n contentVisibility: config && config.contentVisibility || 'visible',\n className: config && config.className || '',\n id: config && config.id || ''\n };\n this.renderConfig.dpr = config && config.dpr || 1;\n\n if (this.animationItem.wrapper) {\n this.renderConfig.dpr = config && config.dpr || window.devicePixelRatio || 1;\n }\n\n this.renderedFrame = -1;\n this.globalData = {\n frameNum: -1,\n _mdf: false,\n renderConfig: this.renderConfig,\n currentGlobalAlpha: -1\n };\n this.contextData = new CVContextData();\n this.elements = [];\n this.pendingElements = [];\n this.transformMat = new Matrix();\n this.completeLayers = false;\n this.rendererType = 'canvas';\n }\n\n extendPrototype([CanvasRendererBase], CanvasRenderer);\n\n CanvasRenderer.prototype.createComp = function (data) {\n return new CVCompElement(data, this.globalData, this);\n };\n\n function HBaseElement() {}\n\n HBaseElement.prototype = {\n checkBlendMode: function checkBlendMode() {},\n initRendererElement: function initRendererElement() {\n this.baseElement = createTag(this.data.tg || 'div');\n\n if (this.data.hasMask) {\n this.svgElement = createNS('svg');\n this.layerElement = createNS('g');\n this.maskedElement = this.layerElement;\n this.svgElement.appendChild(this.layerElement);\n this.baseElement.appendChild(this.svgElement);\n } else {\n this.layerElement = this.baseElement;\n }\n\n styleDiv(this.baseElement);\n },\n createContainerElements: function createContainerElements() {\n this.renderableEffectsManager = new CVEffects(this);\n this.transformedElement = this.baseElement;\n this.maskedElement = this.layerElement;\n\n if (this.data.ln) {\n this.layerElement.setAttribute('id', this.data.ln);\n }\n\n if (this.data.cl) {\n this.layerElement.setAttribute('class', this.data.cl);\n }\n\n if (this.data.bm !== 0) {\n this.setBlendMode();\n }\n },\n renderElement: function renderElement() {\n var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {};\n\n if (this.finalTransform._matMdf) {\n var matrixValue = this.finalTransform.mat.toCSS();\n transformedElementStyle.transform = matrixValue;\n transformedElementStyle.webkitTransform = matrixValue;\n }\n\n if (this.finalTransform._opMdf) {\n transformedElementStyle.opacity = this.finalTransform.mProp.o.v;\n }\n },\n renderFrame: function renderFrame() {\n // If it is exported as hidden (data.hd === true) no need to render\n // If it is not visible no need to render\n if (this.data.hd || this.hidden) {\n return;\n }\n\n this.renderTransform();\n this.renderRenderable();\n this.renderElement();\n this.renderInnerContent();\n\n if (this._isFirstFrame) {\n this._isFirstFrame = false;\n }\n },\n destroy: function destroy() {\n this.layerElement = null;\n this.transformedElement = null;\n\n if (this.matteElement) {\n this.matteElement = null;\n }\n\n if (this.maskManager) {\n this.maskManager.destroy();\n this.maskManager = null;\n }\n },\n createRenderableComponents: function createRenderableComponents() {\n this.maskManager = new MaskElement(this.data, this, this.globalData);\n },\n addEffects: function addEffects() {},\n setMatte: function setMatte() {}\n };\n HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;\n HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;\n HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting;\n\n function HSolidElement(data, globalData, comp) {\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement);\n\n HSolidElement.prototype.createContent = function () {\n var rect;\n\n if (this.data.hasMask) {\n rect = createNS('rect');\n rect.setAttribute('width', this.data.sw);\n rect.setAttribute('height', this.data.sh);\n rect.setAttribute('fill', this.data.sc);\n this.svgElement.setAttribute('width', this.data.sw);\n this.svgElement.setAttribute('height', this.data.sh);\n } else {\n rect = createTag('div');\n rect.style.width = this.data.sw + 'px';\n rect.style.height = this.data.sh + 'px';\n rect.style.backgroundColor = this.data.sc;\n }\n\n this.layerElement.appendChild(rect);\n };\n\n function HShapeElement(data, globalData, comp) {\n // List of drawable elements\n this.shapes = []; // Full shape data\n\n this.shapesData = data.shapes; // List of styles that will be applied to shapes\n\n this.stylesList = []; // List of modifiers that will be applied to shapes\n\n this.shapeModifiers = []; // List of items in shape tree\n\n this.itemsData = []; // List of items in previous shape tree\n\n this.processedElements = []; // List of animated components\n\n this.animatedContents = [];\n this.shapesContainer = createNS('g');\n this.initElement(data, globalData, comp); // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.\n // List of elements that have been created\n\n this.prevViewData = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n }\n\n extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement);\n HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;\n\n HShapeElement.prototype.createContent = function () {\n var cont;\n this.baseElement.style.fontSize = 0;\n\n if (this.data.hasMask) {\n this.layerElement.appendChild(this.shapesContainer);\n cont = this.svgElement;\n } else {\n cont = createNS('svg');\n var size = this.comp.data ? this.comp.data : this.globalData.compSize;\n cont.setAttribute('width', size.w);\n cont.setAttribute('height', size.h);\n cont.appendChild(this.shapesContainer);\n this.layerElement.appendChild(cont);\n }\n\n this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true);\n this.filterUniqueShapes();\n this.shapeCont = cont;\n };\n\n HShapeElement.prototype.getTransformedPoint = function (transformers, point) {\n var i;\n var len = transformers.length;\n\n for (i = 0; i < len; i += 1) {\n point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);\n }\n\n return point;\n };\n\n HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) {\n var shape = item.sh.v;\n var transformers = item.transformers;\n var i;\n var len = shape._length;\n var vPoint;\n var oPoint;\n var nextIPoint;\n var nextVPoint;\n\n if (len <= 1) {\n return;\n }\n\n for (i = 0; i < len - 1; i += 1) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n\n if (shape.c) {\n vPoint = this.getTransformedPoint(transformers, shape.v[i]);\n oPoint = this.getTransformedPoint(transformers, shape.o[i]);\n nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);\n nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);\n this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);\n }\n };\n\n HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {\n this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);\n var bounds = this.shapeBoundingBox;\n boundingBox.x = bmMin(bounds.left, boundingBox.x);\n boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax);\n boundingBox.y = bmMin(bounds.top, boundingBox.y);\n boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax);\n };\n\n HShapeElement.prototype.shapeBoundingBox = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n HShapeElement.prototype.tempBoundingBox = {\n x: 0,\n xMax: 0,\n y: 0,\n yMax: 0,\n width: 0,\n height: 0\n };\n\n HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) {\n var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]];\n\n for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {\n // eslint-disable-line no-plusplus\n b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n b |= 0; // eslint-disable-line no-bitwise\n\n a |= 0; // eslint-disable-line no-bitwise\n\n c |= 0; // eslint-disable-line no-bitwise\n\n if (a === 0 && b === 0) {//\n } else if (a === 0) {\n t = -c / b;\n\n if (t > 0 && t < 1) {\n bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i));\n }\n } else {\n b2ac = b * b - 4 * c * a;\n\n if (b2ac >= 0) {\n t1 = (-b + bmSqrt(b2ac)) / (2 * a);\n if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i));\n t2 = (-b - bmSqrt(b2ac)) / (2 * a);\n if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i));\n }\n }\n }\n\n this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]);\n this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]);\n this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]);\n this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]);\n };\n\n HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) {\n return bmPow(1 - t, 3) * p0[i] + 3 * bmPow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * bmPow(t, 2) * p2[i] + bmPow(t, 3) * p3[i];\n };\n\n HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) {\n var i;\n var len = itemsData.length;\n\n for (i = 0; i < len; i += 1) {\n if (itemsData[i] && itemsData[i].sh) {\n this.calculateShapeBoundingBox(itemsData[i], boundingBox);\n } else if (itemsData[i] && itemsData[i].it) {\n this.calculateBoundingBox(itemsData[i].it, boundingBox);\n } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) {\n this.expandStrokeBoundingBox(itemsData[i].w, boundingBox);\n }\n }\n };\n\n HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) {\n var width = 0;\n\n if (widthProperty.keyframes) {\n for (var i = 0; i < widthProperty.keyframes.length; i += 1) {\n var kfw = widthProperty.keyframes[i].s;\n\n if (kfw > width) {\n width = kfw;\n }\n }\n\n width *= widthProperty.mult;\n } else {\n width = widthProperty.v * widthProperty.mult;\n }\n\n boundingBox.x -= width;\n boundingBox.xMax += width;\n boundingBox.y -= width;\n boundingBox.yMax += width;\n };\n\n HShapeElement.prototype.currentBoxContains = function (box) {\n return this.currentBBox.x <= box.x && this.currentBBox.y <= box.y && this.currentBBox.width + this.currentBBox.x >= box.x + box.width && this.currentBBox.height + this.currentBBox.y >= box.y + box.height;\n };\n\n HShapeElement.prototype.renderInnerContent = function () {\n this._renderShapeFrame();\n\n if (!this.hidden && (this._isFirstFrame || this._mdf)) {\n var tempBoundingBox = this.tempBoundingBox;\n var max = 999999;\n tempBoundingBox.x = max;\n tempBoundingBox.xMax = -max;\n tempBoundingBox.y = max;\n tempBoundingBox.yMax = -max;\n this.calculateBoundingBox(this.itemsData, tempBoundingBox);\n tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;\n tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; // var tempBoundingBox = this.shapeCont.getBBox();\n\n if (this.currentBoxContains(tempBoundingBox)) {\n return;\n }\n\n var changed = false;\n\n if (this.currentBBox.w !== tempBoundingBox.width) {\n this.currentBBox.w = tempBoundingBox.width;\n this.shapeCont.setAttribute('width', tempBoundingBox.width);\n changed = true;\n }\n\n if (this.currentBBox.h !== tempBoundingBox.height) {\n this.currentBBox.h = tempBoundingBox.height;\n this.shapeCont.setAttribute('height', tempBoundingBox.height);\n changed = true;\n }\n\n if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) {\n this.currentBBox.w = tempBoundingBox.width;\n this.currentBBox.h = tempBoundingBox.height;\n this.currentBBox.x = tempBoundingBox.x;\n this.currentBBox.y = tempBoundingBox.y;\n this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n var shapeStyle = this.shapeCont.style;\n var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n shapeStyle.transform = shapeTransform;\n shapeStyle.webkitTransform = shapeTransform;\n }\n }\n };\n\n function HTextElement(data, globalData, comp) {\n this.textSpans = [];\n this.textPaths = [];\n this.currentBBox = {\n x: 999999,\n y: -999999,\n h: 0,\n w: 0\n };\n this.renderType = 'svg';\n this.isMasked = false;\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement);\n\n HTextElement.prototype.createContent = function () {\n this.isMasked = this.checkMasks();\n\n if (this.isMasked) {\n this.renderType = 'svg';\n this.compW = this.comp.data.w;\n this.compH = this.comp.data.h;\n this.svgElement.setAttribute('width', this.compW);\n this.svgElement.setAttribute('height', this.compH);\n var g = createNS('g');\n this.maskedElement.appendChild(g);\n this.innerElem = g;\n } else {\n this.renderType = 'html';\n this.innerElem = this.layerElement;\n }\n\n this.checkParenting();\n };\n\n HTextElement.prototype.buildNewText = function () {\n var documentData = this.textProperty.currentData;\n this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);\n var innerElemStyle = this.innerElem.style;\n var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';\n innerElemStyle.fill = textColor;\n innerElemStyle.color = textColor;\n\n if (documentData.sc) {\n innerElemStyle.stroke = this.buildColor(documentData.sc);\n innerElemStyle.strokeWidth = documentData.sw + 'px';\n }\n\n var fontData = this.globalData.fontManager.getFontByName(documentData.f);\n\n if (!this.globalData.fontManager.chars) {\n innerElemStyle.fontSize = documentData.finalSize + 'px';\n innerElemStyle.lineHeight = documentData.finalSize + 'px';\n\n if (fontData.fClass) {\n this.innerElem.className = fontData.fClass;\n } else {\n innerElemStyle.fontFamily = fontData.fFamily;\n var fWeight = documentData.fWeight;\n var fStyle = documentData.fStyle;\n innerElemStyle.fontStyle = fStyle;\n innerElemStyle.fontWeight = fWeight;\n }\n }\n\n var i;\n var len;\n var letters = documentData.l;\n len = letters.length;\n var tSpan;\n var tParent;\n var tCont;\n var matrixHelper = this.mHelper;\n var shapes;\n var shapeStr = '';\n var cnt = 0;\n\n for (i = 0; i < len; i += 1) {\n if (this.globalData.fontManager.chars) {\n if (!this.textPaths[cnt]) {\n tSpan = createNS('path');\n tSpan.setAttribute('stroke-linecap', lineCapEnum[1]);\n tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]);\n tSpan.setAttribute('stroke-miterlimit', '4');\n } else {\n tSpan = this.textPaths[cnt];\n }\n\n if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tCont = tParent.children[0];\n } else {\n tParent = createTag('div');\n tParent.style.lineHeight = 0;\n tCont = createNS('svg');\n tCont.appendChild(tSpan);\n styleDiv(tParent);\n }\n }\n } else if (!this.isMasked) {\n if (this.textSpans[cnt]) {\n tParent = this.textSpans[cnt];\n tSpan = this.textPaths[cnt];\n } else {\n tParent = createTag('span');\n styleDiv(tParent);\n tSpan = createTag('span');\n styleDiv(tSpan);\n tParent.appendChild(tSpan);\n }\n } else {\n tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');\n } // tSpan.setAttribute('visibility', 'hidden');\n\n\n if (this.globalData.fontManager.chars) {\n var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);\n var shapeData;\n\n if (charData) {\n shapeData = charData.data;\n } else {\n shapeData = null;\n }\n\n matrixHelper.reset();\n\n if (shapeData && shapeData.shapes && shapeData.shapes.length) {\n shapes = shapeData.shapes[0].it;\n matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);\n shapeStr = this.createPathShape(matrixHelper, shapes);\n tSpan.setAttribute('d', shapeStr);\n }\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent);\n\n if (shapeData && shapeData.shapes) {\n // document.body.appendChild is needed to get exact measure of shape\n document.body.appendChild(tCont);\n var boundingBox = tCont.getBBox();\n tCont.setAttribute('width', boundingBox.width + 2);\n tCont.setAttribute('height', boundingBox.height + 2);\n tCont.setAttribute('viewBox', boundingBox.x - 1 + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2));\n var tContStyle = tCont.style;\n var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)';\n tContStyle.transform = tContTranslation;\n tContStyle.webkitTransform = tContTranslation;\n letters[i].yOffset = boundingBox.y - 1;\n } else {\n tCont.setAttribute('width', 1);\n tCont.setAttribute('height', 1);\n }\n\n tParent.appendChild(tCont);\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } else {\n tSpan.textContent = letters[i].val;\n tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n\n if (!this.isMasked) {\n this.innerElem.appendChild(tParent); //\n\n var tStyle = tSpan.style;\n var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)';\n tStyle.transform = tSpanTranslation;\n tStyle.webkitTransform = tSpanTranslation;\n } else {\n this.innerElem.appendChild(tSpan);\n }\n } //\n\n\n if (!this.isMasked) {\n this.textSpans[cnt] = tParent;\n } else {\n this.textSpans[cnt] = tSpan;\n }\n\n this.textSpans[cnt].style.display = 'block';\n this.textPaths[cnt] = tSpan;\n cnt += 1;\n }\n\n while (cnt < this.textSpans.length) {\n this.textSpans[cnt].style.display = 'none';\n cnt += 1;\n }\n };\n\n HTextElement.prototype.renderInnerContent = function () {\n var svgStyle;\n\n if (this.data.singleShape) {\n if (!this._isFirstFrame && !this.lettersChangedFlag) {\n return;\n }\n\n if (this.isMasked && this.finalTransform._matMdf) {\n // Todo Benchmark if using this is better than getBBox\n this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH);\n svgStyle = this.svgElement.style;\n var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';\n svgStyle.transform = translation;\n svgStyle.webkitTransform = translation;\n }\n }\n\n this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);\n\n if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) {\n return;\n }\n\n var i;\n var len;\n var count = 0;\n var renderedLetters = this.textAnimator.renderedLetters;\n var letters = this.textProperty.currentData.l;\n len = letters.length;\n var renderedLetter;\n var textSpan;\n var textPath;\n\n for (i = 0; i < len; i += 1) {\n if (letters[i].n) {\n count += 1;\n } else {\n textSpan = this.textSpans[i];\n textPath = this.textPaths[i];\n renderedLetter = renderedLetters[count];\n count += 1;\n\n if (renderedLetter._mdf.m) {\n if (!this.isMasked) {\n textSpan.style.webkitTransform = renderedLetter.m;\n textSpan.style.transform = renderedLetter.m;\n } else {\n textSpan.setAttribute('transform', renderedLetter.m);\n }\n } /// /textSpan.setAttribute('opacity',renderedLetter.o);\n\n\n textSpan.style.opacity = renderedLetter.o;\n\n if (renderedLetter.sw && renderedLetter._mdf.sw) {\n textPath.setAttribute('stroke-width', renderedLetter.sw);\n }\n\n if (renderedLetter.sc && renderedLetter._mdf.sc) {\n textPath.setAttribute('stroke', renderedLetter.sc);\n }\n\n if (renderedLetter.fc && renderedLetter._mdf.fc) {\n textPath.setAttribute('fill', renderedLetter.fc);\n textPath.style.color = renderedLetter.fc;\n }\n }\n }\n\n if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) {\n var boundingBox = this.innerElem.getBBox();\n\n if (this.currentBBox.w !== boundingBox.width) {\n this.currentBBox.w = boundingBox.width;\n this.svgElement.setAttribute('width', boundingBox.width);\n }\n\n if (this.currentBBox.h !== boundingBox.height) {\n this.currentBBox.h = boundingBox.height;\n this.svgElement.setAttribute('height', boundingBox.height);\n }\n\n var margin = 1;\n\n if (this.currentBBox.w !== boundingBox.width + margin * 2 || this.currentBBox.h !== boundingBox.height + margin * 2 || this.currentBBox.x !== boundingBox.x - margin || this.currentBBox.y !== boundingBox.y - margin) {\n this.currentBBox.w = boundingBox.width + margin * 2;\n this.currentBBox.h = boundingBox.height + margin * 2;\n this.currentBBox.x = boundingBox.x - margin;\n this.currentBBox.y = boundingBox.y - margin;\n this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h);\n svgStyle = this.svgElement.style;\n var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';\n svgStyle.transform = svgTransform;\n svgStyle.webkitTransform = svgTransform;\n }\n }\n };\n\n function HCameraElement(data, globalData, comp) {\n this.initFrame();\n this.initBaseData(data, globalData, comp);\n this.initHierarchy();\n var getProp = PropertyFactory.getProp;\n this.pe = getProp(this, data.pe, 0, 0, this);\n\n if (data.ks.p.s) {\n this.px = getProp(this, data.ks.p.x, 1, 0, this);\n this.py = getProp(this, data.ks.p.y, 1, 0, this);\n this.pz = getProp(this, data.ks.p.z, 1, 0, this);\n } else {\n this.p = getProp(this, data.ks.p, 1, 0, this);\n }\n\n if (data.ks.a) {\n this.a = getProp(this, data.ks.a, 1, 0, this);\n }\n\n if (data.ks.or.k.length && data.ks.or.k[0].to) {\n var i;\n var len = data.ks.or.k.length;\n\n for (i = 0; i < len; i += 1) {\n data.ks.or.k[i].to = null;\n data.ks.or.k[i].ti = null;\n }\n }\n\n this.or = getProp(this, data.ks.or, 1, degToRads, this);\n this.or.sh = true;\n this.rx = getProp(this, data.ks.rx, 0, degToRads, this);\n this.ry = getProp(this, data.ks.ry, 0, degToRads, this);\n this.rz = getProp(this, data.ks.rz, 0, degToRads, this);\n this.mat = new Matrix();\n this._prevMat = new Matrix();\n this._isFirstFrame = true; // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.\n\n this.finalTransform = {\n mProp: this\n };\n }\n\n extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);\n\n HCameraElement.prototype.setup = function () {\n var i;\n var len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n // [perspectiveElem,container]\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n perspectiveStyle = comp.perspectiveElem.style;\n containerStyle = comp.container.style;\n var perspective = this.pe.v + 'px';\n var origin = '0px 0px 0px';\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n perspectiveStyle.perspective = perspective;\n perspectiveStyle.webkitPerspective = perspective;\n containerStyle.transformOrigin = origin;\n containerStyle.mozTransformOrigin = origin;\n containerStyle.webkitTransformOrigin = origin;\n perspectiveStyle.transform = matrix;\n perspectiveStyle.webkitTransform = matrix;\n }\n }\n };\n\n HCameraElement.prototype.createElements = function () {};\n\n HCameraElement.prototype.hide = function () {};\n\n HCameraElement.prototype.renderFrame = function () {\n var _mdf = this._isFirstFrame;\n var i;\n var len;\n\n if (this.hierarchy) {\n len = this.hierarchy.length;\n\n for (i = 0; i < len; i += 1) {\n _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;\n }\n }\n\n if (_mdf || this.pe._mdf || this.p && this.p._mdf || this.px && (this.px._mdf || this.py._mdf || this.pz._mdf) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || this.a && this.a._mdf) {\n this.mat.reset();\n\n if (this.hierarchy) {\n len = this.hierarchy.length - 1;\n\n for (i = len; i >= 0; i -= 1) {\n var mTransf = this.hierarchy[i].finalTransform.mProp;\n this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]);\n this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);\n this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);\n this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]);\n this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]);\n }\n }\n\n if (this.p) {\n this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]);\n } else {\n this.mat.translate(-this.px.v, -this.py.v, this.pz.v);\n }\n\n if (this.a) {\n var diffVector;\n\n if (this.p) {\n diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];\n } else {\n diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];\n }\n\n var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));\n\n var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag];\n var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]);\n var mRotationX = Math.atan2(lookDir[1], lookLengthOnXZ);\n var mRotationY = Math.atan2(lookDir[0], -lookDir[2]);\n this.mat.rotateY(mRotationY).rotateX(-mRotationX);\n }\n\n this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);\n this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);\n this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0);\n this.mat.translate(0, 0, this.pe.v);\n var hasMatrixChanged = !this._prevMat.equals(this.mat);\n\n if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {\n len = this.comp.threeDElements.length;\n var comp;\n var perspectiveStyle;\n var containerStyle;\n\n for (i = 0; i < len; i += 1) {\n comp = this.comp.threeDElements[i];\n\n if (comp.type === '3d') {\n if (hasMatrixChanged) {\n var matValue = this.mat.toCSS();\n containerStyle = comp.container.style;\n containerStyle.transform = matValue;\n containerStyle.webkitTransform = matValue;\n }\n\n if (this.pe._mdf) {\n perspectiveStyle = comp.perspectiveElem.style;\n perspectiveStyle.perspective = this.pe.v + 'px';\n perspectiveStyle.webkitPerspective = this.pe.v + 'px';\n }\n }\n }\n\n this.mat.clone(this._prevMat);\n }\n }\n\n this._isFirstFrame = false;\n };\n\n HCameraElement.prototype.prepareFrame = function (num) {\n this.prepareProperties(num, true);\n };\n\n HCameraElement.prototype.destroy = function () {};\n\n HCameraElement.prototype.getBaseElement = function () {\n return null;\n };\n\n function HImageElement(data, globalData, comp) {\n this.assetData = globalData.getAssetData(data.refId);\n this.initElement(data, globalData, comp);\n }\n\n extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement);\n\n HImageElement.prototype.createContent = function () {\n var assetPath = this.globalData.getAssetsPath(this.assetData);\n var img = new Image();\n\n if (this.data.hasMask) {\n this.imageElem = createNS('image');\n this.imageElem.setAttribute('width', this.assetData.w + 'px');\n this.imageElem.setAttribute('height', this.assetData.h + 'px');\n this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath);\n this.layerElement.appendChild(this.imageElem);\n this.baseElement.setAttribute('width', this.assetData.w);\n this.baseElement.setAttribute('height', this.assetData.h);\n } else {\n this.layerElement.appendChild(img);\n }\n\n img.crossOrigin = 'anonymous';\n img.src = assetPath;\n\n if (this.data.ln) {\n this.baseElement.setAttribute('id', this.data.ln);\n }\n };\n\n function HybridRendererBase(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n }\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([BaseRenderer], HybridRendererBase);\n HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem;\n\n HybridRendererBase.prototype.checkPendingElements = function () {\n while (this.pendingElements.length) {\n var element = this.pendingElements.pop();\n element.checkParenting();\n }\n };\n\n HybridRendererBase.prototype.appendElementInPos = function (element, pos) {\n var newDOMElement = element.getBaseElement();\n\n if (!newDOMElement) {\n return;\n }\n\n var layer = this.layers[pos];\n\n if (!layer.ddd || !this.supports3d) {\n if (this.threeDElements) {\n this.addTo3dContainer(newDOMElement, pos);\n } else {\n var i = 0;\n var nextDOMElement;\n var nextLayer;\n var tmpDOMElement;\n\n while (i < pos) {\n if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) {\n nextLayer = this.elements[i];\n tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();\n nextDOMElement = tmpDOMElement || nextDOMElement;\n }\n\n i += 1;\n }\n\n if (nextDOMElement) {\n if (!layer.ddd || !this.supports3d) {\n this.layerElement.insertBefore(newDOMElement, nextDOMElement);\n }\n } else if (!layer.ddd || !this.supports3d) {\n this.layerElement.appendChild(newDOMElement);\n }\n }\n } else {\n this.addTo3dContainer(newDOMElement, pos);\n }\n };\n\n HybridRendererBase.prototype.createShape = function (data) {\n if (!this.supports3d) {\n return new SVGShapeElement(data, this.globalData, this);\n }\n\n return new HShapeElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createText = function (data) {\n if (!this.supports3d) {\n return new SVGTextLottieElement(data, this.globalData, this);\n }\n\n return new HTextElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createCamera = function (data) {\n this.camera = new HCameraElement(data, this.globalData, this);\n return this.camera;\n };\n\n HybridRendererBase.prototype.createImage = function (data) {\n if (!this.supports3d) {\n return new IImageElement(data, this.globalData, this);\n }\n\n return new HImageElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createSolid = function (data) {\n if (!this.supports3d) {\n return new ISolidElement(data, this.globalData, this);\n }\n\n return new HSolidElement(data, this.globalData, this);\n };\n\n HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull;\n\n HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {\n return this.threeDElements[i].perspectiveElem;\n }\n\n i += 1;\n }\n\n return null;\n };\n\n HybridRendererBase.prototype.createThreeDContainer = function (pos, type) {\n var perspectiveElem = createTag('div');\n var style;\n var containerStyle;\n styleDiv(perspectiveElem);\n var container = createTag('div');\n styleDiv(container);\n\n if (type === '3d') {\n style = perspectiveElem.style;\n style.width = this.globalData.compSize.w + 'px';\n style.height = this.globalData.compSize.h + 'px';\n var center = '50% 50%';\n style.webkitTransformOrigin = center;\n style.mozTransformOrigin = center;\n style.transformOrigin = center;\n containerStyle = container.style;\n var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';\n containerStyle.transform = matrix;\n containerStyle.webkitTransform = matrix;\n }\n\n perspectiveElem.appendChild(container); // this.resizerElem.appendChild(perspectiveElem);\n\n var threeDContainerData = {\n container: container,\n perspectiveElem: perspectiveElem,\n startPos: pos,\n endPos: pos,\n type: type\n };\n this.threeDElements.push(threeDContainerData);\n return threeDContainerData;\n };\n\n HybridRendererBase.prototype.build3dContainers = function () {\n var i;\n var len = this.layers.length;\n var lastThreeDContainerData;\n var currentContainer = '';\n\n for (i = 0; i < len; i += 1) {\n if (this.layers[i].ddd && this.layers[i].ty !== 3) {\n if (currentContainer !== '3d') {\n currentContainer = '3d';\n lastThreeDContainerData = this.createThreeDContainer(i, '3d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n } else {\n if (currentContainer !== '2d') {\n currentContainer = '2d';\n lastThreeDContainerData = this.createThreeDContainer(i, '2d');\n }\n\n lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i);\n }\n }\n\n len = this.threeDElements.length;\n\n for (i = len - 1; i >= 0; i -= 1) {\n this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);\n }\n };\n\n HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) {\n var i = 0;\n var len = this.threeDElements.length;\n\n while (i < len) {\n if (pos <= this.threeDElements[i].endPos) {\n var j = this.threeDElements[i].startPos;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.threeDElements[i].container.insertBefore(elem, nextElement);\n } else {\n this.threeDElements[i].container.appendChild(elem);\n }\n\n break;\n }\n\n i += 1;\n }\n };\n\n HybridRendererBase.prototype.configAnimation = function (animData) {\n var resizerElem = createTag('div');\n var wrapper = this.animationItem.wrapper;\n var style = resizerElem.style;\n style.width = animData.w + 'px';\n style.height = animData.h + 'px';\n this.resizerElem = resizerElem;\n styleDiv(resizerElem);\n style.transformStyle = 'flat';\n style.mozTransformStyle = 'flat';\n style.webkitTransformStyle = 'flat';\n\n if (this.renderConfig.className) {\n resizerElem.setAttribute('class', this.renderConfig.className);\n }\n\n wrapper.appendChild(resizerElem);\n style.overflow = 'hidden';\n var svg = createNS('svg');\n svg.setAttribute('width', '1');\n svg.setAttribute('height', '1');\n styleDiv(svg);\n this.resizerElem.appendChild(svg);\n var defs = createNS('defs');\n svg.appendChild(defs);\n this.data = animData; // Mask animation\n\n this.setupGlobalData(animData, svg);\n this.globalData.defs = defs;\n this.layers = animData.layers;\n this.layerElement = this.resizerElem;\n this.build3dContainers();\n this.updateContainerSize();\n };\n\n HybridRendererBase.prototype.destroy = function () {\n if (this.animationItem.wrapper) {\n this.animationItem.wrapper.innerText = '';\n }\n\n this.animationItem.container = null;\n this.globalData.defs = null;\n var i;\n var len = this.layers ? this.layers.length : 0;\n\n for (i = 0; i < len; i += 1) {\n this.elements[i].destroy();\n }\n\n this.elements.length = 0;\n this.destroyed = true;\n this.animationItem = null;\n };\n\n HybridRendererBase.prototype.updateContainerSize = function () {\n var elementWidth = this.animationItem.wrapper.offsetWidth;\n var elementHeight = this.animationItem.wrapper.offsetHeight;\n var elementRel = elementWidth / elementHeight;\n var animationRel = this.globalData.compSize.w / this.globalData.compSize.h;\n var sx;\n var sy;\n var tx;\n var ty;\n\n if (animationRel > elementRel) {\n sx = elementWidth / this.globalData.compSize.w;\n sy = elementWidth / this.globalData.compSize.w;\n tx = 0;\n ty = (elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2;\n } else {\n sx = elementHeight / this.globalData.compSize.h;\n sy = elementHeight / this.globalData.compSize.h;\n tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2;\n ty = 0;\n }\n\n var style = this.resizerElem.style;\n style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)';\n style.transform = style.webkitTransform;\n };\n\n HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame;\n\n HybridRendererBase.prototype.hide = function () {\n this.resizerElem.style.display = 'none';\n };\n\n HybridRendererBase.prototype.show = function () {\n this.resizerElem.style.display = 'block';\n };\n\n HybridRendererBase.prototype.initItems = function () {\n this.buildAllItems();\n\n if (this.camera) {\n this.camera.setup();\n } else {\n var cWidth = this.globalData.compSize.w;\n var cHeight = this.globalData.compSize.h;\n var i;\n var len = this.threeDElements.length;\n\n for (i = 0; i < len; i += 1) {\n var style = this.threeDElements[i].perspectiveElem.style;\n style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px';\n style.perspective = style.webkitPerspective;\n }\n }\n };\n\n HybridRendererBase.prototype.searchExtraCompositions = function (assets) {\n var i;\n var len = assets.length;\n var floatingContainer = createTag('div');\n\n for (i = 0; i < len; i += 1) {\n if (assets[i].xt) {\n var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null);\n comp.initExpressions();\n this.globalData.projectInterface.registerComposition(comp);\n }\n }\n };\n\n function HCompElement(data, globalData, comp) {\n this.layers = data.layers;\n this.supports3d = !data.hasMask;\n this.completeLayers = false;\n this.pendingElements = [];\n this.elements = this.layers ? createSizedArray(this.layers.length) : [];\n this.initElement(data, globalData, comp);\n this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : {\n _placeholder: true\n };\n }\n\n extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement);\n HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;\n\n HCompElement.prototype.createContainerElements = function () {\n this._createBaseContainerElements(); // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';\n\n\n if (this.data.hasMask) {\n this.svgElement.setAttribute('width', this.data.w);\n this.svgElement.setAttribute('height', this.data.h);\n this.transformedElement = this.baseElement;\n } else {\n this.transformedElement = this.layerElement;\n }\n };\n\n HCompElement.prototype.addTo3dContainer = function (elem, pos) {\n var j = 0;\n var nextElement;\n\n while (j < pos) {\n if (this.elements[j] && this.elements[j].getBaseElement) {\n nextElement = this.elements[j].getBaseElement();\n }\n\n j += 1;\n }\n\n if (nextElement) {\n this.layerElement.insertBefore(elem, nextElement);\n } else {\n this.layerElement.appendChild(elem);\n }\n };\n\n HCompElement.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n function HybridRenderer(animationItem, config) {\n this.animationItem = animationItem;\n this.layers = null;\n this.renderedFrame = -1;\n this.renderConfig = {\n className: config && config.className || '',\n imagePreserveAspectRatio: config && config.imagePreserveAspectRatio || 'xMidYMid slice',\n hideOnTransparent: !(config && config.hideOnTransparent === false),\n filterSize: {\n width: config && config.filterSize && config.filterSize.width || '400%',\n height: config && config.filterSize && config.filterSize.height || '400%',\n x: config && config.filterSize && config.filterSize.x || '-100%',\n y: config && config.filterSize && config.filterSize.y || '-100%'\n }\n };\n this.globalData = {\n _mdf: false,\n frameNum: -1,\n renderConfig: this.renderConfig\n };\n this.pendingElements = [];\n this.elements = [];\n this.threeDElements = [];\n this.destroyed = false;\n this.camera = null;\n this.supports3d = true;\n this.rendererType = 'html';\n }\n\n extendPrototype([HybridRendererBase], HybridRenderer);\n\n HybridRenderer.prototype.createComp = function (data) {\n if (!this.supports3d) {\n return new SVGCompElement(data, this.globalData, this);\n }\n\n return new HCompElement(data, this.globalData, this);\n };\n\n var Expressions = function () {\n var ob = {};\n ob.initExpressions = initExpressions;\n\n function initExpressions(animation) {\n var stackCount = 0;\n var registers = [];\n\n function pushExpression() {\n stackCount += 1;\n }\n\n function popExpression() {\n stackCount -= 1;\n\n if (stackCount === 0) {\n releaseInstances();\n }\n }\n\n function registerExpressionProperty(expression) {\n if (registers.indexOf(expression) === -1) {\n registers.push(expression);\n }\n }\n\n function releaseInstances() {\n var i;\n var len = registers.length;\n\n for (i = 0; i < len; i += 1) {\n registers[i].release();\n }\n\n registers.length = 0;\n }\n\n animation.renderer.compInterface = CompExpressionInterface(animation.renderer);\n animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);\n animation.renderer.globalData.pushExpression = pushExpression;\n animation.renderer.globalData.popExpression = popExpression;\n animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;\n }\n\n return ob;\n }();\n\n function _typeof$1(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\n\n /* eslint-disable */\n\n /*\r\n Copyright 2014 David Bau.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining\r\n a copy of this software and associated documentation files (the\r\n \"Software\"), to deal in the Software without restriction, including\r\n without limitation the rights to use, copy, modify, merge, publish,\r\n distribute, sublicense, and/or sell copies of the Software, and to\r\n permit persons to whom the Software is furnished to do so, subject to\r\n the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be\r\n included in all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\n */\n function seedRandom(pool, math) {\n //\n // The following constants are related to IEEE 754 limits.\n //\n var global = this,\n width = 256,\n // each RC4 output is 0 <= x < 256\n chunks = 6,\n // at least six RC4 outputs for each double\n digits = 52,\n // there are 52 significant digits in a double\n rngname = 'random',\n // rngname: name for Math.random and Math.seedrandom\n startdenom = math.pow(width, chunks),\n significance = math.pow(2, digits),\n overflow = significance * 2,\n mask = width - 1,\n nodecrypto; // node.js crypto module, initialized at the bottom.\n //\n // seedrandom()\n // This is the seedrandom function described above.\n //\n\n function seedrandom(seed, options, callback) {\n var key = [];\n options = options === true ? {\n entropy: true\n } : options || {}; // Flatten the seed string or build one from local entropy if needed.\n\n var shortseed = mixkey(flatten(options.entropy ? [seed, tostring(pool)] : seed === null ? autoseed() : seed, 3), key); // Use the seed to initialize an ARC4 generator.\n\n var arc4 = new ARC4(key); // This function returns a random double in [0, 1) that contains\n // randomness in every bit of the mantissa of the IEEE 754 value.\n\n var prng = function prng() {\n var n = arc4.g(chunks),\n // Start with a numerator n < 2 ^ 48\n d = startdenom,\n // and denominator d = 2 ^ 48.\n x = 0; // and no 'extra last byte'.\n\n while (n < significance) {\n // Fill up all significant digits by\n n = (n + x) * width; // shifting numerator and\n\n d *= width; // denominator and generating a\n\n x = arc4.g(1); // new least-significant-byte.\n }\n\n while (n >= overflow) {\n // To avoid rounding up, before adding\n n /= 2; // last byte, shift everything\n\n d /= 2; // right using integer math until\n\n x >>>= 1; // we have exactly the desired bits.\n }\n\n return (n + x) / d; // Form the number within [0, 1).\n };\n\n prng.int32 = function () {\n return arc4.g(4) | 0;\n };\n\n prng.quick = function () {\n return arc4.g(4) / 0x100000000;\n };\n\n prng[\"double\"] = prng; // Mix the randomness into accumulated entropy.\n\n mixkey(tostring(arc4.S), pool); // Calling convention: what to return as a function of prng, seed, is_math.\n\n return (options.pass || callback || function (prng, seed, is_math_call, state) {\n if (state) {\n // Load the arc4 state from the given state if it has an S array.\n if (state.S) {\n copy(state, arc4);\n } // Only provide the .state method if requested via options.state.\n\n\n prng.state = function () {\n return copy(arc4, {});\n };\n } // If called as a method of Math (Math.seedrandom()), mutate\n // Math.random because that is how seedrandom.js has worked since v1.0.\n\n\n if (is_math_call) {\n math[rngname] = prng;\n return seed;\n } // Otherwise, it is a newer calling convention, so return the\n // prng directly.\n else return prng;\n })(prng, shortseed, 'global' in options ? options.global : this == math, options.state);\n }\n\n math['seed' + rngname] = seedrandom; //\n // ARC4\n //\n // An ARC4 implementation. The constructor takes a key in the form of\n // an array of at most (width) integers that should be 0 <= x < (width).\n //\n // The g(count) method returns a pseudorandom integer that concatenates\n // the next (count) outputs from ARC4. Its return value is a number x\n // that is in the range 0 <= x < (width ^ count).\n //\n\n function ARC4(key) {\n var t,\n keylen = key.length,\n me = this,\n i = 0,\n j = me.i = me.j = 0,\n s = me.S = []; // The empty key [] is treated as [0].\n\n if (!keylen) {\n key = [keylen++];\n } // Set up S using the standard key scheduling algorithm.\n\n\n while (i < width) {\n s[i] = i++;\n }\n\n for (i = 0; i < width; i++) {\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\n s[j] = t;\n } // The \"g\" method returns the next (count) outputs as one number.\n\n\n me.g = function (count) {\n // Using instance members instead of closure state nearly doubles speed.\n var t,\n r = 0,\n i = me.i,\n j = me.j,\n s = me.S;\n\n while (count--) {\n t = s[i = mask & i + 1];\n r = r * width + s[mask & (s[i] = s[j = mask & j + t]) + (s[j] = t)];\n }\n\n me.i = i;\n me.j = j;\n return r; // For robust unpredictability, the function call below automatically\n // discards an initial batch of values. This is called RC4-drop[256].\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\n };\n } //\n // copy()\n // Copies internal state of ARC4 to or from a plain object.\n //\n\n\n function copy(f, t) {\n t.i = f.i;\n t.j = f.j;\n t.S = f.S.slice();\n return t;\n } //\n // flatten()\n // Converts an object tree to nested arrays of strings.\n //\n\n\n function flatten(obj, depth) {\n var result = [],\n typ = _typeof$1(obj),\n prop;\n\n if (depth && typ == 'object') {\n for (prop in obj) {\n try {\n result.push(flatten(obj[prop], depth - 1));\n } catch (e) {}\n }\n }\n\n return result.length ? result : typ == 'string' ? obj : obj + '\\0';\n } //\n // mixkey()\n // Mixes a string seed into a key that is an array of integers, and\n // returns a shortened string seed that is equivalent to the result key.\n //\n\n\n function mixkey(seed, key) {\n var stringseed = seed + '',\n smear,\n j = 0;\n\n while (j < stringseed.length) {\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\n }\n\n return tostring(key);\n } //\n // autoseed()\n // Returns an object for autoseeding, using window.crypto and Node crypto\n // module if available.\n //\n\n\n function autoseed() {\n try {\n if (nodecrypto) {\n return tostring(nodecrypto.randomBytes(width));\n }\n\n var out = new Uint8Array(width);\n (global.crypto || global.msCrypto).getRandomValues(out);\n return tostring(out);\n } catch (e) {\n var browser = global.navigator,\n plugins = browser && browser.plugins;\n return [+new Date(), global, plugins, global.screen, tostring(pool)];\n }\n } //\n // tostring()\n // Converts an array of charcodes to a string\n //\n\n\n function tostring(a) {\n return String.fromCharCode.apply(0, a);\n } //\n // When seedrandom.js is loaded, we immediately mix a few bits\n // from the built-in RNG into the entropy pool. Because we do\n // not want to interfere with deterministic PRNG state later,\n // seedrandom will not call math.random on its own again after\n // initialization.\n //\n\n\n mixkey(math.random(), pool); //\n // Nodejs and AMD support: export the implementation as a module using\n // either convention.\n //\n // End anonymous scope, and pass initial values.\n }\n\n ;\n\n function initialize$2(BMMath) {\n seedRandom([], BMMath);\n }\n\n var propTypes = {\n SHAPE: 'shape'\n };\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n var ExpressionManager = function () {\n 'use strict';\n\n var ob = {};\n var Math = BMMath;\n var window = null;\n var document = null;\n var XMLHttpRequest = null;\n var fetch = null;\n var frames = null;\n initialize$2(BMMath);\n\n function $bm_isInstanceOfArray(arr) {\n return arr.constructor === Array || arr.constructor === Float32Array;\n }\n\n function isNumerable(tOfV, v) {\n return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;\n }\n\n function $bm_neg(a) {\n var tOfA = _typeof(a);\n\n if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) {\n return -a;\n }\n\n if ($bm_isInstanceOfArray(a)) {\n var i;\n var lenA = a.length;\n var retArr = [];\n\n for (i = 0; i < lenA; i += 1) {\n retArr[i] = -a[i];\n }\n\n return retArr;\n }\n\n if (a.propType) {\n return a.v;\n }\n\n return -a;\n }\n\n var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get;\n var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get;\n var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get;\n\n function sum(a, b) {\n var tOfA = _typeof(a);\n\n var tOfB = _typeof(b);\n\n if (tOfA === 'string' || tOfB === 'string') {\n return a + b;\n }\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a + b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] += b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a + b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] + b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n var add = sum;\n\n function sub(a, b) {\n var tOfA = _typeof(a);\n\n var tOfB = _typeof(b);\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n if (tOfA === 'string') {\n a = parseInt(a, 10);\n }\n\n if (tOfB === 'string') {\n b = parseInt(b, 10);\n }\n\n return a - b;\n }\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n a = a.slice(0);\n a[0] -= b;\n return a;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n b = b.slice(0);\n b[0] = a - b[0];\n return b;\n }\n\n if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) {\n var i = 0;\n var lenA = a.length;\n var lenB = b.length;\n var retArr = [];\n\n while (i < lenA || i < lenB) {\n if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) {\n retArr[i] = a[i] - b[i];\n } else {\n retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];\n }\n\n i += 1;\n }\n\n return retArr;\n }\n\n return 0;\n }\n\n function mul(a, b) {\n var tOfA = _typeof(a);\n\n var tOfB = _typeof(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a * b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] * b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a * b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function div(a, b) {\n var tOfA = _typeof(a);\n\n var tOfB = _typeof(b);\n\n var arr;\n\n if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) {\n return a / b;\n }\n\n var i;\n var len;\n\n if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) {\n len = a.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a[i] / b;\n }\n\n return arr;\n }\n\n if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) {\n len = b.length;\n arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = a / b[i];\n }\n\n return arr;\n }\n\n return 0;\n }\n\n function mod(a, b) {\n if (typeof a === 'string') {\n a = parseInt(a, 10);\n }\n\n if (typeof b === 'string') {\n b = parseInt(b, 10);\n }\n\n return a % b;\n }\n\n var $bm_sum = sum;\n var $bm_sub = sub;\n var $bm_mul = mul;\n var $bm_div = div;\n var $bm_mod = mod;\n\n function clamp(num, min, max) {\n if (min > max) {\n var mm = max;\n max = min;\n min = mm;\n }\n\n return Math.min(Math.max(num, min), max);\n }\n\n function radiansToDegrees(val) {\n return val / degToRads;\n }\n\n var radians_to_degrees = radiansToDegrees;\n\n function degreesToRadians(val) {\n return val * degToRads;\n }\n\n var degrees_to_radians = radiansToDegrees;\n var helperLengthArray = [0, 0, 0, 0, 0, 0];\n\n function length(arr1, arr2) {\n if (typeof arr1 === 'number' || arr1 instanceof Number) {\n arr2 = arr2 || 0;\n return Math.abs(arr1 - arr2);\n }\n\n if (!arr2) {\n arr2 = helperLengthArray;\n }\n\n var i;\n var len = Math.min(arr1.length, arr2.length);\n var addedLength = 0;\n\n for (i = 0; i < len; i += 1) {\n addedLength += Math.pow(arr2[i] - arr1[i], 2);\n }\n\n return Math.sqrt(addedLength);\n }\n\n function normalize(vec) {\n return div(vec, length(vec));\n }\n\n function rgbToHsl(val) {\n var r = val[0];\n var g = val[1];\n var b = val[2];\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n\n if (max === min) {\n h = 0; // achromatic\n\n s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n\n default:\n break;\n }\n\n h /= 6;\n }\n\n return [h, s, l, val[3]];\n }\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n function hslToRgb(val) {\n var h = val[0];\n var s = val[1];\n var l = val[2];\n var r;\n var g;\n var b;\n\n if (s === 0) {\n r = l; // achromatic\n\n b = l; // achromatic\n\n g = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return [r, g, b, val[3]];\n }\n\n function linear(t, tMin, tMax, value1, value2) {\n if (value1 === undefined || value2 === undefined) {\n value1 = tMin;\n value2 = tMax;\n tMin = 0;\n tMax = 1;\n }\n\n if (tMax < tMin) {\n var _tMin = tMax;\n tMax = tMin;\n tMin = _tMin;\n }\n\n if (t <= tMin) {\n return value1;\n }\n\n if (t >= tMax) {\n return value2;\n }\n\n var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin);\n\n if (!value1.length) {\n return value1 + (value2 - value1) * perc;\n }\n\n var i;\n var len = value1.length;\n var arr = createTypedArray('float32', len);\n\n for (i = 0; i < len; i += 1) {\n arr[i] = value1[i] + (value2[i] - value1[i]) * perc;\n }\n\n return arr;\n }\n\n function random(min, max) {\n if (max === undefined) {\n if (min === undefined) {\n min = 0;\n max = 1;\n } else {\n max = min;\n min = undefined;\n }\n }\n\n if (max.length) {\n var i;\n var len = max.length;\n\n if (!min) {\n min = createTypedArray('float32', len);\n }\n\n var arr = createTypedArray('float32', len);\n var rnd = BMMath.random();\n\n for (i = 0; i < len; i += 1) {\n arr[i] = min[i] + rnd * (max[i] - min[i]);\n }\n\n return arr;\n }\n\n if (min === undefined) {\n min = 0;\n }\n\n var rndm = BMMath.random();\n return min + rndm * (max - min);\n }\n\n function createPath(points, inTangents, outTangents, closed) {\n var i;\n var len = points.length;\n var path = shapePool.newElement();\n path.setPathData(!!closed, len);\n var arrPlaceholder = [0, 0];\n var inVertexPoint;\n var outVertexPoint;\n\n for (i = 0; i < len; i += 1) {\n inVertexPoint = inTangents && inTangents[i] ? inTangents[i] : arrPlaceholder;\n outVertexPoint = outTangents && outTangents[i] ? outTangents[i] : arrPlaceholder;\n path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true);\n }\n\n return path;\n }\n\n function initiateExpression(elem, data, property) {\n var val = data.x;\n var needsVelocity = /velocity(?![\\w\\d])/.test(val);\n\n var _needsRandom = val.indexOf('random') !== -1;\n\n var elemType = elem.data.ty;\n var transform;\n var $bm_transform;\n var content;\n var effect;\n var thisProperty = property;\n thisProperty.valueAtTime = thisProperty.getValueAtTime;\n Object.defineProperty(thisProperty, 'value', {\n get: function get() {\n return thisProperty.v;\n }\n });\n elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate;\n elem.comp.displayStartTime = 0;\n var inPoint = elem.data.ip / elem.comp.globalData.frameRate;\n var outPoint = elem.data.op / elem.comp.globalData.frameRate;\n var width = elem.data.sw ? elem.data.sw : 0;\n var height = elem.data.sh ? elem.data.sh : 0;\n var name = elem.data.nm;\n var loopIn;\n var loop_in;\n var loopOut;\n var loop_out;\n var smooth;\n var toWorld;\n var fromWorld;\n var fromComp;\n var toComp;\n var fromCompToSurface;\n var position;\n var rotation;\n var anchorPoint;\n var scale;\n var thisLayer;\n var thisComp;\n var mask;\n var valueAtTime;\n var velocityAtTime;\n var scoped_bm_rt; // val = val.replace(/(\\\\?\"|')((http)(s)?(:\\/))?\\/.*?(\\\\?\"|')/g, \"\\\"\\\"\"); // deter potential network calls\n\n var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval\n\n var numKeys = property.kf ? data.k.length : 0;\n var active = !this.data || this.data.hd !== true;\n\n var wiggle = function wiggle(freq, amp) {\n var iWiggle;\n var j;\n var lenWiggle = this.pv.length ? this.pv.length : 1;\n var addedAmps = createTypedArray('float32', lenWiggle);\n freq = 5;\n var iterations = Math.floor(time * freq);\n iWiggle = 0;\n j = 0;\n\n while (iWiggle < iterations) {\n // var rnd = BMMath.random();\n for (j = 0; j < lenWiggle; j += 1) {\n addedAmps[j] += -amp + amp * 2 * BMMath.random(); // addedAmps[j] += -amp + amp*2*rnd;\n }\n\n iWiggle += 1;\n } // var rnd2 = BMMath.random();\n\n\n var periods = time * freq;\n var perc = periods - Math.floor(periods);\n var arr = createTypedArray('float32', lenWiggle);\n\n if (lenWiggle > 1) {\n for (j = 0; j < lenWiggle; j += 1) {\n arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;\n // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);\n }\n\n return arr;\n }\n\n return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc;\n }.bind(this);\n\n if (thisProperty.loopIn) {\n loopIn = thisProperty.loopIn.bind(thisProperty);\n loop_in = loopIn;\n }\n\n if (thisProperty.loopOut) {\n loopOut = thisProperty.loopOut.bind(thisProperty);\n loop_out = loopOut;\n }\n\n if (thisProperty.smooth) {\n smooth = thisProperty.smooth.bind(thisProperty);\n }\n\n function loopInDuration(type, duration) {\n return loopIn(type, duration, true);\n }\n\n function loopOutDuration(type, duration) {\n return loopOut(type, duration, true);\n }\n\n if (this.getValueAtTime) {\n valueAtTime = this.getValueAtTime.bind(this);\n }\n\n if (this.getVelocityAtTime) {\n velocityAtTime = this.getVelocityAtTime.bind(this);\n }\n\n var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);\n\n function lookAt(elem1, elem2) {\n var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]];\n var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads;\n var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads;\n return [yaw, pitch, 0];\n }\n\n function easeOut(t, tMin, tMax, val1, val2) {\n return applyEase(easeOutBez, t, tMin, tMax, val1, val2);\n }\n\n function easeIn(t, tMin, tMax, val1, val2) {\n return applyEase(easeInBez, t, tMin, tMax, val1, val2);\n }\n\n function ease(t, tMin, tMax, val1, val2) {\n return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);\n }\n\n function applyEase(fn, t, tMin, tMax, val1, val2) {\n if (val1 === undefined) {\n val1 = tMin;\n val2 = tMax;\n } else {\n t = (t - tMin) / (tMax - tMin);\n }\n\n if (t > 1) {\n t = 1;\n } else if (t < 0) {\n t = 0;\n }\n\n var mult = fn(t);\n\n if ($bm_isInstanceOfArray(val1)) {\n var iKey;\n var lenKey = val1.length;\n var arr = createTypedArray('float32', lenKey);\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey];\n }\n\n return arr;\n }\n\n return (val2 - val1) * mult + val1;\n }\n\n function nearestKey(time) {\n var iKey;\n var lenKey = data.k.length;\n var index;\n var keyTime;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n index = 0;\n keyTime = 0;\n } else {\n index = -1;\n time *= elem.comp.globalData.frameRate;\n\n if (time < data.k[0].t) {\n index = 1;\n keyTime = data.k[0].t;\n } else {\n for (iKey = 0; iKey < lenKey - 1; iKey += 1) {\n if (time === data.k[iKey].t) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n break;\n } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) {\n if (time - data.k[iKey].t > data.k[iKey + 1].t - time) {\n index = iKey + 2;\n keyTime = data.k[iKey + 1].t;\n } else {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n\n break;\n }\n }\n\n if (index === -1) {\n index = iKey + 1;\n keyTime = data.k[iKey].t;\n }\n }\n }\n\n var obKey = {};\n obKey.index = index;\n obKey.time = keyTime / elem.comp.globalData.frameRate;\n return obKey;\n }\n\n function key(ind) {\n var obKey;\n var iKey;\n var lenKey;\n\n if (!data.k.length || typeof data.k[0] === 'number') {\n throw new Error('The property has no keyframe at index ' + ind);\n }\n\n ind -= 1;\n obKey = {\n time: data.k[ind].t / elem.comp.globalData.frameRate,\n value: []\n };\n var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e;\n lenKey = arr.length;\n\n for (iKey = 0; iKey < lenKey; iKey += 1) {\n obKey[iKey] = arr[iKey];\n obKey.value[iKey] = arr[iKey];\n }\n\n return obKey;\n }\n\n function framesToTime(fr, fps) {\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return fr / fps;\n }\n\n function timeToFrames(t, fps) {\n if (!t && t !== 0) {\n t = time;\n }\n\n if (!fps) {\n fps = elem.comp.globalData.frameRate;\n }\n\n return t * fps;\n }\n\n function seedRandom(seed) {\n BMMath.seedrandom(randSeed + seed);\n }\n\n function sourceRectAtTime() {\n return elem.sourceRectAtTime();\n }\n\n function substring(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substring(init);\n }\n\n return value.substring(init, end);\n }\n\n return '';\n }\n\n function substr(init, end) {\n if (typeof value === 'string') {\n if (end === undefined) {\n return value.substr(init);\n }\n\n return value.substr(init, end);\n }\n\n return '';\n }\n\n function posterizeTime(framesPerSecond) {\n time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond;\n value = valueAtTime(time);\n }\n\n var time;\n var velocity;\n var value;\n var text;\n var textIndex;\n var textTotal;\n var selectorValue;\n var index = elem.data.ind;\n var hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n var parent;\n var randSeed = Math.floor(Math.random() * 1000000);\n var globalData = elem.globalData;\n\n function executeExpression(_value) {\n // globalData.pushExpression();\n value = _value;\n\n if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {\n return value;\n }\n\n if (this.propType === 'textSelector') {\n textIndex = this.textIndex;\n textTotal = this.textTotal;\n selectorValue = this.selectorValue;\n }\n\n if (!thisLayer) {\n text = elem.layerInterface.text;\n thisLayer = elem.layerInterface;\n thisComp = elem.comp.compInterface;\n toWorld = thisLayer.toWorld.bind(thisLayer);\n fromWorld = thisLayer.fromWorld.bind(thisLayer);\n fromComp = thisLayer.fromComp.bind(thisLayer);\n toComp = thisLayer.toComp.bind(thisLayer);\n mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;\n fromCompToSurface = fromComp;\n }\n\n if (!transform) {\n transform = elem.layerInterface('ADBE Transform Group');\n $bm_transform = transform;\n\n if (transform) {\n anchorPoint = transform.anchorPoint;\n /* position = transform.position;\r\n rotation = transform.rotation;\r\n scale = transform.scale; */\n }\n }\n\n if (elemType === 4 && !content) {\n content = thisLayer('ADBE Root Vectors Group');\n }\n\n if (!effect) {\n effect = thisLayer(4);\n }\n\n hasParent = !!(elem.hierarchy && elem.hierarchy.length);\n\n if (hasParent && !parent) {\n parent = elem.hierarchy[0].layerInterface;\n }\n\n time = this.comp.renderedFrame / this.comp.globalData.frameRate;\n\n if (_needsRandom) {\n seedRandom(randSeed + time);\n }\n\n if (needsVelocity) {\n velocity = velocityAtTime(time);\n }\n\n expression_function();\n this.frameExpressionId = elem.globalData.frameId; // TODO: Check if it's possible to return on ShapeInterface the .v value\n // Changed this to a ternary operation because Rollup failed compiling it correctly\n\n scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt;\n return scoped_bm_rt;\n } // Bundlers will see these as dead code and unless we reference them\n\n\n executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData];\n return executeExpression;\n }\n\n ob.initiateExpression = initiateExpression;\n ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath];\n return ob;\n }();\n\n var expressionHelpers = function () {\n function searchExpressions(elem, data, prop) {\n if (data.x) {\n prop.k = true;\n prop.x = true;\n prop.initiateExpression = ExpressionManager.initiateExpression;\n prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop));\n }\n }\n\n function getValueAtTime(frameNum) {\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastFrame) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;\n this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);\n this._cachingAtTime.lastFrame = frameNum;\n }\n\n return this._cachingAtTime.value;\n }\n\n function getSpeedAtTime(frameNum) {\n var delta = -0.01;\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var speed = 0;\n\n if (v1.length) {\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n speed += Math.pow(v2[i] - v1[i], 2);\n }\n\n speed = Math.sqrt(speed) * 100;\n } else {\n speed = 0;\n }\n\n return speed;\n }\n\n function getVelocityAtTime(frameNum) {\n if (this.vel !== undefined) {\n return this.vel;\n }\n\n var delta = -0.001; // frameNum += this.elem.data.st;\n\n var v1 = this.getValueAtTime(frameNum);\n var v2 = this.getValueAtTime(frameNum + delta);\n var velocity;\n\n if (v1.length) {\n velocity = createTypedArray('float32', v1.length);\n var i;\n\n for (i = 0; i < v1.length; i += 1) {\n // removing frameRate\n // if needed, don't add it here\n // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);\n velocity[i] = (v2[i] - v1[i]) / delta;\n }\n } else {\n velocity = (v2 - v1) / delta;\n }\n\n return velocity;\n }\n\n function getStaticValueAtTime() {\n return this.pv;\n }\n\n function setGroupProperty(propertyGroup) {\n this.propertyGroup = propertyGroup;\n }\n\n return {\n searchExpressions: searchExpressions,\n getSpeedAtTime: getSpeedAtTime,\n getVelocityAtTime: getVelocityAtTime,\n getValueAtTime: getValueAtTime,\n getStaticValueAtTime: getStaticValueAtTime,\n setGroupProperty: setGroupProperty\n };\n }();\n\n function addPropertyDecorator() {\n function loopOut(type, duration, durationFlag) {\n if (!this.k || !this.keyframes) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var lastKeyFrame = keyframes[keyframes.length - 1].t;\n\n if (currentFrame <= lastKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var firstKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip);\n } else {\n cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration);\n }\n\n firstKeyFrame = lastKeyFrame - cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (iterations % 2 !== 0) {\n return this.getValueAtTime((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n\n var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration);\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = (endV[i] - initV[i]) * repeats + current[i];\n }\n\n return ret;\n }\n\n return (endV - initV) * repeats + current;\n } else if (type === 'continue') {\n var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(lastValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line\n }\n\n return ret;\n }\n\n return lastValue + (lastValue - nextLastValue) * ((currentFrame - lastKeyFrame) / 0.001);\n }\n\n return this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function loopIn(type, duration, durationFlag) {\n if (!this.k) {\n return this.pv;\n }\n\n type = type ? type.toLowerCase() : '';\n var currentFrame = this.comp.renderedFrame;\n var keyframes = this.keyframes;\n var firstKeyFrame = keyframes[0].t;\n\n if (currentFrame >= firstKeyFrame) {\n return this.pv;\n }\n\n var cycleDuration;\n var lastKeyFrame;\n\n if (!durationFlag) {\n if (!duration || duration > keyframes.length - 1) {\n duration = keyframes.length - 1;\n }\n\n lastKeyFrame = keyframes[duration].t;\n cycleDuration = lastKeyFrame - firstKeyFrame;\n } else {\n if (!duration) {\n cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame);\n } else {\n cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration);\n }\n\n lastKeyFrame = firstKeyFrame + cycleDuration;\n }\n\n var i;\n var len;\n var ret;\n\n if (type === 'pingpong') {\n var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration);\n\n if (iterations % 2 === 0) {\n return this.getValueAtTime(((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n } else if (type === 'offset') {\n var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);\n var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0);\n var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1;\n\n if (this.pv.length) {\n ret = new Array(initV.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = current[i] - (endV[i] - initV[i]) * repeats;\n }\n\n return ret;\n }\n\n return current - (endV - initV) * repeats;\n } else if (type === 'continue') {\n var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);\n var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);\n\n if (this.pv.length) {\n ret = new Array(firstValue.length);\n len = ret.length;\n\n for (i = 0; i < len; i += 1) {\n ret[i] = firstValue[i] + (firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return ret;\n }\n\n return firstValue + (firstValue - nextFirstValue) * (firstKeyFrame - currentFrame) / 0.001;\n }\n\n return this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line\n }\n\n function smooth(width, samples) {\n if (!this.k) {\n return this.pv;\n }\n\n width = (width || 0.4) * 0.5;\n samples = Math.floor(samples || 5);\n\n if (samples <= 1) {\n return this.pv;\n }\n\n var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;\n var initFrame = currentTime - width;\n var endFrame = currentTime + width;\n var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;\n var i = 0;\n var j = 0;\n var value;\n\n if (this.pv.length) {\n value = createTypedArray('float32', this.pv.length);\n } else {\n value = 0;\n }\n\n var sampleValue;\n\n while (i < samples) {\n sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] += sampleValue[j];\n }\n } else {\n value += sampleValue;\n }\n\n i += 1;\n }\n\n if (this.pv.length) {\n for (j = 0; j < this.pv.length; j += 1) {\n value[j] /= samples;\n }\n } else {\n value /= samples;\n }\n\n return value;\n }\n\n function getTransformValueAtTime(time) {\n if (!this._transformCachingAtTime) {\n this._transformCachingAtTime = {\n v: new Matrix()\n };\n } /// /\n\n\n var matrix = this._transformCachingAtTime.v;\n matrix.cloneFromProps(this.pre.props);\n\n if (this.appliedTransformations < 1) {\n var anchor = this.a.getValueAtTime(time);\n matrix.translate(-anchor[0] * this.a.mult, -anchor[1] * this.a.mult, anchor[2] * this.a.mult);\n }\n\n if (this.appliedTransformations < 2) {\n var scale = this.s.getValueAtTime(time);\n matrix.scale(scale[0] * this.s.mult, scale[1] * this.s.mult, scale[2] * this.s.mult);\n }\n\n if (this.sk && this.appliedTransformations < 3) {\n var skew = this.sk.getValueAtTime(time);\n var skewAxis = this.sa.getValueAtTime(time);\n matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult);\n }\n\n if (this.r && this.appliedTransformations < 4) {\n var rotation = this.r.getValueAtTime(time);\n matrix.rotate(-rotation * this.r.mult);\n } else if (!this.r && this.appliedTransformations < 4) {\n var rotationZ = this.rz.getValueAtTime(time);\n var rotationY = this.ry.getValueAtTime(time);\n var rotationX = this.rx.getValueAtTime(time);\n var orientation = this.or.getValueAtTime(time);\n matrix.rotateZ(-rotationZ * this.rz.mult).rotateY(rotationY * this.ry.mult).rotateX(rotationX * this.rx.mult).rotateZ(-orientation[2] * this.or.mult).rotateY(orientation[1] * this.or.mult).rotateX(orientation[0] * this.or.mult);\n }\n\n if (this.data.p && this.data.p.s) {\n var positionX = this.px.getValueAtTime(time);\n var positionY = this.py.getValueAtTime(time);\n\n if (this.data.p.z) {\n var positionZ = this.pz.getValueAtTime(time);\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, -positionZ * this.pz.mult);\n } else {\n matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0);\n }\n } else {\n var position = this.p.getValueAtTime(time);\n matrix.translate(position[0] * this.p.mult, position[1] * this.p.mult, -position[2] * this.p.mult);\n }\n\n return matrix; /// /\n }\n\n function getTransformStaticValueAtTime() {\n return this.v.clone(new Matrix());\n }\n\n var getTransformProperty = TransformPropertyFactory.getTransformProperty;\n\n TransformPropertyFactory.getTransformProperty = function (elem, data, container) {\n var prop = getTransformProperty(elem, data, container);\n\n if (prop.dynamicProperties.length) {\n prop.getValueAtTime = getTransformValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n return prop;\n };\n\n var propertyGetProp = PropertyFactory.getProp;\n\n PropertyFactory.getProp = function (elem, data, type, mult, container) {\n var prop = propertyGetProp(elem, data, type, mult, container); // prop.getVelocityAtTime = getVelocityAtTime;\n // prop.loopOut = loopOut;\n // prop.loopIn = loopIn;\n\n if (prop.kf) {\n prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);\n } else {\n prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);\n }\n\n prop.setGroupProperty = expressionHelpers.setGroupProperty;\n prop.loopOut = loopOut;\n prop.loopIn = loopIn;\n prop.smooth = smooth;\n prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);\n prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);\n prop.numKeys = data.a === 1 ? data.k.length : 0;\n prop.propertyIndex = data.ix;\n var value = 0;\n\n if (type !== 0) {\n value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length);\n }\n\n prop._cachingAtTime = {\n lastFrame: initialDefaultFrame,\n lastIndex: 0,\n value: value\n };\n expressionHelpers.searchExpressions(elem, data, prop);\n\n if (prop.k) {\n container.addDynamicProperty(prop);\n }\n\n return prop;\n };\n\n function getShapeValueAtTime(frameNum) {\n // For now this caching object is created only when needed instead of creating it when the shape is initialized.\n if (!this._cachingAtTime) {\n this._cachingAtTime = {\n shapeValue: shapePool.clone(this.pv),\n lastIndex: 0,\n lastTime: initialDefaultFrame\n };\n }\n\n frameNum *= this.elem.globalData.frameRate;\n frameNum -= this.offsetTime;\n\n if (frameNum !== this._cachingAtTime.lastTime) {\n this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;\n this._cachingAtTime.lastTime = frameNum;\n this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);\n }\n\n return this._cachingAtTime.shapeValue;\n }\n\n var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();\n var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();\n\n function ShapeExpressions() {}\n\n ShapeExpressions.prototype = {\n vertices: function vertices(prop, time) {\n if (this.k) {\n this.getValue();\n }\n\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n var i;\n var len = shapePath._length;\n var vertices = shapePath[prop];\n var points = shapePath.v;\n var arr = createSizedArray(len);\n\n for (i = 0; i < len; i += 1) {\n if (prop === 'i' || prop === 'o') {\n arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];\n } else {\n arr[i] = [vertices[i][0], vertices[i][1]];\n }\n }\n\n return arr;\n },\n points: function points(time) {\n return this.vertices('v', time);\n },\n inTangents: function inTangents(time) {\n return this.vertices('i', time);\n },\n outTangents: function outTangents(time) {\n return this.vertices('o', time);\n },\n isClosed: function isClosed() {\n return this.v.c;\n },\n pointOnPath: function pointOnPath(perc, time) {\n var shapePath = this.v;\n\n if (time !== undefined) {\n shapePath = this.getValueAtTime(time, 0);\n }\n\n if (!this._segmentsLength) {\n this._segmentsLength = bez.getSegmentsLength(shapePath);\n }\n\n var segmentsLength = this._segmentsLength;\n var lengths = segmentsLength.lengths;\n var lengthPos = segmentsLength.totalLength * perc;\n var i = 0;\n var len = lengths.length;\n var accumulatedLength = 0;\n var pt;\n\n while (i < len) {\n if (accumulatedLength + lengths[i].addedLength > lengthPos) {\n var initIndex = i;\n var endIndex = shapePath.c && i === len - 1 ? 0 : i + 1;\n var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength;\n pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);\n break;\n } else {\n accumulatedLength += lengths[i].addedLength;\n }\n\n i += 1;\n }\n\n if (!pt) {\n pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]];\n }\n\n return pt;\n },\n vectorOnPath: function vectorOnPath(perc, time, vectorType) {\n // perc doesn't use triple equality because it can be a Number object as well as a primitive.\n if (perc == 1) {\n // eslint-disable-line eqeqeq\n perc = this.v.c;\n } else if (perc == 0) {\n // eslint-disable-line eqeqeq\n perc = 0.999;\n }\n\n var pt1 = this.pointOnPath(perc, time);\n var pt2 = this.pointOnPath(perc + 0.001, time);\n var xLength = pt2[0] - pt1[0];\n var yLength = pt2[1] - pt1[1];\n var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2));\n\n if (magnitude === 0) {\n return [0, 0];\n }\n\n var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude];\n return unitVector;\n },\n tangentOnPath: function tangentOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'tangent');\n },\n normalOnPath: function normalOnPath(perc, time) {\n return this.vectorOnPath(perc, time, 'normal');\n },\n setGroupProperty: expressionHelpers.setGroupProperty,\n getValueAtTime: expressionHelpers.getStaticValueAtTime\n };\n extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);\n extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);\n KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;\n KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;\n var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;\n\n ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) {\n var prop = propertyGetShapeProp(elem, data, type, arr, trims);\n prop.propertyIndex = data.ix;\n prop.lock = false;\n\n if (type === 3) {\n expressionHelpers.searchExpressions(elem, data.pt, prop);\n } else if (type === 4) {\n expressionHelpers.searchExpressions(elem, data.ks, prop);\n }\n\n if (prop.k) {\n elem.addDynamicProperty(prop);\n }\n\n return prop;\n };\n }\n\n function initialize$1() {\n addPropertyDecorator();\n }\n\n function addDecorator() {\n function searchExpressions() {\n if (this.data.d.x) {\n this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this);\n this.addEffect(this.getExpressionValue.bind(this));\n return true;\n }\n\n return null;\n }\n\n TextProperty.prototype.getExpressionValue = function (currentValue, text) {\n var newValue = this.calculateExpression(text);\n\n if (currentValue.t !== newValue) {\n var newData = {};\n this.copyData(newData, currentValue);\n newData.t = newValue.toString();\n newData.__complete = false;\n return newData;\n }\n\n return currentValue;\n };\n\n TextProperty.prototype.searchProperty = function () {\n var isKeyframed = this.searchKeyframes();\n var hasExpressions = this.searchExpressions();\n this.kf = isKeyframed || hasExpressions;\n return this.kf;\n };\n\n TextProperty.prototype.searchExpressions = searchExpressions;\n }\n\n function initialize() {\n addDecorator();\n }\n\n function SVGComposableEffect() {}\n\n SVGComposableEffect.prototype = {\n createMergeNode: function createMergeNode(resultId, ins) {\n var feMerge = createNS('feMerge');\n feMerge.setAttribute('result', resultId);\n var feMergeNode;\n var i;\n\n for (i = 0; i < ins.length; i += 1) {\n feMergeNode = createNS('feMergeNode');\n feMergeNode.setAttribute('in', ins[i]);\n feMerge.appendChild(feMergeNode);\n feMerge.appendChild(feMergeNode);\n }\n\n return feMerge;\n }\n };\n\n function SVGTintFilter(filter, filterManager, elem, id, source) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id + '_tint_1');\n filter.appendChild(feColorMatrix);\n feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id + '_tint_2');\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n var feMerge = this.createMergeNode(id, [source, id + '_tint_1', id + '_tint_2']);\n filter.appendChild(feMerge);\n }\n\n extendPrototype([SVGComposableEffect], SVGTintFilter);\n\n SVGTintFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var colorBlack = this.filterManager.effectElements[0].p.v;\n var colorWhite = this.filterManager.effectElements[1].p.v;\n var opacity = this.filterManager.effectElements[2].p.v / 100;\n this.matrixFilter.setAttribute('values', colorWhite[0] - colorBlack[0] + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 ' + opacity + ' 0');\n }\n };\n\n function SVGFillFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');\n feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');\n feColorMatrix.setAttribute('result', id);\n filter.appendChild(feColorMatrix);\n this.matrixFilter = feColorMatrix;\n }\n\n SVGFillFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color = this.filterManager.effectElements[2].p.v;\n var opacity = this.filterManager.effectElements[6].p.v;\n this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0');\n }\n };\n\n function SVGStrokeEffect(fil, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.elem = elem;\n this.paths = [];\n }\n\n SVGStrokeEffect.prototype.initialize = function () {\n var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n var path;\n var groupPath;\n var i;\n var len;\n\n if (this.filterManager.effectElements[1].p.v === 1) {\n len = this.elem.maskManager.masksProperties.length;\n i = 0;\n } else {\n i = this.filterManager.effectElements[0].p.v - 1;\n len = i + 1;\n }\n\n groupPath = createNS('g');\n groupPath.setAttribute('fill', 'none');\n groupPath.setAttribute('stroke-linecap', 'round');\n groupPath.setAttribute('stroke-dashoffset', 1);\n\n for (i; i < len; i += 1) {\n path = createNS('path');\n groupPath.appendChild(path);\n this.paths.push({\n p: path,\n m: i\n });\n }\n\n if (this.filterManager.effectElements[10].p.v === 3) {\n var mask = createNS('mask');\n var id = createElementID();\n mask.setAttribute('id', id);\n mask.setAttribute('mask-type', 'alpha');\n mask.appendChild(groupPath);\n this.elem.globalData.defs.appendChild(mask);\n var g = createNS('g');\n g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')');\n\n while (elemChildren[0]) {\n g.appendChild(elemChildren[0]);\n }\n\n this.elem.layerElement.appendChild(g);\n this.masker = mask;\n groupPath.setAttribute('stroke', '#fff');\n } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (this.filterManager.effectElements[10].p.v === 2) {\n elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;\n\n while (elemChildren.length) {\n this.elem.layerElement.removeChild(elemChildren[0]);\n }\n }\n\n this.elem.layerElement.appendChild(groupPath);\n this.elem.layerElement.removeAttribute('mask');\n groupPath.setAttribute('stroke', '#fff');\n }\n\n this.initialized = true;\n this.pathMasker = groupPath;\n };\n\n SVGStrokeEffect.prototype.renderFrame = function (forceRender) {\n if (!this.initialized) {\n this.initialize();\n }\n\n var i;\n var len = this.paths.length;\n var mask;\n var path;\n\n for (i = 0; i < len; i += 1) {\n if (this.paths[i].m !== -1) {\n mask = this.elem.maskManager.viewData[this.paths[i].m];\n path = this.paths[i].p;\n\n if (forceRender || this.filterManager._mdf || mask.prop._mdf) {\n path.setAttribute('d', mask.lastPath);\n }\n\n if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) {\n var dasharrayValue;\n\n if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) {\n var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01;\n var l = path.getTotalLength();\n dasharrayValue = '0 0 0 ' + l * s + ' ';\n var lineLength = l * (e - s);\n var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n var units = Math.floor(lineLength / segment);\n var j;\n\n for (j = 0; j < units; j += 1) {\n dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' ';\n }\n\n dasharrayValue += '0 ' + l * 10 + ' 0 0';\n } else {\n dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01;\n }\n\n path.setAttribute('stroke-dasharray', dasharrayValue);\n }\n }\n }\n\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2);\n }\n\n if (forceRender || this.filterManager.effectElements[6].p._mdf) {\n this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v);\n }\n\n if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) {\n if (forceRender || this.filterManager.effectElements[3].p._mdf) {\n var color = this.filterManager.effectElements[3].p.v;\n this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')');\n }\n }\n };\n\n function SVGTritoneFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var feColorMatrix = createNS('feColorMatrix');\n feColorMatrix.setAttribute('type', 'matrix');\n feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB');\n feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');\n filter.appendChild(feColorMatrix);\n var feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n this.matrixFilter = feComponentTransfer;\n var feFuncR = createNS('feFuncR');\n feFuncR.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncR);\n this.feFuncR = feFuncR;\n var feFuncG = createNS('feFuncG');\n feFuncG.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncG);\n this.feFuncG = feFuncG;\n var feFuncB = createNS('feFuncB');\n feFuncB.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFuncB);\n this.feFuncB = feFuncB;\n filter.appendChild(feComponentTransfer);\n }\n\n SVGTritoneFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var color1 = this.filterManager.effectElements[0].p.v;\n var color2 = this.filterManager.effectElements[1].p.v;\n var color3 = this.filterManager.effectElements[2].p.v;\n var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];\n var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];\n var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];\n this.feFuncR.setAttribute('tableValues', tableR);\n this.feFuncG.setAttribute('tableValues', tableG);\n this.feFuncB.setAttribute('tableValues', tableB);\n }\n };\n\n function SVGProLevelsFilter(filter, filterManager, elem, id) {\n this.filterManager = filterManager;\n var effectElements = this.filterManager.effectElements;\n var feComponentTransfer = createNS('feComponentTransfer'); // Red\n\n if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) {\n this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);\n } // Green\n\n\n if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) {\n this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);\n } // Blue\n\n\n if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) {\n this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);\n } // Alpha\n\n\n if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) {\n this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);\n } // RGB\n\n\n if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) {\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n filter.appendChild(feComponentTransfer);\n }\n\n if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) {\n feComponentTransfer = createNS('feComponentTransfer');\n feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB');\n feComponentTransfer.setAttribute('result', id);\n filter.appendChild(feComponentTransfer);\n this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);\n this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);\n this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);\n }\n }\n\n SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) {\n var feFunc = createNS(type);\n feFunc.setAttribute('type', 'table');\n feComponentTransfer.appendChild(feFunc);\n return feFunc;\n };\n\n SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) {\n var cnt = 0;\n var segments = 256;\n var perc;\n var min = Math.min(inputBlack, inputWhite);\n var max = Math.max(inputBlack, inputWhite);\n var table = Array.call(null, {\n length: segments\n });\n var colorValue;\n var pos = 0;\n var outputDelta = outputWhite - outputBlack;\n var inputDelta = inputWhite - inputBlack;\n\n while (cnt <= 256) {\n perc = cnt / 256;\n\n if (perc <= min) {\n colorValue = inputDelta < 0 ? outputWhite : outputBlack;\n } else if (perc >= max) {\n colorValue = inputDelta < 0 ? outputBlack : outputWhite;\n } else {\n colorValue = outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma);\n }\n\n table[pos] = colorValue;\n pos += 1;\n cnt += 256 / (segments - 1);\n }\n\n return table.join(' ');\n };\n\n SVGProLevelsFilter.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n var val;\n var effectElements = this.filterManager.effectElements;\n\n if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) {\n val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v);\n this.feFuncRComposed.setAttribute('tableValues', val);\n this.feFuncGComposed.setAttribute('tableValues', val);\n this.feFuncBComposed.setAttribute('tableValues', val);\n }\n\n if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) {\n val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v);\n this.feFuncR.setAttribute('tableValues', val);\n }\n\n if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) {\n val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v);\n this.feFuncG.setAttribute('tableValues', val);\n }\n\n if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) {\n val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v);\n this.feFuncB.setAttribute('tableValues', val);\n }\n\n if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) {\n val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v);\n this.feFuncA.setAttribute('tableValues', val);\n }\n }\n };\n\n function SVGDropShadowEffect(filter, filterManager, elem, id, source) {\n var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize;\n var filterSize = filterManager.data.fs || globalFilterSize;\n filter.setAttribute('x', filterSize.x || globalFilterSize.x);\n filter.setAttribute('y', filterSize.y || globalFilterSize.y);\n filter.setAttribute('width', filterSize.width || globalFilterSize.width);\n filter.setAttribute('height', filterSize.height || globalFilterSize.height);\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('in', 'SourceAlpha');\n feGaussianBlur.setAttribute('result', id + '_drop_shadow_1');\n feGaussianBlur.setAttribute('stdDeviation', '0');\n this.feGaussianBlur = feGaussianBlur;\n filter.appendChild(feGaussianBlur);\n var feOffset = createNS('feOffset');\n feOffset.setAttribute('dx', '25');\n feOffset.setAttribute('dy', '0');\n feOffset.setAttribute('in', id + '_drop_shadow_1');\n feOffset.setAttribute('result', id + '_drop_shadow_2');\n this.feOffset = feOffset;\n filter.appendChild(feOffset);\n var feFlood = createNS('feFlood');\n feFlood.setAttribute('flood-color', '#00ff00');\n feFlood.setAttribute('flood-opacity', '1');\n feFlood.setAttribute('result', id + '_drop_shadow_3');\n this.feFlood = feFlood;\n filter.appendChild(feFlood);\n var feComposite = createNS('feComposite');\n feComposite.setAttribute('in', id + '_drop_shadow_3');\n feComposite.setAttribute('in2', id + '_drop_shadow_2');\n feComposite.setAttribute('operator', 'in');\n feComposite.setAttribute('result', id + '_drop_shadow_4');\n filter.appendChild(feComposite);\n var feMerge = this.createMergeNode(id, [id + '_drop_shadow_4', source]);\n filter.appendChild(feMerge); //\n }\n\n extendPrototype([SVGComposableEffect], SVGDropShadowEffect);\n\n SVGDropShadowEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n if (forceRender || this.filterManager.effectElements[4].p._mdf) {\n this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);\n }\n\n if (forceRender || this.filterManager.effectElements[0].p._mdf) {\n var col = this.filterManager.effectElements[0].p.v;\n this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255)));\n }\n\n if (forceRender || this.filterManager.effectElements[1].p._mdf) {\n this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255);\n }\n\n if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) {\n var distance = this.filterManager.effectElements[3].p.v;\n var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;\n var x = distance * Math.cos(angle);\n var y = distance * Math.sin(angle);\n this.feOffset.setAttribute('dx', x);\n this.feOffset.setAttribute('dy', y);\n }\n }\n };\n\n var _svgMatteSymbols = [];\n\n function SVGMatte3Effect(filterElem, filterManager, elem) {\n this.initialized = false;\n this.filterManager = filterManager;\n this.filterElem = filterElem;\n this.elem = elem;\n elem.matteElement = createNS('g');\n elem.matteElement.appendChild(elem.layerElement);\n elem.matteElement.appendChild(elem.transformedElement);\n elem.baseElement = elem.matteElement;\n }\n\n SVGMatte3Effect.prototype.findSymbol = function (mask) {\n var i = 0;\n var len = _svgMatteSymbols.length;\n\n while (i < len) {\n if (_svgMatteSymbols[i] === mask) {\n return _svgMatteSymbols[i];\n }\n\n i += 1;\n }\n\n return null;\n };\n\n SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) {\n var parentNode = mask.layerElement.parentNode;\n\n if (!parentNode) {\n return;\n }\n\n var children = parentNode.children;\n var i = 0;\n var len = children.length;\n\n while (i < len) {\n if (children[i] === mask.layerElement) {\n break;\n }\n\n i += 1;\n }\n\n var nextChild;\n\n if (i <= len - 2) {\n nextChild = children[i + 1];\n }\n\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n\n if (nextChild) {\n parentNode.insertBefore(useElem, nextChild);\n } else {\n parentNode.appendChild(useElem);\n }\n };\n\n SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) {\n if (!this.findSymbol(mask)) {\n var symbolId = createElementID();\n var masker = createNS('mask');\n masker.setAttribute('id', mask.layerId);\n masker.setAttribute('mask-type', 'alpha');\n\n _svgMatteSymbols.push(mask);\n\n var defs = elem.globalData.defs;\n defs.appendChild(masker);\n var symbol = createNS('symbol');\n symbol.setAttribute('id', symbolId);\n this.replaceInParent(mask, symbolId);\n symbol.appendChild(mask.layerElement);\n defs.appendChild(symbol);\n var useElem = createNS('use');\n useElem.setAttribute('href', '#' + symbolId);\n masker.appendChild(useElem);\n mask.data.hd = false;\n mask.show();\n }\n\n elem.setMatte(mask.layerId);\n };\n\n SVGMatte3Effect.prototype.initialize = function () {\n var ind = this.filterManager.effectElements[0].p.v;\n var elements = this.elem.comp.elements;\n var i = 0;\n var len = elements.length;\n\n while (i < len) {\n if (elements[i] && elements[i].data.ind === ind) {\n this.setElementAsMask(this.elem, elements[i]);\n }\n\n i += 1;\n }\n\n this.initialized = true;\n };\n\n SVGMatte3Effect.prototype.renderFrame = function () {\n if (!this.initialized) {\n this.initialize();\n }\n };\n\n function SVGGaussianBlurEffect(filter, filterManager, elem, id) {\n // Outset the filter region by 100% on all sides to accommodate blur expansion.\n filter.setAttribute('x', '-100%');\n filter.setAttribute('y', '-100%');\n filter.setAttribute('width', '300%');\n filter.setAttribute('height', '300%');\n this.filterManager = filterManager;\n var feGaussianBlur = createNS('feGaussianBlur');\n feGaussianBlur.setAttribute('result', id);\n filter.appendChild(feGaussianBlur);\n this.feGaussianBlur = feGaussianBlur;\n }\n\n SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) {\n if (forceRender || this.filterManager._mdf) {\n // Empirical value, matching AE's blur appearance.\n var kBlurrinessToSigma = 0.3;\n var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; // Dimensions mapping:\n //\n // 1 -> horizontal & vertical\n // 2 -> horizontal only\n // 3 -> vertical only\n //\n\n var dimensions = this.filterManager.effectElements[1].p.v;\n var sigmaX = dimensions == 3 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n var sigmaY = dimensions == 2 ? 0 : sigma; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); // Repeat edges mapping:\n //\n // 0 -> off -> duplicate\n // 1 -> on -> wrap\n\n var edgeMode = this.filterManager.effectElements[2].p.v == 1 ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq\n\n this.feGaussianBlur.setAttribute('edgeMode', edgeMode);\n }\n };\n\n registerRenderer('canvas', CanvasRenderer);\n registerRenderer('html', HybridRenderer);\n registerRenderer('svg', SVGRenderer); // Registering shape modifiers\n\n ShapeModifiers.registerModifier('tm', TrimModifier);\n ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier);\n ShapeModifiers.registerModifier('rp', RepeaterModifier);\n ShapeModifiers.registerModifier('rd', RoundCornersModifier); // Registering expression plugin\n\n setExpressionsPlugin(Expressions);\n initialize$1();\n initialize(); // Registering svg effects\n\n registerEffect(20, SVGTintFilter, true);\n registerEffect(21, SVGFillFilter, true);\n registerEffect(22, SVGStrokeEffect, false);\n registerEffect(23, SVGTritoneFilter, true);\n registerEffect(24, SVGProLevelsFilter, true);\n registerEffect(25, SVGDropShadowEffect, true);\n registerEffect(28, SVGMatte3Effect, false);\n registerEffect(29, SVGGaussianBlurEffect, true);\n\n return lottie;\n\n}));\n","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n const hasConfig = typeof config === 'object';\n return new Promise((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: () => {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n","import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n return defer(() => (condition() ? trueResult : falseResult));\n}\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => delayDurationSelector(value, index).pipe(take(1), mapTo(value)));\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return operate((source, subscriber) => {\n let index = 0;\n let innerSub = null;\n let isComplete = false;\n source.subscribe(createOperatorSubscriber(subscriber, (outerValue) => {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, () => {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n }, () => {\n isComplete = true;\n !innerSub && subscriber.complete();\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n return operate((source, subscriber) => {\n let prev;\n let hasPrev = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n }));\n });\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n","/*!\n * Viewer.js v1.11.1\n * https://fengyuanchen.github.io/viewerjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2022-11-06T05:18:19.939Z\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Viewer = factory());\n})(this, (function () { 'use strict';\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n }\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n }\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n\n var DEFAULTS = {\n /**\n * Enable a modal backdrop, specify `static` for a backdrop\n * which doesn't close the modal on click.\n * @type {boolean}\n */\n backdrop: true,\n /**\n * Show the button on the top-right of the viewer.\n * @type {boolean}\n */\n button: true,\n /**\n * Show the navbar.\n * @type {boolean | number}\n */\n navbar: true,\n /**\n * Specify the visibility and the content of the title.\n * @type {boolean | number | Function | Array}\n */\n title: true,\n /**\n * Show the toolbar.\n * @type {boolean | number | Object}\n */\n toolbar: true,\n /**\n * Custom class name(s) to add to the viewer's root element.\n * @type {string}\n */\n className: '',\n /**\n * Define where to put the viewer in modal mode.\n * @type {string | Element}\n */\n container: 'body',\n /**\n * Filter the images for viewing. Return true if the image is viewable.\n * @type {Function}\n */\n filter: null,\n /**\n * Enable to request fullscreen when play.\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}\n * @type {boolean|FullscreenOptions}\n */\n fullscreen: true,\n /**\n * Define the extra attributes to inherit from the original image.\n * @type {Array}\n */\n inheritedAttributes: ['crossOrigin', 'decoding', 'isMap', 'loading', 'referrerPolicy', 'sizes', 'srcset', 'useMap'],\n /**\n * Define the initial coverage of the viewing image.\n * @type {number}\n */\n initialCoverage: 0.9,\n /**\n * Define the initial index of the image for viewing.\n * @type {number}\n */\n initialViewIndex: 0,\n /**\n * Enable inline mode.\n * @type {boolean}\n */\n inline: false,\n /**\n * The amount of time to delay between automatically cycling an image when playing.\n * @type {number}\n */\n interval: 5000,\n /**\n * Enable keyboard support.\n * @type {boolean}\n */\n keyboard: true,\n /**\n * Focus the viewer when initialized.\n * @type {boolean}\n */\n focus: true,\n /**\n * Indicate if show a loading spinner when load image or not.\n * @type {boolean}\n */\n loading: true,\n /**\n * Indicate if enable loop viewing or not.\n * @type {boolean}\n */\n loop: true,\n /**\n * Min width of the viewer in inline mode.\n * @type {number}\n */\n minWidth: 200,\n /**\n * Min height of the viewer in inline mode.\n * @type {number}\n */\n minHeight: 100,\n /**\n * Enable to move the image.\n * @type {boolean}\n */\n movable: true,\n /**\n * Enable to rotate the image.\n * @type {boolean}\n */\n rotatable: true,\n /**\n * Enable to scale the image.\n * @type {boolean}\n */\n scalable: true,\n /**\n * Enable to zoom the image.\n * @type {boolean}\n */\n zoomable: true,\n /**\n * Enable to zoom the current image by dragging on the touch screen.\n * @type {boolean}\n */\n zoomOnTouch: true,\n /**\n * Enable to zoom the image by wheeling mouse.\n * @type {boolean}\n */\n zoomOnWheel: true,\n /**\n * Enable to slide to the next or previous image by swiping on the touch screen.\n * @type {boolean}\n */\n slideOnTouch: true,\n /**\n * Indicate if toggle the image size between its natural size\n * and initial size when double click on the image or not.\n * @type {boolean}\n */\n toggleOnDblclick: true,\n /**\n * Show the tooltip with image ratio (percentage) when zoom in or zoom out.\n * @type {boolean}\n */\n tooltip: true,\n /**\n * Enable CSS3 Transition for some special elements.\n * @type {boolean}\n */\n transition: true,\n /**\n * Define the CSS `z-index` value of viewer in modal mode.\n * @type {number}\n */\n zIndex: 2015,\n /**\n * Define the CSS `z-index` value of viewer in inline mode.\n * @type {number}\n */\n zIndexInline: 0,\n /**\n * Define the ratio when zoom the image by wheeling mouse.\n * @type {number}\n */\n zoomRatio: 0.1,\n /**\n * Define the min ratio of the image when zoom out.\n * @type {number}\n */\n minZoomRatio: 0.01,\n /**\n * Define the max ratio of the image when zoom in.\n * @type {number}\n */\n maxZoomRatio: 100,\n /**\n * Define where to get the original image URL for viewing.\n * @type {string | Function}\n */\n url: 'src',\n /**\n * Event shortcuts.\n * @type {Function}\n */\n ready: null,\n show: null,\n shown: null,\n hide: null,\n hidden: null,\n view: null,\n viewed: null,\n move: null,\n moved: null,\n rotate: null,\n rotated: null,\n scale: null,\n scaled: null,\n zoom: null,\n zoomed: null,\n play: null,\n stop: null\n };\n\n var TEMPLATE = '
    ' + '
    ' + '
    ' + '
    ' + '
    ' + '
    ' + '
      ' + '
      ' + '
      ' + '
      ' + '
      ' + '
      ' + '
      ';\n\n var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n var WINDOW = IS_BROWSER ? window : {};\n var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false;\n var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false;\n var NAMESPACE = 'viewer';\n\n // Actions\n var ACTION_MOVE = 'move';\n var ACTION_SWITCH = 'switch';\n var ACTION_ZOOM = 'zoom';\n\n // Classes\n var CLASS_ACTIVE = \"\".concat(NAMESPACE, \"-active\");\n var CLASS_CLOSE = \"\".concat(NAMESPACE, \"-close\");\n var CLASS_FADE = \"\".concat(NAMESPACE, \"-fade\");\n var CLASS_FIXED = \"\".concat(NAMESPACE, \"-fixed\");\n var CLASS_FULLSCREEN = \"\".concat(NAMESPACE, \"-fullscreen\");\n var CLASS_FULLSCREEN_EXIT = \"\".concat(NAMESPACE, \"-fullscreen-exit\");\n var CLASS_HIDE = \"\".concat(NAMESPACE, \"-hide\");\n var CLASS_HIDE_MD_DOWN = \"\".concat(NAMESPACE, \"-hide-md-down\");\n var CLASS_HIDE_SM_DOWN = \"\".concat(NAMESPACE, \"-hide-sm-down\");\n var CLASS_HIDE_XS_DOWN = \"\".concat(NAMESPACE, \"-hide-xs-down\");\n var CLASS_IN = \"\".concat(NAMESPACE, \"-in\");\n var CLASS_INVISIBLE = \"\".concat(NAMESPACE, \"-invisible\");\n var CLASS_LOADING = \"\".concat(NAMESPACE, \"-loading\");\n var CLASS_MOVE = \"\".concat(NAMESPACE, \"-move\");\n var CLASS_OPEN = \"\".concat(NAMESPACE, \"-open\");\n var CLASS_SHOW = \"\".concat(NAMESPACE, \"-show\");\n var CLASS_TRANSITION = \"\".concat(NAMESPACE, \"-transition\");\n\n // Native events\n var EVENT_CLICK = 'click';\n var EVENT_DBLCLICK = 'dblclick';\n var EVENT_DRAG_START = 'dragstart';\n var EVENT_FOCUSIN = 'focusin';\n var EVENT_KEY_DOWN = 'keydown';\n var EVENT_LOAD = 'load';\n var EVENT_ERROR = 'error';\n var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup';\n var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove';\n var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown';\n var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START;\n var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE;\n var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END;\n var EVENT_RESIZE = 'resize';\n var EVENT_TRANSITION_END = 'transitionend';\n var EVENT_WHEEL = 'wheel';\n\n // Custom events\n var EVENT_READY = 'ready';\n var EVENT_SHOW = 'show';\n var EVENT_SHOWN = 'shown';\n var EVENT_HIDE = 'hide';\n var EVENT_HIDDEN = 'hidden';\n var EVENT_VIEW = 'view';\n var EVENT_VIEWED = 'viewed';\n var EVENT_MOVE = 'move';\n var EVENT_MOVED = 'moved';\n var EVENT_ROTATE = 'rotate';\n var EVENT_ROTATED = 'rotated';\n var EVENT_SCALE = 'scale';\n var EVENT_SCALED = 'scaled';\n var EVENT_ZOOM = 'zoom';\n var EVENT_ZOOMED = 'zoomed';\n var EVENT_PLAY = 'play';\n var EVENT_STOP = 'stop';\n\n // Data keys\n var DATA_ACTION = \"\".concat(NAMESPACE, \"Action\");\n\n // RegExps\n var REGEXP_SPACES = /\\s\\s*/;\n\n // Misc\n var BUTTONS = ['zoom-in', 'zoom-out', 'one-to-one', 'reset', 'prev', 'play', 'next', 'rotate-left', 'rotate-right', 'flip-horizontal', 'flip-vertical'];\n\n /**\n * Check if the given value is a string.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a string, else `false`.\n */\n function isString(value) {\n return typeof value === 'string';\n }\n\n /**\n * Check if the given value is not a number.\n */\n var isNaN = Number.isNaN || WINDOW.isNaN;\n\n /**\n * Check if the given value is a number.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a number, else `false`.\n */\n function isNumber(value) {\n return typeof value === 'number' && !isNaN(value);\n }\n\n /**\n * Check if the given value is undefined.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is undefined, else `false`.\n */\n function isUndefined(value) {\n return typeof value === 'undefined';\n }\n\n /**\n * Check if the given value is an object.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is an object, else `false`.\n */\n function isObject(value) {\n return _typeof(value) === 'object' && value !== null;\n }\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /**\n * Check if the given value is a plain object.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a plain object, else `false`.\n */\n function isPlainObject(value) {\n if (!isObject(value)) {\n return false;\n }\n try {\n var _constructor = value.constructor;\n var prototype = _constructor.prototype;\n return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');\n } catch (error) {\n return false;\n }\n }\n\n /**\n * Check if the given value is a function.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a function, else `false`.\n */\n function isFunction(value) {\n return typeof value === 'function';\n }\n\n /**\n * Iterate the given data.\n * @param {*} data - The data to iterate.\n * @param {Function} callback - The process function for each element.\n * @returns {*} The original data.\n */\n function forEach(data, callback) {\n if (data && isFunction(callback)) {\n if (Array.isArray(data) || isNumber(data.length) /* array-like */) {\n var length = data.length;\n var i;\n for (i = 0; i < length; i += 1) {\n if (callback.call(data, data[i], i, data) === false) {\n break;\n }\n }\n } else if (isObject(data)) {\n Object.keys(data).forEach(function (key) {\n callback.call(data, data[key], key, data);\n });\n }\n }\n return data;\n }\n\n /**\n * Extend the given object.\n * @param {*} obj - The object to be extended.\n * @param {*} args - The rest objects which will be merged to the first object.\n * @returns {Object} The extended object.\n */\n var assign = Object.assign || function assign(obj) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n if (isObject(obj) && args.length > 0) {\n args.forEach(function (arg) {\n if (isObject(arg)) {\n Object.keys(arg).forEach(function (key) {\n obj[key] = arg[key];\n });\n }\n });\n }\n return obj;\n };\n var REGEXP_SUFFIX = /^(?:width|height|left|top|marginLeft|marginTop)$/;\n\n /**\n * Apply styles to the given element.\n * @param {Element} element - The target element.\n * @param {Object} styles - The styles for applying.\n */\n function setStyle(element, styles) {\n var style = element.style;\n forEach(styles, function (value, property) {\n if (REGEXP_SUFFIX.test(property) && isNumber(value)) {\n value += 'px';\n }\n style[property] = value;\n });\n }\n\n /**\n * Escape a string for using in HTML.\n * @param {String} value - The string to escape.\n * @returns {String} Returns the escaped string.\n */\n function escapeHTMLEntities(value) {\n return isString(value) ? value.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>') : value;\n }\n\n /**\n * Check if the given element has a special class.\n * @param {Element} element - The element to check.\n * @param {string} value - The class to search.\n * @returns {boolean} Returns `true` if the special class was found.\n */\n function hasClass(element, value) {\n if (!element || !value) {\n return false;\n }\n return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;\n }\n\n /**\n * Add classes to the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be added.\n */\n function addClass(element, value) {\n if (!element || !value) {\n return;\n }\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n addClass(elem, value);\n });\n return;\n }\n if (element.classList) {\n element.classList.add(value);\n return;\n }\n var className = element.className.trim();\n if (!className) {\n element.className = value;\n } else if (className.indexOf(value) < 0) {\n element.className = \"\".concat(className, \" \").concat(value);\n }\n }\n\n /**\n * Remove classes from the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be removed.\n */\n function removeClass(element, value) {\n if (!element || !value) {\n return;\n }\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n removeClass(elem, value);\n });\n return;\n }\n if (element.classList) {\n element.classList.remove(value);\n return;\n }\n if (element.className.indexOf(value) >= 0) {\n element.className = element.className.replace(value, '');\n }\n }\n\n /**\n * Add or remove classes from the given element.\n * @param {Element} element - The target element.\n * @param {string} value - The classes to be toggled.\n * @param {boolean} added - Add only.\n */\n function toggleClass(element, value, added) {\n if (!value) {\n return;\n }\n if (isNumber(element.length)) {\n forEach(element, function (elem) {\n toggleClass(elem, value, added);\n });\n return;\n }\n\n // IE10-11 doesn't support the second parameter of `classList.toggle`\n if (added) {\n addClass(element, value);\n } else {\n removeClass(element, value);\n }\n }\n var REGEXP_HYPHENATE = /([a-z\\d])([A-Z])/g;\n\n /**\n * Transform the given string from camelCase to kebab-case\n * @param {string} value - The value to transform.\n * @returns {string} The transformed value.\n */\n function hyphenate(value) {\n return value.replace(REGEXP_HYPHENATE, '$1-$2').toLowerCase();\n }\n\n /**\n * Get data from the given element.\n * @param {Element} element - The target element.\n * @param {string} name - The data key to get.\n * @returns {string} The data value.\n */\n function getData(element, name) {\n if (isObject(element[name])) {\n return element[name];\n }\n if (element.dataset) {\n return element.dataset[name];\n }\n return element.getAttribute(\"data-\".concat(hyphenate(name)));\n }\n\n /**\n * Set data to the given element.\n * @param {Element} element - The target element.\n * @param {string} name - The data key to set.\n * @param {string} data - The data value.\n */\n function setData(element, name, data) {\n if (isObject(data)) {\n element[name] = data;\n } else if (element.dataset) {\n element.dataset[name] = data;\n } else {\n element.setAttribute(\"data-\".concat(hyphenate(name)), data);\n }\n }\n var onceSupported = function () {\n var supported = false;\n if (IS_BROWSER) {\n var once = false;\n var listener = function listener() {};\n var options = Object.defineProperty({}, 'once', {\n get: function get() {\n supported = true;\n return once;\n },\n /**\n * This setter can fix a `TypeError` in strict mode\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}\n * @param {boolean} value - The value to set\n */\n set: function set(value) {\n once = value;\n }\n });\n WINDOW.addEventListener('test', listener, options);\n WINDOW.removeEventListener('test', listener, options);\n }\n return supported;\n }();\n\n /**\n * Remove event listener from the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Function} listener - The event listener.\n * @param {Object} options - The event options.\n */\n function removeListener(element, type, listener) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var handler = listener;\n type.trim().split(REGEXP_SPACES).forEach(function (event) {\n if (!onceSupported) {\n var listeners = element.listeners;\n if (listeners && listeners[event] && listeners[event][listener]) {\n handler = listeners[event][listener];\n delete listeners[event][listener];\n if (Object.keys(listeners[event]).length === 0) {\n delete listeners[event];\n }\n if (Object.keys(listeners).length === 0) {\n delete element.listeners;\n }\n }\n }\n element.removeEventListener(event, handler, options);\n });\n }\n\n /**\n * Add event listener to the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Function} listener - The event listener.\n * @param {Object} options - The event options.\n */\n function addListener(element, type, listener) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var _handler = listener;\n type.trim().split(REGEXP_SPACES).forEach(function (event) {\n if (options.once && !onceSupported) {\n var _element$listeners = element.listeners,\n listeners = _element$listeners === void 0 ? {} : _element$listeners;\n _handler = function handler() {\n delete listeners[event][listener];\n element.removeEventListener(event, _handler, options);\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n listener.apply(element, args);\n };\n if (!listeners[event]) {\n listeners[event] = {};\n }\n if (listeners[event][listener]) {\n element.removeEventListener(event, listeners[event][listener], options);\n }\n listeners[event][listener] = _handler;\n element.listeners = listeners;\n }\n element.addEventListener(event, _handler, options);\n });\n }\n\n /**\n * Dispatch event on the target element.\n * @param {Element} element - The event target.\n * @param {string} type - The event type(s).\n * @param {Object} data - The additional event data.\n * @param {Object} options - The additional event options.\n * @returns {boolean} Indicate if the event is default prevented or not.\n */\n function dispatchEvent(element, type, data, options) {\n var event;\n\n // Event and CustomEvent on IE9-11 are global objects, not constructors\n if (isFunction(Event) && isFunction(CustomEvent)) {\n event = new CustomEvent(type, _objectSpread2({\n bubbles: true,\n cancelable: true,\n detail: data\n }, options));\n } else {\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(type, true, true, data);\n }\n return element.dispatchEvent(event);\n }\n\n /**\n * Get the offset base on the document.\n * @param {Element} element - The target element.\n * @returns {Object} The offset data.\n */\n function getOffset(element) {\n var box = element.getBoundingClientRect();\n return {\n left: box.left + (window.pageXOffset - document.documentElement.clientLeft),\n top: box.top + (window.pageYOffset - document.documentElement.clientTop)\n };\n }\n\n /**\n * Get transforms base on the given object.\n * @param {Object} obj - The target object.\n * @returns {string} A string contains transform values.\n */\n function getTransforms(_ref) {\n var rotate = _ref.rotate,\n scaleX = _ref.scaleX,\n scaleY = _ref.scaleY,\n translateX = _ref.translateX,\n translateY = _ref.translateY;\n var values = [];\n if (isNumber(translateX) && translateX !== 0) {\n values.push(\"translateX(\".concat(translateX, \"px)\"));\n }\n if (isNumber(translateY) && translateY !== 0) {\n values.push(\"translateY(\".concat(translateY, \"px)\"));\n }\n\n // Rotate should come first before scale to match orientation transform\n if (isNumber(rotate) && rotate !== 0) {\n values.push(\"rotate(\".concat(rotate, \"deg)\"));\n }\n if (isNumber(scaleX) && scaleX !== 1) {\n values.push(\"scaleX(\".concat(scaleX, \")\"));\n }\n if (isNumber(scaleY) && scaleY !== 1) {\n values.push(\"scaleY(\".concat(scaleY, \")\"));\n }\n var transform = values.length ? values.join(' ') : 'none';\n return {\n WebkitTransform: transform,\n msTransform: transform,\n transform: transform\n };\n }\n\n /**\n * Get an image name from an image url.\n * @param {string} url - The target url.\n * @example\n * // picture.jpg\n * getImageNameFromURL('https://domain.com/path/to/picture.jpg?size=1280×960')\n * @returns {string} A string contains the image name.\n */\n function getImageNameFromURL(url) {\n return isString(url) ? decodeURIComponent(url.replace(/^.*\\//, '').replace(/[?&#].*$/, '')) : '';\n }\n var IS_SAFARI = WINDOW.navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(WINDOW.navigator.userAgent);\n\n /**\n * Get an image's natural sizes.\n * @param {string} image - The target image.\n * @param {Object} options - The viewer options.\n * @param {Function} callback - The callback function.\n * @returns {HTMLImageElement} The new image.\n */\n function getImageNaturalSizes(image, options, callback) {\n var newImage = document.createElement('img');\n\n // Modern browsers (except Safari)\n if (image.naturalWidth && !IS_SAFARI) {\n callback(image.naturalWidth, image.naturalHeight);\n return newImage;\n }\n var body = document.body || document.documentElement;\n newImage.onload = function () {\n callback(newImage.width, newImage.height);\n if (!IS_SAFARI) {\n body.removeChild(newImage);\n }\n };\n forEach(options.inheritedAttributes, function (name) {\n var value = image.getAttribute(name);\n if (value !== null) {\n newImage.setAttribute(name, value);\n }\n });\n newImage.src = image.src;\n\n // iOS Safari will convert the image automatically\n // with its orientation once append it into DOM\n if (!IS_SAFARI) {\n newImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';\n body.appendChild(newImage);\n }\n return newImage;\n }\n\n /**\n * Get the related class name of a responsive type number.\n * @param {string} type - The responsive type.\n * @returns {string} The related class name.\n */\n function getResponsiveClass(type) {\n switch (type) {\n case 2:\n return CLASS_HIDE_XS_DOWN;\n case 3:\n return CLASS_HIDE_SM_DOWN;\n case 4:\n return CLASS_HIDE_MD_DOWN;\n default:\n return '';\n }\n }\n\n /**\n * Get the max ratio of a group of pointers.\n * @param {string} pointers - The target pointers.\n * @returns {number} The result ratio.\n */\n function getMaxZoomRatio(pointers) {\n var pointers2 = _objectSpread2({}, pointers);\n var ratios = [];\n forEach(pointers, function (pointer, pointerId) {\n delete pointers2[pointerId];\n forEach(pointers2, function (pointer2) {\n var x1 = Math.abs(pointer.startX - pointer2.startX);\n var y1 = Math.abs(pointer.startY - pointer2.startY);\n var x2 = Math.abs(pointer.endX - pointer2.endX);\n var y2 = Math.abs(pointer.endY - pointer2.endY);\n var z1 = Math.sqrt(x1 * x1 + y1 * y1);\n var z2 = Math.sqrt(x2 * x2 + y2 * y2);\n var ratio = (z2 - z1) / z1;\n ratios.push(ratio);\n });\n });\n ratios.sort(function (a, b) {\n return Math.abs(a) < Math.abs(b);\n });\n return ratios[0];\n }\n\n /**\n * Get a pointer from an event object.\n * @param {Object} event - The target event object.\n * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not.\n * @returns {Object} The result pointer contains start and/or end point coordinates.\n */\n function getPointer(_ref2, endOnly) {\n var pageX = _ref2.pageX,\n pageY = _ref2.pageY;\n var end = {\n endX: pageX,\n endY: pageY\n };\n return endOnly ? end : _objectSpread2({\n timeStamp: Date.now(),\n startX: pageX,\n startY: pageY\n }, end);\n }\n\n /**\n * Get the center point coordinate of a group of pointers.\n * @param {Object} pointers - The target pointers.\n * @returns {Object} The center point coordinate.\n */\n function getPointersCenter(pointers) {\n var pageX = 0;\n var pageY = 0;\n var count = 0;\n forEach(pointers, function (_ref3) {\n var startX = _ref3.startX,\n startY = _ref3.startY;\n pageX += startX;\n pageY += startY;\n count += 1;\n });\n pageX /= count;\n pageY /= count;\n return {\n pageX: pageX,\n pageY: pageY\n };\n }\n\n var render = {\n render: function render() {\n this.initContainer();\n this.initViewer();\n this.initList();\n this.renderViewer();\n },\n initBody: function initBody() {\n var ownerDocument = this.element.ownerDocument;\n var body = ownerDocument.body || ownerDocument.documentElement;\n this.body = body;\n this.scrollbarWidth = window.innerWidth - ownerDocument.documentElement.clientWidth;\n this.initialBodyPaddingRight = body.style.paddingRight;\n this.initialBodyComputedPaddingRight = window.getComputedStyle(body).paddingRight;\n },\n initContainer: function initContainer() {\n this.containerData = {\n width: window.innerWidth,\n height: window.innerHeight\n };\n },\n initViewer: function initViewer() {\n var options = this.options,\n parent = this.parent;\n var viewerData;\n if (options.inline) {\n viewerData = {\n width: Math.max(parent.offsetWidth, options.minWidth),\n height: Math.max(parent.offsetHeight, options.minHeight)\n };\n this.parentData = viewerData;\n }\n if (this.fulled || !viewerData) {\n viewerData = this.containerData;\n }\n this.viewerData = assign({}, viewerData);\n },\n renderViewer: function renderViewer() {\n if (this.options.inline && !this.fulled) {\n setStyle(this.viewer, this.viewerData);\n }\n },\n initList: function initList() {\n var _this = this;\n var element = this.element,\n options = this.options,\n list = this.list;\n var items = [];\n\n // initList may be called in this.update, so should keep idempotent\n list.innerHTML = '';\n forEach(this.images, function (image, index) {\n var src = image.src;\n var alt = image.alt || getImageNameFromURL(src);\n var url = _this.getImageURL(image);\n if (src || url) {\n var item = document.createElement('li');\n var img = document.createElement('img');\n forEach(options.inheritedAttributes, function (name) {\n var value = image.getAttribute(name);\n if (value !== null) {\n img.setAttribute(name, value);\n }\n });\n if (options.navbar) {\n img.src = src || url;\n }\n img.alt = alt;\n img.setAttribute('data-original-url', url || src);\n item.setAttribute('data-index', index);\n item.setAttribute('data-viewer-action', 'view');\n item.setAttribute('role', 'button');\n if (options.keyboard) {\n item.setAttribute('tabindex', 0);\n }\n item.appendChild(img);\n list.appendChild(item);\n items.push(item);\n }\n });\n this.items = items;\n forEach(items, function (item) {\n var image = item.firstElementChild;\n var onLoad;\n var onError;\n setData(image, 'filled', true);\n if (options.loading) {\n addClass(item, CLASS_LOADING);\n }\n addListener(image, EVENT_LOAD, onLoad = function onLoad(event) {\n removeListener(image, EVENT_ERROR, onError);\n if (options.loading) {\n removeClass(item, CLASS_LOADING);\n }\n _this.loadImage(event);\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n if (options.loading) {\n removeClass(item, CLASS_LOADING);\n }\n }, {\n once: true\n });\n });\n if (options.transition) {\n addListener(element, EVENT_VIEWED, function () {\n addClass(list, CLASS_TRANSITION);\n }, {\n once: true\n });\n }\n },\n renderList: function renderList() {\n var index = this.index;\n var item = this.items[index];\n if (!item) {\n return;\n }\n var next = item.nextElementSibling;\n var gutter = parseInt(window.getComputedStyle(next || item).marginLeft, 10);\n var offsetWidth = item.offsetWidth;\n var outerWidth = offsetWidth + gutter;\n\n // Place the active item in the center of the screen\n setStyle(this.list, assign({\n width: outerWidth * this.length - gutter\n }, getTransforms({\n translateX: (this.viewerData.width - offsetWidth) / 2 - outerWidth * index\n })));\n },\n resetList: function resetList() {\n var list = this.list;\n list.innerHTML = '';\n removeClass(list, CLASS_TRANSITION);\n setStyle(list, getTransforms({\n translateX: 0\n }));\n },\n initImage: function initImage(done) {\n var _this2 = this;\n var options = this.options,\n image = this.image,\n viewerData = this.viewerData;\n var footerHeight = this.footer.offsetHeight;\n var viewerWidth = viewerData.width;\n var viewerHeight = Math.max(viewerData.height - footerHeight, footerHeight);\n var oldImageData = this.imageData || {};\n var sizingImage;\n this.imageInitializing = {\n abort: function abort() {\n sizingImage.onload = null;\n }\n };\n sizingImage = getImageNaturalSizes(image, options, function (naturalWidth, naturalHeight) {\n var aspectRatio = naturalWidth / naturalHeight;\n var initialCoverage = Math.max(0, Math.min(1, options.initialCoverage));\n var width = viewerWidth;\n var height = viewerHeight;\n _this2.imageInitializing = false;\n if (viewerHeight * aspectRatio > viewerWidth) {\n height = viewerWidth / aspectRatio;\n } else {\n width = viewerHeight * aspectRatio;\n }\n initialCoverage = isNumber(initialCoverage) ? initialCoverage : 0.9;\n width = Math.min(width * initialCoverage, naturalWidth);\n height = Math.min(height * initialCoverage, naturalHeight);\n var left = (viewerWidth - width) / 2;\n var top = (viewerHeight - height) / 2;\n var imageData = {\n left: left,\n top: top,\n x: left,\n y: top,\n width: width,\n height: height,\n oldRatio: 1,\n ratio: width / naturalWidth,\n aspectRatio: aspectRatio,\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight\n };\n var initialImageData = assign({}, imageData);\n if (options.rotatable) {\n imageData.rotate = oldImageData.rotate || 0;\n initialImageData.rotate = 0;\n }\n if (options.scalable) {\n imageData.scaleX = oldImageData.scaleX || 1;\n imageData.scaleY = oldImageData.scaleY || 1;\n initialImageData.scaleX = 1;\n initialImageData.scaleY = 1;\n }\n _this2.imageData = imageData;\n _this2.initialImageData = initialImageData;\n if (done) {\n done();\n }\n });\n },\n renderImage: function renderImage(done) {\n var _this3 = this;\n var image = this.image,\n imageData = this.imageData;\n setStyle(image, assign({\n width: imageData.width,\n height: imageData.height,\n // XXX: Not to use translateX/Y to avoid image shaking when zooming\n marginLeft: imageData.x,\n marginTop: imageData.y\n }, getTransforms(imageData)));\n if (done) {\n if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && hasClass(image, CLASS_TRANSITION)) {\n var onTransitionEnd = function onTransitionEnd() {\n _this3.imageRendering = false;\n done();\n };\n this.imageRendering = {\n abort: function abort() {\n removeListener(image, EVENT_TRANSITION_END, onTransitionEnd);\n }\n };\n addListener(image, EVENT_TRANSITION_END, onTransitionEnd, {\n once: true\n });\n } else {\n done();\n }\n }\n },\n resetImage: function resetImage() {\n // this.image only defined after viewed\n if (this.viewing || this.viewed) {\n var image = this.image;\n if (this.viewing) {\n this.viewing.abort();\n }\n image.parentNode.removeChild(image);\n this.image = null;\n }\n }\n };\n\n var events = {\n bind: function bind() {\n var options = this.options,\n viewer = this.viewer,\n canvas = this.canvas;\n var document = this.element.ownerDocument;\n addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this));\n addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this));\n addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this));\n addListener(document, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));\n addListener(document, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));\n addListener(document, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));\n addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));\n if (options.zoomable && options.zoomOnWheel) {\n addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {\n passive: false,\n capture: true\n });\n }\n if (options.toggleOnDblclick) {\n addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));\n }\n },\n unbind: function unbind() {\n var options = this.options,\n viewer = this.viewer,\n canvas = this.canvas;\n var document = this.element.ownerDocument;\n removeListener(viewer, EVENT_CLICK, this.onClick);\n removeListener(viewer, EVENT_DRAG_START, this.onDragStart);\n removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown);\n removeListener(document, EVENT_POINTER_MOVE, this.onPointerMove);\n removeListener(document, EVENT_POINTER_UP, this.onPointerUp);\n removeListener(document, EVENT_KEY_DOWN, this.onKeyDown);\n removeListener(window, EVENT_RESIZE, this.onResize);\n if (options.zoomable && options.zoomOnWheel) {\n removeListener(viewer, EVENT_WHEEL, this.onWheel, {\n passive: false,\n capture: true\n });\n }\n if (options.toggleOnDblclick) {\n removeListener(canvas, EVENT_DBLCLICK, this.onDblclick);\n }\n }\n };\n\n var handlers = {\n click: function click(event) {\n var options = this.options,\n imageData = this.imageData;\n var target = event.target;\n var action = getData(target, DATA_ACTION);\n if (!action && target.localName === 'img' && target.parentElement.localName === 'li') {\n target = target.parentElement;\n action = getData(target, DATA_ACTION);\n }\n\n // Cancel the emulated click when the native click event was triggered.\n if (IS_TOUCH_DEVICE && event.isTrusted && target === this.canvas) {\n clearTimeout(this.clickCanvasTimeout);\n }\n switch (action) {\n case 'mix':\n if (this.played) {\n this.stop();\n } else if (options.inline) {\n if (this.fulled) {\n this.exit();\n } else {\n this.full();\n }\n } else {\n this.hide();\n }\n break;\n case 'hide':\n this.hide();\n break;\n case 'view':\n this.view(getData(target, 'index'));\n break;\n case 'zoom-in':\n this.zoom(0.1, true);\n break;\n case 'zoom-out':\n this.zoom(-0.1, true);\n break;\n case 'one-to-one':\n this.toggle();\n break;\n case 'reset':\n this.reset();\n break;\n case 'prev':\n this.prev(options.loop);\n break;\n case 'play':\n this.play(options.fullscreen);\n break;\n case 'next':\n this.next(options.loop);\n break;\n case 'rotate-left':\n this.rotate(-90);\n break;\n case 'rotate-right':\n this.rotate(90);\n break;\n case 'flip-horizontal':\n this.scaleX(-imageData.scaleX || -1);\n break;\n case 'flip-vertical':\n this.scaleY(-imageData.scaleY || -1);\n break;\n default:\n if (this.played) {\n this.stop();\n }\n }\n },\n dblclick: function dblclick(event) {\n event.preventDefault();\n if (this.viewed && event.target === this.image) {\n // Cancel the emulated double click when the native dblclick event was triggered.\n if (IS_TOUCH_DEVICE && event.isTrusted) {\n clearTimeout(this.doubleClickImageTimeout);\n }\n\n // XXX: No pageX/Y properties in custom event, fallback to the original event.\n this.toggle(event.isTrusted ? event : event.detail && event.detail.originalEvent);\n }\n },\n load: function load() {\n var _this = this;\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = false;\n }\n var element = this.element,\n options = this.options,\n image = this.image,\n index = this.index,\n viewerData = this.viewerData;\n removeClass(image, CLASS_INVISIBLE);\n if (options.loading) {\n removeClass(this.canvas, CLASS_LOADING);\n }\n image.style.cssText = 'height:0;' + \"margin-left:\".concat(viewerData.width / 2, \"px;\") + \"margin-top:\".concat(viewerData.height / 2, \"px;\") + 'max-width:none!important;' + 'position:relative;' + 'width:0;';\n this.initImage(function () {\n toggleClass(image, CLASS_MOVE, options.movable);\n toggleClass(image, CLASS_TRANSITION, options.transition);\n _this.renderImage(function () {\n _this.viewed = true;\n _this.viewing = false;\n if (isFunction(options.viewed)) {\n addListener(element, EVENT_VIEWED, options.viewed, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_VIEWED, {\n originalImage: _this.images[index],\n index: index,\n image: image\n }, {\n cancelable: false\n });\n });\n });\n },\n loadImage: function loadImage(event) {\n var image = event.target;\n var parent = image.parentNode;\n var parentWidth = parent.offsetWidth || 30;\n var parentHeight = parent.offsetHeight || 50;\n var filled = !!getData(image, 'filled');\n getImageNaturalSizes(image, this.options, function (naturalWidth, naturalHeight) {\n var aspectRatio = naturalWidth / naturalHeight;\n var width = parentWidth;\n var height = parentHeight;\n if (parentHeight * aspectRatio > parentWidth) {\n if (filled) {\n width = parentHeight * aspectRatio;\n } else {\n height = parentWidth / aspectRatio;\n }\n } else if (filled) {\n height = parentWidth / aspectRatio;\n } else {\n width = parentHeight * aspectRatio;\n }\n setStyle(image, assign({\n width: width,\n height: height\n }, getTransforms({\n translateX: (parentWidth - width) / 2,\n translateY: (parentHeight - height) / 2\n })));\n });\n },\n keydown: function keydown(event) {\n var options = this.options;\n if (!options.keyboard) {\n return;\n }\n var keyCode = event.keyCode || event.which || event.charCode;\n switch (keyCode) {\n // Enter\n case 13:\n if (this.viewer.contains(event.target)) {\n this.click(event);\n }\n break;\n }\n if (!this.fulled) {\n return;\n }\n switch (keyCode) {\n // Escape\n case 27:\n if (this.played) {\n this.stop();\n } else if (options.inline) {\n if (this.fulled) {\n this.exit();\n }\n } else {\n this.hide();\n }\n break;\n\n // Space\n case 32:\n if (this.played) {\n this.stop();\n }\n break;\n\n // ArrowLeft\n case 37:\n if (this.played && this.playing) {\n this.playing.prev();\n } else {\n this.prev(options.loop);\n }\n break;\n\n // ArrowUp\n case 38:\n // Prevent scroll on Firefox\n event.preventDefault();\n\n // Zoom in\n this.zoom(options.zoomRatio, true);\n break;\n\n // ArrowRight\n case 39:\n if (this.played && this.playing) {\n this.playing.next();\n } else {\n this.next(options.loop);\n }\n break;\n\n // ArrowDown\n case 40:\n // Prevent scroll on Firefox\n event.preventDefault();\n\n // Zoom out\n this.zoom(-options.zoomRatio, true);\n break;\n\n // Ctrl + 0\n case 48:\n // Fall through\n\n // Ctrl + 1\n // eslint-disable-next-line no-fallthrough\n case 49:\n if (event.ctrlKey) {\n event.preventDefault();\n this.toggle();\n }\n break;\n }\n },\n dragstart: function dragstart(event) {\n if (event.target.localName === 'img') {\n event.preventDefault();\n }\n },\n pointerdown: function pointerdown(event) {\n var options = this.options,\n pointers = this.pointers;\n var buttons = event.buttons,\n button = event.button;\n if (!this.viewed || this.showing || this.viewing || this.hiding\n\n // Handle mouse event and pointer event and ignore touch event\n || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && (\n // No primary button (Usually the left button)\n isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0\n\n // Open context menu\n || event.ctrlKey)) {\n return;\n }\n\n // Prevent default behaviours as page zooming in touch devices.\n event.preventDefault();\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n pointers[touch.identifier] = getPointer(touch);\n });\n } else {\n pointers[event.pointerId || 0] = getPointer(event);\n }\n var action = options.movable ? ACTION_MOVE : false;\n if (options.zoomOnTouch && options.zoomable && Object.keys(pointers).length > 1) {\n action = ACTION_ZOOM;\n } else if (options.slideOnTouch && (event.pointerType === 'touch' || event.type === 'touchstart') && this.isSwitchable()) {\n action = ACTION_SWITCH;\n }\n if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {\n removeClass(this.image, CLASS_TRANSITION);\n }\n this.action = action;\n },\n pointermove: function pointermove(event) {\n var pointers = this.pointers,\n action = this.action;\n if (!this.viewed || !action) {\n return;\n }\n event.preventDefault();\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n assign(pointers[touch.identifier] || {}, getPointer(touch, true));\n });\n } else {\n assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));\n }\n this.change(event);\n },\n pointerup: function pointerup(event) {\n var _this2 = this;\n var options = this.options,\n action = this.action,\n pointers = this.pointers;\n var pointer;\n if (event.changedTouches) {\n forEach(event.changedTouches, function (touch) {\n pointer = pointers[touch.identifier];\n delete pointers[touch.identifier];\n });\n } else {\n pointer = pointers[event.pointerId || 0];\n delete pointers[event.pointerId || 0];\n }\n if (!action) {\n return;\n }\n event.preventDefault();\n if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {\n addClass(this.image, CLASS_TRANSITION);\n }\n this.action = false;\n\n // Emulate click and double click in touch devices to support backdrop and image zooming (#210).\n if (IS_TOUCH_DEVICE && action !== ACTION_ZOOM && pointer && Date.now() - pointer.timeStamp < 500) {\n clearTimeout(this.clickCanvasTimeout);\n clearTimeout(this.doubleClickImageTimeout);\n if (options.toggleOnDblclick && this.viewed && event.target === this.image) {\n if (this.imageClicked) {\n this.imageClicked = false;\n\n // This timeout will be cleared later when a native dblclick event is triggering\n this.doubleClickImageTimeout = setTimeout(function () {\n dispatchEvent(_this2.image, EVENT_DBLCLICK, {\n originalEvent: event\n });\n }, 50);\n } else {\n this.imageClicked = true;\n\n // The default timing of a double click in Windows is 500 ms\n this.doubleClickImageTimeout = setTimeout(function () {\n _this2.imageClicked = false;\n }, 500);\n }\n } else {\n this.imageClicked = false;\n if (options.backdrop && options.backdrop !== 'static' && event.target === this.canvas) {\n // This timeout will be cleared later when a native click event is triggering\n this.clickCanvasTimeout = setTimeout(function () {\n dispatchEvent(_this2.canvas, EVENT_CLICK, {\n originalEvent: event\n });\n }, 50);\n }\n }\n }\n },\n resize: function resize() {\n var _this3 = this;\n if (!this.isShown || this.hiding) {\n return;\n }\n if (this.fulled) {\n this.close();\n this.initBody();\n this.open();\n }\n this.initContainer();\n this.initViewer();\n this.renderViewer();\n this.renderList();\n if (this.viewed) {\n this.initImage(function () {\n _this3.renderImage();\n });\n }\n if (this.played) {\n if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n this.stop();\n return;\n }\n forEach(this.player.getElementsByTagName('img'), function (image) {\n addListener(image, EVENT_LOAD, _this3.loadImage.bind(_this3), {\n once: true\n });\n dispatchEvent(image, EVENT_LOAD);\n });\n }\n },\n wheel: function wheel(event) {\n var _this4 = this;\n if (!this.viewed) {\n return;\n }\n event.preventDefault();\n\n // Limit wheel speed to prevent zoom too fast\n if (this.wheeling) {\n return;\n }\n this.wheeling = true;\n setTimeout(function () {\n _this4.wheeling = false;\n }, 50);\n var ratio = Number(this.options.zoomRatio) || 0.1;\n var delta = 1;\n if (event.deltaY) {\n delta = event.deltaY > 0 ? 1 : -1;\n } else if (event.wheelDelta) {\n delta = -event.wheelDelta / 120;\n } else if (event.detail) {\n delta = event.detail > 0 ? 1 : -1;\n }\n this.zoom(-delta * ratio, true, null, event);\n }\n };\n\n var methods = {\n /** Show the viewer (only available in modal mode)\n * @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.\n * @returns {Viewer} this\n */\n show: function show() {\n var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var element = this.element,\n options = this.options;\n if (options.inline || this.showing || this.isShown || this.showing) {\n return this;\n }\n if (!this.ready) {\n this.build();\n if (this.ready) {\n this.show(immediate);\n }\n return this;\n }\n if (isFunction(options.show)) {\n addListener(element, EVENT_SHOW, options.show, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_SHOW) === false || !this.ready) {\n return this;\n }\n if (this.hiding) {\n this.transitioning.abort();\n }\n this.showing = true;\n this.open();\n var viewer = this.viewer;\n removeClass(viewer, CLASS_HIDE);\n viewer.setAttribute('role', 'dialog');\n viewer.setAttribute('aria-labelledby', this.title.id);\n viewer.setAttribute('aria-modal', true);\n viewer.removeAttribute('aria-hidden');\n if (options.transition && !immediate) {\n var shown = this.shown.bind(this);\n this.transitioning = {\n abort: function abort() {\n removeListener(viewer, EVENT_TRANSITION_END, shown);\n removeClass(viewer, CLASS_IN);\n }\n };\n addClass(viewer, CLASS_TRANSITION);\n\n // Force reflow to enable CSS3 transition\n viewer.initialOffsetWidth = viewer.offsetWidth;\n addListener(viewer, EVENT_TRANSITION_END, shown, {\n once: true\n });\n addClass(viewer, CLASS_IN);\n } else {\n addClass(viewer, CLASS_IN);\n this.shown();\n }\n return this;\n },\n /**\n * Hide the viewer (only available in modal mode)\n * @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.\n * @returns {Viewer} this\n */\n hide: function hide() {\n var _this = this;\n var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var element = this.element,\n options = this.options;\n if (options.inline || this.hiding || !(this.isShown || this.showing)) {\n return this;\n }\n if (isFunction(options.hide)) {\n addListener(element, EVENT_HIDE, options.hide, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_HIDE) === false) {\n return this;\n }\n if (this.showing) {\n this.transitioning.abort();\n }\n this.hiding = true;\n if (this.played) {\n this.stop();\n } else if (this.viewing) {\n this.viewing.abort();\n }\n var viewer = this.viewer,\n image = this.image;\n var hideImmediately = function hideImmediately() {\n removeClass(viewer, CLASS_IN);\n _this.hidden();\n };\n if (options.transition && !immediate) {\n var onViewerTransitionEnd = function onViewerTransitionEnd(event) {\n // Ignore all propagating `transitionend` events (#275).\n if (event && event.target === viewer) {\n removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n _this.hidden();\n }\n };\n var onImageTransitionEnd = function onImageTransitionEnd() {\n // In case of show the viewer by `viewer.show(true)` previously (#407).\n if (hasClass(viewer, CLASS_TRANSITION)) {\n addListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n removeClass(viewer, CLASS_IN);\n } else {\n hideImmediately();\n }\n };\n this.transitioning = {\n abort: function abort() {\n if (_this.viewed && hasClass(image, CLASS_TRANSITION)) {\n removeListener(image, EVENT_TRANSITION_END, onImageTransitionEnd);\n } else if (hasClass(viewer, CLASS_TRANSITION)) {\n removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);\n }\n }\n };\n\n // In case of hiding the viewer when holding on the image (#255),\n // note that the `CLASS_TRANSITION` class will be removed on pointer down.\n if (this.viewed && hasClass(image, CLASS_TRANSITION)) {\n addListener(image, EVENT_TRANSITION_END, onImageTransitionEnd, {\n once: true\n });\n this.zoomTo(0, false, null, null, true);\n } else {\n onImageTransitionEnd();\n }\n } else {\n hideImmediately();\n }\n return this;\n },\n /**\n * View one of the images with image's index\n * @param {number} index - The index of the image to view.\n * @returns {Viewer} this\n */\n view: function view() {\n var _this2 = this;\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex;\n index = Number(index) || 0;\n if (this.hiding || this.played || index < 0 || index >= this.length || this.viewed && index === this.index) {\n return this;\n }\n if (!this.isShown) {\n this.index = index;\n return this.show();\n }\n if (this.viewing) {\n this.viewing.abort();\n }\n var element = this.element,\n options = this.options,\n title = this.title,\n canvas = this.canvas;\n var item = this.items[index];\n var img = item.querySelector('img');\n var url = getData(img, 'originalUrl');\n var alt = img.getAttribute('alt');\n var image = document.createElement('img');\n forEach(options.inheritedAttributes, function (name) {\n var value = img.getAttribute(name);\n if (value !== null) {\n image.setAttribute(name, value);\n }\n });\n image.src = url;\n image.alt = alt;\n if (isFunction(options.view)) {\n addListener(element, EVENT_VIEW, options.view, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_VIEW, {\n originalImage: this.images[index],\n index: index,\n image: image\n }) === false || !this.isShown || this.hiding || this.played) {\n return this;\n }\n var activeItem = this.items[this.index];\n if (activeItem) {\n removeClass(activeItem, CLASS_ACTIVE);\n activeItem.removeAttribute('aria-selected');\n }\n addClass(item, CLASS_ACTIVE);\n item.setAttribute('aria-selected', true);\n if (options.focus) {\n item.focus();\n }\n this.image = image;\n this.viewed = false;\n this.index = index;\n this.imageData = {};\n addClass(image, CLASS_INVISIBLE);\n if (options.loading) {\n addClass(canvas, CLASS_LOADING);\n }\n canvas.innerHTML = '';\n canvas.appendChild(image);\n\n // Center current item\n this.renderList();\n\n // Clear title\n title.innerHTML = '';\n\n // Generate title after viewed\n var onViewed = function onViewed() {\n var imageData = _this2.imageData;\n var render = Array.isArray(options.title) ? options.title[1] : options.title;\n title.innerHTML = escapeHTMLEntities(isFunction(render) ? render.call(_this2, image, imageData) : \"\".concat(alt, \" (\").concat(imageData.naturalWidth, \" \\xD7 \").concat(imageData.naturalHeight, \")\"));\n };\n var onLoad;\n var onError;\n addListener(element, EVENT_VIEWED, onViewed, {\n once: true\n });\n this.viewing = {\n abort: function abort() {\n removeListener(element, EVENT_VIEWED, onViewed);\n if (image.complete) {\n if (_this2.imageRendering) {\n _this2.imageRendering.abort();\n } else if (_this2.imageInitializing) {\n _this2.imageInitializing.abort();\n }\n } else {\n // Cancel download to save bandwidth.\n image.src = '';\n removeListener(image, EVENT_LOAD, onLoad);\n if (_this2.timeout) {\n clearTimeout(_this2.timeout);\n }\n }\n }\n };\n if (image.complete) {\n this.load();\n } else {\n addListener(image, EVENT_LOAD, onLoad = function onLoad() {\n removeListener(image, EVENT_ERROR, onError);\n _this2.load();\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n if (_this2.timeout) {\n clearTimeout(_this2.timeout);\n _this2.timeout = false;\n }\n removeClass(image, CLASS_INVISIBLE);\n if (options.loading) {\n removeClass(_this2.canvas, CLASS_LOADING);\n }\n }, {\n once: true\n });\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n // Make the image visible if it fails to load within 1s\n this.timeout = setTimeout(function () {\n removeClass(image, CLASS_INVISIBLE);\n _this2.timeout = false;\n }, 1000);\n }\n return this;\n },\n /**\n * View the previous image\n * @param {boolean} [loop=false] - Indicate if view the last one\n * when it is the first one at present.\n * @returns {Viewer} this\n */\n prev: function prev() {\n var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var index = this.index - 1;\n if (index < 0) {\n index = loop ? this.length - 1 : 0;\n }\n this.view(index);\n return this;\n },\n /**\n * View the next image\n * @param {boolean} [loop=false] - Indicate if view the first one\n * when it is the last one at present.\n * @returns {Viewer} this\n */\n next: function next() {\n var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var maxIndex = this.length - 1;\n var index = this.index + 1;\n if (index > maxIndex) {\n index = loop ? 0 : maxIndex;\n }\n this.view(index);\n return this;\n },\n /**\n * Move the image with relative offsets.\n * @param {number} x - The moving distance in the horizontal direction.\n * @param {number} [y=x] The moving distance in the vertical direction.\n * @returns {Viewer} this\n */\n move: function move(x) {\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n var imageData = this.imageData;\n this.moveTo(isUndefined(x) ? x : imageData.x + Number(x), isUndefined(y) ? y : imageData.y + Number(y));\n return this;\n },\n /**\n * Move the image to an absolute point.\n * @param {number} x - The new position in the horizontal direction.\n * @param {number} [y=x] - The new position in the vertical direction.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n moveTo: function moveTo(x) {\n var _this3 = this;\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n x = Number(x);\n y = Number(y);\n if (this.viewed && !this.played && options.movable) {\n var oldX = imageData.x;\n var oldY = imageData.y;\n var changed = false;\n if (isNumber(x)) {\n changed = true;\n } else {\n x = oldX;\n }\n if (isNumber(y)) {\n changed = true;\n } else {\n y = oldY;\n }\n if (changed) {\n if (isFunction(options.move)) {\n addListener(element, EVENT_MOVE, options.move, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_MOVE, {\n x: x,\n y: y,\n oldX: oldX,\n oldY: oldY,\n originalEvent: _originalEvent\n }) === false) {\n return this;\n }\n imageData.x = x;\n imageData.y = y;\n imageData.left = x;\n imageData.top = y;\n this.moving = true;\n this.renderImage(function () {\n _this3.moving = false;\n if (isFunction(options.moved)) {\n addListener(element, EVENT_MOVED, options.moved, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_MOVED, {\n x: x,\n y: y,\n oldX: oldX,\n oldY: oldY,\n originalEvent: _originalEvent\n }, {\n cancelable: false\n });\n });\n }\n }\n return this;\n },\n /**\n * Rotate the image with a relative degree.\n * @param {number} degree - The rotate degree.\n * @returns {Viewer} this\n */\n rotate: function rotate(degree) {\n this.rotateTo((this.imageData.rotate || 0) + Number(degree));\n return this;\n },\n /**\n * Rotate the image to an absolute degree.\n * @param {number} degree - The rotate degree.\n * @returns {Viewer} this\n */\n rotateTo: function rotateTo(degree) {\n var _this4 = this;\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n degree = Number(degree);\n if (isNumber(degree) && this.viewed && !this.played && options.rotatable) {\n var oldDegree = imageData.rotate;\n if (isFunction(options.rotate)) {\n addListener(element, EVENT_ROTATE, options.rotate, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_ROTATE, {\n degree: degree,\n oldDegree: oldDegree\n }) === false) {\n return this;\n }\n imageData.rotate = degree;\n this.rotating = true;\n this.renderImage(function () {\n _this4.rotating = false;\n if (isFunction(options.rotated)) {\n addListener(element, EVENT_ROTATED, options.rotated, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_ROTATED, {\n degree: degree,\n oldDegree: oldDegree\n }, {\n cancelable: false\n });\n });\n }\n return this;\n },\n /**\n * Scale the image on the x-axis.\n * @param {number} scaleX - The scale ratio on the x-axis.\n * @returns {Viewer} this\n */\n scaleX: function scaleX(_scaleX) {\n this.scale(_scaleX, this.imageData.scaleY);\n return this;\n },\n /**\n * Scale the image on the y-axis.\n * @param {number} scaleY - The scale ratio on the y-axis.\n * @returns {Viewer} this\n */\n scaleY: function scaleY(_scaleY) {\n this.scale(this.imageData.scaleX, _scaleY);\n return this;\n },\n /**\n * Scale the image.\n * @param {number} scaleX - The scale ratio on the x-axis.\n * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.\n * @returns {Viewer} this\n */\n scale: function scale(scaleX) {\n var _this5 = this;\n var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;\n var element = this.element,\n options = this.options,\n imageData = this.imageData;\n scaleX = Number(scaleX);\n scaleY = Number(scaleY);\n if (this.viewed && !this.played && options.scalable) {\n var oldScaleX = imageData.scaleX;\n var oldScaleY = imageData.scaleY;\n var changed = false;\n if (isNumber(scaleX)) {\n changed = true;\n } else {\n scaleX = oldScaleX;\n }\n if (isNumber(scaleY)) {\n changed = true;\n } else {\n scaleY = oldScaleY;\n }\n if (changed) {\n if (isFunction(options.scale)) {\n addListener(element, EVENT_SCALE, options.scale, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_SCALE, {\n scaleX: scaleX,\n scaleY: scaleY,\n oldScaleX: oldScaleX,\n oldScaleY: oldScaleY\n }) === false) {\n return this;\n }\n imageData.scaleX = scaleX;\n imageData.scaleY = scaleY;\n this.scaling = true;\n this.renderImage(function () {\n _this5.scaling = false;\n if (isFunction(options.scaled)) {\n addListener(element, EVENT_SCALED, options.scaled, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_SCALED, {\n scaleX: scaleX,\n scaleY: scaleY,\n oldScaleX: oldScaleX,\n oldScaleY: oldScaleY\n }, {\n cancelable: false\n });\n });\n }\n }\n return this;\n },\n /**\n * Zoom the image with a relative ratio.\n * @param {number} ratio - The target ratio.\n * @param {boolean} [showTooltip=false] - Indicates whether to show the tooltip.\n * @param {Object} [pivot] - The pivot point coordinate for zooming.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n zoom: function zoom(ratio) {\n var showTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var pivot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var _originalEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var imageData = this.imageData;\n ratio = Number(ratio);\n if (ratio < 0) {\n ratio = 1 / (1 - ratio);\n } else {\n ratio = 1 + ratio;\n }\n this.zoomTo(imageData.width * ratio / imageData.naturalWidth, showTooltip, pivot, _originalEvent);\n return this;\n },\n /**\n * Zoom the image to an absolute ratio.\n * @param {number} ratio - The target ratio.\n * @param {boolean} [showTooltip] - Indicates whether to show the tooltip.\n * @param {Object} [pivot] - The pivot point coordinate for zooming.\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.\n * @returns {Viewer} this\n */\n zoomTo: function zoomTo(ratio) {\n var _this6 = this;\n var showTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var pivot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var _originalEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var _zoomable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var element = this.element,\n options = this.options,\n pointers = this.pointers,\n imageData = this.imageData;\n var x = imageData.x,\n y = imageData.y,\n width = imageData.width,\n height = imageData.height,\n naturalWidth = imageData.naturalWidth,\n naturalHeight = imageData.naturalHeight;\n ratio = Math.max(0, ratio);\n if (isNumber(ratio) && this.viewed && !this.played && (_zoomable || options.zoomable)) {\n if (!_zoomable) {\n var minZoomRatio = Math.max(0.01, options.minZoomRatio);\n var maxZoomRatio = Math.min(100, options.maxZoomRatio);\n ratio = Math.min(Math.max(ratio, minZoomRatio), maxZoomRatio);\n }\n if (_originalEvent) {\n switch (_originalEvent.type) {\n case 'wheel':\n if (options.zoomRatio >= 0.055 && ratio > 0.95 && ratio < 1.05) {\n ratio = 1;\n }\n break;\n case 'pointermove':\n case 'touchmove':\n case 'mousemove':\n if (ratio > 0.99 && ratio < 1.01) {\n ratio = 1;\n }\n break;\n }\n }\n var newWidth = naturalWidth * ratio;\n var newHeight = naturalHeight * ratio;\n var offsetWidth = newWidth - width;\n var offsetHeight = newHeight - height;\n var oldRatio = imageData.ratio;\n if (isFunction(options.zoom)) {\n addListener(element, EVENT_ZOOM, options.zoom, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_ZOOM, {\n ratio: ratio,\n oldRatio: oldRatio,\n originalEvent: _originalEvent\n }) === false) {\n return this;\n }\n this.zooming = true;\n if (_originalEvent) {\n var offset = getOffset(this.viewer);\n var center = pointers && Object.keys(pointers).length > 0 ? getPointersCenter(pointers) : {\n pageX: _originalEvent.pageX,\n pageY: _originalEvent.pageY\n };\n\n // Zoom from the triggering point of the event\n imageData.x -= offsetWidth * ((center.pageX - offset.left - x) / width);\n imageData.y -= offsetHeight * ((center.pageY - offset.top - y) / height);\n } else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) {\n imageData.x -= offsetWidth * ((pivot.x - x) / width);\n imageData.y -= offsetHeight * ((pivot.y - y) / height);\n } else {\n // Zoom from the center of the image\n imageData.x -= offsetWidth / 2;\n imageData.y -= offsetHeight / 2;\n }\n imageData.left = imageData.x;\n imageData.top = imageData.y;\n imageData.width = newWidth;\n imageData.height = newHeight;\n imageData.oldRatio = oldRatio;\n imageData.ratio = ratio;\n this.renderImage(function () {\n _this6.zooming = false;\n if (isFunction(options.zoomed)) {\n addListener(element, EVENT_ZOOMED, options.zoomed, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_ZOOMED, {\n ratio: ratio,\n oldRatio: oldRatio,\n originalEvent: _originalEvent\n }, {\n cancelable: false\n });\n });\n if (showTooltip) {\n this.tooltip();\n }\n }\n return this;\n },\n /**\n * Play the images\n * @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.\n * @returns {Viewer} this\n */\n play: function play() {\n var _this7 = this;\n var fullscreen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!this.isShown || this.played) {\n return this;\n }\n var element = this.element,\n options = this.options;\n if (isFunction(options.play)) {\n addListener(element, EVENT_PLAY, options.play, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_PLAY) === false) {\n return this;\n }\n var player = this.player;\n var onLoad = this.loadImage.bind(this);\n var list = [];\n var total = 0;\n var index = 0;\n this.played = true;\n this.onLoadWhenPlay = onLoad;\n if (fullscreen) {\n this.requestFullscreen(fullscreen);\n }\n addClass(player, CLASS_SHOW);\n forEach(this.items, function (item, i) {\n var img = item.querySelector('img');\n var image = document.createElement('img');\n image.src = getData(img, 'originalUrl');\n image.alt = img.getAttribute('alt');\n image.referrerPolicy = img.referrerPolicy;\n total += 1;\n addClass(image, CLASS_FADE);\n toggleClass(image, CLASS_TRANSITION, options.transition);\n if (hasClass(item, CLASS_ACTIVE)) {\n addClass(image, CLASS_IN);\n index = i;\n }\n list.push(image);\n addListener(image, EVENT_LOAD, onLoad, {\n once: true\n });\n player.appendChild(image);\n });\n if (isNumber(options.interval) && options.interval > 0) {\n var prev = function prev() {\n clearTimeout(_this7.playing.timeout);\n removeClass(list[index], CLASS_IN);\n index -= 1;\n index = index >= 0 ? index : total - 1;\n addClass(list[index], CLASS_IN);\n _this7.playing.timeout = setTimeout(prev, options.interval);\n };\n var next = function next() {\n clearTimeout(_this7.playing.timeout);\n removeClass(list[index], CLASS_IN);\n index += 1;\n index = index < total ? index : 0;\n addClass(list[index], CLASS_IN);\n _this7.playing.timeout = setTimeout(next, options.interval);\n };\n if (total > 1) {\n this.playing = {\n prev: prev,\n next: next,\n timeout: setTimeout(next, options.interval)\n };\n }\n }\n return this;\n },\n // Stop play\n stop: function stop() {\n var _this8 = this;\n if (!this.played) {\n return this;\n }\n var element = this.element,\n options = this.options;\n if (isFunction(options.stop)) {\n addListener(element, EVENT_STOP, options.stop, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_STOP) === false) {\n return this;\n }\n var player = this.player;\n clearTimeout(this.playing.timeout);\n this.playing = false;\n this.played = false;\n forEach(player.getElementsByTagName('img'), function (image) {\n removeListener(image, EVENT_LOAD, _this8.onLoadWhenPlay);\n });\n removeClass(player, CLASS_SHOW);\n player.innerHTML = '';\n this.exitFullscreen();\n return this;\n },\n // Enter modal mode (only available in inline mode)\n full: function full() {\n var _this9 = this;\n var options = this.options,\n viewer = this.viewer,\n image = this.image,\n list = this.list;\n if (!this.isShown || this.played || this.fulled || !options.inline) {\n return this;\n }\n this.fulled = true;\n this.open();\n addClass(this.button, CLASS_FULLSCREEN_EXIT);\n if (options.transition) {\n removeClass(list, CLASS_TRANSITION);\n if (this.viewed) {\n removeClass(image, CLASS_TRANSITION);\n }\n }\n addClass(viewer, CLASS_FIXED);\n viewer.setAttribute('role', 'dialog');\n viewer.setAttribute('aria-labelledby', this.title.id);\n viewer.setAttribute('aria-modal', true);\n viewer.removeAttribute('style');\n setStyle(viewer, {\n zIndex: options.zIndex\n });\n if (options.focus) {\n this.enforceFocus();\n }\n this.initContainer();\n this.viewerData = assign({}, this.containerData);\n this.renderList();\n if (this.viewed) {\n this.initImage(function () {\n _this9.renderImage(function () {\n if (options.transition) {\n setTimeout(function () {\n addClass(image, CLASS_TRANSITION);\n addClass(list, CLASS_TRANSITION);\n }, 0);\n }\n });\n });\n }\n return this;\n },\n // Exit modal mode (only available in inline mode)\n exit: function exit() {\n var _this10 = this;\n var options = this.options,\n viewer = this.viewer,\n image = this.image,\n list = this.list;\n if (!this.isShown || this.played || !this.fulled || !options.inline) {\n return this;\n }\n this.fulled = false;\n this.close();\n removeClass(this.button, CLASS_FULLSCREEN_EXIT);\n if (options.transition) {\n removeClass(list, CLASS_TRANSITION);\n if (this.viewed) {\n removeClass(image, CLASS_TRANSITION);\n }\n }\n if (options.focus) {\n this.clearEnforceFocus();\n }\n viewer.removeAttribute('role');\n viewer.removeAttribute('aria-labelledby');\n viewer.removeAttribute('aria-modal');\n removeClass(viewer, CLASS_FIXED);\n setStyle(viewer, {\n zIndex: options.zIndexInline\n });\n this.viewerData = assign({}, this.parentData);\n this.renderViewer();\n this.renderList();\n if (this.viewed) {\n this.initImage(function () {\n _this10.renderImage(function () {\n if (options.transition) {\n setTimeout(function () {\n addClass(image, CLASS_TRANSITION);\n addClass(list, CLASS_TRANSITION);\n }, 0);\n }\n });\n });\n }\n return this;\n },\n // Show the current ratio of the image with percentage\n tooltip: function tooltip() {\n var _this11 = this;\n var options = this.options,\n tooltipBox = this.tooltipBox,\n imageData = this.imageData;\n if (!this.viewed || this.played || !options.tooltip) {\n return this;\n }\n tooltipBox.textContent = \"\".concat(Math.round(imageData.ratio * 100), \"%\");\n if (!this.tooltipping) {\n if (options.transition) {\n if (this.fading) {\n dispatchEvent(tooltipBox, EVENT_TRANSITION_END);\n }\n addClass(tooltipBox, CLASS_SHOW);\n addClass(tooltipBox, CLASS_FADE);\n addClass(tooltipBox, CLASS_TRANSITION);\n tooltipBox.removeAttribute('aria-hidden');\n\n // Force reflow to enable CSS3 transition\n tooltipBox.initialOffsetWidth = tooltipBox.offsetWidth;\n addClass(tooltipBox, CLASS_IN);\n } else {\n addClass(tooltipBox, CLASS_SHOW);\n tooltipBox.removeAttribute('aria-hidden');\n }\n } else {\n clearTimeout(this.tooltipping);\n }\n this.tooltipping = setTimeout(function () {\n if (options.transition) {\n addListener(tooltipBox, EVENT_TRANSITION_END, function () {\n removeClass(tooltipBox, CLASS_SHOW);\n removeClass(tooltipBox, CLASS_FADE);\n removeClass(tooltipBox, CLASS_TRANSITION);\n tooltipBox.setAttribute('aria-hidden', true);\n _this11.fading = false;\n }, {\n once: true\n });\n removeClass(tooltipBox, CLASS_IN);\n _this11.fading = true;\n } else {\n removeClass(tooltipBox, CLASS_SHOW);\n tooltipBox.setAttribute('aria-hidden', true);\n }\n _this11.tooltipping = false;\n }, 1000);\n return this;\n },\n /**\n * Toggle the image size between its current size and natural size\n * @param {Event} [_originalEvent=null] - The original event if any.\n * @returns {Viewer} this\n */\n toggle: function toggle() {\n var _originalEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (this.imageData.ratio === 1) {\n this.zoomTo(this.imageData.oldRatio, true, null, _originalEvent);\n } else {\n this.zoomTo(1, true, null, _originalEvent);\n }\n return this;\n },\n // Reset the image to its initial state\n reset: function reset() {\n if (this.viewed && !this.played) {\n this.imageData = assign({}, this.initialImageData);\n this.renderImage();\n }\n return this;\n },\n // Update viewer when images changed\n update: function update() {\n var _this12 = this;\n var element = this.element,\n options = this.options,\n isImg = this.isImg;\n\n // Destroy viewer if the target image was deleted\n if (isImg && !element.parentNode) {\n return this.destroy();\n }\n var images = [];\n forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {\n if (isFunction(options.filter)) {\n if (options.filter.call(_this12, image)) {\n images.push(image);\n }\n } else if (_this12.getImageURL(image)) {\n images.push(image);\n }\n });\n if (!images.length) {\n return this;\n }\n this.images = images;\n this.length = images.length;\n if (this.ready) {\n var changedIndexes = [];\n forEach(this.items, function (item, i) {\n var img = item.querySelector('img');\n var image = images[i];\n if (image && img) {\n if (image.src !== img.src\n\n // Title changed (#408)\n || image.alt !== img.alt) {\n changedIndexes.push(i);\n }\n } else {\n changedIndexes.push(i);\n }\n });\n setStyle(this.list, {\n width: 'auto'\n });\n this.initList();\n if (this.isShown) {\n if (this.length) {\n if (this.viewed) {\n var changedIndex = changedIndexes.indexOf(this.index);\n if (changedIndex >= 0) {\n this.viewed = false;\n this.view(Math.max(Math.min(this.index - changedIndex, this.length - 1), 0));\n } else {\n var activeItem = this.items[this.index];\n\n // Reactivate the current viewing item after reset the list.\n addClass(activeItem, CLASS_ACTIVE);\n activeItem.setAttribute('aria-selected', true);\n }\n }\n } else {\n this.image = null;\n this.viewed = false;\n this.index = 0;\n this.imageData = {};\n this.canvas.innerHTML = '';\n this.title.innerHTML = '';\n }\n }\n } else {\n this.build();\n }\n return this;\n },\n // Destroy the viewer\n destroy: function destroy() {\n var element = this.element,\n options = this.options;\n if (!element[NAMESPACE]) {\n return this;\n }\n this.destroyed = true;\n if (this.ready) {\n if (this.played) {\n this.stop();\n }\n if (options.inline) {\n if (this.fulled) {\n this.exit();\n }\n this.unbind();\n } else if (this.isShown) {\n if (this.viewing) {\n if (this.imageRendering) {\n this.imageRendering.abort();\n } else if (this.imageInitializing) {\n this.imageInitializing.abort();\n }\n }\n if (this.hiding) {\n this.transitioning.abort();\n }\n this.hidden();\n } else if (this.showing) {\n this.transitioning.abort();\n this.hidden();\n }\n this.ready = false;\n this.viewer.parentNode.removeChild(this.viewer);\n } else if (options.inline) {\n if (this.delaying) {\n this.delaying.abort();\n } else if (this.initializing) {\n this.initializing.abort();\n }\n }\n if (!options.inline) {\n removeListener(element, EVENT_CLICK, this.onStart);\n }\n element[NAMESPACE] = undefined;\n return this;\n }\n };\n\n var others = {\n getImageURL: function getImageURL(image) {\n var url = this.options.url;\n if (isString(url)) {\n url = image.getAttribute(url);\n } else if (isFunction(url)) {\n url = url.call(this, image);\n } else {\n url = '';\n }\n return url;\n },\n enforceFocus: function enforceFocus() {\n var _this = this;\n this.clearEnforceFocus();\n addListener(document, EVENT_FOCUSIN, this.onFocusin = function (event) {\n var viewer = _this.viewer;\n var target = event.target;\n if (target === document || target === viewer || viewer.contains(target)) {\n return;\n }\n while (target) {\n // Avoid conflicts with other modals (#474, #540)\n if (target.getAttribute('tabindex') !== null || target.getAttribute('aria-modal') === 'true') {\n return;\n }\n target = target.parentElement;\n }\n viewer.focus();\n });\n },\n clearEnforceFocus: function clearEnforceFocus() {\n if (this.onFocusin) {\n removeListener(document, EVENT_FOCUSIN, this.onFocusin);\n this.onFocusin = null;\n }\n },\n open: function open() {\n var body = this.body;\n addClass(body, CLASS_OPEN);\n if (this.scrollbarWidth > 0) {\n body.style.paddingRight = \"\".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), \"px\");\n }\n },\n close: function close() {\n var body = this.body;\n removeClass(body, CLASS_OPEN);\n if (this.scrollbarWidth > 0) {\n body.style.paddingRight = this.initialBodyPaddingRight;\n }\n },\n shown: function shown() {\n var element = this.element,\n options = this.options,\n viewer = this.viewer;\n this.fulled = true;\n this.isShown = true;\n this.render();\n this.bind();\n this.showing = false;\n if (options.focus) {\n viewer.focus();\n this.enforceFocus();\n }\n if (isFunction(options.shown)) {\n addListener(element, EVENT_SHOWN, options.shown, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_SHOWN) === false) {\n return;\n }\n if (this.ready && this.isShown && !this.hiding) {\n this.view(this.index);\n }\n },\n hidden: function hidden() {\n var element = this.element,\n options = this.options,\n viewer = this.viewer;\n if (options.fucus) {\n this.clearEnforceFocus();\n }\n this.fulled = false;\n this.viewed = false;\n this.isShown = false;\n this.close();\n this.unbind();\n addClass(viewer, CLASS_HIDE);\n viewer.removeAttribute('role');\n viewer.removeAttribute('aria-labelledby');\n viewer.removeAttribute('aria-modal');\n viewer.setAttribute('aria-hidden', true);\n this.resetList();\n this.resetImage();\n this.hiding = false;\n if (!this.destroyed) {\n if (isFunction(options.hidden)) {\n addListener(element, EVENT_HIDDEN, options.hidden, {\n once: true\n });\n }\n dispatchEvent(element, EVENT_HIDDEN, null, {\n cancelable: false\n });\n }\n },\n requestFullscreen: function requestFullscreen(options) {\n var document = this.element.ownerDocument;\n if (this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n var documentElement = document.documentElement;\n\n // Element.requestFullscreen()\n if (documentElement.requestFullscreen) {\n // Avoid TypeError when convert `options` to dictionary\n if (isPlainObject(options)) {\n documentElement.requestFullscreen(options);\n } else {\n documentElement.requestFullscreen();\n }\n } else if (documentElement.webkitRequestFullscreen) {\n documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n } else if (documentElement.mozRequestFullScreen) {\n documentElement.mozRequestFullScreen();\n } else if (documentElement.msRequestFullscreen) {\n documentElement.msRequestFullscreen();\n }\n }\n },\n exitFullscreen: function exitFullscreen() {\n var document = this.element.ownerDocument;\n if (this.fulled && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {\n // Document.exitFullscreen()\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n }\n },\n change: function change(event) {\n var options = this.options,\n pointers = this.pointers;\n var pointer = pointers[Object.keys(pointers)[0]];\n\n // In the case of the `pointers` object is empty (#421)\n if (!pointer) {\n return;\n }\n var offsetX = pointer.endX - pointer.startX;\n var offsetY = pointer.endY - pointer.startY;\n switch (this.action) {\n // Move the current image\n case ACTION_MOVE:\n this.move(offsetX, offsetY, event);\n break;\n\n // Zoom the current image\n case ACTION_ZOOM:\n this.zoom(getMaxZoomRatio(pointers), false, null, event);\n break;\n case ACTION_SWITCH:\n {\n this.action = 'switched';\n var absoluteOffsetX = Math.abs(offsetX);\n if (absoluteOffsetX > 1 && absoluteOffsetX > Math.abs(offsetY)) {\n // Empty `pointers` as `touchend` event will not be fired after swiped in iOS browsers.\n this.pointers = {};\n if (offsetX > 1) {\n this.prev(options.loop);\n } else if (offsetX < -1) {\n this.next(options.loop);\n }\n }\n break;\n }\n }\n\n // Override\n forEach(pointers, function (p) {\n p.startX = p.endX;\n p.startY = p.endY;\n });\n },\n isSwitchable: function isSwitchable() {\n var imageData = this.imageData,\n viewerData = this.viewerData;\n return this.length > 1 && imageData.x >= 0 && imageData.y >= 0 && imageData.width <= viewerData.width && imageData.height <= viewerData.height;\n }\n };\n\n var AnotherViewer = WINDOW.Viewer;\n var getUniqueID = function (id) {\n return function () {\n id += 1;\n return id;\n };\n }(-1);\n var Viewer = /*#__PURE__*/function () {\n /**\n * Create a new Viewer.\n * @param {Element} element - The target element for viewing.\n * @param {Object} [options={}] - The configuration options.\n */\n function Viewer(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, Viewer);\n if (!element || element.nodeType !== 1) {\n throw new Error('The first argument is required and must be an element.');\n }\n this.element = element;\n this.options = assign({}, DEFAULTS, isPlainObject(options) && options);\n this.action = false;\n this.fading = false;\n this.fulled = false;\n this.hiding = false;\n this.imageClicked = false;\n this.imageData = {};\n this.index = this.options.initialViewIndex;\n this.isImg = false;\n this.isShown = false;\n this.length = 0;\n this.moving = false;\n this.played = false;\n this.playing = false;\n this.pointers = {};\n this.ready = false;\n this.rotating = false;\n this.scaling = false;\n this.showing = false;\n this.timeout = false;\n this.tooltipping = false;\n this.viewed = false;\n this.viewing = false;\n this.wheeling = false;\n this.zooming = false;\n this.id = getUniqueID();\n this.init();\n }\n _createClass(Viewer, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n var element = this.element,\n options = this.options;\n if (element[NAMESPACE]) {\n return;\n }\n element[NAMESPACE] = this;\n\n // The `focus` option requires the `keyboard` option set to `true`.\n if (options.focus && !options.keyboard) {\n options.focus = false;\n }\n var isImg = element.localName === 'img';\n var images = [];\n forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {\n if (isFunction(options.filter)) {\n if (options.filter.call(_this, image)) {\n images.push(image);\n }\n } else if (_this.getImageURL(image)) {\n images.push(image);\n }\n });\n this.isImg = isImg;\n this.length = images.length;\n this.images = images;\n this.initBody();\n\n // Override `transition` option if it is not supported\n if (isUndefined(document.createElement(NAMESPACE).style.transition)) {\n options.transition = false;\n }\n if (options.inline) {\n var count = 0;\n var progress = function progress() {\n count += 1;\n if (count === _this.length) {\n var timeout;\n _this.initializing = false;\n _this.delaying = {\n abort: function abort() {\n clearTimeout(timeout);\n }\n };\n\n // build asynchronously to keep `this.viewer` is accessible in `ready` event handler.\n timeout = setTimeout(function () {\n _this.delaying = false;\n _this.build();\n }, 0);\n }\n };\n this.initializing = {\n abort: function abort() {\n forEach(images, function (image) {\n if (!image.complete) {\n removeListener(image, EVENT_LOAD, progress);\n removeListener(image, EVENT_ERROR, progress);\n }\n });\n }\n };\n forEach(images, function (image) {\n if (image.complete) {\n progress();\n } else {\n var onLoad;\n var onError;\n addListener(image, EVENT_LOAD, onLoad = function onLoad() {\n removeListener(image, EVENT_ERROR, onError);\n progress();\n }, {\n once: true\n });\n addListener(image, EVENT_ERROR, onError = function onError() {\n removeListener(image, EVENT_LOAD, onLoad);\n progress();\n }, {\n once: true\n });\n }\n });\n } else {\n addListener(element, EVENT_CLICK, this.onStart = function (_ref) {\n var target = _ref.target;\n if (target.localName === 'img' && (!isFunction(options.filter) || options.filter.call(_this, target))) {\n _this.view(_this.images.indexOf(target));\n }\n });\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n if (this.ready) {\n return;\n }\n var element = this.element,\n options = this.options;\n var parent = element.parentNode;\n var template = document.createElement('div');\n template.innerHTML = TEMPLATE;\n var viewer = template.querySelector(\".\".concat(NAMESPACE, \"-container\"));\n var title = viewer.querySelector(\".\".concat(NAMESPACE, \"-title\"));\n var toolbar = viewer.querySelector(\".\".concat(NAMESPACE, \"-toolbar\"));\n var navbar = viewer.querySelector(\".\".concat(NAMESPACE, \"-navbar\"));\n var button = viewer.querySelector(\".\".concat(NAMESPACE, \"-button\"));\n var canvas = viewer.querySelector(\".\".concat(NAMESPACE, \"-canvas\"));\n this.parent = parent;\n this.viewer = viewer;\n this.title = title;\n this.toolbar = toolbar;\n this.navbar = navbar;\n this.button = button;\n this.canvas = canvas;\n this.footer = viewer.querySelector(\".\".concat(NAMESPACE, \"-footer\"));\n this.tooltipBox = viewer.querySelector(\".\".concat(NAMESPACE, \"-tooltip\"));\n this.player = viewer.querySelector(\".\".concat(NAMESPACE, \"-player\"));\n this.list = viewer.querySelector(\".\".concat(NAMESPACE, \"-list\"));\n viewer.id = \"\".concat(NAMESPACE).concat(this.id);\n title.id = \"\".concat(NAMESPACE, \"Title\").concat(this.id);\n addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title));\n addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar));\n toggleClass(button, CLASS_HIDE, !options.button);\n if (options.keyboard) {\n button.setAttribute('tabindex', 0);\n }\n if (options.backdrop) {\n addClass(viewer, \"\".concat(NAMESPACE, \"-backdrop\"));\n if (!options.inline && options.backdrop !== 'static') {\n setData(canvas, DATA_ACTION, 'hide');\n }\n }\n if (isString(options.className) && options.className) {\n // In case there are multiple class names\n options.className.split(REGEXP_SPACES).forEach(function (className) {\n addClass(viewer, className);\n });\n }\n if (options.toolbar) {\n var list = document.createElement('ul');\n var custom = isPlainObject(options.toolbar);\n var zoomButtons = BUTTONS.slice(0, 3);\n var rotateButtons = BUTTONS.slice(7, 9);\n var scaleButtons = BUTTONS.slice(9);\n if (!custom) {\n addClass(toolbar, getResponsiveClass(options.toolbar));\n }\n forEach(custom ? options.toolbar : BUTTONS, function (value, index) {\n var deep = custom && isPlainObject(value);\n var name = custom ? hyphenate(index) : value;\n var show = deep && !isUndefined(value.show) ? value.show : value;\n if (!show || !options.zoomable && zoomButtons.indexOf(name) !== -1 || !options.rotatable && rotateButtons.indexOf(name) !== -1 || !options.scalable && scaleButtons.indexOf(name) !== -1) {\n return;\n }\n var size = deep && !isUndefined(value.size) ? value.size : value;\n var click = deep && !isUndefined(value.click) ? value.click : value;\n var item = document.createElement('li');\n if (options.keyboard) {\n item.setAttribute('tabindex', 0);\n }\n item.setAttribute('role', 'button');\n addClass(item, \"\".concat(NAMESPACE, \"-\").concat(name));\n if (!isFunction(click)) {\n setData(item, DATA_ACTION, name);\n }\n if (isNumber(show)) {\n addClass(item, getResponsiveClass(show));\n }\n if (['small', 'large'].indexOf(size) !== -1) {\n addClass(item, \"\".concat(NAMESPACE, \"-\").concat(size));\n } else if (name === 'play') {\n addClass(item, \"\".concat(NAMESPACE, \"-large\"));\n }\n if (isFunction(click)) {\n addListener(item, EVENT_CLICK, click);\n }\n list.appendChild(item);\n });\n toolbar.appendChild(list);\n } else {\n addClass(toolbar, CLASS_HIDE);\n }\n if (!options.rotatable) {\n var rotates = toolbar.querySelectorAll('li[class*=\"rotate\"]');\n addClass(rotates, CLASS_INVISIBLE);\n forEach(rotates, function (rotate) {\n toolbar.appendChild(rotate);\n });\n }\n if (options.inline) {\n addClass(button, CLASS_FULLSCREEN);\n setStyle(viewer, {\n zIndex: options.zIndexInline\n });\n if (window.getComputedStyle(parent).position === 'static') {\n setStyle(parent, {\n position: 'relative'\n });\n }\n parent.insertBefore(viewer, element.nextSibling);\n } else {\n addClass(button, CLASS_CLOSE);\n addClass(viewer, CLASS_FIXED);\n addClass(viewer, CLASS_FADE);\n addClass(viewer, CLASS_HIDE);\n setStyle(viewer, {\n zIndex: options.zIndex\n });\n var container = options.container;\n if (isString(container)) {\n container = element.ownerDocument.querySelector(container);\n }\n if (!container) {\n container = this.body;\n }\n container.appendChild(viewer);\n }\n if (options.inline) {\n this.render();\n this.bind();\n this.isShown = true;\n }\n this.ready = true;\n if (isFunction(options.ready)) {\n addListener(element, EVENT_READY, options.ready, {\n once: true\n });\n }\n if (dispatchEvent(element, EVENT_READY) === false) {\n this.ready = false;\n return;\n }\n if (this.ready && options.inline) {\n this.view(this.index);\n }\n }\n\n /**\n * Get the no conflict viewer class.\n * @returns {Viewer} The viewer class.\n */\n }], [{\n key: \"noConflict\",\n value: function noConflict() {\n window.Viewer = AnotherViewer;\n return Viewer;\n }\n\n /**\n * Change the default options.\n * @param {Object} options - The new default options.\n */\n }, {\n key: \"setDefaults\",\n value: function setDefaults(options) {\n assign(DEFAULTS, isPlainObject(options) && options);\n }\n }]);\n return Viewer;\n }();\n assign(Viewer.prototype, render, events, handlers, methods, others);\n\n return Viewer;\n\n}));\n","import { ConnectableObservable, isObservable, of, Subject } from 'rxjs';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DataSource {\n}\n/** Checks whether an object is a data source. */\nfunction isDataSource(value) {\n // Check if the value is a DataSource by observing if it has a connect function. Cannot\n // be checked as an `instanceof DataSource` since people could create their own sources\n // that match the interface, but don't extend DataSource. We also can't use `isObservable`\n // here, because of some internal apps.\n return value && typeof value.connect === 'function' && !(value instanceof ConnectableObservable);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** DataSource wrapper for a native array. */\nclass ArrayDataSource extends DataSource {\n constructor(_data) {\n super();\n this._data = _data;\n }\n connect() {\n return isObservable(this._data) ? this._data : of(this._data);\n }\n disconnect() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _DisposeViewRepeaterStrategy {\n applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n let view;\n let operation;\n if (record.previousIndex == null) {\n const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = viewContainerRef.createEmbeddedView(insertContext.templateRef, insertContext.context, insertContext.index);\n operation = 1 /* _ViewRepeaterOperation.INSERTED */;\n }\n else if (currentIndex == null) {\n viewContainerRef.remove(adjustedPreviousIndex);\n operation = 3 /* _ViewRepeaterOperation.REMOVED */;\n }\n else {\n view = viewContainerRef.get(adjustedPreviousIndex);\n viewContainerRef.move(view, currentIndex);\n operation = 2 /* _ViewRepeaterOperation.MOVED */;\n }\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n });\n }\n detach() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repeater that caches views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _RecycleViewRepeaterStrategy {\n constructor() {\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n this.viewCacheSize = 20;\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n this._viewCache = [];\n }\n /** Apply changes to the DOM. */\n applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n let view;\n let operation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () => itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(viewArgsFactory, currentIndex, viewContainerRef, itemValueResolver(record));\n operation = view ? 1 /* _ViewRepeaterOperation.INSERTED */ : 0 /* _ViewRepeaterOperation.REPLACED */;\n }\n else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex, viewContainerRef);\n operation = 3 /* _ViewRepeaterOperation.REMOVED */;\n }\n else {\n // Item moved.\n view = this._moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, itemValueResolver(record));\n operation = 2 /* _ViewRepeaterOperation.MOVED */;\n }\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n });\n }\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n _insertView(viewArgsFactory, currentIndex, viewContainerRef, value) {\n const cachedView = this._insertViewFromCache(currentIndex, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(viewArgs.templateRef, viewArgs.context, viewArgs.index);\n }\n /** Detaches the view at the given index and inserts into the view cache. */\n _detachAndCacheView(index, viewContainerRef) {\n const detachedView = viewContainerRef.detach(index);\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n /** Moves view at the previous index to the current index. */\n _moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, value) {\n const view = viewContainerRef.get(adjustedPreviousIndex);\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n _maybeCacheView(view, viewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n }\n else {\n const index = viewContainerRef.indexOf(view);\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n }\n else {\n viewContainerRef.remove(index);\n }\n }\n }\n /** Inserts a recycled view from the cache at the given index. */\n _insertViewFromCache(index, viewContainerRef) {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nclass SelectionModel {\n constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) {\n this._multiple = _multiple;\n this._emitChanges = _emitChanges;\n this.compareWith = compareWith;\n /** Currently-selected values. */\n this._selection = new Set();\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n this._deselectedToEmit = [];\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n this._selectedToEmit = [];\n /** Event emitted when the value has changed. */\n this.changed = new Subject();\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n }\n else {\n this._markSelected(initiallySelectedValues[0]);\n }\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n /** Selected values. */\n get selected() {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n return this._selected;\n }\n /**\n * Selects a value or an array of values.\n * @param values The values to select\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n select(...values) {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Deselects a value or an array of values.\n * @param values The values to deselect\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n deselect(...values) {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Sets the selected values\n * @param values The new selected values\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n setSelection(...values) {\n this._verifyValueAssignment(values);\n const oldValues = this.selected;\n const newSelectedSet = new Set(values);\n values.forEach(value => this._markSelected(value));\n oldValues\n .filter(value => !newSelectedSet.has(value))\n .forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Toggles a value between selected and deselected.\n * @param value The value to toggle\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n toggle(value) {\n return this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n /**\n * Clears all of the selected values.\n * @param flushEvent Whether to flush the changes in an event.\n * If false, the changes to the selection will be flushed along with the next event.\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n clear(flushEvent = true) {\n this._unmarkAll();\n const changed = this._hasQueuedChanges();\n if (flushEvent) {\n this._emitChangeEvent();\n }\n return changed;\n }\n /**\n * Determines whether a value is selected.\n */\n isSelected(value) {\n if (this.compareWith) {\n for (const otherValue of this._selection) {\n if (this.compareWith(otherValue, value)) {\n return true;\n }\n }\n return false;\n }\n return this._selection.has(value);\n }\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty() {\n return this._selection.size === 0;\n }\n /**\n * Determines whether the model has a value.\n */\n hasValue() {\n return !this.isEmpty();\n }\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate) {\n if (this._multiple && this.selected) {\n this._selected.sort(predicate);\n }\n }\n /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\n }\n /** Emits a change event and clears the records of selected and deselected values. */\n _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit,\n });\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n /** Selects a value. */\n _markSelected(value) {\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n if (!this.isSelected(value)) {\n this._selection.add(value);\n }\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n /** Deselects a value. */\n _unmarkSelected(value) {\n if (this.isSelected(value)) {\n this._selection.delete(value);\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n /** Clears out the selected values. */\n _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n _verifyValueAssignment(values) {\n if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n /** Whether there are queued up change to be emitted. */\n _hasQueuedChanges() {\n return !!(this._deselectedToEmit.length || this._selectedToEmit.length);\n }\n}\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n * @docs-private\n */\nfunction getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\nclass UniqueSelectionDispatcher {\n constructor() {\n this._listeners = [];\n }\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id, name) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener) {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered) => {\n return listener !== registered;\n });\n };\n }\n ngOnDestroy() {\n this._listeners = [];\n }\n}\nUniqueSelectionDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: UniqueSelectionDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUniqueSelectionDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: UniqueSelectionDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: UniqueSelectionDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only.\n * @docs-private\n */\nconst _VIEW_REPEATER_STRATEGY = new InjectionToken('_ViewRepeater');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ArrayDataSource, DataSource, SelectionModel, UniqueSelectionDispatcher, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, getMultipleValuesInSingleSelectionError, isDataSource };\n","import * as i1 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, isDataSource, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nexport { DataSource } from '@angular/cdk/collections';\nimport * as i2 from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/scrolling';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, NgZone, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';\nimport { Subject, from, BehaviorSubject, isObservable, of } from 'rxjs';\nimport { takeUntil, take } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nfunction mixinHasStickyInput(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._sticky = false;\n /** Whether the sticky input has changed since it was last checked. */\n this._hasStickyChanged = false;\n }\n /** Whether sticky positioning should be applied. */\n get sticky() {\n return this._sticky;\n }\n set sticky(v) {\n const prevValue = this._sticky;\n this._sticky = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._sticky;\n }\n /** Whether the sticky value has changed since this was last called. */\n hasStickyChanged() {\n const hasStickyChanged = this._hasStickyChanged;\n this._hasStickyChanged = false;\n return hasStickyChanged;\n }\n /** Resets the dirty check for cases where the sticky state has been used without checking. */\n resetStickyChanged() {\n this._hasStickyChanged = false;\n }\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nconst CDK_TABLE = new InjectionToken('CDK_TABLE');\n/** Injection token that can be used to specify the text column options. */\nconst TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass CdkCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkCellDef, selector: \"[cdkCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass CdkHeaderCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkHeaderCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass CdkFooterCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkFooterCellDef, selector: \"[cdkFooterCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkFooterCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// Boilerplate for applying mixins to CdkColumnDef.\n/** @docs-private */\nclass CdkColumnDefBase {\n}\nconst _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\nclass CdkColumnDef extends _CdkColumnDefBase {\n constructor(_table) {\n super();\n this._table = _table;\n this._stickyEnd = false;\n }\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Whether this column should be sticky positioned on the end of the row. Should make sure\n * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n * has been changed.\n */\n get stickyEnd() {\n return this._stickyEnd;\n }\n set stickyEnd(v) {\n const prevValue = this._stickyEnd;\n this._stickyEnd = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._stickyEnd;\n }\n /**\n * Overridable method that sets the css classes that will be added to every cell in this\n * column.\n * In the future, columnCssClassName will change from type string[] to string and this\n * will set a single string value.\n * @docs-private\n */\n _updateColumnCssClassName() {\n this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setNameInput(value) {\n // If the directive is set without a name (updated programmatically), then this setter will\n // trigger with an empty string and should not overwrite the programmatically set value.\n if (value) {\n this._name = value;\n this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n this._updateColumnCssClassName();\n }\n }\n}\nCdkColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkColumnDef, deps: [{ token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: { sticky: \"sticky\", name: [\"cdkColumnDef\", \"name\"], stickyEnd: \"stickyEnd\" }, providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }], queries: [{ propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true }, { propertyName: \"footerCell\", first: true, predicate: CdkFooterCellDef, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkColumnDef]',\n inputs: ['sticky'],\n providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['cdkColumnDef']\n }], stickyEnd: [{\n type: Input,\n args: ['stickyEnd']\n }], cell: [{\n type: ContentChild,\n args: [CdkCellDef]\n }], headerCell: [{\n type: ContentChild,\n args: [CdkHeaderCellDef]\n }], footerCell: [{\n type: ContentChild,\n args: [CdkFooterCellDef]\n }] } });\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nclass BaseCdkCell {\n constructor(columnDef, elementRef) {\n elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\n }\n}\n/** Header cell template container that adds the right classes and role. */\nclass CdkHeaderCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n }\n}\nCdkHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"cdk-header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-header-cell, th[cdk-header-cell]',\n host: {\n 'class': 'cdk-header-cell',\n 'role': 'columnheader',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Footer cell template container that adds the right classes and role. */\nclass CdkFooterCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkFooterCell, selector: \"cdk-footer-cell, td[cdk-footer-cell]\", host: { classAttribute: \"cdk-footer-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n host: {\n 'class': 'cdk-footer-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Cell template container that adds the right classes and role. */\nclass CdkCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\", host: { classAttribute: \"cdk-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-cell, td[cdk-cell]',\n host: {\n 'class': 'cdk-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @docs-private\n */\nclass _Schedule {\n constructor() {\n this.tasks = [];\n this.endTasks = [];\n }\n}\n/** Injection token used to provide a coalesced style scheduler. */\nconst _COALESCED_STYLE_SCHEDULER = new InjectionToken('_COALESCED_STYLE_SCHEDULER');\n/**\n * Allows grouping up CSSDom mutations after the current execution context.\n * This can significantly improve performance when separate consecutive functions are\n * reading from the CSSDom and then mutating it.\n *\n * @docs-private\n */\nclass _CoalescedStyleScheduler {\n constructor(_ngZone) {\n this._ngZone = _ngZone;\n this._currentSchedule = null;\n this._destroyed = new Subject();\n }\n /**\n * Schedules the specified task to run at the end of the current VM turn.\n */\n schedule(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.tasks.push(task);\n }\n /**\n * Schedules the specified task to run after other scheduled tasks at the end of the current\n * VM turn.\n */\n scheduleEnd(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.endTasks.push(task);\n }\n /** Prevent any further tasks from running. */\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n _createScheduleIfNeeded() {\n if (this._currentSchedule) {\n return;\n }\n this._currentSchedule = new _Schedule();\n this._getScheduleObservable()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n while (this._currentSchedule.tasks.length || this._currentSchedule.endTasks.length) {\n const schedule = this._currentSchedule;\n // Capture new tasks scheduled by the current set of tasks.\n this._currentSchedule = new _Schedule();\n for (const task of schedule.tasks) {\n task();\n }\n for (const task of schedule.endTasks) {\n task();\n }\n }\n this._currentSchedule = null;\n });\n }\n _getScheduleObservable() {\n // Use onStable when in the context of an ongoing change detection cycle so that we\n // do not accidentally trigger additional cycles.\n return this._ngZone.isStable\n ? from(Promise.resolve(undefined))\n : this._ngZone.onStable.pipe(take(1));\n }\n}\n_CoalescedStyleScheduler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _CoalescedStyleScheduler, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\n_CoalescedStyleScheduler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _CoalescedStyleScheduler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _CoalescedStyleScheduler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nconst CDK_ROW_TEMPLATE = ``;\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\nclass BaseRowDef {\n constructor(\n /** @docs-private */ template, _differs) {\n this.template = template;\n this._differs = _differs;\n }\n ngOnChanges(changes) {\n // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n // of the columns property or an empty array if none is provided.\n if (!this._columnsDiffer) {\n const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n this._columnsDiffer = this._differs.find(columns).create();\n this._columnsDiffer.diff(columns);\n }\n }\n /**\n * Returns the difference between the current columns and the columns from the last diff, or null\n * if there is no difference.\n */\n getColumnsDiff() {\n return this._columnsDiffer.diff(this.columns);\n }\n /** Gets this row def's relevant cell template from the provided column def. */\n extractCellTemplate(column) {\n if (this instanceof CdkHeaderRowDef) {\n return column.headerCell.template;\n }\n if (this instanceof CdkFooterRowDef) {\n return column.footerCell.template;\n }\n else {\n return column.cell.template;\n }\n }\n}\nBaseRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: BaseRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nBaseRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: BaseRowDef, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: BaseRowDef, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }]; } });\n// Boilerplate for applying mixins to CdkHeaderRowDef.\n/** @docs-private */\nclass CdkHeaderRowDefBase extends BaseRowDef {\n}\nconst _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass CdkHeaderRowDef extends _CdkHeaderRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkHeaderRowDef, selector: \"[cdkHeaderRowDef]\", inputs: { columns: [\"cdkHeaderRowDef\", \"columns\"], sticky: [\"cdkHeaderRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkHeaderRowDef]',\n inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n// Boilerplate for applying mixins to CdkFooterRowDef.\n/** @docs-private */\nclass CdkFooterRowDefBase extends BaseRowDef {\n}\nconst _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass CdkFooterRowDef extends _CdkFooterRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkFooterRowDef, selector: \"[cdkFooterRowDef]\", inputs: { columns: [\"cdkFooterRowDef\", \"columns\"], sticky: [\"cdkFooterRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkFooterRowDef]',\n inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass CdkRowDef extends BaseRowDef {\n // TODO(andrewseguin): Add an input for providing a switch function to determine\n // if this template should be used.\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n}\nCdkRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkRowDef, selector: \"[cdkRowDef]\", inputs: { columns: [\"cdkRowDefColumns\", \"columns\"], when: [\"cdkRowDefWhen\", \"when\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkRowDef]',\n inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\nclass CdkCellOutlet {\n constructor(_viewContainer) {\n this._viewContainer = _viewContainer;\n CdkCellOutlet.mostRecentCellOutlet = this;\n }\n ngOnDestroy() {\n // If this was the last outlet being rendered in the view, remove the reference\n // from the static property after it has been destroyed to avoid leaking memory.\n if (CdkCellOutlet.mostRecentCellOutlet === this) {\n CdkCellOutlet.mostRecentCellOutlet = null;\n }\n }\n}\n/**\n * Static property containing the latest constructed instance of this class.\n * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n * createEmbeddedView. After one of these components are created, this property will provide\n * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n * construct the cells with the provided context.\n */\nCdkCellOutlet.mostRecentCellOutlet = null;\nCdkCellOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCellOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkCellOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass CdkHeaderRow {\n}\nCdkHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkHeaderRow, selector: \"cdk-header-row, tr[cdk-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-header-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-header-row, tr[cdk-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass CdkFooterRow {\n}\nCdkFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkFooterRow, selector: \"cdk-footer-row, tr[cdk-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-footer-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-footer-row, tr[cdk-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass CdkRow {\n}\nCdkRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkRow, selector: \"cdk-row, tr[cdk-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-row, tr[cdk-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass CdkNoDataRow {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._contentClassName = 'cdk-no-data-row';\n }\n}\nCdkNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkNoDataRow, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkNoDataRow, selector: \"ng-template[cdkNoDataRow]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[cdkNoDataRow]',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nconst STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nclass StickyStyler {\n /**\n * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n * that uses the native `` element.\n * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n * sticky positioning applied.\n * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n * by reversing left/right positions.\n * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n * using inline styles. If false, it is assumed that position: sticky is included in\n * the component stylesheet for _stickCellCss.\n * @param _positionListener A listener that is notified of changes to sticky rows/columns\n * and their dimensions.\n */\n constructor(_isNativeHtmlTable, _stickCellCss, direction, _coalescedStyleScheduler, _isBrowser = true, _needsPositionStickyOnElement = true, _positionListener) {\n this._isNativeHtmlTable = _isNativeHtmlTable;\n this._stickCellCss = _stickCellCss;\n this.direction = direction;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._isBrowser = _isBrowser;\n this._needsPositionStickyOnElement = _needsPositionStickyOnElement;\n this._positionListener = _positionListener;\n this._cachedCellWidths = [];\n this._borderCellCss = {\n 'top': `${_stickCellCss}-border-elem-top`,\n 'bottom': `${_stickCellCss}-border-elem-bottom`,\n 'left': `${_stickCellCss}-border-elem-left`,\n 'right': `${_stickCellCss}-border-elem-right`,\n };\n }\n /**\n * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n * @param rows The list of rows that should be cleared from sticking in the provided directions\n * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n */\n clearStickyPositioning(rows, stickyDirections) {\n const elementsToClear = [];\n for (const row of rows) {\n // If the row isn't an element (e.g. if it's an `ng-container`),\n // it won't have inline styles or `children` so we skip it.\n if (row.nodeType !== row.ELEMENT_NODE) {\n continue;\n }\n elementsToClear.push(row);\n for (let i = 0; i < row.children.length; i++) {\n elementsToClear.push(row.children[i]);\n }\n }\n // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (const element of elementsToClear) {\n this._removeStickyStyle(element, stickyDirections);\n }\n });\n }\n /**\n * Applies sticky left and right positions to the cells of each row according to the sticky\n * states of the rendered column definitions.\n * @param rows The rows that should have its set of cells stuck according to the sticky states.\n * @param stickyStartStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the start of the row.\n * @param stickyEndStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the end of the row.\n * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n * column cell. If `false` cached widths will be used instead.\n */\n updateStickyColumns(rows, stickyStartStates, stickyEndStates, recalculateCellWidths = true) {\n if (!rows.length ||\n !this._isBrowser ||\n !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))) {\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({ sizes: [] });\n this._positionListener.stickyEndColumnsUpdated({ sizes: [] });\n }\n return;\n }\n const firstRow = rows[0];\n const numCells = firstRow.children.length;\n const cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n const startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n const endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n const lastStickyStart = stickyStartStates.lastIndexOf(true);\n const firstStickyEnd = stickyEndStates.indexOf(true);\n // Coalesce with sticky row updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n const isRtl = this.direction === 'rtl';\n const start = isRtl ? 'right' : 'left';\n const end = isRtl ? 'left' : 'right';\n for (const row of rows) {\n for (let i = 0; i < numCells; i++) {\n const cell = row.children[i];\n if (stickyStartStates[i]) {\n this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);\n }\n if (stickyEndStates[i]) {\n this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n }\n }\n }\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({\n sizes: lastStickyStart === -1\n ? []\n : cellWidths\n .slice(0, lastStickyStart + 1)\n .map((width, index) => (stickyStartStates[index] ? width : null)),\n });\n this._positionListener.stickyEndColumnsUpdated({\n sizes: firstStickyEnd === -1\n ? []\n : cellWidths\n .slice(firstStickyEnd)\n .map((width, index) => (stickyEndStates[index + firstStickyEnd] ? width : null))\n .reverse(),\n });\n }\n });\n }\n /**\n * Applies sticky positioning to the row's cells if using the native table layout, and to the\n * row itself otherwise.\n * @param rowsToStick The list of rows that should be stuck according to their corresponding\n * sticky state and to the provided top or bottom position.\n * @param stickyStates A list of boolean states where each state represents whether the row\n * should be stuck in the particular top or bottom position.\n * @param position The position direction in which the row should be stuck if that row should be\n * sticky.\n *\n */\n stickRows(rowsToStick, stickyStates, position) {\n // Since we can't measure the rows on the server, we can't stick the rows properly.\n if (!this._isBrowser) {\n return;\n }\n // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n // position such that the last row stuck will be \"bottom: 0px\" and so on. Note that the\n // sticky states need to be reversed as well.\n const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n const stickyOffsets = [];\n const stickyCellHeights = [];\n const elementsToStick = [];\n for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n stickyOffsets[rowIndex] = stickyOffset;\n const row = rows[rowIndex];\n elementsToStick[rowIndex] = this._isNativeHtmlTable\n ? Array.from(row.children)\n : [row];\n const height = row.getBoundingClientRect().height;\n stickyOffset += height;\n stickyCellHeights[rowIndex] = height;\n }\n const borderedRowIndex = states.lastIndexOf(true);\n // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n // (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n const offset = stickyOffsets[rowIndex];\n const isBorderedRowIndex = rowIndex === borderedRowIndex;\n for (const element of elementsToStick[rowIndex]) {\n this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n }\n }\n if (position === 'top') {\n this._positionListener?.stickyHeaderRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n else {\n this._positionListener?.stickyFooterRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n });\n }\n /**\n * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n * the tfoot element.\n */\n updateStickyFooterContainer(tableElement, stickyStates) {\n if (!this._isNativeHtmlTable) {\n return;\n }\n const tfoot = tableElement.querySelector('tfoot');\n // Coalesce with other sticky updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n if (stickyStates.some(state => !state)) {\n this._removeStickyStyle(tfoot, ['bottom']);\n }\n else {\n this._addStickyStyle(tfoot, 'bottom', 0, false);\n }\n });\n }\n /**\n * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n * the zIndex, removing each of the provided sticky directions, and removing the\n * sticky position if there are no more directions.\n */\n _removeStickyStyle(element, stickyDirections) {\n for (const dir of stickyDirections) {\n element.style[dir] = '';\n element.classList.remove(this._borderCellCss[dir]);\n }\n // If the element no longer has any more sticky directions, remove sticky positioning and\n // the sticky CSS class.\n // Short-circuit checking element.style[dir] for stickyDirections as they\n // were already removed above.\n const hasDirection = STICKY_DIRECTIONS.some(dir => stickyDirections.indexOf(dir) === -1 && element.style[dir]);\n if (hasDirection) {\n element.style.zIndex = this._getCalculatedZIndex(element);\n }\n else {\n // When not hasDirection, _getCalculatedZIndex will always return ''.\n element.style.zIndex = '';\n if (this._needsPositionStickyOnElement) {\n element.style.position = '';\n }\n element.classList.remove(this._stickCellCss);\n }\n }\n /**\n * Adds the sticky styling to the element by adding the sticky style class, changing position\n * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n * direction and value.\n */\n _addStickyStyle(element, dir, dirValue, isBorderElement) {\n element.classList.add(this._stickCellCss);\n if (isBorderElement) {\n element.classList.add(this._borderCellCss[dir]);\n }\n element.style[dir] = `${dirValue}px`;\n element.style.zIndex = this._getCalculatedZIndex(element);\n if (this._needsPositionStickyOnElement) {\n element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n }\n }\n /**\n * Calculate what the z-index should be for the element, depending on what directions (top,\n * bottom, left, right) have been set. It should be true that elements with a top direction\n * should have the highest index since these are elements like a table header. If any of those\n * elements are also sticky in another direction, then they should appear above other elements\n * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n * (e.g. footer rows) should then be next in the ordering such that they are below the header\n * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n * should minimally increment so that they are above non-sticky elements but below top and bottom\n * elements.\n */\n _getCalculatedZIndex(element) {\n const zIndexIncrements = {\n top: 100,\n bottom: 10,\n left: 1,\n right: 1,\n };\n let zIndex = 0;\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n for (const dir of STICKY_DIRECTIONS) {\n if (element.style[dir]) {\n zIndex += zIndexIncrements[dir];\n }\n }\n return zIndex ? `${zIndex}` : '';\n }\n /** Gets the widths for each cell in the provided row. */\n _getCellWidths(row, recalculateCellWidths = true) {\n if (!recalculateCellWidths && this._cachedCellWidths.length) {\n return this._cachedCellWidths;\n }\n const cellWidths = [];\n const firstRowCells = row.children;\n for (let i = 0; i < firstRowCells.length; i++) {\n let cell = firstRowCells[i];\n cellWidths.push(cell.getBoundingClientRect().width);\n }\n this._cachedCellWidths = cellWidths;\n return cellWidths;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyStartColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = 0; i < widths.length; i++) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyEndColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = widths.length; i > 0; i--) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an error to be thrown when attempting to find an nonexistent column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nfunction getTableUnknownColumnError(id) {\n return Error(`Could not find column with id \"${id}\".`);\n}\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nfunction getTableDuplicateColumnNameError(name) {\n return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nfunction getTableMultipleDefaultRowDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nfunction getTableMissingMatchingRowDefError(data) {\n return Error(`Could not find a matching row definition for the` +\n `provided row data: ${JSON.stringify(data)}`);\n}\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nfunction getTableMissingRowDefsError() {\n return Error('Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.');\n}\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nfunction getTableUnknownDataSourceError() {\n return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nfunction getTableTextColumnMissingParentTableError() {\n return Error(`Text column could not find a parent table for registration.`);\n}\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nfunction getTableTextColumnMissingNameError() {\n return Error(`Table text column must have a name.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the StickyPositioningListener. */\nconst STICKY_POSITIONING_LISTENER = new InjectionToken('CDK_SPL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass CdkRecycleRows {\n}\nCdkRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkRecycleRows, selector: \"cdk-table[recycleRows], table[cdk-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\nclass DataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: DataRowOutlet, selector: \"[rowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[rowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\nclass HeaderRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nHeaderRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: HeaderRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nHeaderRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: HeaderRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[headerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\nclass FooterRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nFooterRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: FooterRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nFooterRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: FooterRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[footerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\nclass NoDataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nNoDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: NoDataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNoDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: NoDataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[noDataRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nconst CDK_TABLE_TEMPLATE = \n// Note that according to MDN, the `caption` element has to be projected as the **first**\n// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n`\n \n \n \n \n \n \n`;\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nclass RowViewRef extends EmbeddedViewRef {\n}\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\nclass CdkTable {\n constructor(_differs, _changeDetectorRef, _elementRef, role, _dir, _document, _platform, _viewRepeater, _coalescedStyleScheduler, _viewportRuler, \n /**\n * @deprecated `_stickyPositioningListener` parameter to become required.\n * @breaking-change 13.0.0\n */\n _stickyPositioningListener, \n /**\n * @deprecated `_ngZone` parameter to become required.\n * @breaking-change 14.0.0\n */\n _ngZone) {\n this._differs = _differs;\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._dir = _dir;\n this._platform = _platform;\n this._viewRepeater = _viewRepeater;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._viewportRuler = _viewportRuler;\n this._stickyPositioningListener = _stickyPositioningListener;\n this._ngZone = _ngZone;\n /** Subject that emits when the component has been destroyed. */\n this._onDestroy = new Subject();\n /**\n * Map of all the user's defined columns (header, data, and footer cell template) identified by\n * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n * any custom column definitions added to `_customColumnDefs`.\n */\n this._columnDefsByName = new Map();\n /**\n * Column definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * column definitions as *its* content child.\n */\n this._customColumnDefs = new Set();\n /**\n * Data row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in data rows as *its* content child.\n */\n this._customRowDefs = new Set();\n /**\n * Header row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in header rows as *its* content child.\n */\n this._customHeaderRowDefs = new Set();\n /**\n * Footer row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n * built-in footer row as *its* content child.\n */\n this._customFooterRowDefs = new Set();\n /**\n * Whether the header row definition has been changed. Triggers an update to the header row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._headerRowDefChanged = true;\n /**\n * Whether the footer row definition has been changed. Triggers an update to the footer row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._footerRowDefChanged = true;\n /**\n * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n * change.\n */\n this._stickyColumnStylesNeedReset = true;\n /**\n * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n * `false`, cached values will be used instead. This is only applicable to tables with\n * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.\n */\n this._forceRecalculateCellWidths = true;\n /**\n * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n * and row template matches, which allows the `IterableDiffer` to check rows by reference\n * and understand which rows are added/moved/removed.\n *\n * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n * `CdkRowDef` object. With the two keys, the cache points to a `RenderRow` object that\n * contains an array of created pairs. The array is necessary to handle cases where the data\n * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n * stored.\n */\n this._cachedRenderRowsMap = new Map();\n /**\n * CSS class added to any row or cell that has sticky positioning applied. May be overridden by\n * table subclasses.\n */\n this.stickyCssClass = 'cdk-table-sticky';\n /**\n * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n * the position is set in a selector associated with the value of stickyCssClass. May be\n * overridden by table subclasses\n */\n this.needsPositionStickyOnElement = true;\n /** Whether the no data row is currently showing anything. */\n this._isShowingNoDataRow = false;\n this._multiTemplateDataRows = false;\n this._fixedLayout = false;\n /**\n * Emits when the table completes rendering a set of data rows based on the latest data from the\n * data source, even if the set of rows is empty.\n */\n this.contentChanged = new EventEmitter();\n // TODO(andrewseguin): Remove max value as the end index\n // and instead calculate the view on init and scroll.\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n *\n * @docs-private\n */\n this.viewChange = new BehaviorSubject({\n start: 0,\n end: Number.MAX_VALUE,\n });\n if (!role) {\n this._elementRef.nativeElement.setAttribute('role', 'table');\n }\n this._document = _document;\n this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n }\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n * relative to the function to know if a row should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n get trackBy() {\n return this._trackByFn;\n }\n set trackBy(fn) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n }\n this._trackByFn = fn;\n }\n /**\n * The table's source of data, which can be provided in three ways (in order of complexity):\n * - Simple data array (each object represents one table row)\n * - Stream that emits a data array each time the array changes\n * - `DataSource` object that implements the connect/disconnect interface.\n *\n * If a data array is provided, the table must be notified when the array's objects are\n * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n * render the diff since the last table render. If the data array reference is changed, the table\n * will automatically trigger an update to the rows.\n *\n * When providing an Observable stream, the table will trigger an update automatically when the\n * stream emits a new array of data.\n *\n * Finally, when providing a `DataSource` object, the table will use the Observable stream\n * provided by the connect function and trigger updates when that stream emits new data array\n * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n * subscriptions registered during the connect process).\n */\n get dataSource() {\n return this._dataSource;\n }\n set dataSource(dataSource) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n /**\n * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n * dataobject will render the first row that evaluates its when predicate to true, in the order\n * defined in the table, or otherwise the default row which does not have a when predicate.\n */\n get multiTemplateDataRows() {\n return this._multiTemplateDataRows;\n }\n set multiTemplateDataRows(v) {\n this._multiTemplateDataRows = coerceBooleanProperty(v);\n // In Ivy if this value is set via a static attribute (e.g.
      ),\n // this setter will be invoked before the row outlet has been defined hence the null check.\n if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n this._forceRenderDataRows();\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n * and optimize rendering sticky styles for native tables. No-op for flex tables.\n */\n get fixedLayout() {\n return this._fixedLayout;\n }\n set fixedLayout(v) {\n this._fixedLayout = coerceBooleanProperty(v);\n // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n this._forceRecalculateCellWidths = true;\n this._stickyColumnStylesNeedReset = true;\n }\n ngOnInit() {\n this._setupStickyStyler();\n if (this._isNativeHtmlTable) {\n this._applyNativeTableSections();\n }\n // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n // the user has provided a custom trackBy, return the result of that function as evaluated\n // with the values of the `RenderRow`'s data and index.\n this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {\n return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n });\n this._viewportRuler\n .change()\n .pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this._forceRecalculateCellWidths = true;\n });\n }\n ngAfterContentChecked() {\n // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n this._cacheRowDefs();\n this._cacheColumnDefs();\n // Make sure that the user has at least added header, footer, or data row def.\n if (!this._headerRowDefs.length &&\n !this._footerRowDefs.length &&\n !this._rowDefs.length &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingRowDefsError();\n }\n // Render updates if the list of columns have been changed for the header, row, or footer defs.\n const columnsChanged = this._renderUpdatedColumns();\n const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n // Ensure sticky column styles are reset if set to `true` elsewhere.\n this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n this._forceRecalculateCellWidths = rowDefsChanged;\n // If the header row definition has been changed, trigger a render to the header row.\n if (this._headerRowDefChanged) {\n this._forceRenderHeaderRows();\n this._headerRowDefChanged = false;\n }\n // If the footer row definition has been changed, trigger a render to the footer row.\n if (this._footerRowDefChanged) {\n this._forceRenderFooterRows();\n this._footerRowDefChanged = false;\n }\n // If there is a data source and row definitions, connect to the data source unless a\n // connection has already been made.\n if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n this._observeRenderChanges();\n }\n else if (this._stickyColumnStylesNeedReset) {\n // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n // called when it row data arrives. Otherwise, we need to call it proactively.\n this.updateStickyColumnStyles();\n }\n this._checkStickyStates();\n }\n ngOnDestroy() {\n [\n this._rowOutlet.viewContainer,\n this._headerRowOutlet.viewContainer,\n this._footerRowOutlet.viewContainer,\n this._cachedRenderRowsMap,\n this._customColumnDefs,\n this._customRowDefs,\n this._customHeaderRowDefs,\n this._customFooterRowDefs,\n this._columnDefsByName,\n ].forEach(def => {\n def.clear();\n });\n this._headerRowDefs = [];\n this._footerRowDefs = [];\n this._defaultRowDef = null;\n this._onDestroy.next();\n this._onDestroy.complete();\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n }\n /**\n * Renders rows based on the table's latest set of data, which was either provided directly as an\n * input or retrieved through an Observable stream (directly or from a DataSource).\n * Checks for differences in the data since the last diff to perform only the necessary\n * changes (add/remove/move rows).\n *\n * If the table's data source is a DataSource or Observable, this will be invoked automatically\n * each time the provided Observable stream emits a new data array. Otherwise if your data is\n * an array, this function will need to be called to render any changes.\n */\n renderRows() {\n this._renderRows = this._getAllRenderRows();\n const changes = this._dataDiffer.diff(this._renderRows);\n if (!changes) {\n this._updateNoDataRow();\n this.contentChanged.next();\n return;\n }\n const viewContainer = this._rowOutlet.viewContainer;\n this._viewRepeater.applyChanges(changes, viewContainer, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record.item, currentIndex), record => record.item.data, (change) => {\n if (change.operation === 1 /* _ViewRepeaterOperation.INSERTED */ && change.context) {\n this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n }\n });\n // Update the meta context of a row's context data (index, count, first, last, ...)\n this._updateRowIndexContext();\n // Update rows that did not get added/removed/moved but may have had their identity changed,\n // e.g. if trackBy matched data on some property but the actual data reference changed.\n changes.forEachIdentityChange((record) => {\n const rowView = viewContainer.get(record.currentIndex);\n rowView.context.$implicit = record.item.data;\n });\n this._updateNoDataRow();\n // Allow the new row data to render before measuring it.\n // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.\n if (this._ngZone && NgZone.isInAngularZone()) {\n this._ngZone.onStable.pipe(take(1), takeUntil(this._onDestroy)).subscribe(() => {\n this.updateStickyColumnStyles();\n });\n }\n else {\n this.updateStickyColumnStyles();\n }\n this.contentChanged.next();\n }\n /** Adds a column definition that was not included as part of the content children. */\n addColumnDef(columnDef) {\n this._customColumnDefs.add(columnDef);\n }\n /** Removes a column definition that was not included as part of the content children. */\n removeColumnDef(columnDef) {\n this._customColumnDefs.delete(columnDef);\n }\n /** Adds a row definition that was not included as part of the content children. */\n addRowDef(rowDef) {\n this._customRowDefs.add(rowDef);\n }\n /** Removes a row definition that was not included as part of the content children. */\n removeRowDef(rowDef) {\n this._customRowDefs.delete(rowDef);\n }\n /** Adds a header row definition that was not included as part of the content children. */\n addHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.add(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Removes a header row definition that was not included as part of the content children. */\n removeHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.delete(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Adds a footer row definition that was not included as part of the content children. */\n addFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.add(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Removes a footer row definition that was not included as part of the content children. */\n removeFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.delete(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Sets a no data row definition that was not included as a part of the content children. */\n setNoDataRow(noDataRow) {\n this._customNoDataRow = noDataRow;\n }\n /**\n * Updates the header sticky styles. First resets all applied styles with respect to the cells\n * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n * automatically called when the header row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyHeaderRowStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the thead element if there are no header rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const thead = tableElement.querySelector('thead');\n if (thead) {\n thead.style.display = headerRows.length ? '' : 'none';\n }\n const stickyStates = this._headerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n // Reset the dirty state of the sticky input change since it has been used.\n this._headerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n * automatically called when the footer row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyFooterRowStyles() {\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const tfoot = tableElement.querySelector('tfoot');\n if (tfoot) {\n tfoot.style.display = footerRows.length ? '' : 'none';\n }\n const stickyStates = this._footerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n // Reset the dirty state of the sticky input change since it has been used.\n this._footerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the column sticky styles. First resets all applied styles with respect to the cells\n * sticking to the left and right. Then sticky styles are added for the left and right according\n * to the column definitions for each cell in each row. This is automatically called when\n * the data source provides a new set of data or when a column definition changes its sticky\n * input. May be called manually for cases where the cell content changes outside of these events.\n */\n updateStickyColumnStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const dataRows = this._getRenderedRows(this._rowOutlet);\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n // In a table using a fixed layout, row content won't affect column width, so sticky styles\n // don't need to be cleared unless either the sticky column config changes or one of the row\n // defs change.\n if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\n // Clear the left and right positioning from all columns in the table across all rows since\n // sticky columns span across all table sections (header, data, footer)\n this._stickyStyler.clearStickyPositioning([...headerRows, ...dataRows, ...footerRows], ['left', 'right']);\n this._stickyColumnStylesNeedReset = false;\n }\n // Update the sticky styles for each header row depending on the def's sticky state\n headerRows.forEach((headerRow, i) => {\n this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n });\n // Update the sticky styles for each data row depending on its def's sticky state\n this._rowDefs.forEach(rowDef => {\n // Collect all the rows rendered with this row definition.\n const rows = [];\n for (let i = 0; i < dataRows.length; i++) {\n if (this._renderRows[i].rowDef === rowDef) {\n rows.push(dataRows[i]);\n }\n }\n this._addStickyColumnStyles(rows, rowDef);\n });\n // Update the sticky styles for each footer row depending on the def's sticky state\n footerRows.forEach((footerRow, i) => {\n this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n });\n // Reset the dirty state of the sticky input change since it has been used.\n Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n }\n /**\n * Get the list of RenderRow objects to render according to the current list of data and defined\n * row definitions. If the previous list already contained a particular pair, it should be reused\n * so that the differ equates their references.\n */\n _getAllRenderRows() {\n const renderRows = [];\n // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n // new cache while unused ones can be picked up by garbage collection.\n const prevCachedRenderRows = this._cachedRenderRowsMap;\n this._cachedRenderRowsMap = new Map();\n // For each data object, get the list of rows that should be rendered, represented by the\n // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n for (let i = 0; i < this._data.length; i++) {\n let data = this._data[i];\n const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n if (!this._cachedRenderRowsMap.has(data)) {\n this._cachedRenderRowsMap.set(data, new WeakMap());\n }\n for (let j = 0; j < renderRowsForData.length; j++) {\n let renderRow = renderRowsForData[j];\n const cache = this._cachedRenderRowsMap.get(renderRow.data);\n if (cache.has(renderRow.rowDef)) {\n cache.get(renderRow.rowDef).push(renderRow);\n }\n else {\n cache.set(renderRow.rowDef, [renderRow]);\n }\n renderRows.push(renderRow);\n }\n }\n return renderRows;\n }\n /**\n * Gets a list of `RenderRow` for the provided data object and any `CdkRowDef` objects that\n * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n * `(T, CdkRowDef)` pair.\n */\n _getRenderRowsForData(data, dataIndex, cache) {\n const rowDefs = this._getRowDefs(data, dataIndex);\n return rowDefs.map(rowDef => {\n const cachedRenderRows = cache && cache.has(rowDef) ? cache.get(rowDef) : [];\n if (cachedRenderRows.length) {\n const dataRow = cachedRenderRows.shift();\n dataRow.dataIndex = dataIndex;\n return dataRow;\n }\n else {\n return { data, rowDef, dataIndex };\n }\n });\n }\n /** Update the map containing the content's column definitions. */\n _cacheColumnDefs() {\n this._columnDefsByName.clear();\n const columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);\n columnDefs.forEach(columnDef => {\n if (this._columnDefsByName.has(columnDef.name) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableDuplicateColumnNameError(columnDef.name);\n }\n this._columnDefsByName.set(columnDef.name, columnDef);\n });\n }\n /** Update the list of all available row definitions that can be used. */\n _cacheRowDefs() {\n this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows &&\n defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }\n /**\n * Check if the header, data, or footer rows have changed what columns they want to display or\n * whether the sticky states have changed for the header or footer. If there is a diff, then\n * re-render that section.\n */\n _renderUpdatedColumns() {\n const columnsDiffReducer = (acc, def) => acc || !!def.getColumnsDiff();\n // Force re-render data rows if the list of column definitions have changed.\n const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n if (dataColumnsChanged) {\n this._forceRenderDataRows();\n }\n // Force re-render header/footer rows if the list of column definitions have changed.\n const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n if (headerColumnsChanged) {\n this._forceRenderHeaderRows();\n }\n const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n if (footerColumnsChanged) {\n this._forceRenderFooterRows();\n }\n return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n }\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the row outlet. Otherwise start listening for new data.\n */\n _switchDataSource(dataSource) {\n this._data = [];\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n // Stop listening for data from the previous data source.\n if (this._renderChangeSubscription) {\n this._renderChangeSubscription.unsubscribe();\n this._renderChangeSubscription = null;\n }\n if (!dataSource) {\n if (this._dataDiffer) {\n this._dataDiffer.diff([]);\n }\n this._rowOutlet.viewContainer.clear();\n }\n this._dataSource = dataSource;\n }\n /** Set up a subscription for the data provided by the data source. */\n _observeRenderChanges() {\n // If no data source has been set, there is nothing to observe for changes.\n if (!this.dataSource) {\n return;\n }\n let dataStream;\n if (isDataSource(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n }\n else if (isObservable(this.dataSource)) {\n dataStream = this.dataSource;\n }\n else if (Array.isArray(this.dataSource)) {\n dataStream = of(this.dataSource);\n }\n if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownDataSourceError();\n }\n this._renderChangeSubscription = dataStream\n .pipe(takeUntil(this._onDestroy))\n .subscribe(data => {\n this._data = data || [];\n this.renderRows();\n });\n }\n /**\n * Clears any existing content in the header row outlet and creates a new embedded view\n * in the outlet using the header row definition.\n */\n _forceRenderHeaderRows() {\n // Clear the header row outlet if any content exists.\n if (this._headerRowOutlet.viewContainer.length > 0) {\n this._headerRowOutlet.viewContainer.clear();\n }\n this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n this.updateStickyHeaderRowStyles();\n }\n /**\n * Clears any existing content in the footer row outlet and creates a new embedded view\n * in the outlet using the footer row definition.\n */\n _forceRenderFooterRows() {\n // Clear the footer row outlet if any content exists.\n if (this._footerRowOutlet.viewContainer.length > 0) {\n this._footerRowOutlet.viewContainer.clear();\n }\n this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n this.updateStickyFooterRowStyles();\n }\n /** Adds the sticky column styles for the rows according to the columns' stick states. */\n _addStickyColumnStyles(rows, rowDef) {\n const columnDefs = Array.from(rowDef.columns || []).map(columnName => {\n const columnDef = this._columnDefsByName.get(columnName);\n if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnName);\n }\n return columnDef;\n });\n const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates, !this._fixedLayout || this._forceRecalculateCellWidths);\n }\n /** Gets the list of rows that have been rendered in the row outlet. */\n _getRenderedRows(rowOutlet) {\n const renderedRows = [];\n for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n const viewRef = rowOutlet.viewContainer.get(i);\n renderedRows.push(viewRef.rootNodes[0]);\n }\n return renderedRows;\n }\n /**\n * Get the matching row definitions that should be used for this row data. If there is only\n * one row definition, it is returned. Otherwise, find the row definitions that has a when\n * predicate that returns true with the data. If none return true, return the default row\n * definition.\n */\n _getRowDefs(data, dataIndex) {\n if (this._rowDefs.length == 1) {\n return [this._rowDefs[0]];\n }\n let rowDefs = [];\n if (this.multiTemplateDataRows) {\n rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n }\n else {\n let rowDef = this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n if (rowDef) {\n rowDefs.push(rowDef);\n }\n }\n if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingMatchingRowDefError(data);\n }\n return rowDefs;\n }\n _getEmbeddedViewArgs(renderRow, index) {\n const rowDef = renderRow.rowDef;\n const context = { $implicit: renderRow.data };\n return {\n templateRef: rowDef.template,\n context,\n index,\n };\n }\n /**\n * Creates a new row template in the outlet and fills it with the set of cell templates.\n * Optionally takes a context to provide to the row and cells, as well as an optional index\n * of where to place the new row template in the outlet.\n */\n _renderRow(outlet, rowDef, index, context = {}) {\n // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n this._renderCellTemplateForItem(rowDef, context);\n return view;\n }\n _renderCellTemplateForItem(rowDef, context) {\n for (let cellTemplate of this._getCellTemplates(rowDef)) {\n if (CdkCellOutlet.mostRecentCellOutlet) {\n CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Updates the index-related context for each row to reflect any changes in the index of the rows,\n * e.g. first/last/even/odd.\n */\n _updateRowIndexContext() {\n const viewContainer = this._rowOutlet.viewContainer;\n for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n const viewRef = viewContainer.get(renderIndex);\n const context = viewRef.context;\n context.count = count;\n context.first = renderIndex === 0;\n context.last = renderIndex === count - 1;\n context.even = renderIndex % 2 === 0;\n context.odd = !context.even;\n if (this.multiTemplateDataRows) {\n context.dataIndex = this._renderRows[renderIndex].dataIndex;\n context.renderIndex = renderIndex;\n }\n else {\n context.index = this._renderRows[renderIndex].dataIndex;\n }\n }\n }\n /** Gets the column definitions for the provided row def. */\n _getCellTemplates(rowDef) {\n if (!rowDef || !rowDef.columns) {\n return [];\n }\n return Array.from(rowDef.columns, columnId => {\n const column = this._columnDefsByName.get(columnId);\n if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnId);\n }\n return rowDef.extractCellTemplate(column);\n });\n }\n /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */\n _applyNativeTableSections() {\n const documentFragment = this._document.createDocumentFragment();\n const sections = [\n { tag: 'thead', outlets: [this._headerRowOutlet] },\n { tag: 'tbody', outlets: [this._rowOutlet, this._noDataRowOutlet] },\n { tag: 'tfoot', outlets: [this._footerRowOutlet] },\n ];\n for (const section of sections) {\n const element = this._document.createElement(section.tag);\n element.setAttribute('role', 'rowgroup');\n for (const outlet of section.outlets) {\n element.appendChild(outlet.elementRef.nativeElement);\n }\n documentFragment.appendChild(element);\n }\n // Use a DocumentFragment so we don't hit the DOM on each iteration.\n this._elementRef.nativeElement.appendChild(documentFragment);\n }\n /**\n * Forces a re-render of the data rows. Should be called in cases where there has been an input\n * change that affects the evaluation of which rows should be rendered, e.g. toggling\n * `multiTemplateDataRows` or adding/removing row definitions.\n */\n _forceRenderDataRows() {\n this._dataDiffer.diff([]);\n this._rowOutlet.viewContainer.clear();\n this.renderRows();\n }\n /**\n * Checks if there has been a change in sticky states since last check and applies the correct\n * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n * during a change detection and after the inputs are settled (after content check).\n */\n _checkStickyStates() {\n const stickyCheckReducer = (acc, d) => {\n return acc || d.hasStickyChanged();\n };\n // Note that the check needs to occur for every definition since it notifies the definition\n // that it can reset its dirty state. Using another operator like `some` may short-circuit\n // remaining definitions and leave them in an unchecked state.\n if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyHeaderRowStyles();\n }\n if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyFooterRowStyles();\n }\n if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n this._stickyColumnStylesNeedReset = true;\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Creates the sticky styler that will be used for sticky rows and columns. Listens\n * for directionality changes and provides the latest direction to the styler. Re-applies column\n * stickiness when directionality changes.\n */\n _setupStickyStyler() {\n const direction = this._dir ? this._dir.value : 'ltr';\n this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);\n (this._dir ? this._dir.change : of())\n .pipe(takeUntil(this._onDestroy))\n .subscribe(value => {\n this._stickyStyler.direction = value;\n this.updateStickyColumnStyles();\n });\n }\n /** Filters definitions that belong to this table from a QueryList. */\n _getOwnDefs(items) {\n return items.filter(item => !item._table || item._table === this);\n }\n /** Creates or removes the no data row, depending on whether any data is being shown. */\n _updateNoDataRow() {\n const noDataRow = this._customNoDataRow || this._noDataRow;\n if (!noDataRow) {\n return;\n }\n const shouldShow = this._rowOutlet.viewContainer.length === 0;\n if (shouldShow === this._isShowingNoDataRow) {\n return;\n }\n const container = this._noDataRowOutlet.viewContainer;\n if (shouldShow) {\n const view = container.createEmbeddedView(noDataRow.templateRef);\n const rootNode = view.rootNodes[0];\n // Only add the attributes if we have a single root node since it's hard\n // to figure out which one to add it to when there are multiple.\n if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n rootNode.setAttribute('role', 'row');\n rootNode.classList.add(noDataRow._contentClassName);\n }\n }\n else {\n container.clear();\n }\n this._isShowingNoDataRow = shouldShow;\n }\n}\nCdkTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTable, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: 'role', attribute: true }, { token: i1.Directionality, optional: true }, { token: DOCUMENT }, { token: i2.Platform }, { token: _VIEW_REPEATER_STRATEGY }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i3.ViewportRuler }, { token: STICKY_POSITIONING_LISTENER, optional: true, skipSelf: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkTable, selector: \"cdk-table, table[cdk-table]\", inputs: { trackBy: \"trackBy\", dataSource: \"dataSource\", multiTemplateDataRows: \"multiTemplateDataRows\", fixedLayout: \"fixedLayout\" }, outputs: { contentChanged: \"contentChanged\" }, host: { properties: { \"class.cdk-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"cdk-table\" }, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], queries: [{ propertyName: \"_noDataRow\", first: true, predicate: CdkNoDataRow, descendants: true }, { propertyName: \"_contentColumnDefs\", predicate: CdkColumnDef, descendants: true }, { propertyName: \"_contentRowDefs\", predicate: CdkRowDef, descendants: true }, { propertyName: \"_contentHeaderRowDefs\", predicate: CdkHeaderRowDef, descendants: true }, { propertyName: \"_contentFooterRowDefs\", predicate: CdkFooterRowDef, descendants: true }], viewQueries: [{ propertyName: \"_rowOutlet\", first: true, predicate: DataRowOutlet, descendants: true, static: true }, { propertyName: \"_headerRowOutlet\", first: true, predicate: HeaderRowOutlet, descendants: true, static: true }, { propertyName: \"_footerRowOutlet\", first: true, predicate: FooterRowOutlet, descendants: true, static: true }, { propertyName: \"_noDataRowOutlet\", first: true, predicate: NoDataRowOutlet, descendants: true, static: true }], exportAs: [\"cdkTable\"], ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n\", isInline: true, styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTable, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-table, table[cdk-table]', exportAs: 'cdkTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'cdk-table',\n '[class.cdk-table-fixed-layout]': 'fixedLayout',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"] }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['role']\n }] }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i2.Platform }, { type: undefined, decorators: [{\n type: Inject,\n args: [_VIEW_REPEATER_STRATEGY]\n }] }, { type: _CoalescedStyleScheduler, decorators: [{\n type: Inject,\n args: [_COALESCED_STYLE_SCHEDULER]\n }] }, { type: i3.ViewportRuler }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [STICKY_POSITIONING_LISTENER]\n }] }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { trackBy: [{\n type: Input\n }], dataSource: [{\n type: Input\n }], multiTemplateDataRows: [{\n type: Input\n }], fixedLayout: [{\n type: Input\n }], contentChanged: [{\n type: Output\n }], _rowOutlet: [{\n type: ViewChild,\n args: [DataRowOutlet, { static: true }]\n }], _headerRowOutlet: [{\n type: ViewChild,\n args: [HeaderRowOutlet, { static: true }]\n }], _footerRowOutlet: [{\n type: ViewChild,\n args: [FooterRowOutlet, { static: true }]\n }], _noDataRowOutlet: [{\n type: ViewChild,\n args: [NoDataRowOutlet, { static: true }]\n }], _contentColumnDefs: [{\n type: ContentChildren,\n args: [CdkColumnDef, { descendants: true }]\n }], _contentRowDefs: [{\n type: ContentChildren,\n args: [CdkRowDef, { descendants: true }]\n }], _contentHeaderRowDefs: [{\n type: ContentChildren,\n args: [CdkHeaderRowDef, {\n descendants: true,\n }]\n }], _contentFooterRowDefs: [{\n type: ContentChildren,\n args: [CdkFooterRowDef, {\n descendants: true,\n }]\n }], _noDataRow: [{\n type: ContentChild,\n args: [CdkNoDataRow]\n }] } });\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet(array, set) {\n return array.concat(Array.from(set));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`
      `).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass CdkTextColumn {\n constructor(\n // `CdkTextColumn` is always requiring a table, but we just assert it manually\n // for better error reporting.\n // tslint:disable-next-line: lightweight-tokens\n _table, _options) {\n this._table = _table;\n this._options = _options;\n /** Alignment of the cell values. */\n this.justify = 'start';\n this._options = _options || {};\n }\n /** Column name that should be used to reference this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._name = name;\n // With Ivy, inputs can be initialized before static query results are\n // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n this._syncColumnDefName();\n }\n ngOnInit() {\n this._syncColumnDefName();\n if (this.headerText === undefined) {\n this.headerText = this._createDefaultHeaderText();\n }\n if (!this.dataAccessor) {\n this.dataAccessor =\n this._options.defaultDataAccessor || ((data, name) => data[name]);\n }\n if (this._table) {\n // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n // since the columnDef will not pick up its content by the time the table finishes checking\n // its content and initializing the rows.\n this.columnDef.cell = this.cell;\n this.columnDef.headerCell = this.headerCell;\n this._table.addColumnDef(this.columnDef);\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getTableTextColumnMissingParentTableError();\n }\n }\n ngOnDestroy() {\n if (this._table) {\n this._table.removeColumnDef(this.columnDef);\n }\n }\n /**\n * Creates a default header text. Use the options' header text transformation function if one\n * has been provided. Otherwise simply capitalize the column name.\n */\n _createDefaultHeaderText() {\n const name = this.name;\n if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableTextColumnMissingNameError();\n }\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n return name[0].toUpperCase() + name.slice(1);\n }\n /** Synchronizes the column definition name with the text column name. */\n _syncColumnDefName() {\n if (this.columnDef) {\n this.columnDef.name = this.name;\n }\n }\n}\nCdkTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTextColumn, deps: [{ token: CdkTable, optional: true }, { token: TEXT_COLUMN_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkTextColumn, selector: \"cdk-text-column\", inputs: { name: \"name\", headerText: \"headerText\", dataAccessor: \"dataAccessor\", justify: \"justify\" }, viewQueries: [{ propertyName: \"columnDef\", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `\n \n \n \n \n `, isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellDef, selector: \"[cdkCellDef]\" }, { kind: \"directive\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\" }, { kind: \"directive\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: [\"sticky\", \"cdkColumnDef\", \"stickyEnd\"] }, { kind: \"directive\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\" }, { kind: \"directive\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTextColumn, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-text-column',\n template: `\n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n }]\n }], ctorParameters: function () { return [{ type: CdkTable, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [TEXT_COLUMN_OPTIONS]\n }] }]; }, propDecorators: { name: [{\n type: Input\n }], headerText: [{\n type: Input\n }], dataAccessor: [{\n type: Input\n }], justify: [{\n type: Input\n }], columnDef: [{\n type: ViewChild,\n args: [CdkColumnDef, { static: true }]\n }], cell: [{\n type: ViewChild,\n args: [CdkCellDef, { static: true }]\n }], headerCell: [{\n type: ViewChild,\n args: [CdkHeaderCellDef, { static: true }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EXPORTED_DECLARATIONS = [\n CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet,\n];\nclass CdkTableModule {\n}\nCdkTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTableModule, declarations: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet], imports: [ScrollingModule], exports: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet] });\nCdkTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTableModule, imports: [ScrollingModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTableModule, decorators: [{\n type: NgModule,\n args: [{\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n imports: [ScrollingModule],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRecycleRows, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOutlet, STICKY_DIRECTIONS, STICKY_POSITIONING_LISTENER, StickyStyler, TEXT_COLUMN_OPTIONS, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule, mixinHasStickyInput };\n","import * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Optional, Inject, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport * as i2 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRipple, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport * as i3 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nconst MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nconst MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true,\n};\n/** Change event object emitted by MatCheckbox. */\nclass MatCheckboxChange {\n}\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}))));\nclass _MatCheckboxBase extends _MatCheckboxMixinBase {\n constructor(idPrefix, elementRef, _changeDetectorRef, _ngZone, tabIndex, _animationMode, _options) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._ngZone = _ngZone;\n this._animationMode = _animationMode;\n this._options = _options;\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n this.ariaLabel = '';\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n this.ariaLabelledby = null;\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n this.labelPosition = 'after';\n /** Name value will be applied to the input element if present */\n this.name = null;\n /** Event emitted when the checkbox's `checked` value changes. */\n this.change = new EventEmitter();\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n this.indeterminateChange = new EventEmitter();\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n this._onTouched = () => { };\n this._currentAnimationClass = '';\n this._currentCheckState = 0 /* TransitionCheckState.Init */;\n this._controlValueAccessorChangeFn = () => { };\n this._checked = false;\n this._disabled = false;\n this._indeterminate = false;\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;\n }\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n /** Whether the checkbox is required. */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n ngAfterViewInit() {\n this._syncIndeterminate(this._indeterminate);\n }\n /** Whether the checkbox is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n const checked = coerceBooleanProperty(value);\n if (checked != this.checked) {\n this._checked = checked;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n get indeterminate() {\n return this._indeterminate;\n }\n set indeterminate(value) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(3 /* TransitionCheckState.Indeterminate */);\n }\n else {\n this._transitionCheckState(this.checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n this._syncIndeterminate(this._indeterminate);\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n this.checked = !!value;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n _getAriaChecked() {\n if (this.checked) {\n return 'true';\n }\n return this.indeterminate ? 'mixed' : 'false';\n }\n _transitionCheckState(newState) {\n let oldState = this._currentCheckState;\n let element = this._getAnimationTargetElement();\n if (oldState === newState || !element) {\n return;\n }\n if (this._currentAnimationClass) {\n element.classList.remove(this._currentAnimationClass);\n }\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);\n this._currentCheckState = newState;\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n _emitChangeEvent() {\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n /** Toggles the `checked` state of the checkbox. */\n toggle() {\n this.checked = !this.checked;\n this._controlValueAccessorChangeFn(this.checked);\n }\n _handleInputClick() {\n const clickAction = this._options?.clickAction;\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n this._checked = !this._checked;\n this._transitionCheckState(this._checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n }\n else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n _onInteractionEvent(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n _onBlur() {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n _getAnimationClassForCheckStateTransition(oldState, newState) {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n switch (oldState) {\n case 0 /* TransitionCheckState.Init */:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === 1 /* TransitionCheckState.Checked */) {\n return this._animationClasses.uncheckedToChecked;\n }\n else if (newState == 3 /* TransitionCheckState.Indeterminate */) {\n return this._checked\n ? this._animationClasses.checkedToIndeterminate\n : this._animationClasses.uncheckedToIndeterminate;\n }\n break;\n case 2 /* TransitionCheckState.Unchecked */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.uncheckedToChecked\n : this._animationClasses.uncheckedToIndeterminate;\n case 1 /* TransitionCheckState.Checked */:\n return newState === 2 /* TransitionCheckState.Unchecked */\n ? this._animationClasses.checkedToUnchecked\n : this._animationClasses.checkedToIndeterminate;\n case 3 /* TransitionCheckState.Indeterminate */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.indeterminateToChecked\n : this._animationClasses.indeterminateToUnchecked;\n }\n return '';\n }\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n _syncIndeterminate(value) {\n const nativeCheckbox = this._inputElement;\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n}\n_MatCheckboxBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatCheckboxBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatCheckboxBase, inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], id: \"id\", required: \"required\", labelPosition: \"labelPosition\", name: \"name\", value: \"value\", checked: \"checked\", disabled: \"disabled\", indeterminate: \"indeterminate\" }, outputs: { change: \"change\", indeterminateChange: \"indeterminateChange\" }, viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }, { propertyName: \"_labelElement\", first: true, predicate: [\"label\"], descendants: true }, { propertyName: \"ripple\", first: true, predicate: MatRipple, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], id: [{\n type: Input\n }], required: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], name: [{\n type: Input\n }], change: [{\n type: Output\n }], indeterminateChange: [{\n type: Output\n }], value: [{\n type: Input\n }], _inputElement: [{\n type: ViewChild,\n args: ['input']\n }], _labelElement: [{\n type: ViewChild,\n args: ['label']\n }], ripple: [{\n type: ViewChild,\n args: [MatRipple]\n }], checked: [{\n type: Input\n }], disabled: [{\n type: Input\n }], indeterminate: [{\n type: Input\n }] } });\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\nclass MatCheckbox extends _MatCheckboxBase {\n constructor(elementRef, changeDetectorRef, _focusMonitor, ngZone, tabIndex, animationMode, options) {\n super('mat-checkbox-', elementRef, changeDetectorRef, ngZone, tabIndex, animationMode, options);\n this._focusMonitor = _focusMonitor;\n this._animationClasses = {\n uncheckedToChecked: 'mat-checkbox-anim-unchecked-checked',\n uncheckedToIndeterminate: 'mat-checkbox-anim-unchecked-indeterminate',\n checkedToUnchecked: 'mat-checkbox-anim-checked-unchecked',\n checkedToIndeterminate: 'mat-checkbox-anim-checked-indeterminate',\n indeterminateToChecked: 'mat-checkbox-anim-indeterminate-checked',\n indeterminateToUnchecked: 'mat-checkbox-anim-indeterminate-unchecked',\n };\n }\n _createChangeEvent(isChecked) {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = isChecked;\n return event;\n }\n _getAnimationTargetElement() {\n return this._elementRef.nativeElement;\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n this._onBlur();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n super._handleInputClick();\n }\n /** Focuses the checkbox. */\n focus(origin, options) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n}\nMatCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckbox, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i0.NgZone }, { token: 'tabindex', attribute: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_CHECKBOX_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCheckbox, selector: \"mat-checkbox\", inputs: { disableRipple: \"disableRipple\", color: \"color\", tabIndex: \"tabIndex\" }, host: { properties: { \"id\": \"id\", \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"class.mat-checkbox-indeterminate\": \"indeterminate\", \"class.mat-checkbox-checked\": \"checked\", \"class.mat-checkbox-disabled\": \"disabled\", \"class.mat-checkbox-label-before\": \"labelPosition == \\\"before\\\"\", \"class._mat-animation-noopable\": \"_animationMode === 'NoopAnimations'\" }, classAttribute: \"mat-checkbox\" }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], exportAs: [\"matCheckbox\"], usesInheritance: true, ngImport: i0, template: \"\\n\", styles: [\"@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i3.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckbox, decorators: [{\n type: Component,\n args: [{ selector: 'mat-checkbox', exportAs: 'matCheckbox', host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], inputs: ['disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\", styles: [\"@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_CHECKBOX_DEFAULT_OPTIONS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst MAT_CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true,\n};\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\nclass MatCheckboxRequiredValidator extends CheckboxRequiredValidator {\n}\nMatCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCheckboxRequiredValidator, selector: \"mat-checkbox[required][formControlName],\\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]\", providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** This module is used by both original and MDC-based checkbox implementations. */\nclass _MatCheckboxRequiredValidatorModule {\n}\n_MatCheckboxRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n_MatCheckboxRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, declarations: [MatCheckboxRequiredValidator], exports: [MatCheckboxRequiredValidator] });\n_MatCheckboxRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n }]\n }] });\nclass MatCheckboxModule {\n}\nMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxModule, declarations: [MatCheckbox], imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule], exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule] });\nMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxModule, imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule, MatCommonModule, _MatCheckboxRequiredValidatorModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCheckboxModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, MAT_CHECKBOX_DEFAULT_OPTIONS, MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckbox, MatCheckboxChange, MatCheckboxModule, MatCheckboxRequiredValidator, _MatCheckboxBase, _MatCheckboxRequiredValidatorModule };\n","import * as i5 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i9 from '@angular/cdk/overlay';\nimport { Overlay, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport * as i6 from '@angular/cdk/portal';\nimport { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport * as i1 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, Inject, ViewChild, forwardRef, inject, Directive, Attribute, ContentChild, InjectFlags, Self, TemplateRef, NgModule } from '@angular/core';\nimport * as i3 from '@angular/material/button';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i1$1 from '@angular/material/core';\nimport { DateAdapter, MAT_DATE_FORMATS, mixinColor, mixinErrorState, MatCommonModule } from '@angular/material/core';\nimport { Subject, Subscription, merge, of } from 'rxjs';\nimport { ESCAPE, hasModifierKey, SPACE, ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, BACKSPACE } from '@angular/cdk/keycodes';\nimport * as i2 from '@angular/cdk/bidi';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { take, startWith, filter } from 'rxjs/operators';\nimport { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport { trigger, transition, animate, keyframes, style, state } from '@angular/animations';\nimport * as i2$2 from '@angular/forms';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, NgControl } from '@angular/forms';\nimport * as i2$1 from '@angular/material/form-field';\nimport { MAT_FORM_FIELD, MatFormFieldControl } from '@angular/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction createMissingDateImplError(provider) {\n return Error(`MatDatepicker: No provider found for ${provider}. You must import one of the following ` +\n `modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a ` +\n `custom implementation.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Datepicker data that requires internationalization. */\nclass MatDatepickerIntl {\n constructor() {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n this.changes = new Subject();\n /** A label for the calendar popup (used by screen readers). */\n this.calendarLabel = 'Calendar';\n /** A label for the button used to open the calendar popup (used by screen readers). */\n this.openCalendarLabel = 'Open calendar';\n /** Label for the button used to close the calendar popup. */\n this.closeCalendarLabel = 'Close calendar';\n /** A label for the previous month button (used by screen readers). */\n this.prevMonthLabel = 'Previous month';\n /** A label for the next month button (used by screen readers). */\n this.nextMonthLabel = 'Next month';\n /** A label for the previous year button (used by screen readers). */\n this.prevYearLabel = 'Previous year';\n /** A label for the next year button (used by screen readers). */\n this.nextYearLabel = 'Next year';\n /** A label for the previous multi-year button (used by screen readers). */\n this.prevMultiYearLabel = 'Previous 24 years';\n /** A label for the next multi-year button (used by screen readers). */\n this.nextMultiYearLabel = 'Next 24 years';\n /** A label for the 'switch to month view' button (used by screen readers). */\n this.switchToMonthViewLabel = 'Choose date';\n /** A label for the 'switch to year view' button (used by screen readers). */\n this.switchToMultiYearViewLabel = 'Choose month and year';\n /** A label for the first date of a range of dates (used by screen readers). */\n this.startDateLabel = 'Start date';\n /** A label for the last date of a range of dates (used by screen readers). */\n this.endDateLabel = 'End date';\n }\n /** Formats a range of years (used for visuals). */\n formatYearRange(start, end) {\n return `${start} \\u2013 ${end}`;\n }\n /** Formats a label for a range of years (used by screen readers). */\n formatYearRangeLabel(start, end) {\n return `${start} to ${end}`;\n }\n}\nMatDatepickerIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nMatDatepickerIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerIntl, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerIntl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nclass MatCalendarCell {\n constructor(value, displayValue, ariaLabel, enabled, cssClasses = {}, compareValue = value, rawValue) {\n this.value = value;\n this.displayValue = displayValue;\n this.ariaLabel = ariaLabel;\n this.enabled = enabled;\n this.cssClasses = cssClasses;\n this.compareValue = compareValue;\n this.rawValue = rawValue;\n }\n}\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\nclass MatCalendarBody {\n constructor(_elementRef, _ngZone) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n /**\n * Used to focus the active cell after change detection has run.\n */\n this._focusActiveCellAfterViewChecked = false;\n /** The number of columns in the table. */\n this.numCols = 7;\n /** The cell number of the active cell in the table. */\n this.activeCell = 0;\n /** Whether a range is being selected. */\n this.isRange = false;\n /**\n * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n * maintained even as the table resizes.\n */\n this.cellAspectRatio = 1;\n /** Start of the preview range. */\n this.previewStart = null;\n /** End of the preview range. */\n this.previewEnd = null;\n /** Emits when a new value is selected. */\n this.selectedValueChange = new EventEmitter();\n /** Emits when the preview has changed as a result of a user action. */\n this.previewChange = new EventEmitter();\n this.activeDateChange = new EventEmitter();\n /**\n * Event handler for when the user enters an element\n * inside the calendar body (e.g. by hovering in or focus).\n */\n this._enterHandler = (event) => {\n if (this._skipNextFocus && event.type === 'focus') {\n this._skipNextFocus = false;\n return;\n }\n // We only need to hit the zone when we're selecting a range.\n if (event.target && this.isRange) {\n const cell = this._getCellFromElement(event.target);\n if (cell) {\n this._ngZone.run(() => this.previewChange.emit({ value: cell.enabled ? cell : null, event }));\n }\n }\n };\n /**\n * Event handler for when the user's pointer leaves an element\n * inside the calendar body (e.g. by hovering out or blurring).\n */\n this._leaveHandler = (event) => {\n // We only need to hit the zone when we're selecting a range.\n if (this.previewEnd !== null && this.isRange) {\n // Only reset the preview end value when leaving cells. This looks better, because\n // we have a gap between the cells and the rows and we don't want to remove the\n // range just for it to show up again when the user moves a few pixels to the side.\n if (event.target && this._getCellFromElement(event.target)) {\n this._ngZone.run(() => this.previewChange.emit({ value: null, event }));\n }\n }\n };\n _ngZone.runOutsideAngular(() => {\n const element = _elementRef.nativeElement;\n element.addEventListener('mouseenter', this._enterHandler, true);\n element.addEventListener('focus', this._enterHandler, true);\n element.addEventListener('mouseleave', this._leaveHandler, true);\n element.addEventListener('blur', this._leaveHandler, true);\n });\n }\n ngAfterViewChecked() {\n if (this._focusActiveCellAfterViewChecked) {\n this._focusActiveCell();\n this._focusActiveCellAfterViewChecked = false;\n }\n }\n /** Called when a cell is clicked. */\n _cellClicked(cell, event) {\n if (cell.enabled) {\n this.selectedValueChange.emit({ value: cell.value, event });\n }\n }\n _emitActiveDateChange(cell, event) {\n if (cell.enabled) {\n this.activeDateChange.emit({ value: cell.value, event });\n }\n }\n /** Returns whether a cell should be marked as selected. */\n _isSelected(value) {\n return this.startValue === value || this.endValue === value;\n }\n ngOnChanges(changes) {\n const columnChanges = changes['numCols'];\n const { rows, numCols } = this;\n if (changes['rows'] || columnChanges) {\n this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;\n }\n if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {\n this._cellPadding = `${(50 * this.cellAspectRatio) / numCols}%`;\n }\n if (columnChanges || !this._cellWidth) {\n this._cellWidth = `${100 / numCols}%`;\n }\n }\n ngOnDestroy() {\n const element = this._elementRef.nativeElement;\n element.removeEventListener('mouseenter', this._enterHandler, true);\n element.removeEventListener('focus', this._enterHandler, true);\n element.removeEventListener('mouseleave', this._leaveHandler, true);\n element.removeEventListener('blur', this._leaveHandler, true);\n }\n /** Returns whether a cell is active. */\n _isActiveCell(rowIndex, colIndex) {\n let cellNumber = rowIndex * this.numCols + colIndex;\n // Account for the fact that the first row may not have as many cells.\n if (rowIndex) {\n cellNumber -= this._firstRowOffset;\n }\n return cellNumber == this.activeCell;\n }\n /**\n * Focuses the active cell after the microtask queue is empty.\n *\n * Adding a 0ms setTimeout seems to fix Voiceover losing focus when pressing PageUp/PageDown\n * (issue #24330).\n *\n * Determined a 0ms by gradually increasing duration from 0 and testing two use cases with screen\n * reader enabled:\n *\n * 1. Pressing PageUp/PageDown repeatedly with pausing between each key press.\n * 2. Pressing and holding the PageDown key with repeated keys enabled.\n *\n * Test 1 worked roughly 95-99% of the time with 0ms and got a little bit better as the duration\n * increased. Test 2 got slightly better until the duration was long enough to interfere with\n * repeated keys. If the repeated key speed was faster than the timeout duration, then pressing\n * and holding pagedown caused the entire page to scroll.\n *\n * Since repeated key speed can verify across machines, determined that any duration could\n * potentially interfere with repeated keys. 0ms would be best because it almost entirely\n * eliminates the focus being lost in Voiceover (#24330) without causing unintended side effects.\n * Adding delay also complicates writing tests.\n */\n _focusActiveCell(movePreview = true) {\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n setTimeout(() => {\n const activeCell = this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');\n if (activeCell) {\n if (!movePreview) {\n this._skipNextFocus = true;\n }\n activeCell.focus();\n }\n });\n });\n });\n }\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _scheduleFocusActiveCellAfterViewChecked() {\n this._focusActiveCellAfterViewChecked = true;\n }\n /** Gets whether a value is the start of the main range. */\n _isRangeStart(value) {\n return isStart(value, this.startValue, this.endValue);\n }\n /** Gets whether a value is the end of the main range. */\n _isRangeEnd(value) {\n return isEnd(value, this.startValue, this.endValue);\n }\n /** Gets whether a value is within the currently-selected range. */\n _isInRange(value) {\n return isInRange(value, this.startValue, this.endValue, this.isRange);\n }\n /** Gets whether a value is the start of the comparison range. */\n _isComparisonStart(value) {\n return isStart(value, this.comparisonStart, this.comparisonEnd);\n }\n /** Whether the cell is a start bridge cell between the main and comparison ranges. */\n _isComparisonBridgeStart(value, rowIndex, colIndex) {\n if (!this._isComparisonStart(value) || this._isRangeStart(value) || !this._isInRange(value)) {\n return false;\n }\n let previousCell = this.rows[rowIndex][colIndex - 1];\n if (!previousCell) {\n const previousRow = this.rows[rowIndex - 1];\n previousCell = previousRow && previousRow[previousRow.length - 1];\n }\n return previousCell && !this._isRangeEnd(previousCell.compareValue);\n }\n /** Whether the cell is an end bridge cell between the main and comparison ranges. */\n _isComparisonBridgeEnd(value, rowIndex, colIndex) {\n if (!this._isComparisonEnd(value) || this._isRangeEnd(value) || !this._isInRange(value)) {\n return false;\n }\n let nextCell = this.rows[rowIndex][colIndex + 1];\n if (!nextCell) {\n const nextRow = this.rows[rowIndex + 1];\n nextCell = nextRow && nextRow[0];\n }\n return nextCell && !this._isRangeStart(nextCell.compareValue);\n }\n /** Gets whether a value is the end of the comparison range. */\n _isComparisonEnd(value) {\n return isEnd(value, this.comparisonStart, this.comparisonEnd);\n }\n /** Gets whether a value is within the current comparison range. */\n _isInComparisonRange(value) {\n return isInRange(value, this.comparisonStart, this.comparisonEnd, this.isRange);\n }\n /**\n * Gets whether a value is the same as the start and end of the comparison range.\n * For context, the functions that we use to determine whether something is the start/end of\n * a range don't allow for the start and end to be on the same day, because we'd have to use\n * much more specific CSS selectors to style them correctly in all scenarios. This is fine for\n * the regular range, because when it happens, the selected styles take over and still show where\n * the range would've been, however we don't have these selected styles for a comparison range.\n * This function is used to apply a class that serves the same purpose as the one for selected\n * dates, but it only applies in the context of a comparison range.\n */\n _isComparisonIdentical(value) {\n // Note that we don't need to null check the start/end\n // here, because the `value` will always be defined.\n return this.comparisonStart === this.comparisonEnd && value === this.comparisonStart;\n }\n /** Gets whether a value is the start of the preview range. */\n _isPreviewStart(value) {\n return isStart(value, this.previewStart, this.previewEnd);\n }\n /** Gets whether a value is the end of the preview range. */\n _isPreviewEnd(value) {\n return isEnd(value, this.previewStart, this.previewEnd);\n }\n /** Gets whether a value is inside the preview range. */\n _isInPreview(value) {\n return isInRange(value, this.previewStart, this.previewEnd, this.isRange);\n }\n /** Finds the MatCalendarCell that corresponds to a DOM node. */\n _getCellFromElement(element) {\n let cell;\n if (isTableCell(element)) {\n cell = element;\n }\n else if (isTableCell(element.parentNode)) {\n cell = element.parentNode;\n }\n if (cell) {\n const row = cell.getAttribute('data-mat-row');\n const col = cell.getAttribute('data-mat-col');\n if (row && col) {\n return this.rows[parseInt(row)][parseInt(col)];\n }\n }\n return null;\n }\n}\nMatCalendarBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendarBody, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nMatCalendarBody.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: { label: \"label\", rows: \"rows\", todayValue: \"todayValue\", startValue: \"startValue\", endValue: \"endValue\", labelMinRequiredCells: \"labelMinRequiredCells\", numCols: \"numCols\", activeCell: \"activeCell\", isRange: \"isRange\", cellAspectRatio: \"cellAspectRatio\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\", previewStart: \"previewStart\", previewEnd: \"previewEnd\" }, outputs: { selectedValueChange: \"selectedValueChange\", previewChange: \"previewChange\", activeDateChange: \"activeDateChange\" }, host: { classAttribute: \"mat-calendar-body\" }, exportAs: [\"matCalendarBody\"], usesOnChanges: true, ngImport: i0, template: \"\\n\\n \\n\\n\\n\\n\\n \\n \\n \\n \\n \\n
      \\n {{item.displayValue}}\\n
      \\n
      \\n \\n \\n
      \\n\", styles: [\".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\\\"\\\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}\"], dependencies: [{ kind: \"directive\", type: i1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendarBody, decorators: [{\n type: Component,\n args: [{ selector: '[mat-calendar-body]', host: {\n 'class': 'mat-calendar-body',\n }, exportAs: 'matCalendarBody', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\\n \\n\\n\\n\\n\\n \\n \\n \\n \\n \\n
      \\n {{item.displayValue}}\\n
      \\n
      \\n \\n \\n
      \\n\", styles: [\".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\\\"\\\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { label: [{\n type: Input\n }], rows: [{\n type: Input\n }], todayValue: [{\n type: Input\n }], startValue: [{\n type: Input\n }], endValue: [{\n type: Input\n }], labelMinRequiredCells: [{\n type: Input\n }], numCols: [{\n type: Input\n }], activeCell: [{\n type: Input\n }], isRange: [{\n type: Input\n }], cellAspectRatio: [{\n type: Input\n }], comparisonStart: [{\n type: Input\n }], comparisonEnd: [{\n type: Input\n }], previewStart: [{\n type: Input\n }], previewEnd: [{\n type: Input\n }], selectedValueChange: [{\n type: Output\n }], previewChange: [{\n type: Output\n }], activeDateChange: [{\n type: Output\n }] } });\n/** Checks whether a node is a table cell element. */\nfunction isTableCell(node) {\n return node.nodeName === 'TD';\n}\n/** Checks whether a value is the start of a range. */\nfunction isStart(value, start, end) {\n return end !== null && start !== end && value < end && value === start;\n}\n/** Checks whether a value is the end of a range. */\nfunction isEnd(value, start, end) {\n return start !== null && start !== end && value >= start && value === end;\n}\n/** Checks whether a value is inside of a range. */\nfunction isInRange(value, start, end, rangeEnabled) {\n return (rangeEnabled &&\n start !== null &&\n end !== null &&\n start !== end &&\n value >= start &&\n value <= end);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** A class representing a range of dates. */\nclass DateRange {\n constructor(\n /** The start date of the range. */\n start, \n /** The end date of the range. */\n end) {\n this.start = start;\n this.end = end;\n }\n}\n/**\n * A selection model containing a date selection.\n * @docs-private\n */\nclass MatDateSelectionModel {\n constructor(\n /** The current selection. */\n selection, _adapter) {\n this.selection = selection;\n this._adapter = _adapter;\n this._selectionChanged = new Subject();\n /** Emits when the selection has changed. */\n this.selectionChanged = this._selectionChanged;\n this.selection = selection;\n }\n /**\n * Updates the current selection in the model.\n * @param value New selection that should be assigned.\n * @param source Object that triggered the selection change.\n */\n updateSelection(value, source) {\n const oldValue = this.selection;\n this.selection = value;\n this._selectionChanged.next({ selection: value, source, oldValue });\n }\n ngOnDestroy() {\n this._selectionChanged.complete();\n }\n _isValidDateInstance(date) {\n return this._adapter.isDateInstance(date) && this._adapter.isValid(date);\n }\n}\nMatDateSelectionModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateSelectionModel, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nMatDateSelectionModel.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateSelectionModel });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateSelectionModel, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined }, { type: i1$1.DateAdapter }]; } });\n/**\n * A selection model that contains a single date.\n * @docs-private\n */\nclass MatSingleDateSelectionModel extends MatDateSelectionModel {\n constructor(adapter) {\n super(null, adapter);\n }\n /**\n * Adds a date to the current selection. In the case of a single date selection, the added date\n * simply overwrites the previous selection\n */\n add(date) {\n super.updateSelection(date, this);\n }\n /** Checks whether the current selection is valid. */\n isValid() {\n return this.selection != null && this._isValidDateInstance(this.selection);\n }\n /**\n * Checks whether the current selection is complete. In the case of a single date selection, this\n * is true if the current selection is not null.\n */\n isComplete() {\n return this.selection != null;\n }\n /** Clones the selection model. */\n clone() {\n const clone = new MatSingleDateSelectionModel(this._adapter);\n clone.updateSelection(this.selection, this);\n return clone;\n }\n}\nMatSingleDateSelectionModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSingleDateSelectionModel, deps: [{ token: i1$1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\nMatSingleDateSelectionModel.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSingleDateSelectionModel });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSingleDateSelectionModel, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.DateAdapter }]; } });\n/**\n * A selection model that contains a date range.\n * @docs-private\n */\nclass MatRangeDateSelectionModel extends MatDateSelectionModel {\n constructor(adapter) {\n super(new DateRange(null, null), adapter);\n }\n /**\n * Adds a date to the current selection. In the case of a date range selection, the added date\n * fills in the next `null` value in the range. If both the start and the end already have a date,\n * the selection is reset so that the given date is the new `start` and the `end` is null.\n */\n add(date) {\n let { start, end } = this.selection;\n if (start == null) {\n start = date;\n }\n else if (end == null) {\n end = date;\n }\n else {\n start = date;\n end = null;\n }\n super.updateSelection(new DateRange(start, end), this);\n }\n /** Checks whether the current selection is valid. */\n isValid() {\n const { start, end } = this.selection;\n // Empty ranges are valid.\n if (start == null && end == null) {\n return true;\n }\n // Complete ranges are only valid if both dates are valid and the start is before the end.\n if (start != null && end != null) {\n return (this._isValidDateInstance(start) &&\n this._isValidDateInstance(end) &&\n this._adapter.compareDate(start, end) <= 0);\n }\n // Partial ranges are valid if the start/end is valid.\n return ((start == null || this._isValidDateInstance(start)) &&\n (end == null || this._isValidDateInstance(end)));\n }\n /**\n * Checks whether the current selection is complete. In the case of a date range selection, this\n * is true if the current selection has a non-null `start` and `end`.\n */\n isComplete() {\n return this.selection.start != null && this.selection.end != null;\n }\n /** Clones the selection model. */\n clone() {\n const clone = new MatRangeDateSelectionModel(this._adapter);\n clone.updateSelection(this.selection, this);\n return clone;\n }\n}\nMatRangeDateSelectionModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRangeDateSelectionModel, deps: [{ token: i1$1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\nMatRangeDateSelectionModel.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRangeDateSelectionModel });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRangeDateSelectionModel, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.DateAdapter }]; } });\n/** @docs-private */\nfunction MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {\n return parent || new MatSingleDateSelectionModel(adapter);\n}\n/**\n * Used to provide a single selection model to a component.\n * @docs-private\n */\nconst MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER = {\n provide: MatDateSelectionModel,\n deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n useFactory: MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY,\n};\n/** @docs-private */\nfunction MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {\n return parent || new MatRangeDateSelectionModel(adapter);\n}\n/**\n * Used to provide a range selection model to a component.\n * @docs-private\n */\nconst MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER = {\n provide: MatDateSelectionModel,\n deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n useFactory: MAT_RANGE_DATE_SELECTION_MODEL_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token used to customize the date range selection behavior. */\nconst MAT_DATE_RANGE_SELECTION_STRATEGY = new InjectionToken('MAT_DATE_RANGE_SELECTION_STRATEGY');\n/** Provides the default date range selection behavior. */\nclass DefaultMatCalendarRangeStrategy {\n constructor(_dateAdapter) {\n this._dateAdapter = _dateAdapter;\n }\n selectionFinished(date, currentRange) {\n let { start, end } = currentRange;\n if (start == null) {\n start = date;\n }\n else if (end == null && date && this._dateAdapter.compareDate(date, start) >= 0) {\n end = date;\n }\n else {\n start = date;\n end = null;\n }\n return new DateRange(start, end);\n }\n createPreview(activeDate, currentRange) {\n let start = null;\n let end = null;\n if (currentRange.start && !currentRange.end && activeDate) {\n start = currentRange.start;\n end = activeDate;\n }\n return new DateRange(start, end);\n }\n}\nDefaultMatCalendarRangeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy, deps: [{ token: i1$1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultMatCalendarRangeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.DateAdapter }]; } });\n/** @docs-private */\nfunction MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent, adapter) {\n return parent || new DefaultMatCalendarRangeStrategy(adapter);\n}\n/** @docs-private */\nconst MAT_CALENDAR_RANGE_STRATEGY_PROVIDER = {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n deps: [[new Optional(), new SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], DateAdapter],\n useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DAYS_PER_WEEK = 7;\n/**\n * An internal component used to display a single month in the datepicker.\n * @docs-private\n */\nclass MatMonthView {\n constructor(_changeDetectorRef, _dateFormats, _dateAdapter, _dir, _rangeStrategy) {\n this._changeDetectorRef = _changeDetectorRef;\n this._dateFormats = _dateFormats;\n this._dateAdapter = _dateAdapter;\n this._dir = _dir;\n this._rangeStrategy = _rangeStrategy;\n this._rerenderSubscription = Subscription.EMPTY;\n /** Emits when a new date is selected. */\n this.selectedChange = new EventEmitter();\n /** Emits when any date is selected. */\n this._userSelection = new EventEmitter();\n /** Emits when any date is activated. */\n this.activeDateChange = new EventEmitter();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n this._activeDate = this._dateAdapter.today();\n }\n /**\n * The date to display in this month view (everything other than the month and year is ignored).\n */\n get activeDate() {\n return this._activeDate;\n }\n set activeDate(value) {\n const oldActiveDate = this._activeDate;\n const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {\n this._init();\n }\n }\n /** The currently selected date. */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n if (value instanceof DateRange) {\n this._selected = value;\n }\n else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n this._setRanges(this._selected);\n }\n /** The minimum selectable date. */\n get minDate() {\n return this._minDate;\n }\n set minDate(value) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** The maximum selectable date. */\n get maxDate() {\n return this._maxDate;\n }\n set maxDate(value) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n ngOnChanges(changes) {\n const comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];\n if (comparisonChange && !comparisonChange.firstChange) {\n this._setRanges(this.selected);\n }\n }\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n /** Handles when a new date is selected. */\n _dateSelected(event) {\n const date = event.value;\n const selectedDate = this._getDateFromDayOfMonth(date);\n let rangeStartDate;\n let rangeEndDate;\n if (this._selected instanceof DateRange) {\n rangeStartDate = this._getDateInCurrentMonth(this._selected.start);\n rangeEndDate = this._getDateInCurrentMonth(this._selected.end);\n }\n else {\n rangeStartDate = rangeEndDate = this._getDateInCurrentMonth(this._selected);\n }\n if (rangeStartDate !== date || rangeEndDate !== date) {\n this.selectedChange.emit(selectedDate);\n }\n this._userSelection.emit({ value: selectedDate, event: event.event });\n this._previewStart = this._previewEnd = null;\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event) {\n const month = event.value;\n const oldActiveDate = this._activeDate;\n this.activeDate = this._getDateFromDayOfMonth(month);\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this._activeDate);\n }\n }\n /** Handles keydown events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeydown(event) {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, this._dateAdapter.getNumDaysInMonth(this._activeDate) -\n this._dateAdapter.getDate(this._activeDate));\n break;\n case PAGE_UP:\n this.activeDate = event.altKey\n ? this._dateAdapter.addCalendarYears(this._activeDate, -1)\n : this._dateAdapter.addCalendarMonths(this._activeDate, -1);\n break;\n case PAGE_DOWN:\n this.activeDate = event.altKey\n ? this._dateAdapter.addCalendarYears(this._activeDate, 1)\n : this._dateAdapter.addCalendarMonths(this._activeDate, 1);\n break;\n case ENTER:\n case SPACE:\n this._selectionKeyPressed = true;\n if (this._canSelect(this._activeDate)) {\n // Prevent unexpected default actions such as form submission.\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n event.preventDefault();\n }\n return;\n case ESCAPE:\n // Abort the current range selection if the user presses escape mid-selection.\n if (this._previewEnd != null && !hasModifierKey(event)) {\n this._previewStart = this._previewEnd = null;\n this.selectedChange.emit(null);\n this._userSelection.emit({ value: null, event });\n event.preventDefault();\n event.stopPropagation(); // Prevents the overlay from closing.\n }\n return;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n this._focusActiveCellAfterViewChecked();\n }\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n /** Handles keyup events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeyup(event) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed && this._canSelect(this._activeDate)) {\n this._dateSelected({ value: this._dateAdapter.getDate(this._activeDate), event });\n }\n this._selectionKeyPressed = false;\n }\n }\n /** Initializes this month view. */\n _init() {\n this._setRanges(this.selected);\n this._todayDate = this._getCellCompareValue(this._dateAdapter.today());\n this._monthLabel = this._dateFormats.display.monthLabel\n ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)\n : this._dateAdapter\n .getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();\n let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);\n this._firstWeekOffset =\n (DAYS_PER_WEEK +\n this._dateAdapter.getDayOfWeek(firstOfMonth) -\n this._dateAdapter.getFirstDayOfWeek()) %\n DAYS_PER_WEEK;\n this._initWeekdays();\n this._createWeekCells();\n this._changeDetectorRef.markForCheck();\n }\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell(movePreview) {\n this._matCalendarBody._focusActiveCell(movePreview);\n }\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n /** Called when the user has activated a new cell and the preview needs to be updated. */\n _previewChanged({ event, value: cell }) {\n if (this._rangeStrategy) {\n // We can assume that this will be a range, because preview\n // events aren't fired for single date selections.\n const value = cell ? cell.rawValue : null;\n const previewRange = this._rangeStrategy.createPreview(value, this.selected, event);\n this._previewStart = this._getCellCompareValue(previewRange.start);\n this._previewEnd = this._getCellCompareValue(previewRange.end);\n // Note that here we need to use `detectChanges`, rather than `markForCheck`, because\n // the way `_focusActiveCell` is set up at the moment makes it fire at the wrong time\n // when navigating one month back using the keyboard which will cause this handler\n // to throw a \"changed after checked\" error when updating the preview state.\n this._changeDetectorRef.detectChanges();\n }\n }\n /**\n * Takes a day of the month and returns a new date in the same month and year as the currently\n * active date. The returned date will have the same day of the month as the argument date.\n */\n _getDateFromDayOfMonth(dayOfMonth) {\n return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), dayOfMonth);\n }\n /** Initializes the weekdays. */\n _initWeekdays() {\n const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();\n const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');\n const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');\n // Rotate the labels for days of the week based on the configured first day of the week.\n let weekdays = longWeekdays.map((long, i) => {\n return { long, narrow: narrowWeekdays[i] };\n });\n this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\n }\n /** Creates MatCalendarCells for the dates in this month. */\n _createWeekCells() {\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n const dateNames = this._dateAdapter.getDateNames();\n this._weeks = [[]];\n for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n if (cell == DAYS_PER_WEEK) {\n this._weeks.push([]);\n cell = 0;\n }\n const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);\n const enabled = this._shouldEnableDate(date);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;\n this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));\n }\n }\n /** Date filter for the month */\n _shouldEnableDate(date) {\n return (!!date &&\n (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&\n (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0) &&\n (!this.dateFilter || this.dateFilter(date)));\n }\n /**\n * Gets the date in this month that the given Date falls on.\n * Returns null if the given Date is in another month.\n */\n _getDateInCurrentMonth(date) {\n return date && this._hasSameMonthAndYear(date, this.activeDate)\n ? this._dateAdapter.getDate(date)\n : null;\n }\n /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */\n _hasSameMonthAndYear(d1, d2) {\n return !!(d1 &&\n d2 &&\n this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&\n this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));\n }\n /** Gets the value that will be used to one cell to another. */\n _getCellCompareValue(date) {\n if (date) {\n // We use the time since the Unix epoch to compare dates in this view, rather than the\n // cell values, because we need to support ranges that span across multiple months/years.\n const year = this._dateAdapter.getYear(date);\n const month = this._dateAdapter.getMonth(date);\n const day = this._dateAdapter.getDate(date);\n return new Date(year, month, day).getTime();\n }\n return null;\n }\n /** Determines whether the user has the RTL layout direction. */\n _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n /** Sets the current range based on a model value. */\n _setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }\n /** Gets whether a date can be selected in the month view. */\n _canSelect(date) {\n return !this.dateFilter || this.dateFilter(date);\n }\n}\nMatMonthView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMonthView, deps: [{ token: i0.ChangeDetectorRef }, { token: MAT_DATE_FORMATS, optional: true }, { token: i1$1.DateAdapter, optional: true }, { token: i2.Directionality, optional: true }, { token: MAT_DATE_RANGE_SELECTION_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatMonthView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMonthView, selector: \"mat-month-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\" }, outputs: { selectedChange: \"selectedChange\", _userSelection: \"_userSelection\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matMonthView\"], usesOnChanges: true, ngImport: i0, template: \"
      \n {{headerText}}\n \n {{dataAccessor(data, name)}}\n \n {{headerText}}\n \n {{dataAccessor(data, name)}}\n
      \\n {{label}}\\n
      \\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\\n
      \\n {{label}}\\n
      \\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\\n
      \\n \\n \\n \\n \\n \\n \\n \\n \\n
      \\n {{day.long}}\\n {{day.narrow}}\\n
      \\n\", dependencies: [{ kind: \"directive\", type: i1.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMonthView, decorators: [{\n type: Component,\n args: [{ selector: 'mat-month-view', exportAs: 'matMonthView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n \\n \\n \\n \\n \\n \\n \\n \\n
      \\n {{day.long}}\\n {{day.narrow}}\\n
      \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DATE_RANGE_SELECTION_STRATEGY]\n }, {\n type: Optional\n }] }]; }, propDecorators: { activeDate: [{\n type: Input\n }], selected: [{\n type: Input\n }], minDate: [{\n type: Input\n }], maxDate: [{\n type: Input\n }], dateFilter: [{\n type: Input\n }], dateClass: [{\n type: Input\n }], comparisonStart: [{\n type: Input\n }], comparisonEnd: [{\n type: Input\n }], selectedChange: [{\n type: Output\n }], _userSelection: [{\n type: Output\n }], activeDateChange: [{\n type: Output\n }], _matCalendarBody: [{\n type: ViewChild,\n args: [MatCalendarBody]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst yearsPerPage = 24;\nconst yearsPerRow = 4;\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\nclass MatMultiYearView {\n constructor(_changeDetectorRef, _dateAdapter, _dir) {\n this._changeDetectorRef = _changeDetectorRef;\n this._dateAdapter = _dateAdapter;\n this._dir = _dir;\n this._rerenderSubscription = Subscription.EMPTY;\n /** Emits when a new year is selected. */\n this.selectedChange = new EventEmitter();\n /** Emits the selected year. This doesn't imply a change on the selected date */\n this.yearSelected = new EventEmitter();\n /** Emits when any date is activated. */\n this.activeDateChange = new EventEmitter();\n if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw createMissingDateImplError('DateAdapter');\n }\n this._activeDate = this._dateAdapter.today();\n }\n /** The date to display in this multi-year view (everything other than the year is ignored). */\n get activeDate() {\n return this._activeDate;\n }\n set activeDate(value) {\n let oldActiveDate = this._activeDate;\n const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (!isSameMultiYearView(this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\n this._init();\n }\n }\n /** The currently selected date. */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n if (value instanceof DateRange) {\n this._selected = value;\n }\n else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n this._setSelectedYear(value);\n }\n /** The minimum selectable date. */\n get minDate() {\n return this._minDate;\n }\n set minDate(value) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** The maximum selectable date. */\n get maxDate() {\n return this._maxDate;\n }\n set maxDate(value) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n /** Initializes this multi-year view. */\n _init() {\n this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());\n // We want a range years such that we maximize the number of\n // enabled dates visible at once. This prevents issues where the minimum year\n // is the last item of a page OR the maximum year is the first item of a page.\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view.\n const activeYear = this._dateAdapter.getYear(this._activeDate);\n const minYearOfPage = activeYear - getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n this._years = [];\n for (let i = 0, row = []; i < yearsPerPage; i++) {\n row.push(minYearOfPage + i);\n if (row.length == yearsPerRow) {\n this._years.push(row.map(year => this._createCellForYear(year)));\n row = [];\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n /** Handles when a new year is selected. */\n _yearSelected(event) {\n const year = event.value;\n const selectedYear = this._dateAdapter.createDate(year, 0, 1);\n const selectedDate = this._getDateFromYear(year);\n this.yearSelected.emit(selectedYear);\n this.selectedChange.emit(selectedDate);\n }\n /**\n * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event) {\n const year = event.value;\n const oldActiveDate = this._activeDate;\n this.activeDate = this._getDateFromYear(year);\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n }\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeydown(event) {\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerPage -\n getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate) -\n 1);\n break;\n case PAGE_UP:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\n break;\n case PAGE_DOWN:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\n break;\n case ENTER:\n case SPACE:\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n this._selectionKeyPressed = true;\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n this._focusActiveCellAfterViewChecked();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n /** Handles keyup events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeyup(event) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed) {\n this._yearSelected({ value: this._dateAdapter.getYear(this._activeDate), event });\n }\n this._selectionKeyPressed = false;\n }\n }\n _getActiveCell() {\n return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n }\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n /**\n * Takes a year and returns a new date on the same day and month as the currently active date\n * The returned date will have the same year as the argument date.\n */\n _getDateFromYear(year) {\n const activeMonth = this._dateAdapter.getMonth(this.activeDate);\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, activeMonth, 1));\n const normalizedDate = this._dateAdapter.createDate(year, activeMonth, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth));\n return normalizedDate;\n }\n /** Creates an MatCalendarCell for the given year. */\n _createCellForYear(year) {\n const date = this._dateAdapter.createDate(year, 0, 1);\n const yearName = this._dateAdapter.getYearName(date);\n const cellClasses = this.dateClass ? this.dateClass(date, 'multi-year') : undefined;\n return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year), cellClasses);\n }\n /** Whether the given year is enabled. */\n _shouldEnableYear(year) {\n // disable if the year is greater than maxDate lower than minDate\n if (year === undefined ||\n year === null ||\n (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||\n (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {\n return false;\n }\n // enable if it reaches here and there's no filter defined\n if (!this.dateFilter) {\n return true;\n }\n const firstOfYear = this._dateAdapter.createDate(year, 0, 1);\n // If any date in the year is enabled count the year as enabled.\n for (let date = firstOfYear; this._dateAdapter.getYear(date) == year; date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n return false;\n }\n /** Determines whether the user has the RTL layout direction. */\n _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n /** Sets the currently-highlighted year based on a model value. */\n _setSelectedYear(value) {\n this._selectedYear = null;\n if (value instanceof DateRange) {\n const displayValue = value.start || value.end;\n if (displayValue) {\n this._selectedYear = this._dateAdapter.getYear(displayValue);\n }\n }\n else if (value) {\n this._selectedYear = this._dateAdapter.getYear(value);\n }\n }\n}\nMatMultiYearView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMultiYearView, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.DateAdapter, optional: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatMultiYearView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMultiYearView, selector: \"mat-multi-year-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\" }, outputs: { selectedChange: \"selectedChange\", yearSelected: \"yearSelected\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matMultiYearView\"], ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n
      \\n\", dependencies: [{ kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMultiYearView, decorators: [{\n type: Component,\n args: [{ selector: 'mat-multi-year-view', exportAs: 'matMultiYearView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n \\n \\n \\n \\n \\n
      \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { activeDate: [{\n type: Input\n }], selected: [{\n type: Input\n }], minDate: [{\n type: Input\n }], maxDate: [{\n type: Input\n }], dateFilter: [{\n type: Input\n }], dateClass: [{\n type: Input\n }], selectedChange: [{\n type: Output\n }], yearSelected: [{\n type: Output\n }], activeDateChange: [{\n type: Output\n }], _matCalendarBody: [{\n type: ViewChild,\n args: [MatCalendarBody]\n }] } });\nfunction isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return (Math.floor((year1 - startingYear) / yearsPerPage) ===\n Math.floor((year2 - startingYear) / yearsPerPage));\n}\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nfunction getActiveOffset(dateAdapter, activeDate, minDate, maxDate) {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo(activeYear - getStartingYear(dateAdapter, minDate, maxDate), yearsPerPage);\n}\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear(dateAdapter, minDate, maxDate) {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - yearsPerPage + 1;\n }\n else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo(a, b) {\n return ((a % b) + b) % b;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal component used to display a single year in the datepicker.\n * @docs-private\n */\nclass MatYearView {\n constructor(_changeDetectorRef, _dateFormats, _dateAdapter, _dir) {\n this._changeDetectorRef = _changeDetectorRef;\n this._dateFormats = _dateFormats;\n this._dateAdapter = _dateAdapter;\n this._dir = _dir;\n this._rerenderSubscription = Subscription.EMPTY;\n /** Emits when a new month is selected. */\n this.selectedChange = new EventEmitter();\n /** Emits the selected month. This doesn't imply a change on the selected date */\n this.monthSelected = new EventEmitter();\n /** Emits when any date is activated. */\n this.activeDateChange = new EventEmitter();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n this._activeDate = this._dateAdapter.today();\n }\n /** The date to display in this year view (everything other than the year is ignored). */\n get activeDate() {\n return this._activeDate;\n }\n set activeDate(value) {\n let oldActiveDate = this._activeDate;\n const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {\n this._init();\n }\n }\n /** The currently selected date. */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n if (value instanceof DateRange) {\n this._selected = value;\n }\n else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n this._setSelectedMonth(value);\n }\n /** The minimum selectable date. */\n get minDate() {\n return this._minDate;\n }\n set minDate(value) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** The maximum selectable date. */\n get maxDate() {\n return this._maxDate;\n }\n set maxDate(value) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n /** Handles when a new month is selected. */\n _monthSelected(event) {\n const month = event.value;\n const selectedMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n this.monthSelected.emit(selectedMonth);\n const selectedDate = this._getDateFromMonth(month);\n this.selectedChange.emit(selectedDate);\n }\n /**\n * Takes the index of a calendar body cell wrapped in in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event) {\n const month = event.value;\n const oldActiveDate = this._activeDate;\n this.activeDate = this._getDateFromMonth(month);\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n }\n /** Handles keydown events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeydown(event) {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -this._dateAdapter.getMonth(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 11 - this._dateAdapter.getMonth(this._activeDate));\n break;\n case PAGE_UP:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);\n break;\n case PAGE_DOWN:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);\n break;\n case ENTER:\n case SPACE:\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n this._selectionKeyPressed = true;\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n this._focusActiveCellAfterViewChecked();\n }\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n /** Handles keyup events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeyup(event) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed) {\n this._monthSelected({ value: this._dateAdapter.getMonth(this._activeDate), event });\n }\n this._selectionKeyPressed = false;\n }\n }\n /** Initializes this year view. */\n _init() {\n this._setSelectedMonth(this.selected);\n this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());\n this._yearLabel = this._dateAdapter.getYearName(this.activeDate);\n let monthNames = this._dateAdapter.getMonthNames('short');\n // First row of months only contains 5 elements so we can fit the year label on the same row.\n this._months = [\n [0, 1, 2, 3],\n [4, 5, 6, 7],\n [8, 9, 10, 11],\n ].map(row => row.map(month => this._createCellForMonth(month, monthNames[month])));\n this._changeDetectorRef.markForCheck();\n }\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n /** Schedules the matCalendarBody to focus the active cell after change detection has run */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n /**\n * Gets the month in this year that the given Date falls on.\n * Returns null if the given Date is in another year.\n */\n _getMonthInCurrentYear(date) {\n return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate)\n ? this._dateAdapter.getMonth(date)\n : null;\n }\n /**\n * Takes a month and returns a new date in the same day and year as the currently active date.\n * The returned date will have the same month as the argument date.\n */\n _getDateFromMonth(month) {\n const normalizedDate = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);\n return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth));\n }\n /** Creates an MatCalendarCell for the given month. */\n _createCellForMonth(month, monthName) {\n const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined;\n return new MatCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month), cellClasses);\n }\n /** Whether the given month is enabled. */\n _shouldEnableMonth(month) {\n const activeYear = this._dateAdapter.getYear(this.activeDate);\n if (month === undefined ||\n month === null ||\n this._isYearAndMonthAfterMaxDate(activeYear, month) ||\n this._isYearAndMonthBeforeMinDate(activeYear, month)) {\n return false;\n }\n if (!this.dateFilter) {\n return true;\n }\n const firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);\n // If any date in the month is enabled count the month as enabled.\n for (let date = firstOfMonth; this._dateAdapter.getMonth(date) == month; date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Tests whether the combination month/year is after this.maxDate, considering\n * just the month and year of this.maxDate\n */\n _isYearAndMonthAfterMaxDate(year, month) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n return false;\n }\n /**\n * Tests whether the combination month/year is before this.minDate, considering\n * just the month and year of this.minDate\n */\n _isYearAndMonthBeforeMinDate(year, month) {\n if (this.minDate) {\n const minYear = this._dateAdapter.getYear(this.minDate);\n const minMonth = this._dateAdapter.getMonth(this.minDate);\n return year < minYear || (year === minYear && month < minMonth);\n }\n return false;\n }\n /** Determines whether the user has the RTL layout direction. */\n _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n /** Sets the currently-selected month based on a model value. */\n _setSelectedMonth(value) {\n if (value instanceof DateRange) {\n this._selectedMonth =\n this._getMonthInCurrentYear(value.start) || this._getMonthInCurrentYear(value.end);\n }\n else {\n this._selectedMonth = this._getMonthInCurrentYear(value);\n }\n }\n}\nMatYearView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatYearView, deps: [{ token: i0.ChangeDetectorRef }, { token: MAT_DATE_FORMATS, optional: true }, { token: i1$1.DateAdapter, optional: true }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatYearView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatYearView, selector: \"mat-year-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\" }, outputs: { selectedChange: \"selectedChange\", monthSelected: \"monthSelected\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matYearView\"], ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n
      \\n\", dependencies: [{ kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatYearView, decorators: [{\n type: Component,\n args: [{ selector: 'mat-year-view', exportAs: 'matYearView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n \\n \\n \\n \\n \\n
      \\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { activeDate: [{\n type: Input\n }], selected: [{\n type: Input\n }], minDate: [{\n type: Input\n }], maxDate: [{\n type: Input\n }], dateFilter: [{\n type: Input\n }], dateClass: [{\n type: Input\n }], selectedChange: [{\n type: Output\n }], monthSelected: [{\n type: Output\n }], activeDateChange: [{\n type: Output\n }], _matCalendarBody: [{\n type: ViewChild,\n args: [MatCalendarBody]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Counter used to generate unique IDs. */\nlet uniqueId = 0;\n/** Default header for MatCalendar */\nclass MatCalendarHeader {\n constructor(_intl, calendar, _dateAdapter, _dateFormats, changeDetectorRef) {\n this._intl = _intl;\n this.calendar = calendar;\n this._dateAdapter = _dateAdapter;\n this._dateFormats = _dateFormats;\n this._buttonDescriptionId = `mat-calendar-button-${uniqueId++}`;\n this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());\n }\n /** The label for the current calendar view. */\n get periodButtonText() {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter\n .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);\n const minYearOfPage = activeYear -\n getActiveOffset(this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\n const minYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(minYearOfPage, 0, 1));\n const maxYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(maxYearOfPage, 0, 1));\n return this._intl.formatYearRange(minYearName, maxYearName);\n }\n get periodButtonLabel() {\n return this.calendar.currentView == 'month'\n ? this._intl.switchToMultiYearViewLabel\n : this._intl.switchToMonthViewLabel;\n }\n /** The label for the previous button. */\n get prevButtonLabel() {\n return {\n 'month': this._intl.prevMonthLabel,\n 'year': this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel,\n }[this.calendar.currentView];\n }\n /** The label for the next button. */\n get nextButtonLabel() {\n return {\n 'month': this._intl.nextMonthLabel,\n 'year': this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel,\n }[this.calendar.currentView];\n }\n /** Handles user clicks on the period label. */\n currentPeriodClicked() {\n this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n /** Handles user clicks on the previous button. */\n previousClicked() {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1)\n : this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage);\n }\n /** Handles user clicks on the next button. */\n nextClicked() {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1)\n : this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);\n }\n /** Whether the previous period button is enabled. */\n previousEnabled() {\n if (!this.calendar.minDate) {\n return true;\n }\n return (!this.calendar.minDate || !this._isSameView(this.calendar.activeDate, this.calendar.minDate));\n }\n /** Whether the next period button is enabled. */\n nextEnabled() {\n return (!this.calendar.maxDate || !this._isSameView(this.calendar.activeDate, this.calendar.maxDate));\n }\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n _isSameView(date1, date2) {\n if (this.calendar.currentView == 'month') {\n return (this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2));\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n }\n}\nMatCalendarHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendarHeader, deps: [{ token: MatDatepickerIntl }, { token: forwardRef(() => MatCalendar) }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatCalendarHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCalendarHeader, selector: \"mat-calendar-header\", exportAs: [\"matCalendarHeader\"], ngImport: i0, template: \"
      \\n
      \\n \\n\\n
      \\n\\n \\n\\n \\n\\n \\n
      \\n
      \\n\", dependencies: [{ kind: \"component\", type: i3.MatButton, selector: \"button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]\", inputs: [\"disabled\", \"disableRipple\", \"color\"], exportAs: [\"matButton\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendarHeader, decorators: [{\n type: Component,\n args: [{ selector: 'mat-calendar-header', exportAs: 'matCalendarHeader', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"
      \\n
      \\n \\n\\n
      \\n\\n \\n\\n \\n\\n \\n
      \\n
      \\n\" }]\n }], ctorParameters: function () { return [{ type: MatDatepickerIntl }, { type: MatCalendar, decorators: [{\n type: Inject,\n args: [forwardRef(() => MatCalendar)]\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }, { type: i0.ChangeDetectorRef }]; } });\n/** A calendar that is used as part of the datepicker. */\nclass MatCalendar {\n constructor(_intl, _dateAdapter, _dateFormats, _changeDetectorRef) {\n this._dateAdapter = _dateAdapter;\n this._dateFormats = _dateFormats;\n this._changeDetectorRef = _changeDetectorRef;\n /**\n * Used for scheduling that focus should be moved to the active cell on the next tick.\n * We need to schedule it, rather than do it immediately, because we have to wait\n * for Angular to re-evaluate the view children.\n */\n this._moveFocusOnNextTick = false;\n /** Whether the calendar should be started in month or year view. */\n this.startView = 'month';\n /** Emits when the currently selected date changes. */\n this.selectedChange = new EventEmitter();\n /**\n * Emits the year chosen in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n this.yearSelected = new EventEmitter();\n /**\n * Emits the month chosen in year view.\n * This doesn't imply a change on the selected date.\n */\n this.monthSelected = new EventEmitter();\n /**\n * Emits when the current view changes.\n */\n this.viewChanged = new EventEmitter(true);\n /** Emits when any date is selected. */\n this._userSelection = new EventEmitter();\n /**\n * Emits whenever there is a state change that the header may need to respond to.\n */\n this.stateChanges = new Subject();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n this._intlChanges = _intl.changes.subscribe(() => {\n _changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n }\n /** A date representing the period (month or year) to start the calendar in. */\n get startAt() {\n return this._startAt;\n }\n set startAt(value) {\n this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** The currently selected date. */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n if (value instanceof DateRange) {\n this._selected = value;\n }\n else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n }\n /** The minimum selectable date. */\n get minDate() {\n return this._minDate;\n }\n set minDate(value) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** The maximum selectable date. */\n get maxDate() {\n return this._maxDate;\n }\n set maxDate(value) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /**\n * The current active date. This determines which time period is shown and which date is\n * highlighted when using keyboard navigation.\n */\n get activeDate() {\n return this._clampedActiveDate;\n }\n set activeDate(value) {\n this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);\n this.stateChanges.next();\n this._changeDetectorRef.markForCheck();\n }\n /** Whether the calendar is in month view. */\n get currentView() {\n return this._currentView;\n }\n set currentView(value) {\n const viewChangedResult = this._currentView !== value ? value : null;\n this._currentView = value;\n this._moveFocusOnNextTick = true;\n this._changeDetectorRef.markForCheck();\n if (viewChangedResult) {\n this.viewChanged.emit(viewChangedResult);\n }\n }\n ngAfterContentInit() {\n this._calendarHeaderPortal = new ComponentPortal(this.headerComponent || MatCalendarHeader);\n this.activeDate = this.startAt || this._dateAdapter.today();\n // Assign to the private property since we don't want to move focus on init.\n this._currentView = this.startView;\n }\n ngAfterViewChecked() {\n if (this._moveFocusOnNextTick) {\n this._moveFocusOnNextTick = false;\n this.focusActiveCell();\n }\n }\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n this.stateChanges.complete();\n }\n ngOnChanges(changes) {\n // Ignore date changes that are at a different time on the same day. This fixes issues where\n // the calendar re-renders when there is no meaningful change to [minDate] or [maxDate]\n // (#24435).\n const minDateChange = changes['minDate'] &&\n !this._dateAdapter.sameDate(changes['minDate'].previousValue, changes['minDate'].currentValue)\n ? changes['minDate']\n : undefined;\n const maxDateChange = changes['maxDate'] &&\n !this._dateAdapter.sameDate(changes['maxDate'].previousValue, changes['maxDate'].currentValue)\n ? changes['maxDate']\n : undefined;\n const change = minDateChange || maxDateChange || changes['dateFilter'];\n if (change && !change.firstChange) {\n const view = this._getCurrentViewComponent();\n if (view) {\n // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are\n // passed down to the view via data bindings which won't be up-to-date when we call `_init`.\n this._changeDetectorRef.detectChanges();\n view._init();\n }\n }\n this.stateChanges.next();\n }\n /** Focuses the active date. */\n focusActiveCell() {\n this._getCurrentViewComponent()._focusActiveCell(false);\n }\n /** Updates today's date after an update of the active date */\n updateTodaysDate() {\n this._getCurrentViewComponent()._init();\n }\n /** Handles date selection in the month view. */\n _dateSelected(event) {\n const date = event.value;\n if (this.selected instanceof DateRange ||\n (date && !this._dateAdapter.sameDate(date, this.selected))) {\n this.selectedChange.emit(date);\n }\n this._userSelection.emit(event);\n }\n /** Handles year selection in the multiyear view. */\n _yearSelectedInMultiYearView(normalizedYear) {\n this.yearSelected.emit(normalizedYear);\n }\n /** Handles month selection in the year view. */\n _monthSelectedInYearView(normalizedMonth) {\n this.monthSelected.emit(normalizedMonth);\n }\n /** Handles year/month selection in the multi-year/year views. */\n _goToDateInView(date, view) {\n this.activeDate = date;\n this.currentView = view;\n }\n /** Returns the component instance that corresponds to the current calendar view. */\n _getCurrentViewComponent() {\n // The return type is explicitly written as a union to ensure that the Closure compiler does\n // not optimize calls to _init(). Without the explicit return type, TypeScript narrows it to\n // only the first component type. See https://github.com/angular/components/issues/22996.\n return this.monthView || this.yearView || this.multiYearView;\n }\n}\nMatCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendar, deps: [{ token: MatDatepickerIntl }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatCalendar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCalendar, selector: \"mat-calendar\", inputs: { headerComponent: \"headerComponent\", startAt: \"startAt\", startView: \"startView\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\" }, outputs: { selectedChange: \"selectedChange\", yearSelected: \"yearSelected\", monthSelected: \"monthSelected\", viewChanged: \"viewChanged\", _userSelection: \"_userSelection\" }, host: { classAttribute: \"mat-calendar\" }, providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER], viewQueries: [{ propertyName: \"monthView\", first: true, predicate: MatMonthView, descendants: true }, { propertyName: \"yearView\", first: true, predicate: MatYearView, descendants: true }, { propertyName: \"multiYearView\", first: true, predicate: MatMultiYearView, descendants: true }], exportAs: [\"matCalendar\"], usesOnChanges: true, ngImport: i0, template: \"\\n\\n
      \\n \\n \\n\\n \\n \\n\\n \\n \\n
      \\n\", styles: [\".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\\\"\\\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\\\"\\\";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"directive\", type: i1.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i1.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i5.CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: [\"cdkFocusChange\"], exportAs: [\"cdkMonitorFocus\"] }, { kind: \"directive\", type: i6.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }, { kind: \"component\", type: MatMonthView, selector: \"mat-month-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\", \"comparisonStart\", \"comparisonEnd\"], outputs: [\"selectedChange\", \"_userSelection\", \"activeDateChange\"], exportAs: [\"matMonthView\"] }, { kind: \"component\", type: MatYearView, selector: \"mat-year-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\"], outputs: [\"selectedChange\", \"monthSelected\", \"activeDateChange\"], exportAs: [\"matYearView\"] }, { kind: \"component\", type: MatMultiYearView, selector: \"mat-multi-year-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\"], outputs: [\"selectedChange\", \"yearSelected\", \"activeDateChange\"], exportAs: [\"matMultiYearView\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCalendar, decorators: [{\n type: Component,\n args: [{ selector: 'mat-calendar', host: {\n 'class': 'mat-calendar',\n }, exportAs: 'matCalendar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER], template: \"\\n\\n
      \\n \\n \\n\\n \\n \\n\\n \\n \\n
      \\n\", styles: [\".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\\\"\\\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\\\"\\\";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n }], ctorParameters: function () { return [{ type: MatDatepickerIntl }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { headerComponent: [{\n type: Input\n }], startAt: [{\n type: Input\n }], startView: [{\n type: Input\n }], selected: [{\n type: Input\n }], minDate: [{\n type: Input\n }], maxDate: [{\n type: Input\n }], dateFilter: [{\n type: Input\n }], dateClass: [{\n type: Input\n }], comparisonStart: [{\n type: Input\n }], comparisonEnd: [{\n type: Input\n }], selectedChange: [{\n type: Output\n }], yearSelected: [{\n type: Output\n }], monthSelected: [{\n type: Output\n }], viewChanged: [{\n type: Output\n }], _userSelection: [{\n type: Output\n }], monthView: [{\n type: ViewChild,\n args: [MatMonthView]\n }], yearView: [{\n type: ViewChild,\n args: [MatYearView]\n }], multiYearView: [{\n type: ViewChild,\n args: [MatMultiYearView]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by the Material datepicker.\n * @docs-private\n */\nconst matDatepickerAnimations = {\n /** Transforms the height of the datepicker's calendar. */\n transformPanel: trigger('transformPanel', [\n transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n style({ opacity: 0, transform: 'scale(1, 0.8)' }),\n style({ opacity: 1, transform: 'scale(1, 1)' }),\n ]))),\n transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n style({ opacity: 0, transform: 'scale(0.7)' }),\n style({ transform: 'none', opacity: 1 }),\n ]))),\n transition('* => void', animate('100ms linear', style({ opacity: 0 }))),\n ]),\n /** Fades in the content of the calendar. */\n fadeInCalendar: trigger('fadeInCalendar', [\n state('void', style({ opacity: 0 })),\n state('enter', style({ opacity: 1 })),\n // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we\n // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.\n transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),\n ]),\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Used to generate a unique ID for each datepicker instance. */\nlet datepickerUid = 0;\n/** Injection token that determines the scroll handling while the calendar is open. */\nconst MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken('mat-datepicker-scroll-strategy');\n/** @docs-private */\nfunction MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_DATEPICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,\n};\n// Boilerplate for applying mixins to MatDatepickerContent.\n/** @docs-private */\nconst _MatDatepickerContentBase = mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n});\n/**\n * Component used as the content for the datepicker overlay. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the overlay that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\nclass MatDatepickerContent extends _MatDatepickerContentBase {\n constructor(elementRef, _changeDetectorRef, _globalModel, _dateAdapter, _rangeSelectionStrategy, intl) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._globalModel = _globalModel;\n this._dateAdapter = _dateAdapter;\n this._rangeSelectionStrategy = _rangeSelectionStrategy;\n this._subscriptions = new Subscription();\n /** Emits when an animation has finished. */\n this._animationDone = new Subject();\n /** Portal with projected action buttons. */\n this._actionsPortal = null;\n this._closeButtonText = intl.closeCalendarLabel;\n }\n ngOnInit() {\n this._animationState = this.datepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';\n }\n ngAfterViewInit() {\n this._subscriptions.add(this.datepicker.stateChanges.subscribe(() => {\n this._changeDetectorRef.markForCheck();\n }));\n this._calendar.focusActiveCell();\n }\n ngOnDestroy() {\n this._subscriptions.unsubscribe();\n this._animationDone.complete();\n }\n _handleUserSelection(event) {\n const selection = this._model.selection;\n const value = event.value;\n const isRange = selection instanceof DateRange;\n // If we're selecting a range and we have a selection strategy, always pass the value through\n // there. Otherwise don't assign null values to the model, unless we're selecting a range.\n // A null value when picking a range means that the user cancelled the selection (e.g. by\n // pressing escape), whereas when selecting a single value it means that the value didn't\n // change. This isn't very intuitive, but it's here for backwards-compatibility.\n if (isRange && this._rangeSelectionStrategy) {\n const newSelection = this._rangeSelectionStrategy.selectionFinished(value, selection, event.event);\n this._model.updateSelection(newSelection, this);\n }\n else if (value &&\n (isRange || !this._dateAdapter.sameDate(value, selection))) {\n this._model.add(value);\n }\n // Delegate closing the overlay to the actions.\n if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {\n this.datepicker.close();\n }\n }\n _startExitAnimation() {\n this._animationState = 'void';\n this._changeDetectorRef.markForCheck();\n }\n _getSelected() {\n return this._model.selection;\n }\n /** Applies the current pending selection to the global model. */\n _applyPendingSelection() {\n if (this._model !== this._globalModel) {\n this._globalModel.updateSelection(this._model.selection, this);\n }\n }\n /**\n * Assigns a new portal containing the datepicker actions.\n * @param portal Portal with the actions to be assigned.\n * @param forceRerender Whether a re-render of the portal should be triggered. This isn't\n * necessary if the portal is assigned during initialization, but it may be required if it's\n * added at a later point.\n */\n _assignActions(portal, forceRerender) {\n // If we have actions, clone the model so that we have the ability to cancel the selection,\n // otherwise update the global model directly. Note that we want to assign this as soon as\n // possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.\n this._model = portal ? this._globalModel.clone() : this._globalModel;\n this._actionsPortal = portal;\n if (forceRerender) {\n this._changeDetectorRef.detectChanges();\n }\n }\n}\nMatDatepickerContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerContent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MatDateSelectionModel }, { token: i1$1.DateAdapter }, { token: MAT_DATE_RANGE_SELECTION_STRATEGY, optional: true }, { token: MatDatepickerIntl }], target: i0.ɵɵFactoryTarget.Component });\nMatDatepickerContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerContent, selector: \"mat-datepicker-content\", inputs: { color: \"color\" }, host: { listeners: { \"@transformPanel.done\": \"_animationDone.next()\" }, properties: { \"@transformPanel\": \"_animationState\", \"class.mat-datepicker-content-touch\": \"datepicker.touchUi\" }, classAttribute: \"mat-datepicker-content\" }, viewQueries: [{ propertyName: \"_calendar\", first: true, predicate: MatCalendar, descendants: true }], exportAs: [\"matDatepickerContent\"], usesInheritance: true, ngImport: i0, template: \"\\n \\n\\n \\n\\n \\n {{ _closeButtonText }}\\n\\n\", styles: [\".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\"], dependencies: [{ kind: \"directive\", type: i1.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"component\", type: i3.MatButton, selector: \"button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]\", inputs: [\"disabled\", \"disableRipple\", \"color\"], exportAs: [\"matButton\"] }, { kind: \"directive\", type: i5.CdkTrapFocus, selector: \"[cdkTrapFocus]\", inputs: [\"cdkTrapFocus\", \"cdkTrapFocusAutoCapture\"], exportAs: [\"cdkTrapFocus\"] }, { kind: \"directive\", type: i6.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }, { kind: \"component\", type: MatCalendar, selector: \"mat-calendar\", inputs: [\"headerComponent\", \"startAt\", \"startView\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\", \"comparisonStart\", \"comparisonEnd\"], outputs: [\"selectedChange\", \"yearSelected\", \"monthSelected\", \"viewChanged\", \"_userSelection\"], exportAs: [\"matCalendar\"] }], animations: [matDatepickerAnimations.transformPanel, matDatepickerAnimations.fadeInCalendar], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerContent, decorators: [{\n type: Component,\n args: [{ selector: 'mat-datepicker-content', host: {\n 'class': 'mat-datepicker-content',\n '[@transformPanel]': '_animationState',\n '(@transformPanel.done)': '_animationDone.next()',\n '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',\n }, animations: [matDatepickerAnimations.transformPanel, matDatepickerAnimations.fadeInCalendar], exportAs: 'matDatepickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['color'], template: \"\\n \\n\\n \\n\\n \\n {{ _closeButtonText }}\\n\\n\", styles: [\".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: MatDateSelectionModel }, { type: i1$1.DateAdapter }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_RANGE_SELECTION_STRATEGY]\n }] }, { type: MatDatepickerIntl }]; }, propDecorators: { _calendar: [{\n type: ViewChild,\n args: [MatCalendar]\n }] } });\n/** Base class for a datepicker. */\nclass MatDatepickerBase {\n constructor(_overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir, _model) {\n this._overlay = _overlay;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dateAdapter = _dateAdapter;\n this._dir = _dir;\n this._model = _model;\n this._inputStateChanges = Subscription.EMPTY;\n this._document = inject(DOCUMENT);\n /** The view that the calendar should start in. */\n this.startView = 'month';\n this._touchUi = false;\n /** Preferred position of the datepicker in the X axis. */\n this.xPosition = 'start';\n /** Preferred position of the datepicker in the Y axis. */\n this.yPosition = 'below';\n this._restoreFocus = true;\n /**\n * Emits selected year in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n this.yearSelected = new EventEmitter();\n /**\n * Emits selected month in year view.\n * This doesn't imply a change on the selected date.\n */\n this.monthSelected = new EventEmitter();\n /**\n * Emits when the current view changes.\n */\n this.viewChanged = new EventEmitter(true);\n /** Emits when the datepicker has been opened. */\n this.openedStream = new EventEmitter();\n /** Emits when the datepicker has been closed. */\n this.closedStream = new EventEmitter();\n this._opened = false;\n /** The id for the datepicker calendar. */\n this.id = `mat-datepicker-${datepickerUid++}`;\n /** The element that was focused before the datepicker was opened. */\n this._focusedElementBeforeOpen = null;\n /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\n this._backdropHarnessClass = `${this.id}-backdrop`;\n /** Emits when the datepicker's state changes. */\n this.stateChanges = new Subject();\n if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw createMissingDateImplError('DateAdapter');\n }\n this._scrollStrategy = scrollStrategy;\n }\n /** The date to open the calendar to initially. */\n get startAt() {\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\n // selected value is.\n return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);\n }\n set startAt(value) {\n this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n /** Color palette to use on the datepicker's calendar. */\n get color() {\n return (this._color || (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined));\n }\n set color(value) {\n this._color = value;\n }\n /**\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n * than a dropdown and elements have more padding to allow for bigger touch targets.\n */\n get touchUi() {\n return this._touchUi;\n }\n set touchUi(value) {\n this._touchUi = coerceBooleanProperty(value);\n }\n /** Whether the datepicker pop-up should be disabled. */\n get disabled() {\n return this._disabled === undefined && this.datepickerInput\n ? this.datepickerInput.disabled\n : !!this._disabled;\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this.stateChanges.next(undefined);\n }\n }\n /**\n * Whether to restore focus to the previously-focused element when the calendar is closed.\n * Note that automatic focus restoration is an accessibility feature and it is recommended that\n * you provide your own equivalent, if you decide to turn it off.\n */\n get restoreFocus() {\n return this._restoreFocus;\n }\n set restoreFocus(value) {\n this._restoreFocus = coerceBooleanProperty(value);\n }\n /**\n * Classes to be passed to the date picker panel.\n * Supports string and string array values, similar to `ngClass`.\n */\n get panelClass() {\n return this._panelClass;\n }\n set panelClass(value) {\n this._panelClass = coerceStringArray(value);\n }\n /** Whether the calendar is open. */\n get opened() {\n return this._opened;\n }\n set opened(value) {\n coerceBooleanProperty(value) ? this.open() : this.close();\n }\n /** The minimum selectable date. */\n _getMinDate() {\n return this.datepickerInput && this.datepickerInput.min;\n }\n /** The maximum selectable date. */\n _getMaxDate() {\n return this.datepickerInput && this.datepickerInput.max;\n }\n _getDateFilter() {\n return this.datepickerInput && this.datepickerInput.dateFilter;\n }\n ngOnChanges(changes) {\n const positionChange = changes['xPosition'] || changes['yPosition'];\n if (positionChange && !positionChange.firstChange && this._overlayRef) {\n const positionStrategy = this._overlayRef.getConfig().positionStrategy;\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {\n this._setConnectedPositions(positionStrategy);\n if (this.opened) {\n this._overlayRef.updatePosition();\n }\n }\n }\n this.stateChanges.next(undefined);\n }\n ngOnDestroy() {\n this._destroyOverlay();\n this.close();\n this._inputStateChanges.unsubscribe();\n this.stateChanges.complete();\n }\n /** Selects the given date */\n select(date) {\n this._model.add(date);\n }\n /** Emits the selected year in multiyear view */\n _selectYear(normalizedYear) {\n this.yearSelected.emit(normalizedYear);\n }\n /** Emits selected month in year view */\n _selectMonth(normalizedMonth) {\n this.monthSelected.emit(normalizedMonth);\n }\n /** Emits changed view */\n _viewChanged(view) {\n this.viewChanged.emit(view);\n }\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n * @returns Selection model that the input should hook itself up to.\n */\n registerInput(input) {\n if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('A MatDatepicker can only be associated with a single input.');\n }\n this._inputStateChanges.unsubscribe();\n this.datepickerInput = input;\n this._inputStateChanges = input.stateChanges.subscribe(() => this.stateChanges.next(undefined));\n return this._model;\n }\n /**\n * Registers a portal containing action buttons with the datepicker.\n * @param portal Portal to be registered.\n */\n registerActions(portal) {\n if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('A MatDatepicker can only be associated with a single actions row.');\n }\n this._actionsPortal = portal;\n this._componentRef?.instance._assignActions(portal, true);\n }\n /**\n * Removes a portal containing action buttons from the datepicker.\n * @param portal Portal to be removed.\n */\n removeActions(portal) {\n if (portal === this._actionsPortal) {\n this._actionsPortal = null;\n this._componentRef?.instance._assignActions(null, true);\n }\n }\n /** Open the calendar. */\n open() {\n if (this._opened || this.disabled) {\n return;\n }\n if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempted to open an MatDatepicker with no associated input.');\n }\n this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();\n this._openOverlay();\n this._opened = true;\n this.openedStream.emit();\n }\n /** Close the calendar. */\n close() {\n if (!this._opened) {\n return;\n }\n const canRestoreFocus = this._restoreFocus &&\n this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function';\n const completeClose = () => {\n // The `_opened` could've been reset already if\n // we got two events in quick succession.\n if (this._opened) {\n this._opened = false;\n this.closedStream.emit();\n }\n };\n if (this._componentRef) {\n const { instance, location } = this._componentRef;\n instance._startExitAnimation();\n instance._animationDone.pipe(take(1)).subscribe(() => {\n const activeElement = this._document.activeElement;\n // Since we restore focus after the exit animation, we have to check that\n // the user didn't move focus themselves inside the `close` handler.\n if (canRestoreFocus &&\n (!activeElement ||\n activeElement === this._document.activeElement ||\n location.nativeElement.contains(activeElement))) {\n this._focusedElementBeforeOpen.focus();\n }\n this._focusedElementBeforeOpen = null;\n this._destroyOverlay();\n });\n }\n if (canRestoreFocus) {\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\n // marked the datepicker as closed. If the event fires out of sequence and the element that\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\n // able to close the calendar at all. We work around it by making the logic, that marks\n // the datepicker as closed, async as well.\n setTimeout(completeClose);\n }\n else {\n completeClose();\n }\n }\n /** Applies the current pending selection on the overlay to the model. */\n _applyPendingSelection() {\n this._componentRef?.instance?._applyPendingSelection();\n }\n /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */\n _forwardContentValues(instance) {\n instance.datepicker = this;\n instance.color = this.color;\n instance._dialogLabelId = this.datepickerInput.getOverlayLabelId();\n instance._assignActions(this._actionsPortal, false);\n }\n /** Opens the overlay with the calendar. */\n _openOverlay() {\n this._destroyOverlay();\n const isDialog = this.touchUi;\n const portal = new ComponentPortal(MatDatepickerContent, this._viewContainerRef);\n const overlayRef = (this._overlayRef = this._overlay.create(new OverlayConfig({\n positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),\n hasBackdrop: true,\n backdropClass: [\n isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',\n this._backdropHarnessClass,\n ],\n direction: this._dir,\n scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),\n panelClass: `mat-datepicker-${isDialog ? 'dialog' : 'popup'}`,\n })));\n this._getCloseStream(overlayRef).subscribe(event => {\n if (event) {\n event.preventDefault();\n }\n this.close();\n });\n // The `preventDefault` call happens inside the calendar as well, however focus moves into\n // it inside a timeout which can give browsers a chance to fire off a keyboard event in-between\n // that can scroll the page (see #24969). Always block default actions of arrow keys for the\n // entire overlay so the page doesn't get scrolled by accident.\n overlayRef.keydownEvents().subscribe(event => {\n const keyCode = event.keyCode;\n if (keyCode === UP_ARROW ||\n keyCode === DOWN_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW ||\n keyCode === PAGE_UP ||\n keyCode === PAGE_DOWN) {\n event.preventDefault();\n }\n });\n this._componentRef = overlayRef.attach(portal);\n this._forwardContentValues(this._componentRef.instance);\n // Update the position once the calendar has rendered. Only relevant in dropdown mode.\n if (!isDialog) {\n this._ngZone.onStable.pipe(take(1)).subscribe(() => overlayRef.updatePosition());\n }\n }\n /** Destroys the current overlay. */\n _destroyOverlay() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = this._componentRef = null;\n }\n }\n /** Gets a position strategy that will open the calendar as a dropdown. */\n _getDialogStrategy() {\n return this._overlay.position().global().centerHorizontally().centerVertically();\n }\n /** Gets a position strategy that will open the calendar as a dropdown. */\n _getDropdownStrategy() {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())\n .withTransformOriginOn('.mat-datepicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition();\n return this._setConnectedPositions(strategy);\n }\n /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */\n _setConnectedPositions(strategy) {\n const primaryX = this.xPosition === 'end' ? 'end' : 'start';\n const secondaryX = primaryX === 'start' ? 'end' : 'start';\n const primaryY = this.yPosition === 'above' ? 'bottom' : 'top';\n const secondaryY = primaryY === 'top' ? 'bottom' : 'top';\n return strategy.withPositions([\n {\n originX: primaryX,\n originY: secondaryY,\n overlayX: primaryX,\n overlayY: primaryY,\n },\n {\n originX: primaryX,\n originY: primaryY,\n overlayX: primaryX,\n overlayY: secondaryY,\n },\n {\n originX: secondaryX,\n originY: secondaryY,\n overlayX: secondaryX,\n overlayY: primaryY,\n },\n {\n originX: secondaryX,\n originY: primaryY,\n overlayX: secondaryX,\n overlayY: secondaryY,\n },\n ]);\n }\n /** Gets an observable that will emit when the overlay is supposed to be closed. */\n _getCloseStream(overlayRef) {\n return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (this.datepickerInput && hasModifierKey(event, 'altKey') && event.keyCode === UP_ARROW));\n })));\n }\n}\nMatDatepickerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerBase, deps: [{ token: i9.Overlay }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: MAT_DATEPICKER_SCROLL_STRATEGY }, { token: i1$1.DateAdapter, optional: true }, { token: i2.Directionality, optional: true }, { token: MatDateSelectionModel }], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerBase, inputs: { calendarHeaderComponent: \"calendarHeaderComponent\", startAt: \"startAt\", startView: \"startView\", color: \"color\", touchUi: \"touchUi\", disabled: \"disabled\", xPosition: \"xPosition\", yPosition: \"yPosition\", restoreFocus: \"restoreFocus\", dateClass: \"dateClass\", panelClass: \"panelClass\", opened: \"opened\" }, outputs: { yearSelected: \"yearSelected\", monthSelected: \"monthSelected\", viewChanged: \"viewChanged\", openedStream: \"opened\", closedStream: \"closed\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i9.Overlay }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DATEPICKER_SCROLL_STRATEGY]\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }, { type: MatDateSelectionModel }]; }, propDecorators: { calendarHeaderComponent: [{\n type: Input\n }], startAt: [{\n type: Input\n }], startView: [{\n type: Input\n }], color: [{\n type: Input\n }], touchUi: [{\n type: Input\n }], disabled: [{\n type: Input\n }], xPosition: [{\n type: Input\n }], yPosition: [{\n type: Input\n }], restoreFocus: [{\n type: Input\n }], yearSelected: [{\n type: Output\n }], monthSelected: [{\n type: Output\n }], viewChanged: [{\n type: Output\n }], dateClass: [{\n type: Input\n }], openedStream: [{\n type: Output,\n args: ['opened']\n }], closedStream: [{\n type: Output,\n args: ['closed']\n }], panelClass: [{\n type: Input\n }], opened: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDatepicker\"). We can change this to a directive\n// if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the datepicker popup/dialog. */\nclass MatDatepicker extends MatDatepickerBase {\n}\nMatDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepicker, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepicker, selector: \"mat-datepicker\", providers: [\n MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,\n { provide: MatDatepickerBase, useExisting: MatDatepicker },\n ], exportAs: [\"matDatepicker\"], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepicker, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-datepicker',\n template: '',\n exportAs: 'matDatepicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,\n { provide: MatDatepickerBase, useExisting: MatDatepicker },\n ],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An event used for datepicker input and change events. We don't always have access to a native\n * input or change event because the event may have been triggered by the user clicking on the\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\n */\nclass MatDatepickerInputEvent {\n constructor(\n /** Reference to the datepicker input component that emitted the event. */\n target, \n /** Reference to the native input element associated with the datepicker input. */\n targetElement) {\n this.target = target;\n this.targetElement = targetElement;\n this.value = this.target.value;\n }\n}\n/** Base class for datepicker inputs. */\nclass MatDatepickerInputBase {\n constructor(_elementRef, _dateAdapter, _dateFormats) {\n this._elementRef = _elementRef;\n this._dateAdapter = _dateAdapter;\n this._dateFormats = _dateFormats;\n /** Emits when a `change` event is fired on this ``. */\n this.dateChange = new EventEmitter();\n /** Emits when an `input` event is fired on this ``. */\n this.dateInput = new EventEmitter();\n /** Emits when the internal state has changed */\n this.stateChanges = new Subject();\n this._onTouched = () => { };\n this._validatorOnChange = () => { };\n this._cvaOnChange = () => { };\n this._valueChangesSubscription = Subscription.EMPTY;\n this._localeSubscription = Subscription.EMPTY;\n /** The form control validator for whether the input parses. */\n this._parseValidator = () => {\n return this._lastValueValid\n ? null\n : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };\n };\n /** The form control validator for the date filter. */\n this._filterValidator = (control) => {\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return !controlValue || this._matchesFilter(controlValue)\n ? null\n : { 'matDatepickerFilter': true };\n };\n /** The form control validator for the min date. */\n this._minValidator = (control) => {\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n const min = this._getMinDate();\n return !min || !controlValue || this._dateAdapter.compareDate(min, controlValue) <= 0\n ? null\n : { 'matDatepickerMin': { 'min': min, 'actual': controlValue } };\n };\n /** The form control validator for the max date. */\n this._maxValidator = (control) => {\n const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n const max = this._getMaxDate();\n return !max || !controlValue || this._dateAdapter.compareDate(max, controlValue) >= 0\n ? null\n : { 'matDatepickerMax': { 'max': max, 'actual': controlValue } };\n };\n /** Whether the last value set on the input was valid. */\n this._lastValueValid = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n // Update the displayed date when the locale changes.\n this._localeSubscription = _dateAdapter.localeChanges.subscribe(() => {\n this._assignValueProgrammatically(this.value);\n });\n }\n /** The value of the input. */\n get value() {\n return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;\n }\n set value(value) {\n this._assignValueProgrammatically(value);\n }\n /** Whether the datepicker-input is disabled. */\n get disabled() {\n return !!this._disabled || this._parentDisabled();\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n const element = this._elementRef.nativeElement;\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this.stateChanges.next(undefined);\n }\n // We need to null check the `blur` method, because it's undefined during SSR.\n // In Ivy static bindings are invoked earlier, before the element is attached to the DOM.\n // This can cause an error to be thrown in some browsers (IE/Edge) which assert that the\n // element has been inserted.\n if (newValue && this._isInitialized && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n /** Gets the base validator functions. */\n _getValidators() {\n return [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator];\n }\n /** Registers a date selection model with the input. */\n _registerModel(model) {\n this._model = model;\n this._valueChangesSubscription.unsubscribe();\n if (this._pendingValue) {\n this._assignValue(this._pendingValue);\n }\n this._valueChangesSubscription = this._model.selectionChanged.subscribe(event => {\n if (this._shouldHandleChangeEvent(event)) {\n const value = this._getValueFromModel(event.selection);\n this._lastValueValid = this._isValidValue(value);\n this._cvaOnChange(value);\n this._onTouched();\n this._formatValue(value);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n });\n }\n ngAfterViewInit() {\n this._isInitialized = true;\n }\n ngOnChanges(changes) {\n if (dateInputsHaveChanged(changes, this._dateAdapter)) {\n this.stateChanges.next(undefined);\n }\n }\n ngOnDestroy() {\n this._valueChangesSubscription.unsubscribe();\n this._localeSubscription.unsubscribe();\n this.stateChanges.complete();\n }\n /** @docs-private */\n registerOnValidatorChange(fn) {\n this._validatorOnChange = fn;\n }\n /** @docs-private */\n validate(c) {\n return this._validator ? this._validator(c) : null;\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n this._assignValueProgrammatically(value);\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._cvaOnChange = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n _onKeydown(event) {\n const isAltDownArrow = event.altKey && event.keyCode === DOWN_ARROW;\n if (isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._openPopup();\n event.preventDefault();\n }\n }\n _onInput(value) {\n const lastValueWasValid = this._lastValueValid;\n let date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);\n this._lastValueValid = this._isValidValue(date);\n date = this._dateAdapter.getValidDateOrNull(date);\n const hasChanged = !this._dateAdapter.sameDate(date, this.value);\n // We need to fire the CVA change event for all\n // nulls, otherwise the validators won't run.\n if (!date || hasChanged) {\n this._cvaOnChange(date);\n }\n else {\n // Call the CVA change handler for invalid values\n // since this is what marks the control as dirty.\n if (value && !this.value) {\n this._cvaOnChange(date);\n }\n if (lastValueWasValid !== this._lastValueValid) {\n this._validatorOnChange();\n }\n }\n if (hasChanged) {\n this._assignValue(date);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n }\n _onChange() {\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n this._onTouched();\n }\n /** Formats a value and sets it on the input element. */\n _formatValue(value) {\n this._elementRef.nativeElement.value =\n value != null ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';\n }\n /** Assigns a value to the model. */\n _assignValue(value) {\n // We may get some incoming values before the model was\n // assigned. Save the value so that we can assign it later.\n if (this._model) {\n this._assignValueToModel(value);\n this._pendingValue = null;\n }\n else {\n this._pendingValue = value;\n }\n }\n /** Whether a value is considered valid. */\n _isValidValue(value) {\n return !value || this._dateAdapter.isValid(value);\n }\n /**\n * Checks whether a parent control is disabled. This is in place so that it can be overridden\n * by inputs extending this one which can be placed inside of a group that can be disabled.\n */\n _parentDisabled() {\n return false;\n }\n /** Programmatically assigns a value to the input. */\n _assignValueProgrammatically(value) {\n value = this._dateAdapter.deserialize(value);\n this._lastValueValid = this._isValidValue(value);\n value = this._dateAdapter.getValidDateOrNull(value);\n this._assignValue(value);\n this._formatValue(value);\n }\n /** Gets whether a value matches the current date filter. */\n _matchesFilter(value) {\n const filter = this._getDateFilter();\n return !filter || filter(value);\n }\n}\nMatDatepickerInputBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerInputBase, deps: [{ token: i0.ElementRef }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerInputBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerInputBase, inputs: { value: \"value\", disabled: \"disabled\" }, outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerInputBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }]; }, propDecorators: { value: [{\n type: Input\n }], disabled: [{\n type: Input\n }], dateChange: [{\n type: Output\n }], dateInput: [{\n type: Output\n }] } });\n/**\n * Checks whether the `SimpleChanges` object from an `ngOnChanges`\n * callback has any changes, accounting for date objects.\n */\nfunction dateInputsHaveChanged(changes, adapter) {\n const keys = Object.keys(changes);\n for (let key of keys) {\n const { previousValue, currentValue } = changes[key];\n if (adapter.isDateInstance(previousValue) && adapter.isDateInstance(currentValue)) {\n if (!adapter.sameDate(previousValue, currentValue)) {\n return true;\n }\n }\n else {\n return true;\n }\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nconst MAT_DATEPICKER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true,\n};\n/** @docs-private */\nconst MAT_DATEPICKER_VALIDATORS = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true,\n};\n/** Directive used to connect an input to a MatDatepicker. */\nclass MatDatepickerInput extends MatDatepickerInputBase {\n constructor(elementRef, dateAdapter, dateFormats, _formField) {\n super(elementRef, dateAdapter, dateFormats);\n this._formField = _formField;\n this._closedSubscription = Subscription.EMPTY;\n this._validator = Validators.compose(super._getValidators());\n }\n /** The datepicker that this input is associated with. */\n set matDatepicker(datepicker) {\n if (datepicker) {\n this._datepicker = datepicker;\n this._closedSubscription = datepicker.closedStream.subscribe(() => this._onTouched());\n this._registerModel(datepicker.registerInput(this));\n }\n }\n /** The minimum valid date. */\n get min() {\n return this._min;\n }\n set min(value) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n if (!this._dateAdapter.sameDate(validValue, this._min)) {\n this._min = validValue;\n this._validatorOnChange();\n }\n }\n /** The maximum valid date. */\n get max() {\n return this._max;\n }\n set max(value) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n if (!this._dateAdapter.sameDate(validValue, this._max)) {\n this._max = validValue;\n this._validatorOnChange();\n }\n }\n /** Function that can be used to filter out dates within the datepicker. */\n get dateFilter() {\n return this._dateFilter;\n }\n set dateFilter(value) {\n const wasMatchingValue = this._matchesFilter(this.value);\n this._dateFilter = value;\n if (this._matchesFilter(this.value) !== wasMatchingValue) {\n this._validatorOnChange();\n }\n }\n /**\n * Gets the element that the datepicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin() {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n /** Gets the ID of an element that should be used a description for the calendar overlay. */\n getOverlayLabelId() {\n if (this._formField) {\n return this._formField.getLabelId();\n }\n return this._elementRef.nativeElement.getAttribute('aria-labelledby');\n }\n /** Returns the palette used by the input's form field, if any. */\n getThemePalette() {\n return this._formField ? this._formField.color : undefined;\n }\n /** Gets the value at which the calendar should start. */\n getStartValue() {\n return this.value;\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this._closedSubscription.unsubscribe();\n }\n /** Opens the associated datepicker. */\n _openPopup() {\n if (this._datepicker) {\n this._datepicker.open();\n }\n }\n _getValueFromModel(modelValue) {\n return modelValue;\n }\n _assignValueToModel(value) {\n if (this._model) {\n this._model.updateSelection(value, this);\n }\n }\n /** Gets the input's minimum date. */\n _getMinDate() {\n return this._min;\n }\n /** Gets the input's maximum date. */\n _getMaxDate() {\n return this._max;\n }\n /** Gets the input's date filtering function. */\n _getDateFilter() {\n return this._dateFilter;\n }\n _shouldHandleChangeEvent(event) {\n return event.source !== this;\n }\n}\nMatDatepickerInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerInput, deps: [{ token: i0.ElementRef }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerInput, selector: \"input[matDatepicker]\", inputs: { matDatepicker: \"matDatepicker\", min: \"min\", max: \"max\", dateFilter: [\"matDatepickerFilter\", \"dateFilter\"] }, host: { listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"blur\": \"_onBlur()\", \"keydown\": \"_onKeydown($event)\" }, properties: { \"attr.aria-haspopup\": \"_datepicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"(_datepicker?.opened && _datepicker.id) || null\", \"attr.min\": \"min ? _dateAdapter.toIso8601(min) : null\", \"attr.max\": \"max ? _dateAdapter.toIso8601(max) : null\", \"attr.data-mat-calendar\": \"_datepicker ? _datepicker.id : null\", \"disabled\": \"disabled\" }, classAttribute: \"mat-datepicker-input\" }, providers: [\n MAT_DATEPICKER_VALUE_ACCESSOR,\n MAT_DATEPICKER_VALIDATORS,\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },\n ], exportAs: [\"matDatepickerInput\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerInput, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[matDatepicker]',\n providers: [\n MAT_DATEPICKER_VALUE_ACCESSOR,\n MAT_DATEPICKER_VALIDATORS,\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },\n ],\n host: {\n 'class': 'mat-datepicker-input',\n '[attr.aria-haspopup]': '_datepicker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',\n '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',\n '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',\n // Used by the test harness to tie this input to its calendar. We can't depend on\n // `aria-owns` for this, because it's only defined while the calendar is open.\n '[attr.data-mat-calendar]': '_datepicker ? _datepicker.id : null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'matDatepickerInput',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }, { type: i2$1.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }]; }, propDecorators: { matDatepicker: [{\n type: Input\n }], min: [{\n type: Input\n }], max: [{\n type: Input\n }], dateFilter: [{\n type: Input,\n args: ['matDatepickerFilter']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Can be used to override the icon of a `matDatepickerToggle`. */\nclass MatDatepickerToggleIcon {\n}\nMatDatepickerToggleIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerToggleIcon.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerToggleIcon, selector: \"[matDatepickerToggleIcon]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerToggleIcon, decorators: [{\n type: Directive,\n args: [{\n selector: '[matDatepickerToggleIcon]',\n }]\n }] });\nclass MatDatepickerToggle {\n constructor(_intl, _changeDetectorRef, defaultTabIndex) {\n this._intl = _intl;\n this._changeDetectorRef = _changeDetectorRef;\n this._stateChanges = Subscription.EMPTY;\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;\n }\n /** Whether the toggle button is disabled. */\n get disabled() {\n if (this._disabled === undefined && this.datepicker) {\n return this.datepicker.disabled;\n }\n return !!this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n ngOnChanges(changes) {\n if (changes['datepicker']) {\n this._watchStateChanges();\n }\n }\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n _open(event) {\n if (this.datepicker && !this.disabled) {\n this.datepicker.open();\n event.stopPropagation();\n }\n }\n _watchStateChanges() {\n const datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : of();\n const inputStateChanged = this.datepicker && this.datepicker.datepickerInput\n ? this.datepicker.datepickerInput.stateChanges\n : of();\n const datepickerToggled = this.datepicker\n ? merge(this.datepicker.openedStream, this.datepicker.closedStream)\n : of();\n this._stateChanges.unsubscribe();\n this._stateChanges = merge(this._intl.changes, datepickerStateChanged, inputStateChanged, datepickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n}\nMatDatepickerToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerToggle, deps: [{ token: MatDatepickerIntl }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });\nMatDatepickerToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerToggle, selector: \"mat-datepicker-toggle\", inputs: { datepicker: [\"for\", \"datepicker\"], tabIndex: \"tabIndex\", ariaLabel: [\"aria-label\", \"ariaLabel\"], disabled: \"disabled\", disableRipple: \"disableRipple\" }, host: { listeners: { \"click\": \"_open($event)\" }, properties: { \"attr.tabindex\": \"null\", \"class.mat-datepicker-toggle-active\": \"datepicker && datepicker.opened\", \"class.mat-accent\": \"datepicker && datepicker.color === \\\"accent\\\"\", \"class.mat-warn\": \"datepicker && datepicker.color === \\\"warn\\\"\", \"attr.data-mat-calendar\": \"datepicker ? datepicker.id : null\" }, classAttribute: \"mat-datepicker-toggle\" }, queries: [{ propertyName: \"_customIcon\", first: true, predicate: MatDatepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: \"_button\", first: true, predicate: [\"button\"], descendants: true }], exportAs: [\"matDatepickerToggle\"], usesOnChanges: true, ngImport: i0, template: \"\\n\\n \\n \\n \\n\\n \\n\\n\", styles: [\".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}\"], dependencies: [{ kind: \"directive\", type: i1.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: i3.MatButton, selector: \"button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]\", inputs: [\"disabled\", \"disableRipple\", \"color\"], exportAs: [\"matButton\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerToggle, decorators: [{\n type: Component,\n args: [{ selector: 'mat-datepicker-toggle', host: {\n 'class': 'mat-datepicker-toggle',\n '[attr.tabindex]': 'null',\n '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',\n '[class.mat-accent]': 'datepicker && datepicker.color === \"accent\"',\n '[class.mat-warn]': 'datepicker && datepicker.color === \"warn\"',\n // Used by the test harness to tie this toggle to its datepicker.\n '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',\n // Bind the `click` on the host, rather than the inner `button`, so that we can call\n // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop\n // it so that the input doesn't get focused automatically by the form field (See #21836).\n '(click)': '_open($event)',\n }, exportAs: 'matDatepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\\n \\n \\n \\n\\n \\n\\n\", styles: [\".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}\"] }]\n }], ctorParameters: function () { return [{ type: MatDatepickerIntl }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }]; }, propDecorators: { datepicker: [{\n type: Input,\n args: ['for']\n }], tabIndex: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], disabled: [{\n type: Input\n }], disableRipple: [{\n type: Input\n }], _customIcon: [{\n type: ContentChild,\n args: [MatDatepickerToggleIcon]\n }], _button: [{\n type: ViewChild,\n args: ['button']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to provide the date range input wrapper component\n * to the parts without circular dependencies.\n */\nconst MAT_DATE_RANGE_INPUT_PARENT = new InjectionToken('MAT_DATE_RANGE_INPUT_PARENT');\n/**\n * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.\n */\nclass MatDateRangeInputPartBase extends MatDatepickerInputBase {\n constructor(_rangeInput, _elementRef, _defaultErrorStateMatcher, _injector, _parentForm, _parentFormGroup, dateAdapter, dateFormats) {\n super(_elementRef, dateAdapter, dateFormats);\n this._rangeInput = _rangeInput;\n this._elementRef = _elementRef;\n this._defaultErrorStateMatcher = _defaultErrorStateMatcher;\n this._injector = _injector;\n this._parentForm = _parentForm;\n this._parentFormGroup = _parentFormGroup;\n this._dir = inject(Directionality, InjectFlags.Optional);\n }\n ngOnInit() {\n // We need the date input to provide itself as a `ControlValueAccessor` and a `Validator`, while\n // injecting its `NgControl` so that the error state is handled correctly. This introduces a\n // circular dependency, because both `ControlValueAccessor` and `Validator` depend on the input\n // itself. Usually we can work around it for the CVA, but there's no API to do it for the\n // validator. We work around it here by injecting the `NgControl` in `ngOnInit`, after\n // everything has been resolved.\n // tslint:disable-next-line:no-bitwise\n const ngControl = this._injector.get(NgControl, null, InjectFlags.Self | InjectFlags.Optional);\n if (ngControl) {\n this.ngControl = ngControl;\n }\n }\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n }\n /** Gets whether the input is empty. */\n isEmpty() {\n return this._elementRef.nativeElement.value.length === 0;\n }\n /** Gets the placeholder of the input. */\n _getPlaceholder() {\n return this._elementRef.nativeElement.placeholder;\n }\n /** Focuses the input. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n /** Handles `input` events on the input element. */\n _onInput(value) {\n super._onInput(value);\n this._rangeInput._handleChildValueChange();\n }\n /** Opens the datepicker associated with the input. */\n _openPopup() {\n this._rangeInput._openDatepicker();\n }\n /** Gets the minimum date from the range input. */\n _getMinDate() {\n return this._rangeInput.min;\n }\n /** Gets the maximum date from the range input. */\n _getMaxDate() {\n return this._rangeInput.max;\n }\n /** Gets the date filter function from the range input. */\n _getDateFilter() {\n return this._rangeInput.dateFilter;\n }\n _parentDisabled() {\n return this._rangeInput._groupDisabled;\n }\n _shouldHandleChangeEvent({ source }) {\n return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;\n }\n _assignValueProgrammatically(value) {\n super._assignValueProgrammatically(value);\n const opposite = (this === this._rangeInput._startInput\n ? this._rangeInput._endInput\n : this._rangeInput._startInput);\n opposite?._validatorOnChange();\n }\n}\nMatDateRangeInputPartBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangeInputPartBase, deps: [{ token: MAT_DATE_RANGE_INPUT_PARENT }, { token: i0.ElementRef }, { token: i1$1.ErrorStateMatcher }, { token: i0.Injector }, { token: i2$2.NgForm, optional: true }, { token: i2$2.FormGroupDirective, optional: true }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatDateRangeInputPartBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDateRangeInputPartBase, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangeInputPartBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DATE_RANGE_INPUT_PARENT]\n }] }, { type: i0.ElementRef }, { type: i1$1.ErrorStateMatcher }, { type: i0.Injector }, { type: i2$2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2$2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }]; } });\nconst _MatDateRangeInputBase = mixinErrorState(MatDateRangeInputPartBase);\n/** Input for entering the start date in a `mat-date-range-input`. */\nclass MatStartDate extends _MatDateRangeInputBase {\n constructor(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) {\n super(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats);\n /** Validator that checks that the start date isn't after the end date. */\n this._startValidator = (control) => {\n const start = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n const end = this._model ? this._model.selection.end : null;\n return !start || !end || this._dateAdapter.compareDate(start, end) <= 0\n ? null\n : { 'matStartDateInvalid': { 'end': end, 'actual': start } };\n };\n this._validator = Validators.compose([...super._getValidators(), this._startValidator]);\n }\n _getValueFromModel(modelValue) {\n return modelValue.start;\n }\n _shouldHandleChangeEvent(change) {\n if (!super._shouldHandleChangeEvent(change)) {\n return false;\n }\n else {\n return !change.oldValue?.start\n ? !!change.selection.start\n : !change.selection.start ||\n !!this._dateAdapter.compareDate(change.oldValue.start, change.selection.start);\n }\n }\n _assignValueToModel(value) {\n if (this._model) {\n const range = new DateRange(value, this._model.selection.end);\n this._model.updateSelection(range, this);\n }\n }\n _formatValue(value) {\n super._formatValue(value);\n // Any time the input value is reformatted we need to tell the parent.\n this._rangeInput._handleChildValueChange();\n }\n /** Gets the value that should be used when mirroring the input's size. */\n getMirrorValue() {\n const element = this._elementRef.nativeElement;\n const value = element.value;\n return value.length > 0 ? value : element.placeholder;\n }\n _onKeydown(event) {\n const endInput = this._rangeInput._endInput;\n const element = this._elementRef.nativeElement;\n const isLtr = this._dir?.value !== 'rtl';\n // If the user hits RIGHT (LTR) when at the end of the input (and no\n // selection), move the cursor to the start of the end input.\n if (((event.keyCode === RIGHT_ARROW && isLtr) || (event.keyCode === LEFT_ARROW && !isLtr)) &&\n element.selectionStart === element.value.length &&\n element.selectionEnd === element.value.length) {\n event.preventDefault();\n endInput._elementRef.nativeElement.setSelectionRange(0, 0);\n endInput.focus();\n }\n else {\n super._onKeydown(event);\n }\n }\n}\nMatStartDate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatStartDate, deps: [{ token: MAT_DATE_RANGE_INPUT_PARENT }, { token: i0.ElementRef }, { token: i1$1.ErrorStateMatcher }, { token: i0.Injector }, { token: i2$2.NgForm, optional: true }, { token: i2$2.FormGroupDirective, optional: true }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatStartDate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatStartDate, selector: \"input[matStartDate]\", inputs: { errorStateMatcher: \"errorStateMatcher\" }, outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, host: { attributes: { \"type\": \"text\" }, listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"keydown\": \"_onKeydown($event)\", \"blur\": \"_onBlur()\" }, properties: { \"disabled\": \"disabled\", \"attr.id\": \"_rangeInput.id\", \"attr.aria-haspopup\": \"_rangeInput.rangePicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null\", \"attr.min\": \"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null\", \"attr.max\": \"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null\" }, classAttribute: \"mat-start-date mat-date-range-input-inner\" }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },\n { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },\n ], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatStartDate, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[matStartDate]',\n host: {\n 'class': 'mat-start-date mat-date-range-input-inner',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(keydown)': '_onKeydown($event)',\n '[attr.id]': '_rangeInput.id',\n '[attr.aria-haspopup]': '_rangeInput.rangePicker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',\n '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',\n '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',\n '(blur)': '_onBlur()',\n 'type': 'text',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },\n { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },\n ],\n // These need to be specified explicitly, because some tooling doesn't\n // seem to pick them up from the base class. See #20932.\n outputs: ['dateChange', 'dateInput'],\n inputs: ['errorStateMatcher'],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DATE_RANGE_INPUT_PARENT]\n }] }, { type: i0.ElementRef }, { type: i1$1.ErrorStateMatcher }, { type: i0.Injector }, { type: i2$2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2$2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }]; } });\n/** Input for entering the end date in a `mat-date-range-input`. */\nclass MatEndDate extends _MatDateRangeInputBase {\n constructor(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) {\n super(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats);\n /** Validator that checks that the end date isn't before the start date. */\n this._endValidator = (control) => {\n const end = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n const start = this._model ? this._model.selection.start : null;\n return !end || !start || this._dateAdapter.compareDate(end, start) >= 0\n ? null\n : { 'matEndDateInvalid': { 'start': start, 'actual': end } };\n };\n this._validator = Validators.compose([...super._getValidators(), this._endValidator]);\n }\n _getValueFromModel(modelValue) {\n return modelValue.end;\n }\n _shouldHandleChangeEvent(change) {\n if (!super._shouldHandleChangeEvent(change)) {\n return false;\n }\n else {\n return !change.oldValue?.end\n ? !!change.selection.end\n : !change.selection.end ||\n !!this._dateAdapter.compareDate(change.oldValue.end, change.selection.end);\n }\n }\n _assignValueToModel(value) {\n if (this._model) {\n const range = new DateRange(this._model.selection.start, value);\n this._model.updateSelection(range, this);\n }\n }\n _onKeydown(event) {\n const startInput = this._rangeInput._startInput;\n const element = this._elementRef.nativeElement;\n const isLtr = this._dir?.value !== 'rtl';\n // If the user is pressing backspace on an empty end input, move focus back to the start.\n if (event.keyCode === BACKSPACE && !element.value) {\n startInput.focus();\n }\n // If the user hits LEFT (LTR) when at the start of the input (and no\n // selection), move the cursor to the end of the start input.\n else if (((event.keyCode === LEFT_ARROW && isLtr) || (event.keyCode === RIGHT_ARROW && !isLtr)) &&\n element.selectionStart === 0 &&\n element.selectionEnd === 0) {\n event.preventDefault();\n const endPosition = startInput._elementRef.nativeElement.value.length;\n startInput._elementRef.nativeElement.setSelectionRange(endPosition, endPosition);\n startInput.focus();\n }\n else {\n super._onKeydown(event);\n }\n }\n}\nMatEndDate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatEndDate, deps: [{ token: MAT_DATE_RANGE_INPUT_PARENT }, { token: i0.ElementRef }, { token: i1$1.ErrorStateMatcher }, { token: i0.Injector }, { token: i2$2.NgForm, optional: true }, { token: i2$2.FormGroupDirective, optional: true }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatEndDate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatEndDate, selector: \"input[matEndDate]\", inputs: { errorStateMatcher: \"errorStateMatcher\" }, outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, host: { attributes: { \"type\": \"text\" }, listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"keydown\": \"_onKeydown($event)\", \"blur\": \"_onBlur()\" }, properties: { \"disabled\": \"disabled\", \"attr.aria-haspopup\": \"_rangeInput.rangePicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null\", \"attr.min\": \"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null\", \"attr.max\": \"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null\" }, classAttribute: \"mat-end-date mat-date-range-input-inner\" }, providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },\n { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },\n ], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatEndDate, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[matEndDate]',\n host: {\n 'class': 'mat-end-date mat-date-range-input-inner',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(keydown)': '_onKeydown($event)',\n '[attr.aria-haspopup]': '_rangeInput.rangePicker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',\n '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',\n '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',\n '(blur)': '_onBlur()',\n 'type': 'text',\n },\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },\n { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },\n ],\n // These need to be specified explicitly, because some tooling doesn't\n // seem to pick them up from the base class. See #20932.\n outputs: ['dateChange', 'dateInput'],\n inputs: ['errorStateMatcher'],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DATE_RANGE_INPUT_PARENT]\n }] }, { type: i0.ElementRef }, { type: i1$1.ErrorStateMatcher }, { type: i0.Injector }, { type: i2$2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2$2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_FORMATS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet nextUniqueId = 0;\nclass MatDateRangeInput {\n constructor(_changeDetectorRef, _elementRef, control, _dateAdapter, _formField) {\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._dateAdapter = _dateAdapter;\n this._formField = _formField;\n this._closedSubscription = Subscription.EMPTY;\n /** Unique ID for the input. */\n this.id = `mat-date-range-input-${nextUniqueId++}`;\n /** Whether the control is focused. */\n this.focused = false;\n /** Name of the form control. */\n this.controlType = 'mat-date-range-input';\n this._groupDisabled = false;\n /** Value for the `aria-describedby` attribute of the inputs. */\n this._ariaDescribedBy = null;\n /** Separator text to be shown between the inputs. */\n this.separator = '–';\n /** Start of the comparison range that should be shown in the calendar. */\n this.comparisonStart = null;\n /** End of the comparison range that should be shown in the calendar. */\n this.comparisonEnd = null;\n /** Emits when the input's state has changed. */\n this.stateChanges = new Subject();\n if (!_dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw createMissingDateImplError('DateAdapter');\n }\n // The datepicker module can be used both with MDC and non-MDC form fields. We have\n // to conditionally add the MDC input class so that the range picker looks correctly.\n if (_formField?._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {\n const classList = _elementRef.nativeElement.classList;\n classList.add('mat-mdc-input-element');\n classList.add('mat-mdc-form-field-input-control');\n }\n // TODO(crisbeto): remove `as any` after #18206 lands.\n this.ngControl = control;\n }\n /** Current value of the range input. */\n get value() {\n return this._model ? this._model.selection : null;\n }\n /** Whether the control's label should float. */\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n /**\n * Implemented as a part of `MatFormFieldControl`.\n * Set the placeholder attribute on `matStartDate` and `matEndDate`.\n * @docs-private\n */\n get placeholder() {\n const start = this._startInput?._getPlaceholder() || '';\n const end = this._endInput?._getPlaceholder() || '';\n return start || end ? `${start} ${this.separator} ${end}` : '';\n }\n /** The range picker that this input is associated with. */\n get rangePicker() {\n return this._rangePicker;\n }\n set rangePicker(rangePicker) {\n if (rangePicker) {\n this._model = rangePicker.registerInput(this);\n this._rangePicker = rangePicker;\n this._closedSubscription.unsubscribe();\n this._closedSubscription = rangePicker.closedStream.subscribe(() => {\n this._startInput?._onTouched();\n this._endInput?._onTouched();\n });\n this._registerModel(this._model);\n }\n }\n /** Whether the input is required. */\n get required() {\n return !!this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Function that can be used to filter out dates within the date range picker. */\n get dateFilter() {\n return this._dateFilter;\n }\n set dateFilter(value) {\n const start = this._startInput;\n const end = this._endInput;\n const wasMatchingStart = start && start._matchesFilter(start.value);\n const wasMatchingEnd = end && end._matchesFilter(start.value);\n this._dateFilter = value;\n if (start && start._matchesFilter(start.value) !== wasMatchingStart) {\n start._validatorOnChange();\n }\n if (end && end._matchesFilter(end.value) !== wasMatchingEnd) {\n end._validatorOnChange();\n }\n }\n /** The minimum valid date. */\n get min() {\n return this._min;\n }\n set min(value) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n if (!this._dateAdapter.sameDate(validValue, this._min)) {\n this._min = validValue;\n this._revalidate();\n }\n }\n /** The maximum valid date. */\n get max() {\n return this._max;\n }\n set max(value) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n if (!this._dateAdapter.sameDate(validValue, this._max)) {\n this._max = validValue;\n this._revalidate();\n }\n }\n /** Whether the input is disabled. */\n get disabled() {\n return this._startInput && this._endInput\n ? this._startInput.disabled && this._endInput.disabled\n : this._groupDisabled;\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._groupDisabled) {\n this._groupDisabled = newValue;\n this.stateChanges.next(undefined);\n }\n }\n /** Whether the input is in an error state. */\n get errorState() {\n if (this._startInput && this._endInput) {\n return this._startInput.errorState || this._endInput.errorState;\n }\n return false;\n }\n /** Whether the datepicker input is empty. */\n get empty() {\n const startEmpty = this._startInput ? this._startInput.isEmpty() : false;\n const endEmpty = this._endInput ? this._endInput.isEmpty() : false;\n return startEmpty && endEmpty;\n }\n /**\n * Implemented as a part of `MatFormFieldControl`.\n * @docs-private\n */\n setDescribedByIds(ids) {\n this._ariaDescribedBy = ids.length ? ids.join(' ') : null;\n }\n /**\n * Implemented as a part of `MatFormFieldControl`.\n * @docs-private\n */\n onContainerClick() {\n if (!this.focused && !this.disabled) {\n if (!this._model || !this._model.selection.start) {\n this._startInput.focus();\n }\n else {\n this._endInput.focus();\n }\n }\n }\n ngAfterContentInit() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._startInput) {\n throw Error('mat-date-range-input must contain a matStartDate input');\n }\n if (!this._endInput) {\n throw Error('mat-date-range-input must contain a matEndDate input');\n }\n }\n if (this._model) {\n this._registerModel(this._model);\n }\n // We don't need to unsubscribe from this, because we\n // know that the input streams will be completed on destroy.\n merge(this._startInput.stateChanges, this._endInput.stateChanges).subscribe(() => {\n this.stateChanges.next(undefined);\n });\n }\n ngOnChanges(changes) {\n if (dateInputsHaveChanged(changes, this._dateAdapter)) {\n this.stateChanges.next(undefined);\n }\n }\n ngOnDestroy() {\n this._closedSubscription.unsubscribe();\n this.stateChanges.complete();\n }\n /** Gets the date at which the calendar should start. */\n getStartValue() {\n return this.value ? this.value.start : null;\n }\n /** Gets the input's theme palette. */\n getThemePalette() {\n return this._formField ? this._formField.color : undefined;\n }\n /** Gets the element to which the calendar overlay should be attached. */\n getConnectedOverlayOrigin() {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n /** Gets the ID of an element that should be used a description for the calendar overlay. */\n getOverlayLabelId() {\n return this._formField ? this._formField.getLabelId() : null;\n }\n /** Gets the value that is used to mirror the state input. */\n _getInputMirrorValue() {\n return this._startInput ? this._startInput.getMirrorValue() : '';\n }\n /** Whether the input placeholders should be hidden. */\n _shouldHidePlaceholders() {\n return this._startInput ? !this._startInput.isEmpty() : false;\n }\n /** Handles the value in one of the child inputs changing. */\n _handleChildValueChange() {\n this.stateChanges.next(undefined);\n this._changeDetectorRef.markForCheck();\n }\n /** Opens the date range picker associated with the input. */\n _openDatepicker() {\n if (this._rangePicker) {\n this._rangePicker.open();\n }\n }\n /** Whether the separate text should be hidden. */\n _shouldHideSeparator() {\n return ((!this._formField ||\n (this._formField.getLabelId() && !this._formField._shouldLabelFloat())) &&\n this.empty);\n }\n /** Gets the value for the `aria-labelledby` attribute of the inputs. */\n _getAriaLabelledby() {\n const formField = this._formField;\n return formField && formField._hasFloatingLabel() ? formField._labelId : null;\n }\n /** Updates the focused state of the range input. */\n _updateFocus(origin) {\n this.focused = origin !== null;\n this.stateChanges.next();\n }\n /** Re-runs the validators on the start/end inputs. */\n _revalidate() {\n if (this._startInput) {\n this._startInput._validatorOnChange();\n }\n if (this._endInput) {\n this._endInput._validatorOnChange();\n }\n }\n /** Registers the current date selection model with the start/end inputs. */\n _registerModel(model) {\n if (this._startInput) {\n this._startInput._registerModel(model);\n }\n if (this._endInput) {\n this._endInput._registerModel(model);\n }\n }\n}\nMatDateRangeInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangeInput, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i2$2.ControlContainer, optional: true, self: true }, { token: i1$1.DateAdapter, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatDateRangeInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDateRangeInput, selector: \"mat-date-range-input\", inputs: { rangePicker: \"rangePicker\", required: \"required\", dateFilter: \"dateFilter\", min: \"min\", max: \"max\", disabled: \"disabled\", separator: \"separator\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\" }, host: { attributes: { \"role\": \"group\" }, properties: { \"class.mat-date-range-input-hide-placeholders\": \"_shouldHidePlaceholders()\", \"class.mat-date-range-input-required\": \"required\", \"attr.id\": \"null\", \"attr.aria-labelledby\": \"_getAriaLabelledby()\", \"attr.aria-describedby\": \"_ariaDescribedBy\", \"attr.data-mat-calendar\": \"rangePicker ? rangePicker.id : null\" }, classAttribute: \"mat-date-range-input\" }, providers: [\n { provide: MatFormFieldControl, useExisting: MatDateRangeInput },\n { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },\n ], queries: [{ propertyName: \"_startInput\", first: true, predicate: MatStartDate, descendants: true }, { propertyName: \"_endInput\", first: true, predicate: MatEndDate, descendants: true }], exportAs: [\"matDateRangeInput\"], usesOnChanges: true, ngImport: i0, template: \"\\n
      \\n \\n {{_getInputMirrorValue()}}\\n
      \\n\\n {{separator}}\\n\\n
      \\n \\n
      \\n\\n\\n\", styles: [\".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\"], dependencies: [{ kind: \"directive\", type: i5.CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: [\"cdkFocusChange\"], exportAs: [\"cdkMonitorFocus\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangeInput, decorators: [{\n type: Component,\n args: [{ selector: 'mat-date-range-input', exportAs: 'matDateRangeInput', host: {\n 'class': 'mat-date-range-input',\n '[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',\n '[class.mat-date-range-input-required]': 'required',\n '[attr.id]': 'null',\n 'role': 'group',\n '[attr.aria-labelledby]': '_getAriaLabelledby()',\n '[attr.aria-describedby]': '_ariaDescribedBy',\n // Used by the test harness to tie this input to its calendar. We can't depend on\n // `aria-owns` for this, because it's only defined while the calendar is open.\n '[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null',\n }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [\n { provide: MatFormFieldControl, useExisting: MatDateRangeInput },\n { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },\n ], template: \"\\n
      \\n \\n {{_getInputMirrorValue()}}\\n
      \\n\\n {{separator}}\\n\\n
      \\n \\n
      \\n\\n\\n\", styles: [\".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2$2.ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i1$1.DateAdapter, decorators: [{\n type: Optional\n }] }, { type: i2$1.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }]; }, propDecorators: { rangePicker: [{\n type: Input\n }], required: [{\n type: Input\n }], dateFilter: [{\n type: Input\n }], min: [{\n type: Input\n }], max: [{\n type: Input\n }], disabled: [{\n type: Input\n }], separator: [{\n type: Input\n }], comparisonStart: [{\n type: Input\n }], comparisonEnd: [{\n type: Input\n }], _startInput: [{\n type: ContentChild,\n args: [MatStartDate]\n }], _endInput: [{\n type: ContentChild,\n args: [MatEndDate]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDateRangePicker\"). We can change this to a\n// directive if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the date range picker popup/dialog. */\nclass MatDateRangePicker extends MatDatepickerBase {\n _forwardContentValues(instance) {\n super._forwardContentValues(instance);\n const input = this.datepickerInput;\n if (input) {\n instance.comparisonStart = input.comparisonStart;\n instance.comparisonEnd = input.comparisonEnd;\n }\n }\n}\nMatDateRangePicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangePicker, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatDateRangePicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDateRangePicker, selector: \"mat-date-range-picker\", providers: [\n MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,\n MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,\n { provide: MatDatepickerBase, useExisting: MatDateRangePicker },\n ], exportAs: [\"matDateRangePicker\"], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDateRangePicker, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-date-range-picker',\n template: '',\n exportAs: 'matDateRangePicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,\n MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,\n { provide: MatDatepickerBase, useExisting: MatDateRangePicker },\n ],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Button that will close the datepicker and assign the current selection to the data model. */\nclass MatDatepickerApply {\n constructor(_datepicker) {\n this._datepicker = _datepicker;\n }\n _applySelection() {\n this._datepicker._applyPendingSelection();\n this._datepicker.close();\n }\n}\nMatDatepickerApply.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerApply, deps: [{ token: MatDatepickerBase }], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerApply.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerApply, selector: \"[matDatepickerApply], [matDateRangePickerApply]\", host: { listeners: { \"click\": \"_applySelection()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerApply, decorators: [{\n type: Directive,\n args: [{\n selector: '[matDatepickerApply], [matDateRangePickerApply]',\n host: { '(click)': '_applySelection()' },\n }]\n }], ctorParameters: function () { return [{ type: MatDatepickerBase }]; } });\n/** Button that will close the datepicker and discard the current selection. */\nclass MatDatepickerCancel {\n constructor(_datepicker) {\n this._datepicker = _datepicker;\n }\n}\nMatDatepickerCancel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerCancel, deps: [{ token: MatDatepickerBase }], target: i0.ɵɵFactoryTarget.Directive });\nMatDatepickerCancel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerCancel, selector: \"[matDatepickerCancel], [matDateRangePickerCancel]\", host: { listeners: { \"click\": \"_datepicker.close()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerCancel, decorators: [{\n type: Directive,\n args: [{\n selector: '[matDatepickerCancel], [matDateRangePickerCancel]',\n host: { '(click)': '_datepicker.close()' },\n }]\n }], ctorParameters: function () { return [{ type: MatDatepickerBase }]; } });\n/**\n * Container that can be used to project a row of action buttons\n * to the bottom of a datepicker or date range picker.\n */\nclass MatDatepickerActions {\n constructor(_datepicker, _viewContainerRef) {\n this._datepicker = _datepicker;\n this._viewContainerRef = _viewContainerRef;\n }\n ngAfterViewInit() {\n this._portal = new TemplatePortal(this._template, this._viewContainerRef);\n this._datepicker.registerActions(this._portal);\n }\n ngOnDestroy() {\n this._datepicker.removeActions(this._portal);\n // Needs to be null checked since we initialize it in `ngAfterViewInit`.\n if (this._portal && this._portal.isAttached) {\n this._portal?.detach();\n }\n }\n}\nMatDatepickerActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerActions, deps: [{ token: MatDatepickerBase }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });\nMatDatepickerActions.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDatepickerActions, selector: \"mat-datepicker-actions, mat-date-range-picker-actions\", viewQueries: [{ propertyName: \"_template\", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: `\n \n
      \n \n
      \n
      \n `, isInline: true, styles: [\".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:0;margin-right:8px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerActions, decorators: [{\n type: Component,\n args: [{ selector: 'mat-datepicker-actions, mat-date-range-picker-actions', template: `\n \n
      \n \n
      \n
      \n `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:0;margin-right:8px}\"] }]\n }], ctorParameters: function () { return [{ type: MatDatepickerBase }, { type: i0.ViewContainerRef }]; }, propDecorators: { _template: [{\n type: ViewChild,\n args: [TemplateRef]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatDatepickerModule {\n}\nMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerModule, declarations: [MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply], imports: [CommonModule,\n MatButtonModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n MatCommonModule], exports: [CdkScrollableModule,\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply] });\nMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerModule, providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,\n MatButtonModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n MatCommonModule, CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDatepickerModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule,\n MatButtonModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n MatCommonModule,\n ],\n exports: [\n CdkScrollableModule,\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply,\n ],\n declarations: [\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply,\n ],\n providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DateRange, DefaultMatCalendarRangeStrategy, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerModule, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, matDatepickerAnimations, yearsPerPage, yearsPerRow };\n","import * as i1 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayConfig, OverlayRef, OverlayModule } from '@angular/cdk/overlay';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/portal';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, InjectionToken, Injector, TemplateRef, InjectFlags, Injectable, SkipSelf, NgModule } from '@angular/core';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { Subject, defer, of } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { startWith } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Configuration for opening a modal dialog. */\nclass DialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Optional CSS class or classes applied to the overlay panel. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Optional CSS class or classes applied to the overlay backdrop. */\n this.backdropClass = '';\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Dialog label applied via `aria-label` */\n this.ariaLabel = null;\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n this.ariaModal = true;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the previously-focused element upon closing.\n * Has the following behavior based on the type that is passed in:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\n this.restoreFocus = true;\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n this.closeOnNavigation = true;\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n this.closeOnDestroy = true;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\nclass CdkDialogContainer extends BasePortalOutlet {\n constructor(_elementRef, _focusTrapFactory, _document, _config, _interactivityChecker, _ngZone, _overlayRef, _focusMonitor) {\n super();\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n this._config = _config;\n this._interactivityChecker = _interactivityChecker;\n this._ngZone = _ngZone;\n this._overlayRef = _overlayRef;\n this._focusMonitor = _focusMonitor;\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n this._elementFocusedBeforeDialogWasOpened = null;\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n this._closeInteractionType = null;\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n this._ariaLabelledBy = this._config.ariaLabelledBy || null;\n this._document = _document;\n }\n _contentAttached() {\n this._initializeFocusTrap();\n this._handleBackdropClicks();\n this._captureInitialFocus();\n }\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n _captureInitialFocus() {\n this._trapFocus();\n }\n ngOnDestroy() {\n this._restoreFocus();\n }\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n _forceFocus(element, options) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n element.removeEventListener('blur', callback);\n element.removeEventListener('mousedown', callback);\n element.removeAttribute('tabindex');\n };\n element.addEventListener('blur', callback);\n element.addEventListener('mousedown', callback);\n });\n }\n element.focus(options);\n }\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n _focusByCssSelector(selector, options) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(selector);\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n _trapFocus() {\n const element = this._elementRef.nativeElement;\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty when setting focus when autoFocus isn't set to\n // dialog. If the element inside the dialog can't be focused, then the container is focused\n // so the user can't tab into other elements behind it.\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady().then(focusedSuccessfully => {\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer();\n }\n });\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus);\n break;\n }\n }\n /** Restores focus to the element that was focused before the dialog opened. */\n _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement = null;\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n }\n else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n }\n else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus &&\n focusTargetElement &&\n typeof focusTargetElement.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (!activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n }\n else {\n focusTargetElement.focus();\n }\n }\n }\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n /** Focuses the dialog container. */\n _focusDialogContainer() {\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n this._elementRef.nativeElement.focus();\n }\n }\n /** Returns whether focus is inside the dialog. */\n _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n /** Sets up the focus trap. */\n _initializeFocusTrap() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n /** Sets up the listener that handles clicks on the dialog backdrop. */\n _handleBackdropClicks() {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this._overlayRef.backdropClick().subscribe(() => {\n if (this._config.disableClose) {\n this._recaptureFocus();\n }\n });\n }\n}\nCdkDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkDialogContainer, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: DialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\nCdkDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkDialogContainer, selector: \"cdk-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, properties: { \"attr.id\": \"_config.id || null\", \"attr.role\": \"_config.role\", \"attr.aria-modal\": \"_config.ariaModal\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledBy\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\" }, classAttribute: \"cdk-dialog-container\" }, viewQueries: [{ propertyName: \"_portalOutlet\", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"], dependencies: [{ kind: \"directive\", type: i3.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkDialogContainer, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {\n 'class': 'cdk-dialog-container',\n 'tabindex': '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n }, template: \"\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DialogConfig]\n }] }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i1.FocusMonitor }]; }, propDecorators: { _portalOutlet: [{\n type: ViewChild,\n args: [CdkPortalOutlet, { static: true }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nclass DialogRef {\n constructor(overlayRef, config) {\n this.overlayRef = overlayRef;\n this.config = config;\n /** Emits when the dialog has been closed. */\n this.closed = new Subject();\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID.\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, { focusOrigin: 'keyboard' });\n }\n });\n this.backdropClick.subscribe(() => {\n if (!this.disableClose) {\n this.close(undefined, { focusOrigin: 'mouse' });\n }\n });\n }\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result, options) {\n if (this.containerInstance) {\n const closedSubject = this.closed;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n this.componentInstance = this.containerInstance = null;\n }\n }\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition() {\n this.overlayRef.updatePosition();\n return this;\n }\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width = '', height = '') {\n this.overlayRef.updateSize({ width, height });\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this.overlayRef.removePanelClass(classes);\n return this;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token for the Dialog's ScrollStrategy. */\nconst DIALOG_SCROLL_STRATEGY = new InjectionToken('DialogScrollStrategy');\n/** Injection token for the Dialog's Data. */\nconst DIALOG_DATA = new InjectionToken('DialogData');\n/** Injection token that can be used to provide default options for the dialog module. */\nconst DEFAULT_DIALOG_CONFIG = new InjectionToken('DefaultDialogConfig');\n/** @docs-private */\nfunction DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Unique id for the created dialog. */\nlet uniqueId = 0;\nclass Dialog {\n constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy) {\n this._overlay = _overlay;\n this._injector = _injector;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._overlayContainer = _overlayContainer;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._ariaHiddenElements = new Map();\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n this.afterAllClosed = defer(() => this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n }\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n open(componentOrTemplateRef, config) {\n const defaults = (this._defaultOptions || new DialogConfig());\n config = { ...defaults, ...config };\n config.id = config.id || `cdk-dialog-${uniqueId++}`;\n if (config.id &&\n this.getDialogById(config.id) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = this._overlay.create(overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n dialogRef.containerInstance = dialogContainer;\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n this.openDialogs.push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id) {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n _getOverlayConfig(config) {\n const state = new OverlayConfig({\n positionStrategy: config.positionStrategy ||\n this._overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation,\n });\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n return state;\n }\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n _attachContainer(overlay, dialogRef, config) {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers = [\n { provide: DialogConfig, useValue: config },\n { provide: DialogRef, useValue: dialogRef },\n { provide: OverlayRef, useValue: overlay },\n ];\n let containerType;\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n }\n else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n }\n else {\n containerType = CdkDialogContainer;\n }\n const containerPortal = new ComponentPortal(containerType, config.viewContainerRef, Injector.create({ parent: userInjector || this._injector, providers }), config.componentFactoryResolver);\n const containerRef = overlay.attach(containerPortal);\n return containerRef.instance;\n }\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n _attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) {\n if (componentOrTemplateRef instanceof TemplateRef) {\n const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n let context = { $implicit: config.data, dialogRef };\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function'\n ? config.templateContext()\n : config.templateContext),\n };\n }\n dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, context, injector));\n }\n else {\n const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector, config.componentFactoryResolver));\n dialogRef.componentInstance = contentRef.instance;\n }\n }\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n * dialog injector, if the user didn't provide a custom one.\n * @returns The custom injector that can be used inside the dialog.\n */\n _createInjector(config, dialogRef, dialogContainer, fallbackInjector) {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers = [\n { provide: DIALOG_DATA, useValue: config.data },\n { provide: DialogRef, useValue: dialogRef },\n ];\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n }\n else {\n providers.push(...config.providers);\n }\n }\n if (config.direction &&\n (!userInjector ||\n !userInjector.get(Directionality, null, InjectFlags.Optional))) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: of() },\n });\n }\n return Injector.create({ parent: userInjector || fallbackInjector, providers });\n }\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n _removeOpenDialog(dialogRef, emitEvent) {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n }\n else {\n element.removeAttribute('aria-hidden');\n }\n });\n this._ariaHiddenElements.clear();\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n /** Hides all of the content that isn't an overlay from assistive technology. */\n _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n}\nDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: Dialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: DEFAULT_DIALOG_CONFIG, optional: true }, { token: Dialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: DIALOG_SCROLL_STRATEGY }], target: i0.ɵɵFactoryTarget.Injectable });\nDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: Dialog });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: Dialog, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: DialogConfig, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DEFAULT_DIALOG_CONFIG]\n }] }, { type: Dialog, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: i1$1.OverlayContainer }, { type: undefined, decorators: [{\n type: Inject,\n args: [DIALOG_SCROLL_STRATEGY]\n }] }]; } });\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach(items, callback) {\n let i = items.length;\n while (i--) {\n callback(items[i]);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DialogModule {\n}\nDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: DialogModule, declarations: [CdkDialogContainer], imports: [OverlayModule, PortalModule, A11yModule], exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer] });\nDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DialogModule, providers: [Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [OverlayModule, PortalModule, A11yModule, \n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: DialogModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [OverlayModule, PortalModule, A11yModule],\n exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer,\n ],\n declarations: [CdkDialogContainer],\n providers: [Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError };\n","import { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i4 from '@angular/cdk/portal';\nimport { PortalModule } from '@angular/cdk/portal';\nimport * as i0 from '@angular/core';\nimport { EventEmitter, Component, Optional, Inject, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injectable, SkipSelf, Directive, Input, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport { Subject, merge, defer } from 'rxjs';\nimport { filter, take, startWith } from 'rxjs/operators';\nimport { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';\nimport * as i1 from '@angular/cdk/a11y';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Default parameters for the animation for backwards compatibility.\n * @docs-private\n */\nconst defaultParams = {\n params: { enterAnimationDuration: '150ms', exitAnimationDuration: '75ms' },\n};\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nconst matDialogAnimations = {\n /** Animation that is applied on the dialog container by default. */\n dialogContainer: trigger('dialogContainer', [\n // Note: The `enter` animation transitions to `transform: none`, because for some reason\n // specifying the transform explicitly, causes IE both to blur the dialog content and\n // decimate the animation performance. Leaving it as `none` solves both issues.\n state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),\n state('enter', style({ transform: 'none' })),\n transition('* => enter', group([\n animate('{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),\n query('@*', animateChild(), { optional: true }),\n ]), defaultParams),\n transition('* => void, * => exit', group([\n animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),\n query('@*', animateChild(), { optional: true }),\n ]), defaultParams),\n ]),\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nclass MatDialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Custom class for the overlay pane. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Custom class for the backdrop. */\n this.backdropClass = '';\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n this.maxWidth = '80vw';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Aria label to assign to the dialog element. */\n this.ariaLabel = null;\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n this.ariaModal = true;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n this.restoreFocus = true;\n /** Whether to wait for the opening animation to finish before trapping focus. */\n this.delayFocusTrap = true;\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n this.closeOnNavigation = true;\n /** Duration of the enter animation. Has to be a valid CSS value (e.g. 100ms). */\n this.enterAnimationDuration = defaultParams.params.enterAnimationDuration;\n /** Duration of the exit animation. Has to be a valid CSS value (e.g. 50ms). */\n this.exitAnimationDuration = defaultParams.params.exitAnimationDuration;\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n }\n}\n\n/**\n * Base class for the `MatDialogContainer`. The base class does not implement\n * animations as these are left to implementers of the dialog container.\n */\n// tslint:disable-next-line:validate-decorators\nclass _MatDialogContainerBase extends CdkDialogContainer {\n constructor(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor) {\n super(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor);\n /** Emits when an animation state changes. */\n this._animationStateChanged = new EventEmitter();\n }\n _captureInitialFocus() {\n if (!this._config.delayFocusTrap) {\n this._trapFocus();\n }\n }\n /**\n * Callback for when the open dialog animation has finished. Intended to\n * be called by sub-classes that use different animation implementations.\n */\n _openAnimationDone(totalTime) {\n if (this._config.delayFocusTrap) {\n this._trapFocus();\n }\n this._animationStateChanged.next({ state: 'opened', totalTime });\n }\n}\n_MatDialogContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatDialogContainerBase, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\n_MatDialogContainerBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatDialogContainerBase, selector: \"ng-component\", usesInheritance: true, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatDialogContainerBase, decorators: [{\n type: Component,\n args: [{ template: '' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: MatDialogConfig }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i1.FocusMonitor }]; } });\n/**\n * Internal component that wraps user-provided dialog content.\n * Animation is based on https://material.io/guidelines/motion/choreography.html.\n * @docs-private\n */\nclass MatDialogContainer extends _MatDialogContainerBase {\n constructor(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, _changeDetectorRef, focusMonitor) {\n super(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, focusMonitor);\n this._changeDetectorRef = _changeDetectorRef;\n /** State of the dialog animation. */\n this._state = 'enter';\n }\n /** Callback, invoked whenever an animation on the host completes. */\n _onAnimationDone({ toState, totalTime }) {\n if (toState === 'enter') {\n this._openAnimationDone(totalTime);\n }\n else if (toState === 'exit') {\n this._animationStateChanged.next({ state: 'closed', totalTime });\n }\n }\n /** Callback, invoked when an animation on the host starts. */\n _onAnimationStart({ toState, totalTime }) {\n if (toState === 'enter') {\n this._animationStateChanged.next({ state: 'opening', totalTime });\n }\n else if (toState === 'exit' || toState === 'void') {\n this._animationStateChanged.next({ state: 'closing', totalTime });\n }\n }\n /** Starts the dialog exit animation. */\n _startExitAnimation() {\n this._state = 'exit';\n // Mark the container for check so it can react if the\n // view container is using OnPush change detection.\n this._changeDetectorRef.markForCheck();\n }\n _getAnimationState() {\n return {\n value: this._state,\n params: {\n 'enterAnimationDuration': this._config.enterAnimationDuration || defaultParams.params.enterAnimationDuration,\n 'exitAnimationDuration': this._config.exitAnimationDuration || defaultParams.params.exitAnimationDuration,\n },\n };\n }\n}\nMatDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogContainer, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\nMatDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDialogContainer, selector: \"mat-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, listeners: { \"@dialogContainer.start\": \"_onAnimationStart($event)\", \"@dialogContainer.done\": \"_onAnimationDone($event)\" }, properties: { \"attr.aria-modal\": \"_config.ariaModal\", \"id\": \"_config.id\", \"attr.role\": \"_config.role\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledBy\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\", \"@dialogContainer\": \"_getAnimationState()\" }, classAttribute: \"mat-dialog-container\" }, usesInheritance: true, ngImport: i0, template: \"\\n\", styles: [\".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"], dependencies: [{ kind: \"directive\", type: i4.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], animations: [matDialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogContainer, decorators: [{\n type: Component,\n args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [matDialogAnimations.dialogContainer], host: {\n 'class': 'mat-dialog-container',\n 'tabindex': '-1',\n '[attr.aria-modal]': '_config.ariaModal',\n '[id]': '_config.id',\n '[attr.role]': '_config.role',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n '[@dialogContainer]': `_getAnimationState()`,\n '(@dialogContainer.start)': '_onAnimationStart($event)',\n '(@dialogContainer.done)': '_onAnimationDone($event)',\n }, template: \"\\n\", styles: [\".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: MatDialogConfig }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nclass MatDialogRef {\n constructor(_ref, config, _containerInstance) {\n this._ref = _ref;\n this._containerInstance = _containerInstance;\n /** Subject for notifying the user that the dialog has finished opening. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the dialog has started closing. */\n this._beforeClosed = new Subject();\n /** Current state of the dialog. */\n this._state = 0 /* MatDialogState.OPEN */;\n this.disableClose = config.disableClose;\n this.id = _ref.id;\n // Emit when opening animation completes\n _containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'opened'), take(1))\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'closed'), take(1))\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._finishDialogClose();\n });\n _ref.overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._finishDialogClose();\n });\n merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {\n if (!this.disableClose) {\n event.preventDefault();\n _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');\n }\n });\n }\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult) {\n this._result = dialogResult;\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'closing'), take(1))\n .subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._ref.overlayRef.detachBackdrop();\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(() => this._finishDialogClose(), event.totalTime + 100);\n });\n this._state = 1 /* MatDialogState.CLOSING */;\n this._containerInstance._startExitAnimation();\n }\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened() {\n return this._afterOpened;\n }\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed() {\n return this._ref.closed;\n }\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed() {\n return this._beforeClosed;\n }\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick() {\n return this._ref.backdropClick;\n }\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents() {\n return this._ref.keydownEvents;\n }\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position) {\n let strategy = this._ref.config.positionStrategy;\n if (position && (position.left || position.right)) {\n position.left ? strategy.left(position.left) : strategy.right(position.right);\n }\n else {\n strategy.centerHorizontally();\n }\n if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n }\n else {\n strategy.centerVertically();\n }\n this._ref.updatePosition();\n return this;\n }\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width = '', height = '') {\n this._ref.updateSize(width, height);\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this._ref.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this._ref.removePanelClass(classes);\n return this;\n }\n /** Gets the current state of the dialog's lifecycle. */\n getState() {\n return this._state;\n }\n /**\n * Finishes the dialog close by updating the state of the dialog\n * and disposing the overlay.\n */\n _finishDialogClose() {\n this._state = 2 /* MatDialogState.CLOSED */;\n this._ref.close(this._result, { focusOrigin: this._closeInteractionType });\n this.componentInstance = null;\n }\n}\n/**\n * Closes the dialog with the specified interaction type. This is currently not part of\n * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.\n * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.\n */\n// TODO: Move this back into `MatDialogRef` when we provide an official mock dialog ref.\nfunction _closeDialogVia(ref, interactionType, result) {\n ref._closeInteractionType = interactionType;\n return ref.close(result);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nconst MAT_DIALOG_DATA = new InjectionToken('MatDialogData');\n/** Injection token that can be used to specify default dialog options. */\nconst MAT_DIALOG_DEFAULT_OPTIONS = new InjectionToken('mat-dialog-default-options');\n/** Injection token that determines the scroll handling while the dialog is open. */\nconst MAT_DIALOG_SCROLL_STRATEGY = new InjectionToken('mat-dialog-scroll-strategy');\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\nclass _MatDialogBase {\n constructor(_overlay, injector, _defaultOptions, _parentDialog, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n _overlayContainer, scrollStrategy, _dialogRefConstructor, _dialogContainerType, _dialogDataToken, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n _animationMode) {\n this._overlay = _overlay;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._dialogRefConstructor = _dialogRefConstructor;\n this._dialogContainerType = _dialogContainerType;\n this._dialogDataToken = _dialogDataToken;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._idPrefix = 'mat-dialog-';\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n this.afterAllClosed = defer(() => this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n this._dialog = injector.get(Dialog);\n }\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n open(componentOrTemplateRef, config) {\n let dialogRef;\n config = { ...(this._defaultOptions || new MatDialogConfig()), ...config };\n config.id = config.id || `${this._idPrefix}${uniqueId++}`;\n config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();\n const cdkRef = this._dialog.open(componentOrTemplateRef, {\n ...config,\n positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),\n // Disable closing since we need to sync it up to the animation ourselves.\n disableClose: true,\n // Disable closing on destroy, because this service cleans up its open dialogs as well.\n // We want to do the cleanup here, rather than the CDK service, because the CDK destroys\n // the dialogs immediately whereas we want it to wait for the animations to finish.\n closeOnDestroy: false,\n container: {\n type: this._dialogContainerType,\n providers: () => [\n // Provide our config as the CDK config as well since it has the same interface as the\n // CDK one, but it contains the actual values passed in by the user for things like\n // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n { provide: MatDialogConfig, useValue: config },\n { provide: DialogConfig, useValue: config },\n ],\n },\n templateContext: () => ({ dialogRef }),\n providers: (ref, cdkConfig, dialogContainer) => {\n dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);\n dialogRef.updatePosition(config?.position);\n return [\n { provide: this._dialogContainerType, useValue: dialogContainer },\n { provide: this._dialogDataToken, useValue: cdkConfig.data },\n { provide: this._dialogRefConstructor, useValue: dialogRef },\n ];\n },\n });\n // This can't be assigned in the `providers` callback, because\n // the instance hasn't been assigned to the CDK ref yet.\n dialogRef.componentInstance = cdkRef.componentInstance;\n this.openDialogs.push(dialogRef);\n this.afterOpened.next(dialogRef);\n dialogRef.afterClosed().subscribe(() => {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n if (!this.openDialogs.length) {\n this._getAfterAllClosed().next();\n }\n }\n });\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n this._closeDialogs(this.openDialogs);\n }\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id) {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n ngOnDestroy() {\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n _closeDialogs(dialogs) {\n let i = dialogs.length;\n while (i--) {\n dialogs[i].close();\n }\n }\n}\n_MatDialogBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatDialogBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\n_MatDialogBase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatDialogBase });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatDialogBase, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined }, { type: undefined }, { type: i1$1.OverlayContainer }, { type: undefined }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }, { type: undefined }]; } });\n/**\n * Service to open Material Design modal dialogs.\n */\nclass MatDialog extends _MatDialogBase {\n constructor(overlay, injector, \n /**\n * @deprecated `_location` parameter to be removed.\n * @breaking-change 10.0.0\n */\n _location, defaultOptions, scrollStrategy, parentDialog, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n overlayContainer, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n animationMode) {\n super(overlay, injector, defaultOptions, parentDialog, overlayContainer, scrollStrategy, MatDialogRef, MatDialogContainer, MAT_DIALOG_DATA, animationMode);\n }\n}\nMatDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i2.Location, optional: true }, { token: MAT_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: MAT_DIALOG_SCROLL_STRATEGY }, { token: MatDialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nMatDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialog });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialog, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i2.Location, decorators: [{\n type: Optional\n }] }, { type: MatDialogConfig, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DIALOG_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DIALOG_SCROLL_STRATEGY]\n }] }, { type: MatDialog, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: i1$1.OverlayContainer }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n/**\n * Button that will close the current dialog.\n */\nclass MatDialogClose {\n constructor(\n /**\n * Reference to the containing dialog.\n * @deprecated `dialogRef` property to become private.\n * @breaking-change 13.0.0\n */\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n dialogRef, _elementRef, _dialog) {\n this.dialogRef = dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n /** Default to \"button\" to prevents accidental form submits. */\n this.type = 'button';\n }\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n }\n }\n ngOnChanges(changes) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n _onButtonClick(event) {\n // Determinate the focus origin using the click event, because using the FocusMonitor will\n // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n // dialog, and therefore clicking the button won't result in a focus change. This means that\n // the FocusMonitor won't detect any origin change, and will always output `program`.\n _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);\n }\n}\nMatDialogClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogClose, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDialogClose, selector: \"[mat-dialog-close], [matDialogClose]\", inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], type: \"type\", dialogResult: [\"mat-dialog-close\", \"dialogResult\"], _matDialogClose: [\"matDialogClose\", \"_matDialogClose\"] }, host: { listeners: { \"click\": \"_onButtonClick($event)\" }, properties: { \"attr.aria-label\": \"ariaLabel || null\", \"attr.type\": \"type\" } }, exportAs: [\"matDialogClose\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogClose, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-dialog-close], [matDialogClose]',\n exportAs: 'matDialogClose',\n host: {\n '(click)': '_onButtonClick($event)',\n '[attr.aria-label]': 'ariaLabel || null',\n '[attr.type]': 'type',\n },\n }]\n }], ctorParameters: function () { return [{ type: MatDialogRef, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }, { type: MatDialog }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], type: [{\n type: Input\n }], dialogResult: [{\n type: Input,\n args: ['mat-dialog-close']\n }], _matDialogClose: [{\n type: Input,\n args: ['matDialogClose']\n }] } });\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\nclass MatDialogTitle {\n constructor(\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n _dialogRef, _elementRef, _dialog) {\n this._dialogRef = _dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n /** Unique id for the dialog title. If none is supplied, it will be auto-generated. */\n this.id = `mat-dialog-title-${dialogElementUid++}`;\n }\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n }\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n const container = this._dialogRef._containerInstance;\n if (container && !container._ariaLabelledBy) {\n container._ariaLabelledBy = this.id;\n }\n });\n }\n }\n}\nMatDialogTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogTitle, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDialogTitle, selector: \"[mat-dialog-title], [matDialogTitle]\", inputs: { id: \"id\" }, host: { properties: { \"id\": \"id\" }, classAttribute: \"mat-dialog-title\" }, exportAs: [\"matDialogTitle\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogTitle, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-dialog-title], [matDialogTitle]',\n exportAs: 'matDialogTitle',\n host: {\n 'class': 'mat-dialog-title',\n '[id]': 'id',\n },\n }]\n }], ctorParameters: function () { return [{ type: MatDialogRef, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }, { type: MatDialog }]; }, propDecorators: { id: [{\n type: Input\n }] } });\n/**\n * Scrollable content container of a dialog.\n */\nclass MatDialogContent {\n}\nMatDialogContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDialogContent, selector: \"[mat-dialog-content], mat-dialog-content, [matDialogContent]\", host: { classAttribute: \"mat-dialog-content\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogContent, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n host: { 'class': 'mat-dialog-content' },\n }]\n }] });\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\nclass MatDialogActions {\n constructor() {\n /**\n * Horizontal alignment of action buttons.\n */\n this.align = 'start';\n }\n}\nMatDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDialogActions, selector: \"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]\", inputs: { align: \"align\" }, host: { properties: { \"class.mat-dialog-actions-align-center\": \"align === \\\"center\\\"\", \"class.mat-dialog-actions-align-end\": \"align === \\\"end\\\"\" }, classAttribute: \"mat-dialog-actions\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogActions, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n host: {\n 'class': 'mat-dialog-actions',\n '[class.mat-dialog-actions-align-center]': 'align === \"center\"',\n '[class.mat-dialog-actions-align-end]': 'align === \"end\"',\n },\n }]\n }], propDecorators: { align: [{\n type: Input\n }] } });\n// TODO(crisbeto): this utility shouldn't be necessary anymore, because the dialog ref is provided\n// both to component and template dialogs through DI. We need to keep it around, because there are\n// some internal wrappers around `MatDialog` that happened to work by accident, because we had this\n// fallback logic in place.\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element, openDialogs) {\n let parent = element.nativeElement.parentElement;\n while (parent && !parent.classList.contains('mat-dialog-container')) {\n parent = parent.parentElement;\n }\n return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatDialogModule {\n}\nMatDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogModule, declarations: [MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule], exports: [MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule] });\nMatDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogModule, providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDialogModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule],\n exports: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule,\n ],\n declarations: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent,\n ],\n providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogTitle, _MatDialogBase, _MatDialogContainerBase, _closeDialogVia, matDialogAnimations };\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { MatCommonModule } from '@angular/material/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatDivider {\n constructor() {\n this._vertical = false;\n this._inset = false;\n }\n /** Whether the divider is vertically aligned. */\n get vertical() {\n return this._vertical;\n }\n set vertical(value) {\n this._vertical = coerceBooleanProperty(value);\n }\n /** Whether the divider is an inset divider. */\n get inset() {\n return this._inset;\n }\n set inset(value) {\n this._inset = coerceBooleanProperty(value);\n }\n}\nMatDivider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });\nMatDivider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatDivider, selector: \"mat-divider\", inputs: { vertical: \"vertical\", inset: \"inset\" }, host: { attributes: { \"role\": \"separator\" }, properties: { \"attr.aria-orientation\": \"vertical ? \\\"vertical\\\" : \\\"horizontal\\\"\", \"class.mat-divider-vertical\": \"vertical\", \"class.mat-divider-horizontal\": \"!vertical\", \"class.mat-divider-inset\": \"inset\" }, classAttribute: \"mat-divider\" }, ngImport: i0, template: '', isInline: true, styles: [\".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDivider, decorators: [{\n type: Component,\n args: [{ selector: 'mat-divider', host: {\n 'role': 'separator',\n '[attr.aria-orientation]': 'vertical ? \"vertical\" : \"horizontal\"',\n '[class.mat-divider-vertical]': 'vertical',\n '[class.mat-divider-horizontal]': '!vertical',\n '[class.mat-divider-inset]': 'inset',\n 'class': 'mat-divider',\n }, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\"] }]\n }], propDecorators: { vertical: [{\n type: Input\n }], inset: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatDividerModule {\n}\nMatDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDividerModule, declarations: [MatDivider], imports: [MatCommonModule], exports: [MatDivider, MatCommonModule] });\nMatDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDividerModule, imports: [MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatDividerModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatDivider, MatCommonModule],\n declarations: [MatDivider],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatDivider, MatDividerModule };\n","import * as i4 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Attribute, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';\nimport { mixinColor, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Subject, merge, fromEvent } from 'rxjs';\nimport { startWith, takeUntil, take } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport * as i2 from '@angular/cdk/platform';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet nextUniqueId$2 = 0;\n/**\n * Injection token that can be used to reference instances of `MatError`. It serves as\n * alternative token to the actual `MatError` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_ERROR = new InjectionToken('MatError');\n/** Single error message to be shown underneath the form field. */\nclass MatError {\n constructor(ariaLive, elementRef) {\n this.id = `mat-error-${nextUniqueId$2++}`;\n // If no aria-live value is set add 'polite' as a default. This is preferred over setting\n // role='alert' so that screen readers do not interrupt the current task to read this aloud.\n if (!ariaLive) {\n elementRef.nativeElement.setAttribute('aria-live', 'polite');\n }\n }\n}\nMatError.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatError, deps: [{ token: 'aria-live', attribute: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nMatError.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatError, selector: \"mat-error\", inputs: { id: \"id\" }, host: { attributes: { \"aria-atomic\": \"true\" }, properties: { \"attr.id\": \"id\" }, classAttribute: \"mat-error\" }, providers: [{ provide: MAT_ERROR, useExisting: MatError }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatError, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-error',\n host: {\n 'class': 'mat-error',\n '[attr.id]': 'id',\n 'aria-atomic': 'true',\n },\n providers: [{ provide: MAT_ERROR, useExisting: MatError }],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['aria-live']\n }] }, { type: i0.ElementRef }]; }, propDecorators: { id: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by the MatFormField.\n * @docs-private\n */\nconst matFormFieldAnimations = {\n /** Animation that transitions the form field's error and hint messages. */\n transitionMessages: trigger('transitionMessages', [\n // TODO(mmalerba): Use angular animations for label animation as well.\n state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),\n transition('void => enter', [\n style({ opacity: 0, transform: 'translateY(-5px)' }),\n animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n ]),\n ]),\n};\n\n/** An interface which allows a control to work inside of a `MatFormField`. */\nclass MatFormFieldControl {\n}\nMatFormFieldControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatFormFieldControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFormFieldControl, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldControl, decorators: [{\n type: Directive\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction getMatFormFieldPlaceholderConflictError() {\n return Error('Placeholder attribute and child element were both specified.');\n}\n/** @docs-private */\nfunction getMatFormFieldDuplicatedHintError(align) {\n return Error(`A hint was already declared for 'align=\"${align}\"'.`);\n}\n/** @docs-private */\nfunction getMatFormFieldMissingControlError() {\n return Error('mat-form-field must contain a MatFormFieldControl.');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet nextUniqueId$1 = 0;\n/**\n * Injection token that can be used to reference instances of `MatHint`. It serves as\n * alternative token to the actual `MatHint` class which could cause unnecessary\n * retention of the class and its directive metadata.\n *\n * *Note*: This is not part of the public API as the MDC-based form-field will not\n * need a lightweight token for `MatHint` and we want to reduce breaking changes.\n */\nconst _MAT_HINT = new InjectionToken('MatHint');\n/** Hint text to be shown underneath the form field control. */\nclass MatHint {\n constructor() {\n /** Whether to align the hint label at the start or end of the line. */\n this.align = 'start';\n /** Unique ID for the hint. Used for the aria-describedby on the form field control. */\n this.id = `mat-hint-${nextUniqueId$1++}`;\n }\n}\nMatHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHint, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatHint.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatHint, selector: \"mat-hint\", inputs: { align: \"align\", id: \"id\" }, host: { properties: { \"class.mat-form-field-hint-end\": \"align === \\\"end\\\"\", \"attr.id\": \"id\", \"attr.align\": \"null\" }, classAttribute: \"mat-hint\" }, providers: [{ provide: _MAT_HINT, useExisting: MatHint }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHint, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-hint',\n host: {\n 'class': 'mat-hint',\n '[class.mat-form-field-hint-end]': 'align === \"end\"',\n '[attr.id]': 'id',\n // Remove align attribute to prevent it from interfering with layout.\n '[attr.align]': 'null',\n },\n providers: [{ provide: _MAT_HINT, useExisting: MatHint }],\n }]\n }], propDecorators: { align: [{\n type: Input\n }], id: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The floating label for a `mat-form-field`. */\nclass MatLabel {\n}\nMatLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatLabel, selector: \"mat-label\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatLabel, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-label',\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The placeholder text for an `MatFormField`.\n * @deprecated Use `` to specify the label and the `placeholder` attribute to specify the\n * placeholder.\n * @breaking-change 8.0.0\n */\nclass MatPlaceholder {\n}\nMatPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatPlaceholder.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatPlaceholder, selector: \"mat-placeholder\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatPlaceholder, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-placeholder',\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `MatPrefix`. It serves as\n * alternative token to the actual `MatPrefix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_PREFIX = new InjectionToken('MatPrefix');\n/** Prefix to be placed in front of the form field. */\nclass MatPrefix {\n}\nMatPrefix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatPrefix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatPrefix, selector: \"[matPrefix]\", providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatPrefix, decorators: [{\n type: Directive,\n args: [{\n selector: '[matPrefix]',\n providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `MatSuffix`. It serves as\n * alternative token to the actual `MatSuffix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_SUFFIX = new InjectionToken('MatSuffix');\n/** Suffix to be placed at the end of the form field. */\nclass MatSuffix {\n}\nMatSuffix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatSuffix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatSuffix, selector: \"[matSuffix]\", providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSuffix, decorators: [{\n type: Directive,\n args: [{\n selector: '[matSuffix]',\n providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet nextUniqueId = 0;\nconst floatingLabelScale = 0.75;\nconst outlineGapPadding = 5;\n/**\n * Boilerplate for applying mixins to MatFormField.\n * @docs-private\n */\nconst _MatFormFieldBase = mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}, 'primary');\n/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nconst MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken('MAT_FORM_FIELD_DEFAULT_OPTIONS');\n/**\n * Injection token that can be used to inject an instances of `MatFormField`. It serves\n * as alternative token to the actual `MatFormField` class which would cause unnecessary\n * retention of the `MatFormField` class and its component metadata.\n */\nconst MAT_FORM_FIELD = new InjectionToken('MatFormField');\n/** Container for form controls that applies Material Design styling and behavior. */\nclass MatFormField extends _MatFormFieldBase {\n constructor(elementRef, _changeDetectorRef, _dir, _defaults, _platform, _ngZone, _animationMode) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._dir = _dir;\n this._defaults = _defaults;\n this._platform = _platform;\n this._ngZone = _ngZone;\n /**\n * Whether the outline gap needs to be calculated\n * immediately on the next change detection run.\n */\n this._outlineGapCalculationNeededImmediately = false;\n /** Whether the outline gap needs to be calculated next time the zone has stabilized. */\n this._outlineGapCalculationNeededOnStable = false;\n this._destroyed = new Subject();\n this._hideRequiredMarker = false;\n /** Override for the logic that disables the label animation in certain cases. */\n this._showAlwaysAnimate = false;\n /** State of the mat-hint and mat-error animations. */\n this._subscriptAnimationState = '';\n this._hintLabel = '';\n // Unique id for the hint label.\n this._hintLabelId = `mat-hint-${nextUniqueId++}`;\n // Unique id for the label element.\n this._labelId = `mat-form-field-label-${nextUniqueId++}`;\n this.floatLabel = this._getDefaultFloatLabelState();\n this._animationsEnabled = _animationMode !== 'NoopAnimations';\n // Set the default through here so we invoke the setter on the first run.\n this.appearance = _defaults?.appearance || 'legacy';\n if (_defaults) {\n this._hideRequiredMarker = Boolean(_defaults.hideRequiredMarker);\n if (_defaults.color) {\n this.color = this.defaultColor = _defaults.color;\n }\n }\n }\n /** The form field appearance style. */\n get appearance() {\n return this._appearance;\n }\n set appearance(value) {\n const oldValue = this._appearance;\n this._appearance = value || this._defaults?.appearance || 'legacy';\n if (this._appearance === 'outline' && oldValue !== value) {\n this._outlineGapCalculationNeededOnStable = true;\n }\n }\n /** Whether the required marker should be hidden. */\n get hideRequiredMarker() {\n return this._hideRequiredMarker;\n }\n set hideRequiredMarker(value) {\n this._hideRequiredMarker = coerceBooleanProperty(value);\n }\n /** Whether the floating label should always float or not. */\n _shouldAlwaysFloat() {\n return this.floatLabel === 'always' && !this._showAlwaysAnimate;\n }\n /** Whether the label can float or not. */\n _canLabelFloat() {\n return this.floatLabel !== 'never';\n }\n /** Text for the form field hint. */\n get hintLabel() {\n return this._hintLabel;\n }\n set hintLabel(value) {\n this._hintLabel = value;\n this._processHints();\n }\n /**\n * Whether the label should always float, never float or float as the user types.\n *\n * Note: only the legacy appearance supports the `never` option. `never` was originally added as a\n * way to make the floating label emulate the behavior of a standard input placeholder. However\n * the form field now supports both floating labels and placeholders. Therefore in the non-legacy\n * appearances the `never` option has been disabled in favor of just using the placeholder.\n */\n get floatLabel() {\n return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;\n }\n set floatLabel(value) {\n if (value !== this._floatLabel) {\n this._floatLabel = value || this._getDefaultFloatLabelState();\n this._changeDetectorRef.markForCheck();\n }\n }\n get _control() {\n // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.\n // We should clean this up once Ivy is the default renderer.\n return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;\n }\n set _control(value) {\n this._explicitFormFieldControl = value;\n }\n /**\n * Gets the id of the label element. If no label is present, returns `null`.\n */\n getLabelId() {\n return this._hasFloatingLabel() ? this._labelId : null;\n }\n /**\n * Gets an ElementRef for the element that a overlay attached to the form field should be\n * positioned relative to.\n */\n getConnectedOverlayOrigin() {\n return this._connectionContainerRef || this._elementRef;\n }\n ngAfterContentInit() {\n this._validateControlChild();\n const control = this._control;\n if (control.controlType) {\n this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);\n }\n // Subscribe to changes in the child control state in order to update the form field UI.\n control.stateChanges.pipe(startWith(null)).subscribe(() => {\n this._validatePlaceholders();\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n // Run change detection if the value changes.\n if (control.ngControl && control.ngControl.valueChanges) {\n control.ngControl.valueChanges\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n // Note that we have to run outside of the `NgZone` explicitly,\n // in order to avoid throwing users into an infinite loop\n // if `zone-patch-rxjs` is included.\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._outlineGapCalculationNeededOnStable) {\n this.updateOutlineGap();\n }\n });\n });\n // Run change detection and update the outline if the suffix or prefix changes.\n merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {\n this._outlineGapCalculationNeededOnStable = true;\n this._changeDetectorRef.markForCheck();\n });\n // Re-validate when the number of hints changes.\n this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._processHints();\n this._changeDetectorRef.markForCheck();\n });\n // Update the aria-described by when the number of errors changes.\n this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n if (this._dir) {\n this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (typeof requestAnimationFrame === 'function') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this.updateOutlineGap());\n });\n }\n else {\n this.updateOutlineGap();\n }\n });\n }\n }\n ngAfterContentChecked() {\n this._validateControlChild();\n if (this._outlineGapCalculationNeededImmediately) {\n this.updateOutlineGap();\n }\n }\n ngAfterViewInit() {\n // Avoid animations on load.\n this._subscriptAnimationState = 'enter';\n this._changeDetectorRef.detectChanges();\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Determines whether a class from the AbstractControlDirective\n * should be forwarded to the host element.\n */\n _shouldForward(prop) {\n const control = this._control ? this._control.ngControl : null;\n return control && control[prop];\n }\n _hasPlaceholder() {\n return !!((this._control && this._control.placeholder) || this._placeholderChild);\n }\n _hasLabel() {\n return !!(this._labelChildNonStatic || this._labelChildStatic);\n }\n _shouldLabelFloat() {\n return (this._canLabelFloat() &&\n ((this._control && this._control.shouldLabelFloat) || this._shouldAlwaysFloat()));\n }\n _hideControlPlaceholder() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return ((this.appearance === 'legacy' && !this._hasLabel()) ||\n (this._hasLabel() && !this._shouldLabelFloat()));\n }\n _hasFloatingLabel() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return this._hasLabel() || (this.appearance === 'legacy' && this._hasPlaceholder());\n }\n /** Determines whether to display hints or errors. */\n _getDisplayedMessages() {\n return this._errorChildren && this._errorChildren.length > 0 && this._control.errorState\n ? 'error'\n : 'hint';\n }\n /** Animates the placeholder up and locks it in position. */\n _animateAndLockLabel() {\n if (this._hasFloatingLabel() && this._canLabelFloat()) {\n // If animations are disabled, we shouldn't go in here,\n // because the `transitionend` will never fire.\n if (this._animationsEnabled && this._label) {\n this._showAlwaysAnimate = true;\n fromEvent(this._label.nativeElement, 'transitionend')\n .pipe(take(1))\n .subscribe(() => {\n this._showAlwaysAnimate = false;\n });\n }\n this.floatLabel = 'always';\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Ensure that there is only one placeholder (either `placeholder` attribute on the child control\n * or child element with the `mat-placeholder` directive).\n */\n _validatePlaceholders() {\n if (this._control.placeholder &&\n this._placeholderChild &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldPlaceholderConflictError();\n }\n }\n /** Does any extra processing that is required when handling the hints. */\n _processHints() {\n this._validateHints();\n this._syncDescribedByIds();\n }\n /**\n * Ensure that there is a maximum of one of each `` alignment specified, with the\n * attribute being considered as `align=\"start\"`.\n */\n _validateHints() {\n if (this._hintChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n let startHint;\n let endHint;\n this._hintChildren.forEach((hint) => {\n if (hint.align === 'start') {\n if (startHint || this.hintLabel) {\n throw getMatFormFieldDuplicatedHintError('start');\n }\n startHint = hint;\n }\n else if (hint.align === 'end') {\n if (endHint) {\n throw getMatFormFieldDuplicatedHintError('end');\n }\n endHint = hint;\n }\n });\n }\n }\n /** Gets the default float label state. */\n _getDefaultFloatLabelState() {\n return (this._defaults && this._defaults.floatLabel) || 'auto';\n }\n /**\n * Sets the list of element IDs that describe the child control. This allows the control to update\n * its `aria-describedby` attribute accordingly.\n */\n _syncDescribedByIds() {\n if (this._control) {\n let ids = [];\n // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n if (this._control.userAriaDescribedBy &&\n typeof this._control.userAriaDescribedBy === 'string') {\n ids.push(...this._control.userAriaDescribedBy.split(' '));\n }\n if (this._getDisplayedMessages() === 'hint') {\n const startHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'start')\n : null;\n const endHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'end')\n : null;\n if (startHint) {\n ids.push(startHint.id);\n }\n else if (this._hintLabel) {\n ids.push(this._hintLabelId);\n }\n if (endHint) {\n ids.push(endHint.id);\n }\n }\n else if (this._errorChildren) {\n ids.push(...this._errorChildren.map(error => error.id));\n }\n this._control.setDescribedByIds(ids);\n }\n }\n /** Throws an error if the form field's control is missing. */\n _validateControlChild() {\n if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldMissingControlError();\n }\n }\n /**\n * Updates the width and position of the gap in the outline. Only relevant for the outline\n * appearance.\n */\n updateOutlineGap() {\n const labelEl = this._label ? this._label.nativeElement : null;\n const container = this._connectionContainerRef.nativeElement;\n const outlineStartSelector = '.mat-form-field-outline-start';\n const outlineGapSelector = '.mat-form-field-outline-gap';\n // getBoundingClientRect isn't available on the server.\n if (this.appearance !== 'outline' || !this._platform.isBrowser) {\n return;\n }\n // If there is no content, set the gap elements to zero.\n if (!labelEl || !labelEl.children.length || !labelEl.textContent.trim()) {\n const gapElements = container.querySelectorAll(`${outlineStartSelector}, ${outlineGapSelector}`);\n for (let i = 0; i < gapElements.length; i++) {\n gapElements[i].style.width = '0';\n }\n return;\n }\n // If the element is not present in the DOM, the outline gap will need to be calculated\n // the next time it is checked and in the DOM.\n if (!this._isAttachedToDOM()) {\n this._outlineGapCalculationNeededImmediately = true;\n return;\n }\n let startWidth = 0;\n let gapWidth = 0;\n const startEls = container.querySelectorAll(outlineStartSelector);\n const gapEls = container.querySelectorAll(outlineGapSelector);\n if (this._label && this._label.nativeElement.children.length) {\n const containerRect = container.getBoundingClientRect();\n // If the container's width and height are zero, it means that the element is\n // invisible and we can't calculate the outline gap. Mark the element as needing\n // to be checked the next time the zone stabilizes. We can't do this immediately\n // on the next change detection, because even if the element becomes visible,\n // the `ClientRect` won't be recalculated immediately. We reset the\n // `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.\n if (containerRect.width === 0 && containerRect.height === 0) {\n this._outlineGapCalculationNeededOnStable = true;\n this._outlineGapCalculationNeededImmediately = false;\n return;\n }\n const containerStart = this._getStartEnd(containerRect);\n const labelChildren = labelEl.children;\n const labelStart = this._getStartEnd(labelChildren[0].getBoundingClientRect());\n let labelWidth = 0;\n for (let i = 0; i < labelChildren.length; i++) {\n labelWidth += labelChildren[i].offsetWidth;\n }\n startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;\n gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;\n }\n for (let i = 0; i < startEls.length; i++) {\n startEls[i].style.width = `${startWidth}px`;\n }\n for (let i = 0; i < gapEls.length; i++) {\n gapEls[i].style.width = `${gapWidth}px`;\n }\n this._outlineGapCalculationNeededOnStable = this._outlineGapCalculationNeededImmediately =\n false;\n }\n /** Gets the start end of the rect considering the current directionality. */\n _getStartEnd(rect) {\n return this._dir && this._dir.value === 'rtl' ? rect.right : rect.left;\n }\n /** Checks whether the form field is attached to the DOM. */\n _isAttachedToDOM() {\n const element = this._elementRef.nativeElement;\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement.contains(element);\n }\n}\nMatFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }, { token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i2.Platform }, { token: i0.NgZone }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFormField, selector: \"mat-form-field\", inputs: { color: \"color\", appearance: \"appearance\", hideRequiredMarker: \"hideRequiredMarker\", hintLabel: \"hintLabel\", floatLabel: \"floatLabel\" }, host: { properties: { \"class.mat-form-field-appearance-standard\": \"appearance == \\\"standard\\\"\", \"class.mat-form-field-appearance-fill\": \"appearance == \\\"fill\\\"\", \"class.mat-form-field-appearance-outline\": \"appearance == \\\"outline\\\"\", \"class.mat-form-field-appearance-legacy\": \"appearance == \\\"legacy\\\"\", \"class.mat-form-field-invalid\": \"_control.errorState\", \"class.mat-form-field-can-float\": \"_canLabelFloat()\", \"class.mat-form-field-should-float\": \"_shouldLabelFloat()\", \"class.mat-form-field-has-label\": \"_hasFloatingLabel()\", \"class.mat-form-field-hide-placeholder\": \"_hideControlPlaceholder()\", \"class.mat-form-field-disabled\": \"_control.disabled\", \"class.mat-form-field-autofilled\": \"_control.autofilled\", \"class.mat-focused\": \"_control.focused\", \"class.ng-untouched\": \"_shouldForward(\\\"untouched\\\")\", \"class.ng-touched\": \"_shouldForward(\\\"touched\\\")\", \"class.ng-pristine\": \"_shouldForward(\\\"pristine\\\")\", \"class.ng-dirty\": \"_shouldForward(\\\"dirty\\\")\", \"class.ng-valid\": \"_shouldForward(\\\"valid\\\")\", \"class.ng-invalid\": \"_shouldForward(\\\"invalid\\\")\", \"class.ng-pending\": \"_shouldForward(\\\"pending\\\")\", \"class._mat-animation-noopable\": \"!_animationsEnabled\" }, classAttribute: \"mat-form-field\" }, providers: [{ provide: MAT_FORM_FIELD, useExisting: MatFormField }], queries: [{ propertyName: \"_controlNonStatic\", first: true, predicate: MatFormFieldControl, descendants: true }, { propertyName: \"_controlStatic\", first: true, predicate: MatFormFieldControl, descendants: true, static: true }, { propertyName: \"_labelChildNonStatic\", first: true, predicate: MatLabel, descendants: true }, { propertyName: \"_labelChildStatic\", first: true, predicate: MatLabel, descendants: true, static: true }, { propertyName: \"_placeholderChild\", first: true, predicate: MatPlaceholder, descendants: true }, { propertyName: \"_errorChildren\", predicate: MAT_ERROR, descendants: true }, { propertyName: \"_hintChildren\", predicate: _MAT_HINT, descendants: true }, { propertyName: \"_prefixChildren\", predicate: MAT_PREFIX, descendants: true }, { propertyName: \"_suffixChildren\", predicate: MAT_SUFFIX, descendants: true }], viewQueries: [{ propertyName: \"_connectionContainerRef\", first: true, predicate: [\"connectionContainer\"], descendants: true, static: true }, { propertyName: \"_inputContainerRef\", first: true, predicate: [\"inputContainer\"], descendants: true }, { propertyName: \"_label\", first: true, predicate: [\"label\"], descendants: true }], exportAs: [\"matFormField\"], usesInheritance: true, ngImport: i0, template: \"
      \\n
      \\n\\n \\n \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\\n \\n \\n
      \\n\\n
      \\n \\n\\n \\n \\n \\n \\n \\n
      \\n\\n
      \\n \\n
      \\n
      \\n\\n \\n
      \\n \\n
      \\n\\n
      \\n
      \\n \\n
      \\n\\n
      \\n \\n
      {{hintLabel}}
      \\n \\n
      \\n \\n
      \\n
      \\n\\n\", styles: [\".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.cdk-high-contrast-active .mat-form-field-disabled .mat-form-field-label{color:GrayText}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\", \".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\\\"\\\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\", \".mat-input-element{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\\\" \\\";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-input-element::placeholder{transition:none}._mat-animation-noopable .mat-input-element::-moz-placeholder{transition:none}._mat-animation-noopable .mat-input-element::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-input-element:-ms-input-placeholder{transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\", \".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px)}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px;border-top-color:GrayText}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\", \".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:rgba(0,0,0,0)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:GrayText}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\", \".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\"], dependencies: [{ kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i3.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i4.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], animations: [matFormFieldAnimations.transitionMessages], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormField, decorators: [{\n type: Component,\n args: [{ selector: 'mat-form-field', exportAs: 'matFormField', animations: [matFormFieldAnimations.transitionMessages], host: {\n 'class': 'mat-form-field',\n '[class.mat-form-field-appearance-standard]': 'appearance == \"standard\"',\n '[class.mat-form-field-appearance-fill]': 'appearance == \"fill\"',\n '[class.mat-form-field-appearance-outline]': 'appearance == \"outline\"',\n '[class.mat-form-field-appearance-legacy]': 'appearance == \"legacy\"',\n '[class.mat-form-field-invalid]': '_control.errorState',\n '[class.mat-form-field-can-float]': '_canLabelFloat()',\n '[class.mat-form-field-should-float]': '_shouldLabelFloat()',\n '[class.mat-form-field-has-label]': '_hasFloatingLabel()',\n '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',\n '[class.mat-form-field-disabled]': '_control.disabled',\n '[class.mat-form-field-autofilled]': '_control.autofilled',\n '[class.mat-focused]': '_control.focused',\n '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n '[class.ng-touched]': '_shouldForward(\"touched\")',\n '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n '[class.ng-valid]': '_shouldForward(\"valid\")',\n '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n '[class.ng-pending]': '_shouldForward(\"pending\")',\n '[class._mat-animation-noopable]': '!_animationsEnabled',\n }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MAT_FORM_FIELD, useExisting: MatFormField }], template: \"
      \\n
      \\n\\n \\n \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\\n \\n \\n
      \\n\\n
      \\n \\n\\n \\n \\n \\n \\n \\n
      \\n\\n
      \\n \\n
      \\n
      \\n\\n \\n
      \\n \\n
      \\n\\n
      \\n
      \\n \\n
      \\n\\n
      \\n \\n
      {{hintLabel}}
      \\n \\n
      \\n \\n
      \\n
      \\n\\n\", styles: [\".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.cdk-high-contrast-active .mat-form-field-disabled .mat-form-field-label{color:GrayText}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\", \".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\\\"\\\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\", \".mat-input-element{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\\\" \\\";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-input-element::placeholder{transition:none}._mat-animation-noopable .mat-input-element::-moz-placeholder{transition:none}._mat-animation-noopable .mat-input-element::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-input-element:-ms-input-placeholder{transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\", \".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px)}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px;border-top-color:GrayText}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\", \".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:rgba(0,0,0,0)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:GrayText}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\", \".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]\n }] }, { type: i2.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { appearance: [{\n type: Input\n }], hideRequiredMarker: [{\n type: Input\n }], hintLabel: [{\n type: Input\n }], floatLabel: [{\n type: Input\n }], _connectionContainerRef: [{\n type: ViewChild,\n args: ['connectionContainer', { static: true }]\n }], _inputContainerRef: [{\n type: ViewChild,\n args: ['inputContainer']\n }], _label: [{\n type: ViewChild,\n args: ['label']\n }], _controlNonStatic: [{\n type: ContentChild,\n args: [MatFormFieldControl]\n }], _controlStatic: [{\n type: ContentChild,\n args: [MatFormFieldControl, { static: true }]\n }], _labelChildNonStatic: [{\n type: ContentChild,\n args: [MatLabel]\n }], _labelChildStatic: [{\n type: ContentChild,\n args: [MatLabel, { static: true }]\n }], _placeholderChild: [{\n type: ContentChild,\n args: [MatPlaceholder]\n }], _errorChildren: [{\n type: ContentChildren,\n args: [MAT_ERROR, { descendants: true }]\n }], _hintChildren: [{\n type: ContentChildren,\n args: [_MAT_HINT, { descendants: true }]\n }], _prefixChildren: [{\n type: ContentChildren,\n args: [MAT_PREFIX, { descendants: true }]\n }], _suffixChildren: [{\n type: ContentChildren,\n args: [MAT_SUFFIX, { descendants: true }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatFormFieldModule {\n}\nMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldModule, declarations: [MatError, MatFormField, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix], imports: [CommonModule, MatCommonModule, ObserversModule], exports: [MatCommonModule,\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix] });\nMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldModule, imports: [CommonModule, MatCommonModule, ObserversModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFormFieldModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [MatError, MatFormField, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix],\n imports: [CommonModule, MatCommonModule, ObserversModule],\n exports: [\n MatCommonModule,\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix,\n ],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, _MAT_HINT, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };\n","import * as i1 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { coerceElement, coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { EMPTY, Subject, fromEvent } from 'rxjs';\nimport { auditTime, takeUntil } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\nclass AutofillMonitor {\n constructor(_platform, _ngZone) {\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._monitoredElements = new Map();\n }\n monitor(elementOrRef) {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n return info.subject;\n }\n const result = new Subject();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: true }));\n }\n else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: false }));\n }\n });\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n },\n });\n return result;\n }\n stopMonitoring(elementOrRef) {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\nAutofillMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nAutofillMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: AutofillMonitor, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: AutofillMonitor, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }]; } });\n/** A directive that can be used to monitor the autofill state of an input. */\nclass CdkAutofill {\n constructor(_elementRef, _autofillMonitor) {\n this._elementRef = _elementRef;\n this._autofillMonitor = _autofillMonitor;\n /** Emits when the autofill state of the element changes. */\n this.cdkAutofill = new EventEmitter();\n }\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\nCdkAutofill.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive });\nCdkAutofill.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkAutofill, selector: \"[cdkAutofill]\", outputs: { cdkAutofill: \"cdkAutofill\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkAutofill, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkAutofill]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AutofillMonitor }]; }, propDecorators: { cdkAutofill: [{\n type: Output\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Directive to automatically resize a textarea to fit its content. */\nclass CdkTextareaAutosize {\n constructor(_elementRef, _platform, _ngZone, \n /** @breaking-change 11.0.0 make document required */\n document) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._destroyed = new Subject();\n this._enabled = true;\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n this._previousMinRows = -1;\n this._isViewInited = false;\n /** Handles `focus` and `blur` events. */\n this._handleFocusEvent = (event) => {\n this._hasFocus = event.type === 'focus';\n };\n this._document = document;\n this._textareaElement = this._elementRef.nativeElement;\n }\n /** Minimum amount of rows in the textarea. */\n get minRows() {\n return this._minRows;\n }\n set minRows(value) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n /** Maximum amount of rows in the textarea. */\n get maxRows() {\n return this._maxRows;\n }\n set maxRows(value) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n /** Whether autosizing is enabled or not */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n value = coerceBooleanProperty(value);\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n get placeholder() {\n return this._textareaElement.placeholder;\n }\n set placeholder(value) {\n this._cachedPlaceholderHeight = undefined;\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n }\n else {\n this._textareaElement.removeAttribute('placeholder');\n }\n this._cacheTextareaPlaceholderHeight();\n }\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight() {\n const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight() {\n const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n this._textareaElement.addEventListener('focus', this._handleFocusEvent);\n this._textareaElement.addEventListener('blur', this._handleFocusEvent);\n });\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n ngOnDestroy() {\n this._textareaElement.removeEventListener('focus', this._handleFocusEvent);\n this._textareaElement.removeEventListener('blur', this._handleFocusEvent);\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n _cacheTextareaLineHeight() {\n if (this._cachedLineHeight) {\n return;\n }\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false);\n textareaClone.rows = 1;\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n this._textareaElement.parentNode.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n _measureScrollHeight() {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = isFirefox && this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n return scrollHeight;\n }\n _cacheTextareaPlaceholderHeight() {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n const value = this._textareaElement.value;\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n const textarea = this._elementRef.nativeElement;\n const value = textarea.value;\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n }\n else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n /** Access injected document if available or fallback to global document reference */\n _getDocument() {\n return this._document || document;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n _scrollToCaretPosition(textarea) {\n const { selectionStart, selectionEnd } = textarea;\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\nCdkTextareaAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTextareaAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: CdkTextareaAutosize, selector: \"textarea[cdkTextareaAutosize]\", inputs: { minRows: [\"cdkAutosizeMinRows\", \"minRows\"], maxRows: [\"cdkAutosizeMaxRows\", \"maxRows\"], enabled: [\"cdkTextareaAutosize\", \"enabled\"], placeholder: \"placeholder\" }, host: { attributes: { \"rows\": \"1\" }, listeners: { \"input\": \"_noopInputHandler()\" }, classAttribute: \"cdk-textarea-autosize\" }, exportAs: [\"cdkTextareaAutosize\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: CdkTextareaAutosize, decorators: [{\n type: Directive,\n args: [{\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { minRows: [{\n type: Input,\n args: ['cdkAutosizeMinRows']\n }], maxRows: [{\n type: Input,\n args: ['cdkAutosizeMaxRows']\n }], enabled: [{\n type: Input,\n args: ['cdkTextareaAutosize']\n }], placeholder: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass TextFieldModule {\n}\nTextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: TextFieldModule, declarations: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] });\nTextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: TextFieldModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: TextFieldModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule };\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/cdk/platform';\nimport { getSupportedInputTypes } from '@angular/cdk/platform';\nimport * as i4 from '@angular/cdk/text-field';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Optional, Self, Inject, Input, NgModule } from '@angular/core';\nimport * as i2 from '@angular/forms';\nimport { Validators } from '@angular/forms';\nimport * as i3 from '@angular/material/core';\nimport { mixinErrorState, MatCommonModule, ErrorStateMatcher } from '@angular/material/core';\nimport * as i5 from '@angular/material/form-field';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction getMatInputUnsupportedTypeError(type) {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nconst MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n];\nlet nextUniqueId = 0;\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nconst _MatInputBase = mixinErrorState(class {\n constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, \n /**\n * Form control bound to the component.\n * Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n ngControl) {\n this._defaultErrorStateMatcher = _defaultErrorStateMatcher;\n this._parentForm = _parentForm;\n this._parentFormGroup = _parentFormGroup;\n this.ngControl = ngControl;\n /**\n * Emits whenever the component state changes and should cause the parent\n * form field to update. Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n this.stateChanges = new Subject();\n }\n});\n/** Directive that allows a native input to work inside a `MatFormField`. */\nclass MatInput extends _MatInputBase {\n constructor(_elementRef, _platform, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone, \n // TODO: Remove this once the legacy appearance has been removed. We only need\n // to inject the form field for determining whether the placeholder has been promoted.\n _formField) {\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._autofillMonitor = _autofillMonitor;\n this._formField = _formField;\n this._uid = `mat-input-${nextUniqueId++}`;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.focused = false;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.stateChanges = new Subject();\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.controlType = 'mat-input';\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.autofilled = false;\n this._disabled = false;\n this._type = 'text';\n this._readonly = false;\n this._neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n ].filter(t => getSupportedInputTypes().has(t));\n this._iOSKeyupListener = (event) => {\n const el = event.target;\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n };\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n this._previousNativeValue = this.value;\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', this._iOSKeyupListener);\n });\n }\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!_formField;\n if (this._isNativeSelect) {\n this.controlType = element.multiple\n ? 'mat-native-select-multiple'\n : 'mat-native-select';\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get disabled() {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value || this._uid;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get required() {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Input type of the element. */\n get type() {\n return this._type;\n }\n set type(value) {\n this._type = value || 'text';\n this._validateType();\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n this._elementRef.nativeElement.type = this._type;\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get value() {\n return this._inputValueAccessor.value;\n }\n set value(value) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n /** Whether the element is readonly. */\n get readonly() {\n return this._readonly;\n }\n set readonly(value) {\n this._readonly = coerceBooleanProperty(value);\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n ngOnChanges() {\n this.stateChanges.next();\n }\n ngOnDestroy() {\n this.stateChanges.complete();\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n if (this._platform.IOS) {\n this._elementRef.nativeElement.removeEventListener('keyup', this._iOSKeyupListener);\n }\n }\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n /** Focuses the input. */\n focus(options) {\n this._elementRef.nativeElement.focus(options);\n }\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n _dirtyCheckPlaceholder() {\n // If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise\n // screen readers will read it out twice: once from the label and once from the attribute.\n // TODO: can be removed once we get rid of the `legacy` style for the form field, because it's\n // the only one that supports promoting the placeholder to a label.\n const formField = this._formField;\n const placeholder = formField && formField.appearance === 'legacy' && !formField._hasLabel?.()\n ? null\n : this.placeholder;\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder\n ? element.setAttribute('placeholder', placeholder)\n : element.removeAttribute('placeholder');\n }\n }\n /** Does some manual dirty checking on the native input `value` property. */\n _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n /** Make sure the input is a supported type. */\n _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n /** Checks whether the input type is one of the types that are never empty. */\n _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n /** Checks whether the input is invalid based on the native validation. */\n _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = this._elementRef.nativeElement.validity;\n return validity && validity.badInput;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty() {\n return (!this._isNeverEmpty() &&\n !this._elementRef.nativeElement.value &&\n !this._isBadInput() &&\n !this.autofilled);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat() {\n if (this._isNativeSelect) {\n // For a single-selection ``, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement;\n const firstOption = selectElement.options[0];\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return (this.focused ||\n selectElement.multiple ||\n !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label));\n }\n else {\n return this.focused || !this.empty;\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n /** Whether the form control is a native select that is displayed inline. */\n _isInlineSelect() {\n const element = this._elementRef.nativeElement;\n return this._isNativeSelect && (element.multiple || element.size > 1);\n }\n}\nMatInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInput, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MAT_INPUT_VALUE_ACCESSOR, optional: true, self: true }, { token: i4.AutofillMonitor }, { token: i0.NgZone }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatInput, selector: \"input[matInput], textarea[matInput], select[matNativeControl],\\n input[matNativeControl], textarea[matNativeControl]\", inputs: { disabled: \"disabled\", id: \"id\", placeholder: \"placeholder\", name: \"name\", required: \"required\", type: \"type\", errorStateMatcher: \"errorStateMatcher\", userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], value: \"value\", readonly: \"readonly\" }, host: { listeners: { \"focus\": \"_focusChanged(true)\", \"blur\": \"_focusChanged(false)\", \"input\": \"_onInput()\" }, properties: { \"class.mat-input-server\": \"_isServer\", \"attr.id\": \"id\", \"attr.data-placeholder\": \"placeholder\", \"disabled\": \"disabled\", \"required\": \"required\", \"attr.name\": \"name || null\", \"attr.readonly\": \"readonly && !_isNativeSelect || null\", \"class.mat-native-select-inline\": \"_isInlineSelect()\", \"attr.aria-invalid\": \"(empty && required) ? null : errorState\", \"attr.aria-required\": \"required\" }, classAttribute: \"mat-input-element mat-form-field-autofill-control\" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: [\"matInput\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInput, decorators: [{\n type: Directive,\n args: [{\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n // At the time of writing, we have a lot of customer tests that look up the input based on its\n // placeholder. Since we sometimes omit the placeholder attribute from the DOM to prevent screen\n // readers from reading it twice, we have to keep it somewhere in the DOM for the lookup.\n '[attr.data-placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.name]': 'name || null',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[class.mat-native-select-inline]': '_isInlineSelect()',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n '(focus)': '_focusChanged(true)',\n '(blur)': '_focusChanged(false)',\n '(input)': '_onInput()',\n },\n providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i2.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i3.ErrorStateMatcher }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [MAT_INPUT_VALUE_ACCESSOR]\n }] }, { type: i4.AutofillMonitor }, { type: i0.NgZone }, { type: i5.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }]; }, propDecorators: { disabled: [{\n type: Input\n }], id: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], name: [{\n type: Input\n }], required: [{\n type: Input\n }], type: [{\n type: Input\n }], errorStateMatcher: [{\n type: Input\n }], userAriaDescribedBy: [{\n type: Input,\n args: ['aria-describedby']\n }], value: [{\n type: Input\n }], readonly: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatInputModule {\n}\nMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInputModule, declarations: [MatInput], imports: [TextFieldModule, MatFormFieldModule, MatCommonModule], exports: [TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput] });\nMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInputModule, providers: [ErrorStateMatcher], imports: [TextFieldModule, MatFormFieldModule, MatCommonModule, TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatInputModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [MatInput],\n imports: [TextFieldModule, MatFormFieldModule, MatCommonModule],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n ],\n providers: [ErrorStateMatcher],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_INPUT_VALUE_ACCESSOR, MatInput, MatInputModule, getMatInputUnsupportedTypeError };\n","import * as i1 from '@angular/cdk/a11y';\nimport { FocusKeyManager, isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, ESCAPE, hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Input, QueryList, EventEmitter, TemplateRef, ContentChildren, ViewChild, ContentChild, Output, Self, NgModule } from '@angular/core';\nimport { Subject, Subscription, merge, of, asapScheduler } from 'rxjs';\nimport { startWith, switchMap, take, takeUntil, filter, delay } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i3 from '@angular/material/core';\nimport { mixinDisableRipple, mixinDisabled, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport * as i3$1 from '@angular/cdk/bidi';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by the mat-menu component.\n * Animation duration and timing values are based on:\n * https://material.io/guidelines/components/menus.html#menus-usage\n * @docs-private\n */\nconst matMenuAnimations = {\n /**\n * This animation controls the menu panel's entry and exit from the page.\n *\n * When the menu panel is added to the DOM, it scales in and fades in its border.\n *\n * When the menu panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n transformMenu: trigger('transformMenu', [\n state('void', style({\n opacity: 0,\n transform: 'scale(0.8)',\n })),\n transition('void => enter', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({\n opacity: 1,\n transform: 'scale(1)',\n }))),\n transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 }))),\n ]),\n /**\n * This animation fades in the background color and content of the menu panel\n * after its containing element is scaled in.\n */\n fadeInItems: trigger('fadeInItems', [\n // TODO(crisbeto): this is inside the `transformMenu`\n // now. Remove next time we do breaking changes.\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n ]),\n ]),\n};\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nconst fadeInItems = matMenuAnimations.fadeInItems;\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nconst transformMenu = matMenuAnimations.transformMenu;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `MatMenuContent`. It serves\n * as alternative token to the actual `MatMenuContent` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_MENU_CONTENT = new InjectionToken('MatMenuContent');\nclass _MatMenuContentBase {\n constructor(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {\n this._template = _template;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._injector = _injector;\n this._viewContainerRef = _viewContainerRef;\n this._document = _document;\n this._changeDetectorRef = _changeDetectorRef;\n /** Emits when the menu content has been attached. */\n this._attached = new Subject();\n }\n /**\n * Attaches the content with a particular context.\n * @docs-private\n */\n attach(context = {}) {\n if (!this._portal) {\n this._portal = new TemplatePortal(this._template, this._viewContainerRef);\n }\n this.detach();\n if (!this._outlet) {\n this._outlet = new DomPortalOutlet(this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);\n }\n const element = this._template.elementRef.nativeElement;\n // Because we support opening the same menu from different triggers (which in turn have their\n // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we\n // risk it staying attached to a pane that's no longer in the DOM.\n element.parentNode.insertBefore(this._outlet.outletElement, element);\n // When `MatMenuContent` is used in an `OnPush` component, the insertion of the menu\n // content via `createEmbeddedView` does not cause the content to be seen as \"dirty\"\n // by Angular. This causes the `@ContentChildren` for menu items within the menu to\n // not be updated by Angular. By explicitly marking for check here, we tell Angular that\n // it needs to check for new menu items and update the `@ContentChild` in `MatMenu`.\n // @breaking-change 9.0.0 Make change detector ref required\n this._changeDetectorRef?.markForCheck();\n this._portal.attach(this._outlet, context);\n this._attached.next();\n }\n /**\n * Detaches the content.\n * @docs-private\n */\n detach() {\n if (this._portal.isAttached) {\n this._portal.detach();\n }\n }\n ngOnDestroy() {\n if (this._outlet) {\n this._outlet.dispose();\n }\n }\n}\n_MatMenuContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuContentBase, deps: [{ token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatMenuContentBase, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuContentBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }]; } });\n/**\n * Menu content that will be rendered lazily once the menu is opened.\n */\nclass MatMenuContent extends _MatMenuContentBase {\n}\nMatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatMenuContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMenuContent, selector: \"ng-template[matMenuContent]\", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuContent, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[matMenuContent]',\n providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Throws an exception for the case when menu's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * @docs-private\n */\nfunction throwMatMenuInvalidPositionX() {\n throw Error(`xPosition value must be either 'before' or after'.\n Example: `);\n}\n/**\n * Throws an exception for the case when menu's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * @docs-private\n */\nfunction throwMatMenuInvalidPositionY() {\n throw Error(`yPosition value must be either 'above' or below'.\n Example: `);\n}\n/**\n * Throws an exception for the case when a menu is assigned\n * to a trigger that is placed inside the same menu.\n * @docs-private\n */\nfunction throwMatMenuRecursiveError() {\n throw Error(`matMenuTriggerFor: menu cannot contain its own trigger. Assign a menu that is ` +\n `not a parent of the trigger or move the trigger outside of the menu.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token used to provide the parent menu to menu-specific components.\n * @docs-private\n */\nconst MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatMenuItem.\n/** @docs-private */\nconst _MatMenuItemBase = mixinDisableRipple(mixinDisabled(class {\n}));\n/**\n * Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.\n */\nclass MatMenuItem extends _MatMenuItemBase {\n constructor(_elementRef, _document, _focusMonitor, _parentMenu, _changeDetectorRef) {\n super();\n this._elementRef = _elementRef;\n this._document = _document;\n this._focusMonitor = _focusMonitor;\n this._parentMenu = _parentMenu;\n this._changeDetectorRef = _changeDetectorRef;\n /** ARIA role for the menu item. */\n this.role = 'menuitem';\n /** Stream that emits when the menu item is hovered. */\n this._hovered = new Subject();\n /** Stream that emits when the menu item is focused. */\n this._focused = new Subject();\n /** Whether the menu item is highlighted. */\n this._highlighted = false;\n /** Whether the menu item acts as a trigger for a sub-menu. */\n this._triggersSubmenu = false;\n _parentMenu?.addItem?.(this);\n }\n /** Focuses the menu item. */\n focus(origin, options) {\n if (this._focusMonitor && origin) {\n this._focusMonitor.focusVia(this._getHostElement(), origin, options);\n }\n else {\n this._getHostElement().focus(options);\n }\n this._focused.next(this);\n }\n ngAfterViewInit() {\n if (this._focusMonitor) {\n // Start monitoring the element so it gets the appropriate focused classes. We want\n // to show the focus style for menu items only when the focus was not caused by a\n // mouse or touch interaction.\n this._focusMonitor.monitor(this._elementRef, false);\n }\n }\n ngOnDestroy() {\n if (this._focusMonitor) {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n if (this._parentMenu && this._parentMenu.removeItem) {\n this._parentMenu.removeItem(this);\n }\n this._hovered.complete();\n this._focused.complete();\n }\n /** Used to set the `tabindex`. */\n _getTabIndex() {\n return this.disabled ? '-1' : '0';\n }\n /** Returns the host DOM element. */\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n /** Prevents the default element actions if it is disabled. */\n _checkDisabled(event) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n /** Emits to the hover stream. */\n _handleMouseEnter() {\n this._hovered.next(this);\n }\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel() {\n const clone = this._elementRef.nativeElement.cloneNode(true);\n const icons = clone.querySelectorAll('mat-icon, .material-icons');\n // Strip away icons so they don't show up in the text.\n for (let i = 0; i < icons.length; i++) {\n icons[i].remove();\n }\n return clone.textContent?.trim() || '';\n }\n _setHighlighted(isHighlighted) {\n // We need to mark this for check for the case where the content is coming from a\n // `matMenuContent` whose change detection tree is at the declaration position,\n // not the insertion position. See #23175.\n // @breaking-change 12.0.0 Remove null check for `_changeDetectorRef`.\n this._highlighted = isHighlighted;\n this._changeDetectorRef?.markForCheck();\n }\n _hasFocus() {\n return this._document && this._document.activeElement === this._getHostElement();\n }\n}\nMatMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuItem, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i1.FocusMonitor }, { token: MAT_MENU_PANEL, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMenuItem, selector: \"[mat-menu-item]\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", role: \"role\" }, host: { listeners: { \"click\": \"_checkDisabled($event)\", \"mouseenter\": \"_handleMouseEnter()\" }, properties: { \"attr.role\": \"role\", \"class.mat-menu-item\": \"true\", \"class.mat-menu-item-highlighted\": \"_highlighted\", \"class.mat-menu-item-submenu-trigger\": \"_triggersSubmenu\", \"attr.tabindex\": \"_getTabIndex()\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.disabled\": \"disabled || null\" }, classAttribute: \"mat-focus-indicator\" }, exportAs: [\"matMenuItem\"], usesInheritance: true, ngImport: i0, template: \"\\n
      \\n
      \\n\\n\\n\", dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuItem, decorators: [{\n type: Component,\n args: [{ selector: '[mat-menu-item]', exportAs: 'matMenuItem', inputs: ['disabled', 'disableRipple'], host: {\n '[attr.role]': 'role',\n '[class.mat-menu-item]': 'true',\n '[class.mat-menu-item-highlighted]': '_highlighted',\n '[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.disabled]': 'disabled || null',\n 'class': 'mat-focus-indicator',\n '(click)': '_checkDisabled($event)',\n '(mouseenter)': '_handleMouseEnter()',\n }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: \"\\n
      \\n
      \\n\\n\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_PANEL]\n }, {\n type: Optional\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { role: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-menu`. */\nconst MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options', {\n providedIn: 'root',\n factory: MAT_MENU_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_MENU_DEFAULT_OPTIONS_FACTORY() {\n return {\n overlapTrigger: false,\n xPosition: 'after',\n yPosition: 'below',\n backdropClass: 'cdk-overlay-transparent-backdrop',\n };\n}\nlet menuPanelUid = 0;\n/** Base class with all of the `MatMenu` functionality. */\nclass _MatMenuBase {\n constructor(_elementRef, _ngZone, _defaultOptions, \n // @breaking-change 15.0.0 `_changeDetectorRef` to become a required parameter.\n _changeDetectorRef) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n this._changeDetectorRef = _changeDetectorRef;\n this._xPosition = this._defaultOptions.xPosition;\n this._yPosition = this._defaultOptions.yPosition;\n /** Only the direct descendant menu items. */\n this._directDescendantItems = new QueryList();\n /** Subscription to tab events on the menu panel */\n this._tabSubscription = Subscription.EMPTY;\n /** Config object to be passed into the menu's ngClass */\n this._classList = {};\n /** Current state of the panel animation. */\n this._panelAnimationState = 'void';\n /** Emits whenever an animation on the menu completes. */\n this._animationDone = new Subject();\n /** Class or list of classes to be added to the overlay panel. */\n this.overlayPanelClass = this._defaultOptions.overlayPanelClass || '';\n /** Class to be added to the backdrop element. */\n this.backdropClass = this._defaultOptions.backdropClass;\n this._overlapTrigger = this._defaultOptions.overlapTrigger;\n this._hasBackdrop = this._defaultOptions.hasBackdrop;\n /** Event emitted when the menu is closed. */\n this.closed = new EventEmitter();\n /**\n * Event emitted when the menu is closed.\n * @deprecated Switch to `closed` instead\n * @breaking-change 8.0.0\n */\n this.close = this.closed;\n this.panelId = `mat-menu-panel-${menuPanelUid++}`;\n }\n /** Position of the menu in the X axis. */\n get xPosition() {\n return this._xPosition;\n }\n set xPosition(value) {\n if (value !== 'before' &&\n value !== 'after' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuInvalidPositionX();\n }\n this._xPosition = value;\n this.setPositionClasses();\n }\n /** Position of the menu in the Y axis. */\n get yPosition() {\n return this._yPosition;\n }\n set yPosition(value) {\n if (value !== 'above' && value !== 'below' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuInvalidPositionY();\n }\n this._yPosition = value;\n this.setPositionClasses();\n }\n /** Whether the menu should overlap its trigger. */\n get overlapTrigger() {\n return this._overlapTrigger;\n }\n set overlapTrigger(value) {\n this._overlapTrigger = coerceBooleanProperty(value);\n }\n /** Whether the menu has a backdrop. */\n get hasBackdrop() {\n return this._hasBackdrop;\n }\n set hasBackdrop(value) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @param classes list of class names\n */\n set panelClass(classes) {\n const previousPanelClass = this._previousPanelClass;\n if (previousPanelClass && previousPanelClass.length) {\n previousPanelClass.split(' ').forEach((className) => {\n this._classList[className] = false;\n });\n }\n this._previousPanelClass = classes;\n if (classes && classes.length) {\n classes.split(' ').forEach((className) => {\n this._classList[className] = true;\n });\n this._elementRef.nativeElement.className = '';\n }\n }\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @deprecated Use `panelClass` instead.\n * @breaking-change 8.0.0\n */\n get classList() {\n return this.panelClass;\n }\n set classList(classes) {\n this.panelClass = classes;\n }\n ngOnInit() {\n this.setPositionClasses();\n }\n ngAfterContentInit() {\n this._updateDirectDescendants();\n this._keyManager = new FocusKeyManager(this._directDescendantItems)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd();\n this._tabSubscription = this._keyManager.tabOut.subscribe(() => this.closed.emit('tab'));\n // If a user manually (programmatically) focuses a menu item, we need to reflect that focus\n // change back to the key manager. Note that we don't need to unsubscribe here because _focused\n // is internal and we know that it gets completed on destroy.\n this._directDescendantItems.changes\n .pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._focused))))\n .subscribe(focusedItem => this._keyManager.updateActiveItem(focusedItem));\n this._directDescendantItems.changes.subscribe((itemsList) => {\n // Move focus to another item, if the active item is removed from the list.\n // We need to debounce the callback, because multiple items might be removed\n // in quick succession.\n const manager = this._keyManager;\n if (this._panelAnimationState === 'enter' && manager.activeItem?._hasFocus()) {\n const items = itemsList.toArray();\n const index = Math.max(0, Math.min(items.length - 1, manager.activeItemIndex || 0));\n if (items[index] && !items[index].disabled) {\n manager.setActiveItem(index);\n }\n else {\n manager.setNextItemActive();\n }\n }\n });\n }\n ngOnDestroy() {\n this._directDescendantItems.destroy();\n this._tabSubscription.unsubscribe();\n this.closed.complete();\n }\n /** Stream that emits whenever the hovered menu item changes. */\n _hovered() {\n // Coerce the `changes` property because Angular types it as `Observable`\n const itemChanges = this._directDescendantItems.changes;\n return itemChanges.pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._hovered))));\n }\n /*\n * Registers a menu item with the menu.\n * @docs-private\n * @deprecated No longer being used. To be removed.\n * @breaking-change 9.0.0\n */\n addItem(_item) { }\n /**\n * Removes an item from the menu.\n * @docs-private\n * @deprecated No longer being used. To be removed.\n * @breaking-change 9.0.0\n */\n removeItem(_item) { }\n /** Handle a keyboard event from the menu, delegating to the appropriate action. */\n _handleKeydown(event) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n switch (keyCode) {\n case ESCAPE:\n if (!hasModifierKey(event)) {\n event.preventDefault();\n this.closed.emit('keydown');\n }\n break;\n case LEFT_ARROW:\n if (this.parentMenu && this.direction === 'ltr') {\n this.closed.emit('keydown');\n }\n break;\n case RIGHT_ARROW:\n if (this.parentMenu && this.direction === 'rtl') {\n this.closed.emit('keydown');\n }\n break;\n default:\n if (keyCode === UP_ARROW || keyCode === DOWN_ARROW) {\n manager.setFocusOrigin('keyboard');\n }\n manager.onKeydown(event);\n return;\n }\n // Don't allow the event to propagate if we've already handled it, or it may\n // end up reaching other overlays that were opened earlier (see #22694).\n event.stopPropagation();\n }\n /**\n * Focus the first item in the menu.\n * @param origin Action from which the focus originated. Used to set the correct styling.\n */\n focusFirstItem(origin = 'program') {\n // Wait for `onStable` to ensure iOS VoiceOver screen reader focuses the first item (#24735).\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n let menuPanel = null;\n if (this._directDescendantItems.length) {\n // Because the `mat-menuPanel` is at the DOM insertion point, not inside the overlay, we don't\n // have a nice way of getting a hold of the menuPanel panel. We can't use a `ViewChild` either\n // because the panel is inside an `ng-template`. We work around it by starting from one of\n // the items and walking up the DOM.\n menuPanel = this._directDescendantItems.first._getHostElement().closest('[role=\"menu\"]');\n }\n // If an item in the menuPanel is already focused, avoid overriding the focus.\n if (!menuPanel || !menuPanel.contains(document.activeElement)) {\n const manager = this._keyManager;\n manager.setFocusOrigin(origin).setFirstItemActive();\n // If there's no active item at this point, it means that all the items are disabled.\n // Move focus to the menuPanel panel so keyboard events like Escape still work. Also this will\n // give _some_ feedback to screen readers.\n if (!manager.activeItem && menuPanel) {\n menuPanel.focus();\n }\n }\n });\n }\n /**\n * Resets the active item in the menu. This is used when the menu is opened, allowing\n * the user to start from the first option when pressing the down arrow.\n */\n resetActiveItem() {\n this._keyManager.setActiveItem(-1);\n }\n /**\n * Sets the menu panel elevation.\n * @param depth Number of parent menus that come before the menu.\n */\n setElevation(depth) {\n // The elevation starts at the base and increases by one for each level.\n // Capped at 24 because that's the maximum elevation defined in the Material design spec.\n const elevation = Math.min(this._baseElevation + depth, 24);\n const newElevation = `${this._elevationPrefix}${elevation}`;\n const customElevation = Object.keys(this._classList).find(className => {\n return className.startsWith(this._elevationPrefix);\n });\n if (!customElevation || customElevation === this._previousElevation) {\n if (this._previousElevation) {\n this._classList[this._previousElevation] = false;\n }\n this._classList[newElevation] = true;\n this._previousElevation = newElevation;\n }\n }\n /**\n * Adds classes to the menu panel based on its position. Can be used by\n * consumers to add specific styling based on the position.\n * @param posX Position of the menu along the x axis.\n * @param posY Position of the menu along the y axis.\n * @docs-private\n */\n setPositionClasses(posX = this.xPosition, posY = this.yPosition) {\n const classes = this._classList;\n classes['mat-menu-before'] = posX === 'before';\n classes['mat-menu-after'] = posX === 'after';\n classes['mat-menu-above'] = posY === 'above';\n classes['mat-menu-below'] = posY === 'below';\n // @breaking-change 15.0.0 Remove null check for `_changeDetectorRef`.\n this._changeDetectorRef?.markForCheck();\n }\n /** Starts the enter animation. */\n _startAnimation() {\n // @breaking-change 8.0.0 Combine with _resetAnimation.\n this._panelAnimationState = 'enter';\n }\n /** Resets the panel animation to its initial state. */\n _resetAnimation() {\n // @breaking-change 8.0.0 Combine with _startAnimation.\n this._panelAnimationState = 'void';\n }\n /** Callback that is invoked when the panel animation completes. */\n _onAnimationDone(event) {\n this._animationDone.next(event);\n this._isAnimating = false;\n }\n _onAnimationStart(event) {\n this._isAnimating = true;\n // Scroll the content element to the top as soon as the animation starts. This is necessary,\n // because we move focus to the first item while it's still being animated, which can throw\n // the browser off when it determines the scroll position. Alternatively we can move focus\n // when the animation is done, however moving focus asynchronously will interrupt screen\n // readers which are in the process of reading out the menu already. We take the `element`\n // from the `event` since we can't use a `ViewChild` to access the pane.\n if (event.toState === 'enter' && this._keyManager.activeItemIndex === 0) {\n event.element.scrollTop = 0;\n }\n }\n /**\n * Sets up a stream that will keep track of any newly-added menu items and will update the list\n * of direct descendants. We collect the descendants this way, because `_allItems` can include\n * items that are part of child menus, and using a custom way of registering items is unreliable\n * when it comes to maintaining the item order.\n */\n _updateDirectDescendants() {\n this._allItems.changes\n .pipe(startWith(this._allItems))\n .subscribe((items) => {\n this._directDescendantItems.reset(items.filter(item => item._parentMenu === this));\n this._directDescendantItems.notifyOnChanges();\n });\n }\n}\n_MatMenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuBase, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatMenuBase, inputs: { backdropClass: \"backdropClass\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], xPosition: \"xPosition\", yPosition: \"yPosition\", overlapTrigger: \"overlapTrigger\", hasBackdrop: \"hasBackdrop\", panelClass: [\"class\", \"panelClass\"], classList: \"classList\" }, outputs: { closed: \"closed\", close: \"close\" }, queries: [{ propertyName: \"lazyContent\", first: true, predicate: MAT_MENU_CONTENT, descendants: true }, { propertyName: \"_allItems\", predicate: MatMenuItem, descendants: true }, { propertyName: \"items\", predicate: MatMenuItem }], viewQueries: [{ propertyName: \"templateRef\", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_DEFAULT_OPTIONS]\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _allItems: [{\n type: ContentChildren,\n args: [MatMenuItem, { descendants: true }]\n }], backdropClass: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], xPosition: [{\n type: Input\n }], yPosition: [{\n type: Input\n }], templateRef: [{\n type: ViewChild,\n args: [TemplateRef]\n }], items: [{\n type: ContentChildren,\n args: [MatMenuItem, { descendants: false }]\n }], lazyContent: [{\n type: ContentChild,\n args: [MAT_MENU_CONTENT]\n }], overlapTrigger: [{\n type: Input\n }], hasBackdrop: [{\n type: Input\n }], panelClass: [{\n type: Input,\n args: ['class']\n }], classList: [{\n type: Input\n }], closed: [{\n type: Output\n }], close: [{\n type: Output\n }] } });\n/** @docs-public MatMenu */\nclass MatMenu extends _MatMenuBase {\n constructor(elementRef, ngZone, defaultOptions, changeDetectorRef) {\n super(elementRef, ngZone, defaultOptions, changeDetectorRef);\n this._elevationPrefix = 'mat-elevation-z';\n this._baseElevation = 4;\n }\n}\nMatMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenu, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMenu, selector: \"mat-menu\", host: { properties: { \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.aria-describedby\": \"null\" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], exportAs: [\"matMenu\"], usesInheritance: true, ngImport: i0, template: \"\\n \\n
      \\n \\n
      \\n \\n
      \\n\", styles: [\"mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]::after{display:block;position:absolute;content:\\\"\\\";top:0;left:0;bottom:0;right:0}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\"], dependencies: [{ kind: \"directive\", type: i2.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenu, decorators: [{\n type: Component,\n args: [{ selector: 'mat-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: {\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n }, animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], template: \"\\n \\n
      \\n \\n
      \\n \\n
      \\n\", styles: [\"mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]::after{display:block;position:absolute;content:\\\"\\\";top:0;left:0;bottom:0;right:0}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_DEFAULT_OPTIONS]\n }] }, { type: i0.ChangeDetectorRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that determines the scroll handling while the menu is open. */\nconst MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');\n/** @docs-private */\nfunction MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_MENU_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,\n};\n/**\n * Default top padding of the menu panel.\n * @deprecated No longer being used. Will be removed.\n * @breaking-change 15.0.0\n */\nconst MENU_PANEL_TOP_PADDING = 8;\n/** Options for binding a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });\n// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors\nclass _MatMenuTriggerBase {\n constructor(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu, \n // `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.\n // tslint:disable-next-line: lightweight-tokens\n _menuItemInstance, _dir, _focusMonitor, _ngZone) {\n this._overlay = _overlay;\n this._element = _element;\n this._viewContainerRef = _viewContainerRef;\n this._menuItemInstance = _menuItemInstance;\n this._dir = _dir;\n this._focusMonitor = _focusMonitor;\n this._ngZone = _ngZone;\n this._overlayRef = null;\n this._menuOpen = false;\n this._closingActionsSubscription = Subscription.EMPTY;\n this._hoverSubscription = Subscription.EMPTY;\n this._menuCloseSubscription = Subscription.EMPTY;\n /**\n * Handles touch start events on the trigger.\n * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.\n */\n this._handleTouchStart = (event) => {\n if (!isFakeTouchstartFromScreenReader(event)) {\n this._openedBy = 'touch';\n }\n };\n // Tracking input type is necessary so it's possible to only auto-focus\n // the first item of the list when the menu is opened via the keyboard\n this._openedBy = undefined;\n /**\n * Whether focus should be restored when the menu is closed.\n * Note that disabling this option can have accessibility implications\n * and it's up to you to manage focus, if you decide to turn it off.\n */\n this.restoreFocus = true;\n /** Event emitted when the associated menu is opened. */\n this.menuOpened = new EventEmitter();\n /**\n * Event emitted when the associated menu is opened.\n * @deprecated Switch to `menuOpened` instead\n * @breaking-change 8.0.0\n */\n // tslint:disable-next-line:no-output-on-prefix\n this.onMenuOpen = this.menuOpened;\n /** Event emitted when the associated menu is closed. */\n this.menuClosed = new EventEmitter();\n /**\n * Event emitted when the associated menu is closed.\n * @deprecated Switch to `menuClosed` instead\n * @breaking-change 8.0.0\n */\n // tslint:disable-next-line:no-output-on-prefix\n this.onMenuClose = this.menuClosed;\n this._scrollStrategy = scrollStrategy;\n this._parentMaterialMenu = parentMenu instanceof _MatMenuBase ? parentMenu : undefined;\n _element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);\n if (_menuItemInstance) {\n _menuItemInstance._triggersSubmenu = this.triggersSubmenu();\n }\n }\n /**\n * @deprecated\n * @breaking-change 8.0.0\n */\n get _deprecatedMatMenuTriggerFor() {\n return this.menu;\n }\n set _deprecatedMatMenuTriggerFor(v) {\n this.menu = v;\n }\n /** References the menu instance that the trigger is associated with. */\n get menu() {\n return this._menu;\n }\n set menu(menu) {\n if (menu === this._menu) {\n return;\n }\n this._menu = menu;\n this._menuCloseSubscription.unsubscribe();\n if (menu) {\n if (menu === this._parentMaterialMenu && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuRecursiveError();\n }\n this._menuCloseSubscription = menu.close.subscribe((reason) => {\n this._destroyMenu(reason);\n // If a click closed the menu, we should close the entire chain of nested menus.\n if ((reason === 'click' || reason === 'tab') && this._parentMaterialMenu) {\n this._parentMaterialMenu.closed.emit(reason);\n }\n });\n }\n }\n ngAfterContentInit() {\n this._handleHover();\n }\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._element.nativeElement.removeEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);\n this._menuCloseSubscription.unsubscribe();\n this._closingActionsSubscription.unsubscribe();\n this._hoverSubscription.unsubscribe();\n }\n /** Whether the menu is open. */\n get menuOpen() {\n return this._menuOpen;\n }\n /** The text direction of the containing app. */\n get dir() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Whether the menu triggers a sub-menu or a top-level one. */\n triggersSubmenu() {\n return !!(this._menuItemInstance && this._parentMaterialMenu);\n }\n /** Toggles the menu between the open and closed states. */\n toggleMenu() {\n return this._menuOpen ? this.closeMenu() : this.openMenu();\n }\n /** Opens the menu. */\n openMenu() {\n const menu = this.menu;\n if (this._menuOpen || !menu) {\n return;\n }\n const overlayRef = this._createOverlay(menu);\n const overlayConfig = overlayRef.getConfig();\n const positionStrategy = overlayConfig.positionStrategy;\n this._setPosition(menu, positionStrategy);\n overlayConfig.hasBackdrop =\n menu.hasBackdrop == null ? !this.triggersSubmenu() : menu.hasBackdrop;\n overlayRef.attach(this._getPortal(menu));\n if (menu.lazyContent) {\n menu.lazyContent.attach(this.menuData);\n }\n this._closingActionsSubscription = this._menuClosingActions().subscribe(() => this.closeMenu());\n this._initMenu(menu);\n if (menu instanceof _MatMenuBase) {\n menu._startAnimation();\n menu._directDescendantItems.changes.pipe(takeUntil(menu.close)).subscribe(() => {\n // Re-adjust the position without locking when the amount of items\n // changes so that the overlay is allowed to pick a new optimal position.\n positionStrategy.withLockedPosition(false).reapplyLastPosition();\n positionStrategy.withLockedPosition(true);\n });\n }\n }\n /** Closes the menu. */\n closeMenu() {\n this.menu?.close.emit();\n }\n /**\n * Focuses the menu trigger.\n * @param origin Source of the menu trigger's focus.\n */\n focus(origin, options) {\n if (this._focusMonitor && origin) {\n this._focusMonitor.focusVia(this._element, origin, options);\n }\n else {\n this._element.nativeElement.focus(options);\n }\n }\n /**\n * Updates the position of the menu to ensure that it fits all options within the viewport.\n */\n updatePosition() {\n this._overlayRef?.updatePosition();\n }\n /** Closes the menu and does the necessary cleanup. */\n _destroyMenu(reason) {\n if (!this._overlayRef || !this.menuOpen) {\n return;\n }\n const menu = this.menu;\n this._closingActionsSubscription.unsubscribe();\n this._overlayRef.detach();\n // Always restore focus if the user is navigating using the keyboard or the menu was opened\n // programmatically. We don't restore for non-root triggers, because it can prevent focus\n // from making it back to the root trigger when closing a long chain of menus by clicking\n // on the backdrop.\n if (this.restoreFocus && (reason === 'keydown' || !this._openedBy || !this.triggersSubmenu())) {\n this.focus(this._openedBy);\n }\n this._openedBy = undefined;\n if (menu instanceof _MatMenuBase) {\n menu._resetAnimation();\n if (menu.lazyContent) {\n // Wait for the exit animation to finish before detaching the content.\n menu._animationDone\n .pipe(filter(event => event.toState === 'void'), take(1), \n // Interrupt if the content got re-attached.\n takeUntil(menu.lazyContent._attached))\n .subscribe({\n next: () => menu.lazyContent.detach(),\n // No matter whether the content got re-attached, reset the menu.\n complete: () => this._setIsMenuOpen(false),\n });\n }\n else {\n this._setIsMenuOpen(false);\n }\n }\n else {\n this._setIsMenuOpen(false);\n menu?.lazyContent?.detach();\n }\n }\n /**\n * This method sets the menu state to open and focuses the first item if\n * the menu was opened via the keyboard.\n */\n _initMenu(menu) {\n menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;\n menu.direction = this.dir;\n this._setMenuElevation(menu);\n menu.focusFirstItem(this._openedBy || 'program');\n this._setIsMenuOpen(true);\n }\n /** Updates the menu elevation based on the amount of parent menus that it has. */\n _setMenuElevation(menu) {\n if (menu.setElevation) {\n let depth = 0;\n let parentMenu = menu.parentMenu;\n while (parentMenu) {\n depth++;\n parentMenu = parentMenu.parentMenu;\n }\n menu.setElevation(depth);\n }\n }\n // set state rather than toggle to support triggers sharing a menu\n _setIsMenuOpen(isOpen) {\n this._menuOpen = isOpen;\n this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();\n if (this.triggersSubmenu()) {\n this._menuItemInstance._setHighlighted(isOpen);\n }\n }\n /**\n * This method creates the overlay from the provided menu's template and saves its\n * OverlayRef so that it can be attached to the DOM when openMenu is called.\n */\n _createOverlay(menu) {\n if (!this._overlayRef) {\n const config = this._getOverlayConfig(menu);\n this._subscribeToPositions(menu, config.positionStrategy);\n this._overlayRef = this._overlay.create(config);\n // Consume the `keydownEvents` in order to prevent them from going to another overlay.\n // Ideally we'd also have our keyboard event logic in here, however doing so will\n // break anybody that may have implemented the `MatMenuPanel` themselves.\n this._overlayRef.keydownEvents().subscribe();\n }\n return this._overlayRef;\n }\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @returns OverlayConfig\n */\n _getOverlayConfig(menu) {\n return new OverlayConfig({\n positionStrategy: this._overlay\n .position()\n .flexibleConnectedTo(this._element)\n .withLockedPosition()\n .withGrowAfterOpen()\n .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),\n backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',\n panelClass: menu.overlayPanelClass,\n scrollStrategy: this._scrollStrategy(),\n direction: this._dir,\n });\n }\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the menu based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n */\n _subscribeToPositions(menu, position) {\n if (menu.setPositionClasses) {\n position.positionChanges.subscribe(change => {\n const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';\n const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n // @breaking-change 15.0.0 Remove null check for `ngZone`.\n // `positionChanges` fires outside of the `ngZone` and `setPositionClasses` might be\n // updating something in the view so we need to bring it back in.\n if (this._ngZone) {\n this._ngZone.run(() => menu.setPositionClasses(posX, posY));\n }\n else {\n menu.setPositionClasses(posX, posY);\n }\n });\n }\n }\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n _setPosition(menu, positionStrategy) {\n let [originX, originFallbackX] = menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];\n let [overlayY, overlayFallbackY] = menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];\n let [originY, originFallbackY] = [overlayY, overlayFallbackY];\n let [overlayX, overlayFallbackX] = [originX, originFallbackX];\n let offsetY = 0;\n if (this.triggersSubmenu()) {\n // When the menu is a sub-menu, it should always align itself\n // to the edges of the trigger, instead of overlapping it.\n overlayFallbackX = originX = menu.xPosition === 'before' ? 'start' : 'end';\n originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';\n if (this._parentMaterialMenu) {\n if (this._parentInnerPadding == null) {\n const firstItem = this._parentMaterialMenu.items.first;\n this._parentInnerPadding = firstItem ? firstItem._getHostElement().offsetTop : 0;\n }\n offsetY = overlayY === 'bottom' ? this._parentInnerPadding : -this._parentInnerPadding;\n }\n }\n else if (!menu.overlapTrigger) {\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY },\n { originX: originFallbackX, originY, overlayX: overlayFallbackX, overlayY, offsetY },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n ]);\n }\n /** Returns a stream that emits whenever an action that should close the menu occurs. */\n _menuClosingActions() {\n const backdrop = this._overlayRef.backdropClick();\n const detachments = this._overlayRef.detachments();\n const parentClose = this._parentMaterialMenu ? this._parentMaterialMenu.closed : of();\n const hover = this._parentMaterialMenu\n ? this._parentMaterialMenu._hovered().pipe(filter(active => active !== this._menuItemInstance), filter(() => this._menuOpen))\n : of();\n return merge(backdrop, parentClose, hover, detachments);\n }\n /** Handles mouse presses on the trigger. */\n _handleMousedown(event) {\n if (!isFakeMousedownFromScreenReader(event)) {\n // Since right or middle button clicks won't trigger the `click` event,\n // we shouldn't consider the menu as opened by mouse in those cases.\n this._openedBy = event.button === 0 ? 'mouse' : undefined;\n // Since clicking on the trigger won't close the menu if it opens a sub-menu,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the menu item.\n if (this.triggersSubmenu()) {\n event.preventDefault();\n }\n }\n }\n /** Handles key presses on the trigger. */\n _handleKeydown(event) {\n const keyCode = event.keyCode;\n // Pressing enter on the trigger will trigger the click handler later.\n if (keyCode === ENTER || keyCode === SPACE) {\n this._openedBy = 'keyboard';\n }\n if (this.triggersSubmenu() &&\n ((keyCode === RIGHT_ARROW && this.dir === 'ltr') ||\n (keyCode === LEFT_ARROW && this.dir === 'rtl'))) {\n this._openedBy = 'keyboard';\n this.openMenu();\n }\n }\n /** Handles click events on the trigger. */\n _handleClick(event) {\n if (this.triggersSubmenu()) {\n // Stop event propagation to avoid closing the parent menu.\n event.stopPropagation();\n this.openMenu();\n }\n else {\n this.toggleMenu();\n }\n }\n /** Handles the cases where the user hovers over the trigger. */\n _handleHover() {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n if (!this.triggersSubmenu() || !this._parentMaterialMenu) {\n return;\n }\n this._hoverSubscription = this._parentMaterialMenu\n ._hovered()\n // Since we might have multiple competing triggers for the same menu (e.g. a sub-menu\n // with different data and triggers), we have to delay it by a tick to ensure that\n // it won't be closed immediately after it is opened.\n .pipe(filter(active => active === this._menuItemInstance && !active.disabled), delay(0, asapScheduler))\n .subscribe(() => {\n this._openedBy = 'mouse';\n // If the same menu is used between multiple triggers, it might still be animating\n // while the new trigger tries to re-open it. Wait for the animation to finish\n // before doing so. Also interrupt if the user moves to another item.\n if (this.menu instanceof _MatMenuBase && this.menu._isAnimating) {\n // We need the `delay(0)` here in order to avoid\n // 'changed after checked' errors in some cases. See #12194.\n this.menu._animationDone\n .pipe(take(1), delay(0, asapScheduler), takeUntil(this._parentMaterialMenu._hovered()))\n .subscribe(() => this.openMenu());\n }\n else {\n this.openMenu();\n }\n });\n }\n /** Gets the portal that should be attached to the overlay. */\n _getPortal(menu) {\n // Note that we can avoid this check by keeping the portal on the menu panel.\n // While it would be cleaner, we'd have to introduce another required method on\n // `MatMenuPanel`, making it harder to consume.\n if (!this._portal || this._portal.templateRef !== menu.templateRef) {\n this._portal = new TemplatePortal(menu.templateRef, this._viewContainerRef);\n }\n return this._portal;\n }\n}\n_MatMenuTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuTriggerBase, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: MAT_MENU_SCROLL_STRATEGY }, { token: MAT_MENU_PANEL, optional: true }, { token: MatMenuItem, optional: true, self: true }, { token: i3$1.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatMenuTriggerBase, inputs: { _deprecatedMatMenuTriggerFor: [\"mat-menu-trigger-for\", \"_deprecatedMatMenuTriggerFor\"], menu: [\"matMenuTriggerFor\", \"menu\"], menuData: [\"matMenuTriggerData\", \"menuData\"], restoreFocus: [\"matMenuTriggerRestoreFocus\", \"restoreFocus\"] }, outputs: { menuOpened: \"menuOpened\", onMenuOpen: \"onMenuOpen\", menuClosed: \"menuClosed\", onMenuClose: \"onMenuClose\" }, host: { listeners: { \"click\": \"_handleClick($event)\", \"mousedown\": \"_handleMousedown($event)\", \"keydown\": \"_handleKeydown($event)\" }, properties: { \"attr.aria-haspopup\": \"menu ? \\\"menu\\\" : null\", \"attr.aria-expanded\": \"menuOpen || null\", \"attr.aria-controls\": \"menuOpen ? menu.panelId : null\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{\n type: Directive,\n args: [{\n host: {\n '[attr.aria-haspopup]': 'menu ? \"menu\" : null',\n '[attr.aria-expanded]': 'menuOpen || null',\n '[attr.aria-controls]': 'menuOpen ? menu.panelId : null',\n '(click)': '_handleClick($event)',\n '(mousedown)': '_handleMousedown($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n }]\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_SCROLL_STRATEGY]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_PANEL]\n }, {\n type: Optional\n }] }, { type: MatMenuItem, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i3$1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { _deprecatedMatMenuTriggerFor: [{\n type: Input,\n args: ['mat-menu-trigger-for']\n }], menu: [{\n type: Input,\n args: ['matMenuTriggerFor']\n }], menuData: [{\n type: Input,\n args: ['matMenuTriggerData']\n }], restoreFocus: [{\n type: Input,\n args: ['matMenuTriggerRestoreFocus']\n }], menuOpened: [{\n type: Output\n }], onMenuOpen: [{\n type: Output\n }], menuClosed: [{\n type: Output\n }], onMenuClose: [{\n type: Output\n }] } });\n/** Directive applied to an element that should trigger a `mat-menu`. */\nclass MatMenuTrigger extends _MatMenuTriggerBase {\n}\nMatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatMenuTrigger, selector: \"[mat-menu-trigger-for], [matMenuTriggerFor]\", host: { classAttribute: \"mat-menu-trigger\" }, exportAs: [\"matMenuTrigger\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuTrigger, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,\n host: {\n 'class': 'mat-menu-trigger',\n },\n exportAs: 'matMenuTrigger',\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatMenuModule {\n}\nMatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuModule, declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule], exports: [CdkScrollableModule,\n MatCommonModule,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger,\n MatMenuContent] });\nMatMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule, CdkScrollableModule,\n MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatMenuModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule],\n exports: [\n CdkScrollableModule,\n MatCommonModule,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger,\n MatMenuContent,\n ],\n declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent],\n providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_MENU_CONTENT, MAT_MENU_DEFAULT_OPTIONS, MAT_MENU_PANEL, MAT_MENU_SCROLL_STRATEGY, MatMenu, MatMenuContent, MatMenuItem, MatMenuModule, MatMenuTrigger, _MatMenuBase, _MatMenuContentBase, _MatMenuTriggerBase, fadeInItems, matMenuAnimations, transformMenu };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Output, Input, ContentChildren, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Attribute, NgModule } from '@angular/core';\nimport * as i3 from '@angular/material/core';\nimport { mixinDisableRipple, mixinTabIndex, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i2 from '@angular/cdk/collections';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n});\nfunction MAT_RADIO_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent',\n };\n}\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nconst MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true,\n};\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nclass MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n source, \n /** The value of the MatRadioButton. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_RADIO_GROUP = new InjectionToken('MatRadioGroup');\n/**\n * Base class with all of the `MatRadioGroup` functionality.\n * @docs-private\n */\nclass _MatRadioGroupBase {\n constructor(_changeDetector) {\n this._changeDetector = _changeDetector;\n /** Selected value for the radio group. */\n this._value = null;\n /** The HTML name attribute applied to radio buttons in this group. */\n this._name = `mat-radio-group-${nextUniqueId++}`;\n /** The currently selected radio button. Should match value. */\n this._selected = null;\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n this._labelPosition = 'after';\n /** Whether the radio group is disabled. */\n this._disabled = false;\n /** Whether the radio group is required. */\n this._required = false;\n /** The method to be called in order to update ngModel */\n this._controlValueAccessorChangeFn = () => { };\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n this.onTouched = () => { };\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as ``).\n */\n this.change = new EventEmitter();\n }\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n get selected() {\n return this._selected;\n }\n set selected(selected) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n /** Whether the radio group is disabled */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n /** Whether the radio group is required */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n _updateRadioButtonNames() {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n /** Updates the `selected` radio button from the internal _value state. */\n _updateSelectedRadioFromValue() {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent() {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected, this._value));\n }\n }\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n_MatRadioGroupBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatRadioGroupBase, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatRadioGroupBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatRadioGroupBase, inputs: { color: \"color\", name: \"name\", labelPosition: \"labelPosition\", value: \"value\", selected: \"selected\", disabled: \"disabled\", required: \"required\" }, outputs: { change: \"change\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatRadioGroupBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { change: [{\n type: Output\n }], color: [{\n type: Input\n }], name: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], value: [{\n type: Input\n }], selected: [{\n type: Input\n }], disabled: [{\n type: Input\n }], required: [{\n type: Input\n }] } });\n/**\n * A group of radio buttons. May contain one or more `` elements.\n */\nclass MatRadioGroup extends _MatRadioGroupBase {\n}\nMatRadioGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioGroup, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatRadioGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatRadioGroup, selector: \"mat-radio-group\", host: { attributes: { \"role\": \"radiogroup\" }, classAttribute: \"mat-radio-group\" }, providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n ], queries: [{ propertyName: \"_radios\", predicate: i0.forwardRef(function () { return MatRadioButton; }), descendants: true }], exportAs: [\"matRadioGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioGroup, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n }]\n }], propDecorators: { _radios: [{\n type: ContentChildren,\n args: [forwardRef(() => MatRadioButton), { descendants: true }]\n }] } });\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}\nconst _MatRadioButtonMixinBase = mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\nclass _MatRadioButtonBase extends _MatRadioButtonMixinBase {\n constructor(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, animationMode, _providerOverride, tabIndex) {\n super(elementRef);\n this._changeDetector = _changeDetector;\n this._focusMonitor = _focusMonitor;\n this._radioDispatcher = _radioDispatcher;\n this._providerOverride = _providerOverride;\n this._uniqueId = `mat-radio-${++nextUniqueId}`;\n /** The unique ID for the radio button. */\n this.id = this._uniqueId;\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as ``).\n */\n this.change = new EventEmitter();\n /** Whether this radio is checked. */\n this._checked = false;\n /** Value assigned to this radio. */\n this._value = null;\n /** Unregister function for _radioDispatcher */\n this._removeUniqueSelectionListener = () => { };\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._noopAnimations = animationMode === 'NoopAnimations';\n if (tabIndex) {\n this.tabIndex = coerceNumberProperty(tabIndex, 0);\n }\n this._removeUniqueSelectionListener = _radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n /** Whether this radio button is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n }\n else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n /** The value of this radio button. */\n get value() {\n return this._value;\n }\n set value(value) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n /** Whether the radio button is disabled. */\n get disabled() {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n /** Whether the radio button is required. */\n get required() {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Theme color of the radio button. */\n get color() {\n // As per Material design specifications the selection control radio should use the accent color\n // palette by default. https://material.io/guidelines/components/selection-controls.html\n return (this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n (this._providerOverride && this._providerOverride.color) ||\n 'accent');\n }\n set color(newValue) {\n this._color = newValue;\n }\n /** ID of the native input element inside `` */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n /** Focuses the radio button. */\n focus(options, origin) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n ngDoCheck() {\n this._updateTabIndex();\n }\n ngAfterViewInit() {\n this._updateTabIndex();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n /** Dispatch change event with current value. */\n _emitChangeEvent() {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n /** Sets the disabled state and marks for check if a change occurred. */\n _setDisabled(value) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n /** Gets the tabindex for the underlying input element. */\n _updateTabIndex() {\n const group = this.radioGroup;\n let value;\n // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n // necessary, because the browser handles the tab order for inputs inside a group automatically,\n // but we need an explicitly higher tabindex for the selected button in order for things like\n // the focus trap to pick it up correctly.\n if (!group || !group.selected || this.disabled) {\n value = this.tabIndex;\n }\n else {\n value = group.selected === this ? this.tabIndex : -1;\n }\n if (value !== this._previousTabIndex) {\n // We have to set the tabindex directly on the DOM node, because it depends on\n // the selected state which is prone to \"changed after checked errors\".\n const input = this._inputElement?.nativeElement;\n if (input) {\n input.setAttribute('tabindex', value + '');\n this._previousTabIndex = value;\n }\n }\n }\n}\n_MatRadioButtonBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatRadioButtonBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatRadioButtonBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatRadioButtonBase, inputs: { id: \"id\", name: \"name\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], checked: \"checked\", value: \"value\", labelPosition: \"labelPosition\", disabled: \"disabled\", required: \"required\", color: \"color\" }, outputs: { change: \"change\" }, viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatRadioButtonBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: _MatRadioGroupBase }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { id: [{\n type: Input\n }], name: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], checked: [{\n type: Input\n }], value: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], disabled: [{\n type: Input\n }], required: [{\n type: Input\n }], color: [{\n type: Input\n }], change: [{\n type: Output\n }], _inputElement: [{\n type: ViewChild,\n args: ['input']\n }] } });\n/**\n * A Material design radio-button. Typically placed inside of `` elements.\n */\nclass MatRadioButton extends _MatRadioButtonBase {\n constructor(radioGroup, elementRef, changeDetector, focusMonitor, radioDispatcher, animationMode, providerOverride, tabIndex) {\n super(radioGroup, elementRef, changeDetector, focusMonitor, radioDispatcher, animationMode, providerOverride, tabIndex);\n }\n}\nMatRadioButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioButton, deps: [{ token: MAT_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_RADIO_DEFAULT_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });\nMatRadioButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatRadioButton, selector: \"mat-radio-button\", inputs: { disableRipple: \"disableRipple\", tabIndex: \"tabIndex\" }, host: { listeners: { \"focus\": \"_inputElement.nativeElement.focus()\" }, properties: { \"class.mat-radio-checked\": \"checked\", \"class.mat-radio-disabled\": \"disabled\", \"class._mat-animation-noopable\": \"_noopAnimations\", \"class.mat-primary\": \"color === \\\"primary\\\"\", \"class.mat-accent\": \"color === \\\"accent\\\"\", \"class.mat-warn\": \"color === \\\"warn\\\"\", \"attr.tabindex\": \"null\", \"attr.id\": \"id\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.aria-describedby\": \"null\" }, classAttribute: \"mat-radio-button\" }, exportAs: [\"matRadioButton\"], usesInheritance: true, ngImport: i0, template: \"\\n\\n\\n\", styles: [\".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.mat-radio-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\"], dependencies: [{ kind: \"directive\", type: i3.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioButton, decorators: [{\n type: Component,\n args: [{ selector: 'mat-radio-button', inputs: ['disableRipple', 'tabIndex'], encapsulation: ViewEncapsulation.None, exportAs: 'matRadioButton', host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_noopAnimations',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n }, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\\n\\n\", styles: [\".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.mat-radio-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\"] }]\n }], ctorParameters: function () { return [{ type: MatRadioGroup, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RADIO_GROUP]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RADIO_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatRadioModule {\n}\nMatRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioModule, declarations: [MatRadioGroup, MatRadioButton], imports: [MatRippleModule, MatCommonModule], exports: [MatRadioGroup, MatRadioButton, MatCommonModule] });\nMatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioModule, imports: [MatRippleModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRadioModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule, _MatRadioButtonBase, _MatRadioGroupBase };\n","import * as i3 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Inject, Optional, ViewChild, NgModule } from '@angular/core';\nimport * as i2 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nconst MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new InjectionToken('mat-slide-toggle-default-options', {\n providedIn: 'root',\n factory: () => ({ disableToggleValue: false }),\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Increasing integer for generating unique ids for slide-toggle components.\nlet nextUniqueId = 0;\n/** @docs-private */\nconst MAT_SLIDE_TOGGLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSlideToggle),\n multi: true,\n};\n/** Change event object emitted by a MatSlideToggle. */\nclass MatSlideToggleChange {\n constructor(\n /** The source MatSlideToggle of the event. */\n source, \n /** The new `checked` value of the MatSlideToggle. */\n checked) {\n this.source = source;\n this.checked = checked;\n }\n}\n// Boilerplate for applying mixins to MatSlideToggle.\n/** @docs-private */\nconst _MatSlideToggleMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}))));\nclass _MatSlideToggleBase extends _MatSlideToggleMixinBase {\n constructor(elementRef, _focusMonitor, _changeDetectorRef, tabIndex, defaults, animationMode, idPrefix) {\n super(elementRef);\n this._focusMonitor = _focusMonitor;\n this._changeDetectorRef = _changeDetectorRef;\n this.defaults = defaults;\n this._onChange = (_) => { };\n this._onTouched = () => { };\n this._required = false;\n this._checked = false;\n /** Name value will be applied to the input element if present. */\n this.name = null;\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n this.labelPosition = 'after';\n /** Used to set the aria-label attribute on the underlying input element. */\n this.ariaLabel = null;\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n this.ariaLabelledby = null;\n /** An event will be dispatched each time the slide-toggle changes its value. */\n this.change = new EventEmitter();\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed.\n */\n this.toggleChange = new EventEmitter();\n this.tabIndex = parseInt(tabIndex) || 0;\n this.color = this.defaultColor = defaults.color || 'accent';\n this._noopAnimations = animationMode === 'NoopAnimations';\n this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;\n }\n /** Whether the slide-toggle is required. */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Whether the slide-toggle element is checked or not. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n this._checked = coerceBooleanProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n ngAfterContentInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n this._focused = true;\n }\n else if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's ng-touched) will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._focused = false;\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value) {\n this.checked = !!value;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn) {\n this._onChange = fn;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n /** Toggles the checked state of the slide-toggle. */\n toggle() {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n }\n}\n_MatSlideToggleBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatSlideToggleBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatSlideToggleBase, inputs: { name: \"name\", id: \"id\", labelPosition: \"labelPosition\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], required: \"required\", checked: \"checked\" }, outputs: { change: \"change\", toggleChange: \"toggleChange\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { name: [{\n type: Input\n }], id: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], required: [{\n type: Input\n }], checked: [{\n type: Input\n }], change: [{\n type: Output\n }], toggleChange: [{\n type: Output\n }] } });\n/** Represents a slidable \"switch\" toggle that can be moved between on and off. */\nclass MatSlideToggle extends _MatSlideToggleBase {\n constructor(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode) {\n super(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode, 'mat-slide-toggle-');\n }\n _createChangeEvent(isChecked) {\n return new MatSlideToggleChange(this, isChecked);\n }\n /** Method being called whenever the underlying input emits a change event. */\n _onChangeEvent(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the component's `change` output.\n event.stopPropagation();\n this.toggleChange.emit();\n // When the slide toggle's config disables toggle change event by setting\n // `disableToggleValue: true`, the slide toggle's value does not change, and the\n // checked state of the underlying input needs to be changed back.\n if (this.defaults.disableToggleValue) {\n this._inputElement.nativeElement.checked = this.checked;\n return;\n }\n // Sync the value from the underlying input element with the component instance.\n this.checked = this._inputElement.nativeElement.checked;\n // Emit our custom change event only if the underlying input emitted one. This ensures that\n // there is no change event, when the checked state changes programmatically.\n this._emitChangeEvent();\n }\n /** Method being called whenever the slide-toggle has been clicked. */\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `slide-toggle` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n /** Focuses the slide-toggle. */\n focus(options, origin) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the\n // slide-toggle component will be only marked for check, but no actual change detection runs\n // automatically. Instead of going back into the zone in order to trigger a change detection\n // which causes *all* components to be checked (if explicitly marked or not using OnPush),\n // we only trigger an explicit change detection for the slide-toggle view and its children.\n this._changeDetectorRef.detectChanges();\n }\n}\nMatSlideToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggle, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }, { token: MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatSlideToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatSlideToggle, selector: \"mat-slide-toggle\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", color: \"color\", tabIndex: \"tabIndex\" }, host: { properties: { \"id\": \"id\", \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.name\": \"null\", \"class.mat-checked\": \"checked\", \"class.mat-disabled\": \"disabled\", \"class.mat-slide-toggle-label-before\": \"labelPosition == \\\"before\\\"\", \"class._mat-animation-noopable\": \"_noopAnimations\" }, classAttribute: \"mat-slide-toggle\" }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }], exportAs: [\"matSlideToggle\"], usesInheritance: true, ngImport: i0, template: \"\\n\", styles: [\".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i3.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggle, decorators: [{\n type: Component,\n args: [{ selector: 'mat-slide-toggle', exportAs: 'matSlideToggle', host: {\n 'class': 'mat-slide-toggle',\n '[id]': 'id',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.name]': 'null',\n '[class.mat-checked]': 'checked',\n '[class.mat-disabled]': 'disabled',\n '[class.mat-slide-toggle-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': '_noopAnimations',\n }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], inputs: ['disabled', 'disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\", styles: [\".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _inputElement: [{\n type: ViewChild,\n args: ['input']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatSlideToggleRequiredValidator),\n multi: true,\n};\n/**\n * Validator for Material slide-toggle components with the required attribute in a\n * template-driven form. The default validator for required form controls asserts\n * that the control value is not undefined but that is not appropriate for a slide-toggle\n * where the value is always defined.\n *\n * Required slide-toggle form controls are valid when checked.\n */\nclass MatSlideToggleRequiredValidator extends CheckboxRequiredValidator {\n}\nMatSlideToggleRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatSlideToggleRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatSlideToggleRequiredValidator, selector: \"mat-slide-toggle[required][formControlName],\\n mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]\", providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: `mat-slide-toggle[required][formControlName],\n mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]`,\n providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** This module is used by both original and MDC-based slide-toggle implementations. */\nclass _MatSlideToggleRequiredValidatorModule {\n}\n_MatSlideToggleRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n_MatSlideToggleRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, declarations: [MatSlideToggleRequiredValidator], exports: [MatSlideToggleRequiredValidator] });\n_MatSlideToggleRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [MatSlideToggleRequiredValidator],\n declarations: [MatSlideToggleRequiredValidator],\n }]\n }] });\nclass MatSlideToggleModule {\n}\nMatSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSlideToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleModule, declarations: [MatSlideToggle], imports: [_MatSlideToggleRequiredValidatorModule, MatRippleModule,\n MatCommonModule,\n ObserversModule], exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule] });\nMatSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleModule, imports: [_MatSlideToggleRequiredValidatorModule,\n MatRippleModule,\n MatCommonModule,\n ObserversModule, _MatSlideToggleRequiredValidatorModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSlideToggleModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n _MatSlideToggleRequiredValidatorModule,\n MatRippleModule,\n MatCommonModule,\n ObserversModule,\n ],\n exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule],\n declarations: [MatSlideToggle],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS, MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggle, MatSlideToggleChange, MatSlideToggleModule, MatSlideToggleRequiredValidator, _MatSlideToggleBase, _MatSlideToggleRequiredValidatorModule };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, Directive, Optional, Inject, Input, Output, Injectable, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport * as i3 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { SPACE, ENTER } from '@angular/cdk/keycodes';\nimport { mixinInitialized, mixinDisabled, AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';\nimport { Subject, merge } from 'rxjs';\nimport { trigger, state, style, transition, animate, keyframes, query, animateChild } from '@angular/animations';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction getSortDuplicateSortableIdError(id) {\n return Error(`Cannot have two MatSortables with the same id (${id}).`);\n}\n/** @docs-private */\nfunction getSortHeaderNotContainedWithinSortError() {\n return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`);\n}\n/** @docs-private */\nfunction getSortHeaderMissingIdError() {\n return Error(`MatSortHeader must be provided with a unique id.`);\n}\n/** @docs-private */\nfunction getSortInvalidDirectionError(direction) {\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-sort`. */\nconst MAT_SORT_DEFAULT_OPTIONS = new InjectionToken('MAT_SORT_DEFAULT_OPTIONS');\n// Boilerplate for applying mixins to MatSort.\n/** @docs-private */\nconst _MatSortBase = mixinInitialized(mixinDisabled(class {\n}));\n/** Container for MatSortables to manage the sort state and provide default sort parameters. */\nclass MatSort extends _MatSortBase {\n constructor(_defaultOptions) {\n super();\n this._defaultOptions = _defaultOptions;\n /** Collection of all registered sortables that this directive manages. */\n this.sortables = new Map();\n /** Used to notify any child components listening to state changes. */\n this._stateChanges = new Subject();\n /**\n * The direction to set when an MatSortable is initially sorted.\n * May be overridden by the MatSortable's sort start.\n */\n this.start = 'asc';\n this._direction = '';\n /** Event emitted when the user changes either the active sort or sort direction. */\n this.sortChange = new EventEmitter();\n }\n /** The sort direction of the currently active MatSortable. */\n get direction() {\n return this._direction;\n }\n set direction(direction) {\n if (direction &&\n direction !== 'asc' &&\n direction !== 'desc' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortInvalidDirectionError(direction);\n }\n this._direction = direction;\n }\n /**\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\n * May be overridden by the MatSortable's disable clear input.\n */\n get disableClear() {\n return this._disableClear;\n }\n set disableClear(v) {\n this._disableClear = coerceBooleanProperty(v);\n }\n /**\n * Register function to be used by the contained MatSortables. Adds the MatSortable to the\n * collection of MatSortables.\n */\n register(sortable) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!sortable.id) {\n throw getSortHeaderMissingIdError();\n }\n if (this.sortables.has(sortable.id)) {\n throw getSortDuplicateSortableIdError(sortable.id);\n }\n }\n this.sortables.set(sortable.id, sortable);\n }\n /**\n * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the\n * collection of contained MatSortables.\n */\n deregister(sortable) {\n this.sortables.delete(sortable.id);\n }\n /** Sets the active sort id and determines the new sort direction. */\n sort(sortable) {\n if (this.active != sortable.id) {\n this.active = sortable.id;\n this.direction = sortable.start ? sortable.start : this.start;\n }\n else {\n this.direction = this.getNextSortDirection(sortable);\n }\n this.sortChange.emit({ active: this.active, direction: this.direction });\n }\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n getNextSortDirection(sortable) {\n if (!sortable) {\n return '';\n }\n // Get the sort direction cycle with the potential sortable overrides.\n const disableClear = sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n // Get and return the next direction in the cycle\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n if (nextDirectionIndex >= sortDirectionCycle.length) {\n nextDirectionIndex = 0;\n }\n return sortDirectionCycle[nextDirectionIndex];\n }\n ngOnInit() {\n this._markInitialized();\n }\n ngOnChanges() {\n this._stateChanges.next();\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n}\nMatSort.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSort, deps: [{ token: MAT_SORT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatSort.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatSort, selector: \"[matSort]\", inputs: { disabled: [\"matSortDisabled\", \"disabled\"], active: [\"matSortActive\", \"active\"], start: [\"matSortStart\", \"start\"], direction: [\"matSortDirection\", \"direction\"], disableClear: [\"matSortDisableClear\", \"disableClear\"] }, outputs: { sortChange: \"matSortChange\" }, host: { classAttribute: \"mat-sort\" }, exportAs: [\"matSort\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSort, decorators: [{\n type: Directive,\n args: [{\n selector: '[matSort]',\n exportAs: 'matSort',\n host: { 'class': 'mat-sort' },\n inputs: ['disabled: matSortDisabled'],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_SORT_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { active: [{\n type: Input,\n args: ['matSortActive']\n }], start: [{\n type: Input,\n args: ['matSortStart']\n }], direction: [{\n type: Input,\n args: ['matSortDirection']\n }], disableClear: [{\n type: Input,\n args: ['matSortDisableClear']\n }], sortChange: [{\n type: Output,\n args: ['matSortChange']\n }] } });\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start, disableClear) {\n let sortOrder = ['asc', 'desc'];\n if (start == 'desc') {\n sortOrder.reverse();\n }\n if (!disableClear) {\n sortOrder.push('');\n }\n return sortOrder;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SORT_ANIMATION_TRANSITION = AnimationDurations.ENTERING + ' ' + AnimationCurves.STANDARD_CURVE;\n/**\n * Animations used by MatSort.\n * @docs-private\n */\nconst matSortAnimations = {\n /** Animation that moves the sort indicator. */\n indicator: trigger('indicator', [\n state('active-asc, asc', style({ transform: 'translateY(0px)' })),\n // 10px is the height of the sort indicator, minus the width of the pointers\n state('active-desc, desc', style({ transform: 'translateY(10px)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that rotates the left pointer of the indicator based on the sorting direction. */\n leftPointer: trigger('leftPointer', [\n state('active-asc, asc', style({ transform: 'rotate(-45deg)' })),\n state('active-desc, desc', style({ transform: 'rotate(45deg)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that rotates the right pointer of the indicator based on the sorting direction. */\n rightPointer: trigger('rightPointer', [\n state('active-asc, asc', style({ transform: 'rotate(45deg)' })),\n state('active-desc, desc', style({ transform: 'rotate(-45deg)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that controls the arrow opacity. */\n arrowOpacity: trigger('arrowOpacity', [\n state('desc-to-active, asc-to-active, active', style({ opacity: 1 })),\n state('desc-to-hint, asc-to-hint, hint', style({ opacity: 0.54 })),\n state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void', style({ opacity: 0 })),\n // Transition between all states except for immediate transitions\n transition('* => asc, * => desc, * => active, * => hint, * => void', animate('0ms')),\n transition('* <=> *', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /**\n * Animation for the translation of the arrow as a whole. States are separated into two\n * groups: ones with animations and others that are immediate. Immediate states are asc, desc,\n * peek, and active. The other states define a specific animation (source-to-destination)\n * and are determined as a function of their prev user-perceived state and what the next state\n * should be.\n */\n arrowPosition: trigger('arrowPosition', [\n // Hidden Above => Hint Center\n transition('* => desc-to-hint, * => desc-to-active', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(-25%)' }), style({ transform: 'translateY(0)' })]))),\n // Hint Center => Hidden Below\n transition('* => hint-to-desc, * => active-to-desc', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(0)' }), style({ transform: 'translateY(25%)' })]))),\n // Hidden Below => Hint Center\n transition('* => asc-to-hint, * => asc-to-active', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(25%)' }), style({ transform: 'translateY(0)' })]))),\n // Hint Center => Hidden Above\n transition('* => hint-to-asc, * => active-to-asc', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(0)' }), style({ transform: 'translateY(-25%)' })]))),\n state('desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active', style({ transform: 'translateY(0)' })),\n state('hint-to-desc, active-to-desc, desc', style({ transform: 'translateY(-25%)' })),\n state('hint-to-asc, active-to-asc, asc', style({ transform: 'translateY(25%)' })),\n ]),\n /** Necessary trigger that calls animate on children animations. */\n allowChildren: trigger('allowChildren', [\n transition('* <=> *', [query('@*', animateChild(), { optional: true })]),\n ]),\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and\n * include it in a custom provider.\n */\nclass MatSortHeaderIntl {\n constructor() {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n this.changes = new Subject();\n }\n}\nMatSortHeaderIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortHeaderIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nMatSortHeaderIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortHeaderIntl, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortHeaderIntl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/** @docs-private */\nfunction MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl) {\n return parentIntl || new MatSortHeaderIntl();\n}\n/** @docs-private */\nconst MAT_SORT_HEADER_INTL_PROVIDER = {\n // If there is already an MatSortHeaderIntl available, use that. Otherwise, provide a new one.\n provide: MatSortHeaderIntl,\n deps: [[new Optional(), new SkipSelf(), MatSortHeaderIntl]],\n useFactory: MAT_SORT_HEADER_INTL_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to the sort header.\n/** @docs-private */\nconst _MatSortHeaderBase = mixinDisabled(class {\n});\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent MatSort directive.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\nclass MatSortHeader extends _MatSortHeaderBase {\n constructor(\n /**\n * @deprecated `_intl` parameter isn't being used anymore and it'll be removed.\n * @breaking-change 13.0.0\n */\n _intl, _changeDetectorRef, \n // `MatSort` is not optionally injected, but just asserted manually w/ better error.\n // tslint:disable-next-line: lightweight-tokens\n _sort, _columnDef, _focusMonitor, _elementRef, \n /** @breaking-change 14.0.0 _ariaDescriber will be required. */\n _ariaDescriber, defaultOptions) {\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\n // `material/table` and `cdk/table` and we can't have the CDK depending on Material,\n // and we want to avoid having the sort header depending on the CDK table because\n // of this single reference.\n super();\n this._intl = _intl;\n this._changeDetectorRef = _changeDetectorRef;\n this._sort = _sort;\n this._columnDef = _columnDef;\n this._focusMonitor = _focusMonitor;\n this._elementRef = _elementRef;\n this._ariaDescriber = _ariaDescriber;\n /**\n * Flag set to true when the indicator should be displayed while the sort is not active. Used to\n * provide an affordance that the header is sortable by showing on focus and hover.\n */\n this._showIndicatorHint = false;\n /**\n * The view transition state of the arrow (translation/ opacity) - indicates its `from` and `to`\n * position through the animation. If animations are currently disabled, the fromState is removed\n * so that there is no animation displayed.\n */\n this._viewState = {};\n /** The direction the arrow should be facing according to the current state. */\n this._arrowDirection = '';\n /**\n * Whether the view state animation should show the transition between the `from` and `to` states.\n */\n this._disableViewStateAnimation = false;\n /** Sets the position of the arrow that displays when sorted. */\n this.arrowPosition = 'after';\n // Default the action description to \"Sort\" because it's better than nothing.\n // Without a description, the button's label comes from the sort header text content,\n // which doesn't give any indication that it performs a sorting operation.\n this._sortActionDescription = 'Sort';\n if (!_sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortHeaderNotContainedWithinSortError();\n }\n if (defaultOptions?.arrowPosition) {\n this.arrowPosition = defaultOptions?.arrowPosition;\n }\n this._handleStateChanges();\n }\n /**\n * Description applied to MatSortHeader's button element with aria-describedby. This text should\n * describe the action that will occur when the user clicks the sort header.\n */\n get sortActionDescription() {\n return this._sortActionDescription;\n }\n set sortActionDescription(value) {\n this._updateSortActionDescription(value);\n }\n /** Overrides the disable clear value of the containing MatSort for this MatSortable. */\n get disableClear() {\n return this._disableClear;\n }\n set disableClear(v) {\n this._disableClear = coerceBooleanProperty(v);\n }\n ngOnInit() {\n if (!this.id && this._columnDef) {\n this.id = this._columnDef.name;\n }\n // Initialize the direction of the arrow and set the view state to be immediately that state.\n this._updateArrowDirection();\n this._setAnimationTransitionState({\n toState: this._isSorted() ? 'active' : this._arrowDirection,\n });\n this._sort.register(this);\n this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container');\n this._updateSortActionDescription(this._sortActionDescription);\n }\n ngAfterViewInit() {\n // We use the focus monitor because we also want to style\n // things differently based on the focus origin.\n this._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n const newState = !!origin;\n if (newState !== this._showIndicatorHint) {\n this._setIndicatorHintVisible(newState);\n this._changeDetectorRef.markForCheck();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._sort.deregister(this);\n this._rerenderSubscription.unsubscribe();\n }\n /**\n * Sets the \"hint\" state such that the arrow will be semi-transparently displayed as a hint to the\n * user showing what the active sort will become. If set to false, the arrow will fade away.\n */\n _setIndicatorHintVisible(visible) {\n // No-op if the sort header is disabled - should not make the hint visible.\n if (this._isDisabled() && visible) {\n return;\n }\n this._showIndicatorHint = visible;\n if (!this._isSorted()) {\n this._updateArrowDirection();\n if (this._showIndicatorHint) {\n this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'hint' });\n }\n else {\n this._setAnimationTransitionState({ fromState: 'hint', toState: this._arrowDirection });\n }\n }\n }\n /**\n * Sets the animation transition view state for the arrow's position and opacity. If the\n * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that\n * no animation appears.\n */\n _setAnimationTransitionState(viewState) {\n this._viewState = viewState || {};\n // If the animation for arrow position state (opacity/translation) should be disabled,\n // remove the fromState so that it jumps right to the toState.\n if (this._disableViewStateAnimation) {\n this._viewState = { toState: viewState.toState };\n }\n }\n /** Triggers the sort on this sort header and removes the indicator hint. */\n _toggleOnInteraction() {\n this._sort.sort(this);\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n }\n _handleClick() {\n if (!this._isDisabled()) {\n this._sort.sort(this);\n }\n }\n _handleKeydown(event) {\n if (!this._isDisabled() && (event.keyCode === SPACE || event.keyCode === ENTER)) {\n event.preventDefault();\n this._toggleOnInteraction();\n }\n }\n /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */\n _isSorted() {\n return (this._sort.active == this.id &&\n (this._sort.direction === 'asc' || this._sort.direction === 'desc'));\n }\n /** Returns the animation state for the arrow direction (indicator and pointers). */\n _getArrowDirectionState() {\n return `${this._isSorted() ? 'active-' : ''}${this._arrowDirection}`;\n }\n /** Returns the arrow position state (opacity, translation). */\n _getArrowViewState() {\n const fromState = this._viewState.fromState;\n return (fromState ? `${fromState}-to-` : '') + this._viewState.toState;\n }\n /**\n * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be\n * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently\n * active sorted direction. The reason this is updated through a function is because the direction\n * should only be changed at specific times - when deactivated but the hint is displayed and when\n * the sort is active and the direction changes. Otherwise the arrow's direction should linger\n * in cases such as the sort becoming deactivated but we want to animate the arrow away while\n * preserving its direction, even though the next sort direction is actually different and should\n * only be changed once the arrow displays again (hint or activation).\n */\n _updateArrowDirection() {\n this._arrowDirection = this._isSorted() ? this._sort.direction : this.start || this._sort.start;\n }\n _isDisabled() {\n return this._sort.disabled || this.disabled;\n }\n /**\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n * says that the aria-sort property should only be present on one header at a time, so removing\n * ensures this is true.\n */\n _getAriaSortAttribute() {\n if (!this._isSorted()) {\n return 'none';\n }\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\n }\n /** Whether the arrow inside the sort header should be rendered. */\n _renderArrow() {\n return !this._isDisabled() || this._isSorted();\n }\n _updateSortActionDescription(newDescription) {\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n // for every *cell* in the table, creating a lot of unnecessary noise.\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\n // nothing to update in the DOM.\n if (this._sortButton) {\n // removeDescription will no-op if there is no existing message.\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n this._ariaDescriber?.describe(this._sortButton, newDescription);\n }\n this._sortActionDescription = newDescription;\n }\n /** Handles changes in the sorting state. */\n _handleStateChanges() {\n this._rerenderSubscription = merge(this._sort.sortChange, this._sort._stateChanges, this._intl.changes).subscribe(() => {\n if (this._isSorted()) {\n this._updateArrowDirection();\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'active' });\n this._showIndicatorHint = false;\n }\n // If this header was recently active and now no longer sorted, animate away the arrow.\n if (!this._isSorted() && this._viewState && this._viewState.toState === 'active') {\n this._disableViewStateAnimation = false;\n this._setAnimationTransitionState({ fromState: 'active', toState: this._arrowDirection });\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n}\nMatSortHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortHeader, deps: [{ token: MatSortHeaderIntl }, { token: i0.ChangeDetectorRef }, { token: MatSort, optional: true }, { token: 'MAT_SORT_HEADER_COLUMN_DEF', optional: true }, { token: i3.FocusMonitor }, { token: i0.ElementRef }, { token: i3.AriaDescriber, optional: true }, { token: MAT_SORT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatSortHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatSortHeader, selector: \"[mat-sort-header]\", inputs: { disabled: \"disabled\", id: [\"mat-sort-header\", \"id\"], arrowPosition: \"arrowPosition\", start: \"start\", sortActionDescription: \"sortActionDescription\", disableClear: \"disableClear\" }, host: { listeners: { \"click\": \"_handleClick()\", \"keydown\": \"_handleKeydown($event)\", \"mouseenter\": \"_setIndicatorHintVisible(true)\", \"mouseleave\": \"_setIndicatorHintVisible(false)\" }, properties: { \"attr.aria-sort\": \"_getAriaSortAttribute()\", \"class.mat-sort-header-disabled\": \"_isDisabled()\" }, classAttribute: \"mat-sort-header\" }, exportAs: [\"matSortHeader\"], usesInheritance: true, ngImport: i0, template: \"\\n
      \\n\\n \\n
      \\n \\n
      \\n\\n \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\", styles: [\".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\"], dependencies: [{ kind: \"directive\", type: i4.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], animations: [\n matSortAnimations.indicator,\n matSortAnimations.leftPointer,\n matSortAnimations.rightPointer,\n matSortAnimations.arrowOpacity,\n matSortAnimations.arrowPosition,\n matSortAnimations.allowChildren,\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortHeader, decorators: [{\n type: Component,\n args: [{ selector: '[mat-sort-header]', exportAs: 'matSortHeader', host: {\n 'class': 'mat-sort-header',\n '(click)': '_handleClick()',\n '(keydown)': '_handleKeydown($event)',\n '(mouseenter)': '_setIndicatorHintVisible(true)',\n '(mouseleave)': '_setIndicatorHintVisible(false)',\n '[attr.aria-sort]': '_getAriaSortAttribute()',\n '[class.mat-sort-header-disabled]': '_isDisabled()',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], animations: [\n matSortAnimations.indicator,\n matSortAnimations.leftPointer,\n matSortAnimations.rightPointer,\n matSortAnimations.arrowOpacity,\n matSortAnimations.arrowPosition,\n matSortAnimations.allowChildren,\n ], template: \"\\n
      \\n\\n \\n
      \\n \\n
      \\n\\n \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\", styles: [\".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\"] }]\n }], ctorParameters: function () { return [{ type: MatSortHeaderIntl }, { type: i0.ChangeDetectorRef }, { type: MatSort, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: ['MAT_SORT_HEADER_COLUMN_DEF']\n }, {\n type: Optional\n }] }, { type: i3.FocusMonitor }, { type: i0.ElementRef }, { type: i3.AriaDescriber, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_SORT_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { id: [{\n type: Input,\n args: ['mat-sort-header']\n }], arrowPosition: [{\n type: Input\n }], start: [{\n type: Input\n }], sortActionDescription: [{\n type: Input\n }], disableClear: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatSortModule {\n}\nMatSortModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSortModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortModule, declarations: [MatSort, MatSortHeader], imports: [CommonModule, MatCommonModule], exports: [MatSort, MatSortHeader] });\nMatSortModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortModule, providers: [MAT_SORT_HEADER_INTL_PROVIDER], imports: [CommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatSortModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, MatCommonModule],\n exports: [MatSort, MatSortHeader],\n declarations: [MatSort, MatSortHeader],\n providers: [MAT_SORT_HEADER_INTL_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SORT_DEFAULT_OPTIONS, MAT_SORT_HEADER_INTL_PROVIDER, MAT_SORT_HEADER_INTL_PROVIDER_FACTORY, MatSort, MatSortHeader, MatSortHeaderIntl, MatSortModule, matSortAnimations };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/table';\nimport { CdkTable, CDK_TABLE, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, STICKY_POSITIONING_LISTENER, CDK_TABLE_TEMPLATE, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CDK_ROW_TEMPLATE, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTextColumn, CdkTableModule, DataSource } from '@angular/cdk/table';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nimport { MatCommonModule } from '@angular/material/core';\nimport { _isNumberValue } from '@angular/cdk/coercion';\nimport { BehaviorSubject, Subject, merge, of, combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass MatRecycleRows {\n}\nMatRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatRecycleRows, selector: \"mat-table[recycleRows], table[mat-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\n/**\n * Wrapper for the CdkTable with Material design styles.\n */\nclass MatTable extends CdkTable {\n constructor() {\n super(...arguments);\n /** Overrides the sticky CSS class set by the `CdkTable`. */\n this.stickyCssClass = 'mat-table-sticky';\n /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */\n this.needsPositionStickyOnElement = false;\n }\n}\nMatTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTable, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatTable, selector: \"mat-table, table[mat-table]\", host: { properties: { \"class.mat-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"mat-table\" }, providers: [\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], exportAs: [\"matTable\"], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n\", isInline: true, styles: [\"mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: i1.DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: i1.HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: i1.FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: i1.NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTable, decorators: [{\n type: Component,\n args: [{ selector: 'mat-table, table[mat-table]', exportAs: 'matTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'mat-table',\n '[class.mat-table-fixed-layout]': 'fixedLayout',\n }, providers: [\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, styles: [\"mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\"] }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Cell definition for the mat-table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass MatCellDef extends CdkCellDef {\n}\nMatCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCellDef, selector: \"[matCellDef]\", providers: [{ provide: CdkCellDef, useExisting: MatCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matCellDef]',\n providers: [{ provide: CdkCellDef, useExisting: MatCellDef }],\n }]\n }] });\n/**\n * Header cell definition for the mat-table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass MatHeaderCellDef extends CdkHeaderCellDef {\n}\nMatHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\", providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderCellDef]',\n providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }],\n }]\n }] });\n/**\n * Footer cell definition for the mat-table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass MatFooterCellDef extends CdkFooterCellDef {\n}\nMatFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFooterCellDef, selector: \"[matFooterCellDef]\", providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterCellDef]',\n providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }],\n }]\n }] });\n/**\n * Column definition for the mat-table.\n * Defines a set of cells available for a table column.\n */\nclass MatColumnDef extends CdkColumnDef {\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Add \"mat-column-\" prefix in addition to \"cdk-column-\" prefix.\n * In the future, this will only add \"mat-column-\" and columnCssClassName\n * will change from type string[] to string.\n * @docs-private\n */\n _updateColumnCssClassName() {\n super._updateColumnCssClassName();\n this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);\n }\n}\nMatColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: { sticky: \"sticky\", name: [\"matColumnDef\", \"name\"] }, providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matColumnDef]',\n inputs: ['sticky'],\n providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ],\n }]\n }], propDecorators: { name: [{\n type: Input,\n args: ['matColumnDef']\n }] } });\n/** Header cell template container that adds the right classes and role. */\nclass MatHeaderCell extends CdkHeaderCell {\n}\nMatHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"mat-header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-header-cell, th[mat-header-cell]',\n host: {\n 'class': 'mat-header-cell',\n 'role': 'columnheader',\n },\n }]\n }] });\n/** Footer cell template container that adds the right classes and role. */\nclass MatFooterCell extends CdkFooterCell {\n}\nMatFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFooterCell, selector: \"mat-footer-cell, td[mat-footer-cell]\", host: { attributes: { \"role\": \"gridcell\" }, classAttribute: \"mat-footer-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-footer-cell, td[mat-footer-cell]',\n host: {\n 'class': 'mat-footer-cell',\n 'role': 'gridcell',\n },\n }]\n }] });\n/** Cell template container that adds the right classes and role. */\nclass MatCell extends CdkCell {\n}\nMatCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatCell, selector: \"mat-cell, td[mat-cell]\", host: { attributes: { \"role\": \"gridcell\" }, classAttribute: \"mat-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-cell, td[mat-cell]',\n host: {\n 'class': 'mat-cell',\n 'role': 'gridcell',\n },\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Header row definition for the mat-table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass MatHeaderRowDef extends CdkHeaderRowDef {\n}\nMatHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatHeaderRowDef, selector: \"[matHeaderRowDef]\", inputs: { columns: [\"matHeaderRowDef\", \"columns\"], sticky: [\"matHeaderRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderRowDef]',\n providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }],\n inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'],\n }]\n }] });\n/**\n * Footer row definition for the mat-table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass MatFooterRowDef extends CdkFooterRowDef {\n}\nMatFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFooterRowDef, selector: \"[matFooterRowDef]\", inputs: { columns: [\"matFooterRowDef\", \"columns\"], sticky: [\"matFooterRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterRowDef]',\n providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }],\n inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'],\n }]\n }] });\n/**\n * Data row definition for the mat-table.\n * Captures the data row's template and other properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass MatRowDef extends CdkRowDef {\n}\nMatRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatRowDef, selector: \"[matRowDef]\", inputs: { columns: [\"matRowDefColumns\", \"columns\"], when: [\"matRowDefWhen\", \"when\"] }, providers: [{ provide: CdkRowDef, useExisting: MatRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matRowDef]',\n providers: [{ provide: CdkRowDef, useExisting: MatRowDef }],\n inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],\n }]\n }] });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass MatHeaderRow extends CdkHeaderRow {\n}\nMatHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatHeaderRow, selector: \"mat-header-row, tr[mat-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-header-row\" }, providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }], exportAs: [\"matHeaderRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-header-row, tr[mat-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matHeaderRow',\n providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }],\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass MatFooterRow extends CdkFooterRow {\n}\nMatFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatFooterRow, selector: \"mat-footer-row, tr[mat-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-footer-row\" }, providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }], exportAs: [\"matFooterRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-footer-row, tr[mat-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matFooterRow',\n providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }],\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass MatRow extends CdkRow {\n}\nMatRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatRow, selector: \"mat-row, tr[mat-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-row\" }, providers: [{ provide: CdkRow, useExisting: MatRow }], exportAs: [\"matRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-row, tr[mat-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRow',\n providers: [{ provide: CdkRow, useExisting: MatRow }],\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass MatNoDataRow extends CdkNoDataRow {\n constructor() {\n super(...arguments);\n this._contentClassName = 'mat-no-data-row';\n }\n}\nMatNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatNoDataRow, selector: \"ng-template[matNoDataRow]\", providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[matNoDataRow]',\n providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (``).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass MatTextColumn extends CdkTextColumn {\n}\nMatTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatTextColumn, selector: \"mat-text-column\", usesInheritance: true, ngImport: i0, template: `\n \n \n \n \n `, isInline: true, dependencies: [{ kind: \"directive\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\" }, { kind: \"directive\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: [\"sticky\", \"matColumnDef\"] }, { kind: \"directive\", type: MatCellDef, selector: \"[matCellDef]\" }, { kind: \"directive\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\" }, { kind: \"directive\", type: MatCell, selector: \"mat-cell, td[mat-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTextColumn, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-text-column',\n template: `\n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EXPORTED_DECLARATIONS = [\n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn,\n];\nclass MatTableModule {\n}\nMatTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTableModule, declarations: [\n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn], imports: [CdkTableModule, MatCommonModule], exports: [MatCommonModule, \n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn] });\nMatTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTableModule, imports: [CdkTableModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTableModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CdkTableModule, MatCommonModule],\n exports: [MatCommonModule, EXPORTED_DECLARATIONS],\n declarations: EXPORTED_DECLARATIONS,\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to\n * flaky browser support and the value not being defined in Closure's typings.\n */\nconst MAX_SAFE_INTEGER = 9007199254740991;\n/** Shared base class with MDC-based implementation. */\nclass _MatTableDataSource extends DataSource {\n constructor(initialData = []) {\n super();\n /** Stream emitting render data to the table (depends on ordered data changes). */\n this._renderData = new BehaviorSubject([]);\n /** Stream that emits when a new filter string is set on the data source. */\n this._filter = new BehaviorSubject('');\n /** Used to react to internal changes of the paginator that are made by the data source itself. */\n this._internalPageChanges = new Subject();\n /**\n * Subscription to the changes that should trigger an update to the table's rendered rows, such\n * as filtering, sorting, pagination, or base data changes.\n */\n this._renderChangesSubscription = null;\n /**\n * Data accessor function that is used for accessing data properties for sorting through\n * the default sortData function.\n * This default function assumes that the sort header IDs (which defaults to the column name)\n * matches the data's properties (e.g. column Xyz represents data['Xyz']).\n * May be set to a custom function for different behavior.\n * @param data Data object that is being accessed.\n * @param sortHeaderId The name of the column that represents the data.\n */\n this.sortingDataAccessor = (data, sortHeaderId) => {\n const value = data[sortHeaderId];\n if (_isNumberValue(value)) {\n const numberValue = Number(value);\n // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we\n // leave them as strings. For more info: https://goo.gl/y5vbSg\n return numberValue < MAX_SAFE_INTEGER ? numberValue : value;\n }\n return value;\n };\n /**\n * Gets a sorted copy of the data array based on the state of the MatSort. Called\n * after changes are made to the filtered data or when sort changes are emitted from MatSort.\n * By default, the function retrieves the active sort and its direction and compares data\n * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation\n * of data ordering.\n * @param data The array of data that should be sorted.\n * @param sort The connected MatSort that holds the current sort state.\n */\n this.sortData = (data, sort) => {\n const active = sort.active;\n const direction = sort.direction;\n if (!active || direction == '') {\n return data;\n }\n return data.sort((a, b) => {\n let valueA = this.sortingDataAccessor(a, active);\n let valueB = this.sortingDataAccessor(b, active);\n // If there are data in the column that can be converted to a number,\n // it must be ensured that the rest of the data\n // is of the same type so as not to order incorrectly.\n const valueAType = typeof valueA;\n const valueBType = typeof valueB;\n if (valueAType !== valueBType) {\n if (valueAType === 'number') {\n valueA += '';\n }\n if (valueBType === 'number') {\n valueB += '';\n }\n }\n // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if\n // one value exists while the other doesn't. In this case, existing value should come last.\n // This avoids inconsistent results when comparing values to undefined/null.\n // If neither value exists, return 0 (equal).\n let comparatorResult = 0;\n if (valueA != null && valueB != null) {\n // Check if one value is greater than the other; if equal, comparatorResult should remain 0.\n if (valueA > valueB) {\n comparatorResult = 1;\n }\n else if (valueA < valueB) {\n comparatorResult = -1;\n }\n }\n else if (valueA != null) {\n comparatorResult = 1;\n }\n else if (valueB != null) {\n comparatorResult = -1;\n }\n return comparatorResult * (direction == 'asc' ? 1 : -1);\n });\n };\n /**\n * Checks if a data object matches the data source's filter string. By default, each data object\n * is converted to a string of its properties and returns true if the filter has\n * at least one occurrence in that string. By default, the filter string has its whitespace\n * trimmed and the match is case-insensitive. May be overridden for a custom implementation of\n * filter matching.\n * @param data Data object used to check against the filter.\n * @param filter Filter string that has been set on the data source.\n * @returns Whether the filter matches against the data\n */\n this.filterPredicate = (data, filter) => {\n // Transform the data into a lowercase string of all property values.\n const dataStr = Object.keys(data)\n .reduce((currentTerm, key) => {\n // Use an obscure Unicode character to delimit the words in the concatenated string.\n // This avoids matches where the values of two columns combined will match the user's query\n // (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something\n // that has a very low chance of being typed in by somebody in a text field. This one in\n // particular is \"White up-pointing triangle with dot\" from\n // https://en.wikipedia.org/wiki/List_of_Unicode_characters\n return currentTerm + data[key] + '◬';\n }, '')\n .toLowerCase();\n // Transform the filter by converting it to lowercase and removing whitespace.\n const transformedFilter = filter.trim().toLowerCase();\n return dataStr.indexOf(transformedFilter) != -1;\n };\n this._data = new BehaviorSubject(initialData);\n this._updateChangeSubscription();\n }\n /** Array of data that should be rendered by the table, where each object represents one row. */\n get data() {\n return this._data.value;\n }\n set data(data) {\n data = Array.isArray(data) ? data : [];\n this._data.next(data);\n // Normally the `filteredData` is updated by the re-render\n // subscription, but that won't happen if it's inactive.\n if (!this._renderChangesSubscription) {\n this._filterData(data);\n }\n }\n /**\n * Filter term that should be used to filter out objects from the data array. To override how\n * data objects match to this filter string, provide a custom function for filterPredicate.\n */\n get filter() {\n return this._filter.value;\n }\n set filter(filter) {\n this._filter.next(filter);\n // Normally the `filteredData` is updated by the re-render\n // subscription, but that won't happen if it's inactive.\n if (!this._renderChangesSubscription) {\n this._filterData(this.data);\n }\n }\n /**\n * Instance of the MatSort directive used by the table to control its sorting. Sort changes\n * emitted by the MatSort will trigger an update to the table's rendered data.\n */\n get sort() {\n return this._sort;\n }\n set sort(sort) {\n this._sort = sort;\n this._updateChangeSubscription();\n }\n /**\n * Instance of the MatPaginator component used by the table to control what page of the data is\n * displayed. Page changes emitted by the MatPaginator will trigger an update to the\n * table's rendered data.\n *\n * Note that the data source uses the paginator's properties to calculate which page of data\n * should be displayed. If the paginator receives its properties as template inputs,\n * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been\n * initialized before assigning it to this data source.\n */\n get paginator() {\n return this._paginator;\n }\n set paginator(paginator) {\n this._paginator = paginator;\n this._updateChangeSubscription();\n }\n /**\n * Subscribe to changes that should trigger an update to the table's rendered rows. When the\n * changes occur, process the current state of the filter, sort, and pagination along with\n * the provided base data and send it to the table for rendering.\n */\n _updateChangeSubscription() {\n // Sorting and/or pagination should be watched if MatSort and/or MatPaginator are provided.\n // The events should emit whenever the component emits a change or initializes, or if no\n // component is provided, a stream with just a null event should be provided.\n // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the\n // pipeline can progress to the next step. Note that the value from these streams are not used,\n // they purely act as a signal to progress in the pipeline.\n const sortChange = this._sort\n ? merge(this._sort.sortChange, this._sort.initialized)\n : of(null);\n const pageChange = this._paginator\n ? merge(this._paginator.page, this._internalPageChanges, this._paginator.initialized)\n : of(null);\n const dataStream = this._data;\n // Watch for base data or filter changes to provide a filtered set of data.\n const filteredData = combineLatest([dataStream, this._filter]).pipe(map(([data]) => this._filterData(data)));\n // Watch for filtered data or sort changes to provide an ordered set of data.\n const orderedData = combineLatest([filteredData, sortChange]).pipe(map(([data]) => this._orderData(data)));\n // Watch for ordered data or page changes to provide a paged set of data.\n const paginatedData = combineLatest([orderedData, pageChange]).pipe(map(([data]) => this._pageData(data)));\n // Watched for paged data changes and send the result to the table to render.\n this._renderChangesSubscription?.unsubscribe();\n this._renderChangesSubscription = paginatedData.subscribe(data => this._renderData.next(data));\n }\n /**\n * Returns a filtered data array where each filter object contains the filter string within\n * the result of the filterTermAccessor function. If no filter is set, returns the data array\n * as provided.\n */\n _filterData(data) {\n // If there is a filter string, filter out data that does not contain it.\n // Each data object is converted to a string using the function defined by filterTermAccessor.\n // May be overridden for customization.\n this.filteredData =\n this.filter == null || this.filter === ''\n ? data\n : data.filter(obj => this.filterPredicate(obj, this.filter));\n if (this.paginator) {\n this._updatePaginator(this.filteredData.length);\n }\n return this.filteredData;\n }\n /**\n * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the\n * data array as provided. Uses the default data accessor for data lookup, unless a\n * sortDataAccessor function is defined.\n */\n _orderData(data) {\n // If there is no active sort or direction, return the data without trying to sort.\n if (!this.sort) {\n return data;\n }\n return this.sortData(data.slice(), this.sort);\n }\n /**\n * Returns a paged slice of the provided data array according to the provided MatPaginator's page\n * index and length. If there is no paginator provided, returns the data array as provided.\n */\n _pageData(data) {\n if (!this.paginator) {\n return data;\n }\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.slice(startIndex, startIndex + this.paginator.pageSize);\n }\n /**\n * Updates the paginator to reflect the length of the filtered data, and makes sure that the page\n * index does not exceed the paginator's last page. Values are changed in a resolved promise to\n * guard against making property changes within a round of change detection.\n */\n _updatePaginator(filteredDataLength) {\n Promise.resolve().then(() => {\n const paginator = this.paginator;\n if (!paginator) {\n return;\n }\n paginator.length = filteredDataLength;\n // If the page index is set beyond the page, reduce it to the last page.\n if (paginator.pageIndex > 0) {\n const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;\n const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);\n if (newPageIndex !== paginator.pageIndex) {\n paginator.pageIndex = newPageIndex;\n // Since the paginator only emits after user-generated changes,\n // we need our own stream so we know to should re-render the data.\n this._internalPageChanges.next();\n }\n }\n });\n }\n /**\n * Used by the MatTable. Called when it connects to the data source.\n * @docs-private\n */\n connect() {\n if (!this._renderChangesSubscription) {\n this._updateChangeSubscription();\n }\n return this._renderData;\n }\n /**\n * Used by the MatTable. Called when it disconnects from the data source.\n * @docs-private\n */\n disconnect() {\n this._renderChangesSubscription?.unsubscribe();\n this._renderChangesSubscription = null;\n }\n}\n/**\n * Data source that accepts a client-side data array and includes native support of filtering,\n * sorting (using MatSort), and pagination (using MatPaginator).\n *\n * Allows for sort customization by overriding sortingDataAccessor, which defines how data\n * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,\n * which defines how row data is converted to a string for filter matching.\n *\n * **Note:** This class is meant to be a simple data source to help you get started. As such\n * it isn't equipped to handle some more advanced cases like robust i18n support or server-side\n * interactions. If your app needs to support more advanced use cases, consider implementing your\n * own `DataSource`.\n */\nclass MatTableDataSource extends _MatTableDataSource {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatCell, MatCellDef, MatColumnDef, MatFooterCell, MatFooterCellDef, MatFooterRow, MatFooterRowDef, MatHeaderCell, MatHeaderCellDef, MatHeaderRow, MatHeaderRowDef, MatNoDataRow, MatRecycleRows, MatRow, MatRowDef, MatTable, MatTableDataSource, MatTableModule, MatTextColumn, _MatTableDataSource };\n","import * as i1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i4 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i7 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Input, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i2 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i5 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport * as i6 from '@angular/cdk/layout';\nimport { Breakpoints } from '@angular/cdk/layout';\nimport * as i3 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, take } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate, keyframes } from '@angular/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Time in ms to throttle repositioning after scroll events. */\nconst SCROLL_THROTTLE_MS = 20;\n/**\n * CSS class that will be attached to the overlay panel.\n * @deprecated\n * @breaking-change 13.0.0 remove this variable\n */\nconst TOOLTIP_PANEL_CLASS = 'mat-tooltip-panel';\nconst PANEL_CLASS = 'tooltip-panel';\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nfunction getMatTooltipInvalidPositionError(position) {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nconst MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken('mat-tooltip-scroll-strategy');\n/** @docs-private */\nfunction MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n/** @docs-private */\nconst MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n/** Injection token to be used to override the default options for `matTooltip`. */\nconst MAT_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken('mat-tooltip-default-options', {\n providedIn: 'root',\n factory: MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY() {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\nclass _MatTooltipBase {\n constructor(_overlay, _elementRef, _scrollDispatcher, _viewContainerRef, _ngZone, _platform, _ariaDescriber, _focusMonitor, scrollStrategy, _dir, _defaultOptions, _document) {\n this._overlay = _overlay;\n this._elementRef = _elementRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._viewContainerRef = _viewContainerRef;\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._ariaDescriber = _ariaDescriber;\n this._focusMonitor = _focusMonitor;\n this._dir = _dir;\n this._defaultOptions = _defaultOptions;\n this._position = 'below';\n this._disabled = false;\n this._viewInitialized = false;\n this._pointerExitEventsInitialized = false;\n this._viewportMargin = 8;\n this._cssClassPrefix = 'mat';\n this._showDelay = this._defaultOptions.showDelay;\n this._hideDelay = this._defaultOptions.hideDelay;\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n this.touchGestures = 'auto';\n this._message = '';\n /** Manually-bound passive event listeners. */\n this._passiveListeners = [];\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n this._scrollStrategy = scrollStrategy;\n this._document = _document;\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._overlayRef) {\n this._updatePosition(this._overlayRef);\n }\n });\n }\n /** Allows the user to define the position of the tooltip relative to the parent element */\n get position() {\n return this._position;\n }\n set position(value) {\n if (value !== this._position) {\n this._position = value;\n if (this._overlayRef) {\n this._updatePosition(this._overlayRef);\n this._tooltipInstance?.show(0);\n this._overlayRef.updatePosition();\n }\n }\n }\n /** Disables the display of the tooltip. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n }\n else {\n this._setupPointerEnterEventsIfNeeded();\n }\n }\n /** The default delay in ms before showing the tooltip after show is called */\n get showDelay() {\n return this._showDelay;\n }\n set showDelay(value) {\n this._showDelay = coerceNumberProperty(value);\n }\n /** The default delay in ms before hiding the tooltip after hide is called */\n get hideDelay() {\n return this._hideDelay;\n }\n set hideDelay(value) {\n this._hideDelay = coerceNumberProperty(value);\n if (this._tooltipInstance) {\n this._tooltipInstance._mouseLeaveHideDelay = this._hideDelay;\n }\n }\n /** The message to be displayed in the tooltip */\n get message() {\n return this._message;\n }\n set message(value) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message, 'tooltip');\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n // Must convert with `String(value)`, not `${value}`, otherwise Closure Compiler optimises\n // away the string-conversion: https://github.com/angular/components/issues/20684\n this._message = value != null ? String(value).trim() : '';\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n }\n else {\n this._setupPointerEnterEventsIfNeeded();\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message, 'tooltip');\n });\n });\n }\n }\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n get tooltipClass() {\n return this._tooltipClass;\n }\n set tooltipClass(value) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n ngAfterViewInit() {\n // This needs to happen after view init so the initial values for all inputs have been set.\n this._viewInitialized = true;\n this._setupPointerEnterEventsIfNeeded();\n this._focusMonitor\n .monitor(this._elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n this._ngZone.run(() => this.hide(0));\n }\n else if (origin === 'keyboard') {\n this._ngZone.run(() => this.show());\n }\n });\n }\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy() {\n const nativeElement = this._elementRef.nativeElement;\n clearTimeout(this._touchstartTimeout);\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n // Clean up the event listeners set in the constructor\n this._passiveListeners.forEach(([event, listener]) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.length = 0;\n this._destroyed.next();\n this._destroyed.complete();\n this._ariaDescriber.removeDescription(nativeElement, this.message, 'tooltip');\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay = this.showDelay) {\n if (this.disabled || !this.message || this._isTooltipVisible()) {\n this._tooltipInstance?._cancelPendingAnimations();\n return;\n }\n const overlayRef = this._createOverlay();\n this._detach();\n this._portal =\n this._portal || new ComponentPortal(this._tooltipComponent, this._viewContainerRef);\n const instance = (this._tooltipInstance = overlayRef.attach(this._portal).instance);\n instance._triggerElement = this._elementRef.nativeElement;\n instance._mouseLeaveHideDelay = this._hideDelay;\n instance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n instance.show(delay);\n }\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay = this.hideDelay) {\n const instance = this._tooltipInstance;\n if (instance) {\n if (instance.isVisible()) {\n instance.hide(delay);\n }\n else {\n instance._cancelPendingAnimations();\n this._detach();\n }\n }\n }\n /** Shows/hides the tooltip */\n toggle() {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible() {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n /** Create the overlay config and position strategy */\n _createOverlay() {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`)\n .withFlexibleDimensions(false)\n .withViewportMargin(this._viewportMargin)\n .withScrollableContainers(scrollableAncestors);\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {\n this._updateCurrentPositionClass(change.connectionPair);\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,\n scrollStrategy: this._scrollStrategy(),\n });\n this._updatePosition(this._overlayRef);\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._tooltipInstance?._handleBodyInteraction());\n this._overlayRef\n .keydownEvents()\n .pipe(takeUntil(this._destroyed))\n .subscribe(event => {\n if (this._isTooltipVisible() && event.keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n });\n if (this._defaultOptions?.disableTooltipInteractivity) {\n this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`);\n }\n return this._overlayRef;\n }\n /** Detaches the currently-attached tooltip. */\n _detach() {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n this._tooltipInstance = null;\n }\n /** Updates the position of the current tooltip. */\n _updatePosition(overlayRef) {\n const position = overlayRef.getConfig().positionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n position.withPositions([\n this._addOffset({ ...origin.main, ...overlay.main }),\n this._addOffset({ ...origin.fallback, ...overlay.fallback }),\n ]);\n }\n /** Adds the configured offset to a position. Used as a hook for child classes. */\n _addOffset(position) {\n return position;\n }\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin() {\n const isLtr = !this._dir || this._dir.value == 'ltr';\n const position = this.position;\n let originPosition;\n if (position == 'above' || position == 'below') {\n originPosition = { originX: 'center', originY: position == 'above' ? 'top' : 'bottom' };\n }\n else if (position == 'before' ||\n (position == 'left' && isLtr) ||\n (position == 'right' && !isLtr)) {\n originPosition = { originX: 'start', originY: 'center' };\n }\n else if (position == 'after' ||\n (position == 'right' && isLtr) ||\n (position == 'left' && !isLtr)) {\n originPosition = { originX: 'end', originY: 'center' };\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getMatTooltipInvalidPositionError(position);\n }\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition() {\n const isLtr = !this._dir || this._dir.value == 'ltr';\n const position = this.position;\n let overlayPosition;\n if (position == 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n }\n else if (position == 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n }\n else if (position == 'before' ||\n (position == 'left' && isLtr) ||\n (position == 'right' && !isLtr)) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n }\n else if (position == 'after' ||\n (position == 'right' && isLtr) ||\n (position == 'left' && !isLtr)) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getMatTooltipInvalidPositionError(position);\n }\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n _updateTooltipMessage() {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n this._ngZone.onMicrotaskEmpty.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n if (this._tooltipInstance) {\n this._overlayRef.updatePosition();\n }\n });\n }\n }\n /** Updates the tooltip class */\n _setTooltipClass(tooltipClass) {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n /** Inverts an overlay position. */\n _invertPosition(x, y) {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n }\n else if (y === 'bottom') {\n y = 'top';\n }\n }\n else {\n if (x === 'end') {\n x = 'start';\n }\n else if (x === 'start') {\n x = 'end';\n }\n }\n return { x, y };\n }\n /** Updates the class on the overlay panel based on the current position of the tooltip. */\n _updateCurrentPositionClass(connectionPair) {\n const { overlayY, originX, originY } = connectionPair;\n let newPosition;\n // If the overlay is in the middle along the Y axis,\n // it means that it's either before or after.\n if (overlayY === 'center') {\n // Note that since this information is used for styling, we want to\n // resolve `start` and `end` to their real values, otherwise consumers\n // would have to remember to do it themselves on each consumption.\n if (this._dir && this._dir.value === 'rtl') {\n newPosition = originX === 'end' ? 'left' : 'right';\n }\n else {\n newPosition = originX === 'start' ? 'left' : 'right';\n }\n }\n else {\n newPosition = overlayY === 'bottom' && originY === 'top' ? 'above' : 'below';\n }\n if (newPosition !== this._currentPosition) {\n const overlayRef = this._overlayRef;\n if (overlayRef) {\n const classPrefix = `${this._cssClassPrefix}-${PANEL_CLASS}-`;\n overlayRef.removePanelClass(classPrefix + this._currentPosition);\n overlayRef.addPanelClass(classPrefix + newPosition);\n }\n this._currentPosition = newPosition;\n }\n }\n /** Binds the pointer events to the tooltip trigger. */\n _setupPointerEnterEventsIfNeeded() {\n // Optimization: Defer hooking up events if there's no message or the tooltip is disabled.\n if (this._disabled ||\n !this.message ||\n !this._viewInitialized ||\n this._passiveListeners.length) {\n return;\n }\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this._platformSupportsMouseEvents()) {\n this._passiveListeners.push([\n 'mouseenter',\n () => {\n this._setupPointerExitEventsIfNeeded();\n this.show();\n },\n ]);\n }\n else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n this._passiveListeners.push([\n 'touchstart',\n () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n this._setupPointerExitEventsIfNeeded();\n clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = setTimeout(() => this.show(), LONGPRESS_DELAY);\n },\n ]);\n }\n this._addListeners(this._passiveListeners);\n }\n _setupPointerExitEventsIfNeeded() {\n if (this._pointerExitEventsInitialized) {\n return;\n }\n this._pointerExitEventsInitialized = true;\n const exitListeners = [];\n if (this._platformSupportsMouseEvents()) {\n exitListeners.push([\n 'mouseleave',\n event => {\n const newTarget = event.relatedTarget;\n if (!newTarget || !this._overlayRef?.overlayElement.contains(newTarget)) {\n this.hide();\n }\n },\n ], ['wheel', event => this._wheelListener(event)]);\n }\n else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n exitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n }\n this._addListeners(exitListeners);\n this._passiveListeners.push(...exitListeners);\n }\n _addListeners(listeners) {\n listeners.forEach(([event, listener]) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n _platformSupportsMouseEvents() {\n return !this._platform.IOS && !this._platform.ANDROID;\n }\n /** Listener for the `wheel` event on the element. */\n _wheelListener(event) {\n if (this._isTooltipVisible()) {\n const elementUnderPointer = this._document.elementFromPoint(event.clientX, event.clientY);\n const element = this._elementRef.nativeElement;\n // On non-touch devices we depend on the `mouseleave` event to close the tooltip, but it\n // won't fire if the user scrolls away using the wheel without moving their cursor. We\n // work around it by finding the element under the user's cursor and closing the tooltip\n // if it's not the trigger.\n if (elementUnderPointer !== element && !element.contains(elementUnderPointer)) {\n this.hide();\n }\n }\n }\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n _disableNativeGesturesIfNecessary() {\n const gestures = this.touchGestures;\n if (gestures !== 'off') {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect =\n style.msUserSelect =\n style.webkitUserSelect =\n style.MozUserSelect =\n 'none';\n }\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n style.webkitUserDrag = 'none';\n }\n style.touchAction = 'none';\n style.webkitTapHighlightColor = 'transparent';\n }\n }\n}\n_MatTooltipBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatTooltipBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatTooltipBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _MatTooltipBase, inputs: { position: [\"matTooltipPosition\", \"position\"], disabled: [\"matTooltipDisabled\", \"disabled\"], showDelay: [\"matTooltipShowDelay\", \"showDelay\"], hideDelay: [\"matTooltipHideDelay\", \"hideDelay\"], touchGestures: [\"matTooltipTouchGestures\", \"touchGestures\"], message: [\"matTooltip\", \"message\"], tooltipClass: [\"matTooltipClass\", \"tooltipClass\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _MatTooltipBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: i4.AriaDescriber }, { type: i4.FocusMonitor }, { type: undefined }, { type: i5.Directionality }, { type: undefined }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { position: [{\n type: Input,\n args: ['matTooltipPosition']\n }], disabled: [{\n type: Input,\n args: ['matTooltipDisabled']\n }], showDelay: [{\n type: Input,\n args: ['matTooltipShowDelay']\n }], hideDelay: [{\n type: Input,\n args: ['matTooltipHideDelay']\n }], touchGestures: [{\n type: Input,\n args: ['matTooltipTouchGestures']\n }], message: [{\n type: Input,\n args: ['matTooltip']\n }], tooltipClass: [{\n type: Input,\n args: ['matTooltipClass']\n }] } });\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\nclass MatTooltip extends _MatTooltipBase {\n constructor(overlay, elementRef, scrollDispatcher, viewContainerRef, ngZone, platform, ariaDescriber, focusMonitor, scrollStrategy, dir, defaultOptions, _document) {\n super(overlay, elementRef, scrollDispatcher, viewContainerRef, ngZone, platform, ariaDescriber, focusMonitor, scrollStrategy, dir, defaultOptions, _document);\n this._tooltipComponent = TooltipComponent;\n }\n}\nMatTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltip, deps: [{ token: i1.Overlay }, { token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: i4.AriaDescriber }, { token: i4.FocusMonitor }, { token: MAT_TOOLTIP_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }, { token: MAT_TOOLTIP_DEFAULT_OPTIONS, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nMatTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: MatTooltip, selector: \"[matTooltip]\", host: { classAttribute: \"mat-tooltip-trigger\" }, exportAs: [\"matTooltip\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltip, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTooltip]',\n exportAs: 'matTooltip',\n host: {\n 'class': 'mat-tooltip-trigger',\n },\n }]\n }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: i4.AriaDescriber }, { type: i4.FocusMonitor }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TOOLTIP_SCROLL_STRATEGY]\n }] }, { type: i5.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_TOOLTIP_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nclass _TooltipComponentBase {\n constructor(_changeDetectorRef, animationMode) {\n this._changeDetectorRef = _changeDetectorRef;\n /** Whether interactions on the page should close the tooltip */\n this._closeOnInteraction = false;\n /** Whether the tooltip is currently visible. */\n this._isVisible = false;\n /** Subject for notifying that the tooltip has been hidden from the view */\n this._onHide = new Subject();\n this._animationsDisabled = animationMode === 'NoopAnimations';\n }\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay) {\n // Cancel the delayed hide if it is scheduled\n clearTimeout(this._hideTimeoutId);\n this._showTimeoutId = setTimeout(() => {\n this._toggleVisibility(true);\n this._showTimeoutId = undefined;\n }, delay);\n }\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay) {\n // Cancel the delayed show if it is scheduled\n clearTimeout(this._showTimeoutId);\n this._hideTimeoutId = setTimeout(() => {\n this._toggleVisibility(false);\n this._hideTimeoutId = undefined;\n }, delay);\n }\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden() {\n return this._onHide;\n }\n /** Whether the tooltip is being displayed. */\n isVisible() {\n return this._isVisible;\n }\n ngOnDestroy() {\n this._cancelPendingAnimations();\n this._onHide.complete();\n this._triggerElement = null;\n }\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction() {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck() {\n this._changeDetectorRef.markForCheck();\n }\n _handleMouseLeave({ relatedTarget }) {\n if (!relatedTarget || !this._triggerElement.contains(relatedTarget)) {\n if (this.isVisible()) {\n this.hide(this._mouseLeaveHideDelay);\n }\n else {\n this._finalizeAnimation(false);\n }\n }\n }\n /**\n * Callback for when the timeout in this.show() gets completed.\n * This method is only needed by the mdc-tooltip, and so it is only implemented\n * in the mdc-tooltip, not here.\n */\n _onShow() { }\n /** Event listener dispatched when an animation on the tooltip finishes. */\n _handleAnimationEnd({ animationName }) {\n if (animationName === this._showAnimation || animationName === this._hideAnimation) {\n this._finalizeAnimation(animationName === this._showAnimation);\n }\n }\n /** Cancels any pending animation sequences. */\n _cancelPendingAnimations() {\n clearTimeout(this._showTimeoutId);\n clearTimeout(this._hideTimeoutId);\n this._showTimeoutId = this._hideTimeoutId = undefined;\n }\n /** Handles the cleanup after an animation has finished. */\n _finalizeAnimation(toVisible) {\n if (toVisible) {\n this._closeOnInteraction = true;\n }\n else if (!this.isVisible()) {\n this._onHide.next();\n }\n }\n /** Toggles the visibility of the tooltip element. */\n _toggleVisibility(isVisible) {\n // We set the classes directly here ourselves so that toggling the tooltip state\n // isn't bound by change detection. This allows us to hide it even if the\n // view ref has been detached from the CD tree.\n const tooltip = this._tooltip.nativeElement;\n const showClass = this._showAnimation;\n const hideClass = this._hideAnimation;\n tooltip.classList.remove(isVisible ? hideClass : showClass);\n tooltip.classList.add(isVisible ? showClass : hideClass);\n this._isVisible = isVisible;\n // It's common for internal apps to disable animations using `* { animation: none !important }`\n // which can break the opening sequence. Try to detect such cases and work around them.\n if (isVisible && !this._animationsDisabled && typeof getComputedStyle === 'function') {\n const styles = getComputedStyle(tooltip);\n // Use `getPropertyValue` to avoid issues with property renaming.\n if (styles.getPropertyValue('animation-duration') === '0s' ||\n styles.getPropertyValue('animation-name') === 'none') {\n this._animationsDisabled = true;\n }\n }\n if (isVisible) {\n this._onShow();\n }\n if (this._animationsDisabled) {\n tooltip.classList.add('_mat-animation-noopable');\n this._finalizeAnimation(isVisible);\n }\n }\n}\n_TooltipComponentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _TooltipComponentBase, deps: [{ token: i0.ChangeDetectorRef }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_TooltipComponentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.0\", type: _TooltipComponentBase, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: _TooltipComponentBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; } });\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\nclass TooltipComponent extends _TooltipComponentBase {\n constructor(changeDetectorRef, _breakpointObserver, animationMode) {\n super(changeDetectorRef, animationMode);\n this._breakpointObserver = _breakpointObserver;\n /** Stream that emits whether the user has a handset-sized display. */\n this._isHandset = this._breakpointObserver.observe(Breakpoints.Handset);\n this._showAnimation = 'mat-tooltip-show';\n this._hideAnimation = 'mat-tooltip-hide';\n }\n}\nTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i6.BreakpointObserver }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.2.0\", type: TooltipComponent, selector: \"mat-tooltip-component\", host: { attributes: { \"aria-hidden\": \"true\" }, listeners: { \"mouseleave\": \"_handleMouseLeave($event)\" }, properties: { \"style.zoom\": \"isVisible() ? 1 : null\" } }, viewQueries: [{ propertyName: \"_tooltip\", first: true, predicate: [\"tooltip\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"
      {{message}}
      \\n\", styles: [\".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\"], dependencies: [{ kind: \"directive\", type: i7.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"pipe\", type: i7.AsyncPipe, name: \"async\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: TooltipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': 'isVisible() ? 1 : null',\n '(mouseleave)': '_handleMouseLeave($event)',\n 'aria-hidden': 'true',\n }, template: \"
      {{message}}
      \\n\", styles: [\".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i6.BreakpointObserver }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _tooltip: [{\n type: ViewChild,\n args: ['tooltip', {\n // Use a static query here since we interact directly with\n // the DOM which can happen before `ngAfterViewInit`.\n static: true,\n }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatTooltipModule {\n}\nMatTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltipModule, declarations: [MatTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule], exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });\nMatTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltipModule, providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MatCommonModule, CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.0\", ngImport: i0, type: MatTooltipModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MatTooltip, TooltipComponent],\n providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by MatTooltip.\n * @docs-private\n */\nconst matTooltipAnimations = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),\n state('visible', style({ transform: 'scale(1)' })),\n transition('* => visible', animate('200ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n style({ opacity: 0, transform: 'scale(0)', offset: 0 }),\n style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),\n style({ opacity: 1, transform: 'scale(1)', offset: 1 }),\n ]))),\n transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),\n ]),\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, MatTooltip, MatTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, _MatTooltipBase, _TooltipComponentBase, getMatTooltipInvalidPositionError, matTooltipAnimations };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, Injectable, EventEmitter, ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Output, ViewChild, InjectionToken, forwardRef, TemplateRef, Attribute, HostBinding, ContentChild, ContentChildren, HostListener, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { takeUntil, auditTime, startWith, tap, debounceTime, filter, map } from 'rxjs/operators';\nimport { animationFrameScheduler, asapScheduler, Subject, fromEvent, merge } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\n\nconst unescapedHTMLExp = /[&<>\"']/g;\nconst hasUnescapedHTMLExp = RegExp(unescapedHTMLExp.source);\nconst htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': '''\n};\nfunction escapeHTML(value) {\n return (value && hasUnescapedHTMLExp.test(value)) ?\n value.replace(unescapedHTMLExp, chr => htmlEscapes[chr]) :\n value;\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isObject(value) {\n return typeof value === 'object' && isDefined(value);\n}\nfunction isPromise(value) {\n return value instanceof Promise;\n}\nfunction isFunction(value) {\n return value instanceof Function;\n}\n\nclass NgItemLabelDirective {\n constructor(element) {\n this.element = element;\n this.escape = true;\n }\n ngOnChanges(changes) {\n this.element.nativeElement.innerHTML = this.escape ?\n escapeHTML(this.ngItemLabel) :\n this.ngItemLabel;\n }\n}\nNgItemLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgItemLabelDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgItemLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgItemLabelDirective, selector: \"[ngItemLabel]\", inputs: { ngItemLabel: \"ngItemLabel\", escape: \"escape\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgItemLabelDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ngItemLabel]' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { ngItemLabel: [{\n type: Input\n }], escape: [{\n type: Input\n }] } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgOptionTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgOptionTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgOptionTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgOptionTemplateDirective, selector: \"[ng-option-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptionTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-option-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgOptgroupTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgOptgroupTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptgroupTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgOptgroupTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgOptgroupTemplateDirective, selector: \"[ng-optgroup-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptgroupTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-optgroup-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgLabelTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLabelTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgLabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgLabelTemplateDirective, selector: \"[ng-label-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLabelTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-label-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgMultiLabelTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgMultiLabelTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgMultiLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgMultiLabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgMultiLabelTemplateDirective, selector: \"[ng-multi-label-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgMultiLabelTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-multi-label-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgHeaderTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgHeaderTemplateDirective, selector: \"[ng-header-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgHeaderTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-header-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgFooterTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgFooterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgFooterTemplateDirective, selector: \"[ng-footer-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgFooterTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-footer-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgNotFoundTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgNotFoundTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgNotFoundTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgNotFoundTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgNotFoundTemplateDirective, selector: \"[ng-notfound-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgNotFoundTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-notfound-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgTypeToSearchTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgTypeToSearchTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgTypeToSearchTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTypeToSearchTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgTypeToSearchTemplateDirective, selector: \"[ng-typetosearch-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgTypeToSearchTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-typetosearch-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgLoadingTextTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLoadingTextTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLoadingTextTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgLoadingTextTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgLoadingTextTemplateDirective, selector: \"[ng-loadingtext-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLoadingTextTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-loadingtext-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgTagTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgTagTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgTagTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTagTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgTagTemplateDirective, selector: \"[ng-tag-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgTagTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-tag-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// eslint-disable-next-line @angular-eslint/directive-selector\nclass NgLoadingSpinnerTemplateDirective {\n constructor(template) {\n this.template = template;\n }\n}\nNgLoadingSpinnerTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgLoadingSpinnerTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgLoadingSpinnerTemplateDirective, selector: \"[ng-loadingspinner-tmp]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgLoadingSpinnerTemplateDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng-loadingspinner-tmp]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\nfunction newId() {\n // First character is an 'a', it's good practice to tag id to begin with a letter\n return 'axxxxxxxxxxx'.replace(/[x]/g, () => {\n // eslint-disable-next-line no-bitwise\n const val = Math.random() * 16 | 0;\n return val.toString(16);\n });\n}\n\nconst diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n};\nfunction stripSpecialChars(text) {\n const match = (a) => diacritics[a] || a;\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n}\n\nclass ItemsList {\n constructor(_ngSelect, _selectionModel) {\n this._ngSelect = _ngSelect;\n this._selectionModel = _selectionModel;\n this._items = [];\n this._filteredItems = [];\n this._markedIndex = -1;\n }\n get items() {\n return this._items;\n }\n get filteredItems() {\n return this._filteredItems;\n }\n get markedIndex() {\n return this._markedIndex;\n }\n get selectedItems() {\n return this._selectionModel.value;\n }\n get markedItem() {\n return this._filteredItems[this._markedIndex];\n }\n get noItemsToSelect() {\n return this._ngSelect.hideSelected && this._items.length === this.selectedItems.length;\n }\n get maxItemsSelected() {\n return this._ngSelect.multiple && this._ngSelect.maxSelectedItems <= this.selectedItems.length;\n }\n get lastSelectedItem() {\n let i = this.selectedItems.length - 1;\n for (; i >= 0; i--) {\n const item = this.selectedItems[i];\n if (!item.disabled) {\n return item;\n }\n }\n return null;\n }\n setItems(items) {\n this._items = items.map((item, index) => this.mapItem(item, index));\n if (this._ngSelect.groupBy) {\n this._groups = this._groupBy(this._items, this._ngSelect.groupBy);\n this._items = this._flatten(this._groups);\n }\n else {\n this._groups = new Map();\n this._groups.set(undefined, this._items);\n }\n this._filteredItems = [...this._items];\n }\n select(item) {\n if (item.selected || this.maxItemsSelected) {\n return;\n }\n const multiple = this._ngSelect.multiple;\n if (!multiple) {\n this.clearSelected();\n }\n this._selectionModel.select(item, multiple, this._ngSelect.selectableGroupAsModel);\n if (this._ngSelect.hideSelected) {\n this._hideSelected(item);\n }\n }\n unselect(item) {\n if (!item.selected) {\n return;\n }\n this._selectionModel.unselect(item, this._ngSelect.multiple);\n if (this._ngSelect.hideSelected && isDefined(item.index) && this._ngSelect.multiple) {\n this._showSelected(item);\n }\n }\n findItem(value) {\n let findBy;\n if (this._ngSelect.compareWith) {\n findBy = item => this._ngSelect.compareWith(item.value, value);\n }\n else if (this._ngSelect.bindValue) {\n findBy = item => !item.children && this.resolveNested(item.value, this._ngSelect.bindValue) === value;\n }\n else {\n findBy = item => item.value === value ||\n !item.children && item.label && item.label === this.resolveNested(value, this._ngSelect.bindLabel);\n }\n return this._items.find(item => findBy(item));\n }\n addItem(item) {\n const option = this.mapItem(item, this._items.length);\n this._items.push(option);\n this._filteredItems.push(option);\n return option;\n }\n clearSelected(keepDisabled = false) {\n this._selectionModel.clear(keepDisabled);\n this._items.forEach(item => {\n item.selected = keepDisabled && item.selected && item.disabled;\n item.marked = false;\n });\n if (this._ngSelect.hideSelected) {\n this.resetFilteredItems();\n }\n }\n findByLabel(term) {\n term = stripSpecialChars(term).toLocaleLowerCase();\n return this.filteredItems.find(item => {\n const label = stripSpecialChars(item.label).toLocaleLowerCase();\n return label.substr(0, term.length) === term;\n });\n }\n filter(term) {\n if (!term) {\n this.resetFilteredItems();\n return;\n }\n this._filteredItems = [];\n term = this._ngSelect.searchFn ? term : stripSpecialChars(term).toLocaleLowerCase();\n const match = this._ngSelect.searchFn || this._defaultSearchFn;\n const hideSelected = this._ngSelect.hideSelected;\n for (const key of Array.from(this._groups.keys())) {\n const matchedItems = [];\n for (const item of this._groups.get(key)) {\n if (hideSelected && (item.parent && item.parent.selected || item.selected)) {\n continue;\n }\n const searchItem = this._ngSelect.searchFn ? item.value : item;\n if (match(term, searchItem)) {\n matchedItems.push(item);\n }\n }\n if (matchedItems.length > 0) {\n const [last] = matchedItems.slice(-1);\n if (last.parent) {\n const head = this._items.find(x => x === last.parent);\n this._filteredItems.push(head);\n }\n this._filteredItems.push(...matchedItems);\n }\n }\n }\n resetFilteredItems() {\n if (this._filteredItems.length === this._items.length) {\n return;\n }\n if (this._ngSelect.hideSelected && this.selectedItems.length > 0) {\n this._filteredItems = this._items.filter(x => !x.selected);\n }\n else {\n this._filteredItems = this._items;\n }\n }\n unmarkItem() {\n this._markedIndex = -1;\n }\n markNextItem() {\n this._stepToItem(+1);\n }\n markPreviousItem() {\n this._stepToItem(-1);\n }\n markItem(item) {\n this._markedIndex = this._filteredItems.indexOf(item);\n }\n markSelectedOrDefault(markDefault) {\n if (this._filteredItems.length === 0) {\n return;\n }\n const lastMarkedIndex = this._getLastMarkedIndex();\n if (lastMarkedIndex > -1) {\n this._markedIndex = lastMarkedIndex;\n }\n else {\n this._markedIndex = markDefault ? this.filteredItems.findIndex(x => !x.disabled) : -1;\n }\n }\n resolveNested(option, key) {\n if (!isObject(option)) {\n return option;\n }\n if (key.indexOf('.') === -1) {\n return option[key];\n }\n else {\n const keys = key.split('.');\n let value = option;\n for (let i = 0, len = keys.length; i < len; ++i) {\n if (value == null) {\n return null;\n }\n value = value[keys[i]];\n }\n return value;\n }\n }\n mapItem(item, index) {\n const label = isDefined(item.$ngOptionLabel) ? item.$ngOptionLabel : this.resolveNested(item, this._ngSelect.bindLabel);\n const value = isDefined(item.$ngOptionValue) ? item.$ngOptionValue : item;\n return {\n index,\n label: isDefined(label) ? label.toString() : '',\n value,\n disabled: item.disabled,\n htmlId: `${this._ngSelect.dropdownId}-${index}`,\n };\n }\n mapSelectedItems() {\n const multiple = this._ngSelect.multiple;\n for (const selected of this.selectedItems) {\n const value = this._ngSelect.bindValue ? this.resolveNested(selected.value, this._ngSelect.bindValue) : selected.value;\n const item = isDefined(value) ? this.findItem(value) : null;\n this._selectionModel.unselect(selected, multiple);\n this._selectionModel.select(item || selected, multiple, this._ngSelect.selectableGroupAsModel);\n }\n if (this._ngSelect.hideSelected) {\n this._filteredItems = this.filteredItems.filter(x => this.selectedItems.indexOf(x) === -1);\n }\n }\n _showSelected(item) {\n this._filteredItems.push(item);\n if (item.parent) {\n const parent = item.parent;\n const parentExists = this._filteredItems.find(x => x === parent);\n if (!parentExists) {\n this._filteredItems.push(parent);\n }\n }\n else if (item.children) {\n for (const child of item.children) {\n child.selected = false;\n this._filteredItems.push(child);\n }\n }\n this._filteredItems = [...this._filteredItems.sort((a, b) => (a.index - b.index))];\n }\n _hideSelected(item) {\n this._filteredItems = this._filteredItems.filter(x => x !== item);\n if (item.parent) {\n const children = item.parent.children;\n if (children.every(x => x.selected)) {\n this._filteredItems = this._filteredItems.filter(x => x !== item.parent);\n }\n }\n else if (item.children) {\n this._filteredItems = this.filteredItems.filter(x => x.parent !== item);\n }\n }\n _defaultSearchFn(search, opt) {\n const label = stripSpecialChars(opt.label).toLocaleLowerCase();\n return label.indexOf(search) > -1;\n }\n _getNextItemIndex(steps) {\n if (steps > 0) {\n return (this._markedIndex >= this._filteredItems.length - 1) ? 0 : (this._markedIndex + 1);\n }\n return (this._markedIndex <= 0) ? (this._filteredItems.length - 1) : (this._markedIndex - 1);\n }\n _stepToItem(steps) {\n if (this._filteredItems.length === 0 || this._filteredItems.every(x => x.disabled)) {\n return;\n }\n this._markedIndex = this._getNextItemIndex(steps);\n if (this.markedItem.disabled) {\n this._stepToItem(steps);\n }\n }\n _getLastMarkedIndex() {\n if (this._ngSelect.hideSelected) {\n return -1;\n }\n if (this._markedIndex > -1 && this.markedItem === undefined) {\n return -1;\n }\n const selectedIndex = this._filteredItems.indexOf(this.lastSelectedItem);\n if (this.lastSelectedItem && selectedIndex < 0) {\n return -1;\n }\n return Math.max(this.markedIndex, selectedIndex);\n }\n _groupBy(items, prop) {\n const groups = new Map();\n if (items.length === 0) {\n return groups;\n }\n // Check if items are already grouped by given key.\n if (Array.isArray(items[0].value[prop])) {\n for (const item of items) {\n const children = (item.value[prop] || []).map((x, index) => this.mapItem(x, index));\n groups.set(item, children);\n }\n return groups;\n }\n const isFnKey = isFunction(this._ngSelect.groupBy);\n const keyFn = (item) => {\n const key = isFnKey ? prop(item.value) : item.value[prop];\n return isDefined(key) ? key : undefined;\n };\n // Group items by key.\n for (const item of items) {\n const key = keyFn(item);\n const group = groups.get(key);\n if (group) {\n group.push(item);\n }\n else {\n groups.set(key, [item]);\n }\n }\n return groups;\n }\n _flatten(groups) {\n const isGroupByFn = isFunction(this._ngSelect.groupBy);\n const items = [];\n for (const key of Array.from(groups.keys())) {\n let i = items.length;\n if (key === undefined) {\n const withoutGroup = groups.get(undefined) || [];\n items.push(...withoutGroup.map(x => {\n x.index = i++;\n return x;\n }));\n continue;\n }\n const isObjectKey = isObject(key);\n const parent = {\n label: isObjectKey ? '' : String(key),\n children: undefined,\n parent: null,\n index: i++,\n disabled: !this._ngSelect.selectableGroup,\n htmlId: newId(),\n };\n const groupKey = isGroupByFn ? this._ngSelect.bindLabel : this._ngSelect.groupBy;\n const groupValue = this._ngSelect.groupValue || (() => {\n if (isObjectKey) {\n return key.value;\n }\n return { [groupKey]: key };\n });\n const children = groups.get(key).map(x => {\n x.parent = parent;\n x.children = undefined;\n x.index = i++;\n return x;\n });\n parent.children = children;\n parent.value = groupValue(key, children.map(x => x.value));\n items.push(parent);\n items.push(...children);\n }\n return items;\n }\n}\n\nvar KeyCode;\n(function (KeyCode) {\n KeyCode[KeyCode[\"Tab\"] = 9] = \"Tab\";\n KeyCode[KeyCode[\"Enter\"] = 13] = \"Enter\";\n KeyCode[KeyCode[\"Esc\"] = 27] = \"Esc\";\n KeyCode[KeyCode[\"Space\"] = 32] = \"Space\";\n KeyCode[KeyCode[\"ArrowUp\"] = 38] = \"ArrowUp\";\n KeyCode[KeyCode[\"ArrowDown\"] = 40] = \"ArrowDown\";\n KeyCode[KeyCode[\"Backspace\"] = 8] = \"Backspace\";\n})(KeyCode || (KeyCode = {}));\n\nclass NgDropdownPanelService {\n constructor() {\n this._dimensions = {\n itemHeight: 0,\n panelHeight: 0,\n itemsPerViewport: 0\n };\n }\n get dimensions() {\n return this._dimensions;\n }\n calculateItems(scrollPos, itemsLength, buffer) {\n const d = this._dimensions;\n const scrollHeight = d.itemHeight * itemsLength;\n const scrollTop = Math.max(0, scrollPos);\n const indexByScrollTop = scrollTop / scrollHeight * itemsLength;\n let end = Math.min(itemsLength, Math.ceil(indexByScrollTop) + (d.itemsPerViewport + 1));\n const maxStartEnd = end;\n const maxStart = Math.max(0, maxStartEnd - d.itemsPerViewport);\n let start = Math.min(maxStart, Math.floor(indexByScrollTop));\n let topPadding = d.itemHeight * Math.ceil(start) - (d.itemHeight * Math.min(start, buffer));\n topPadding = !isNaN(topPadding) ? topPadding : 0;\n start = !isNaN(start) ? start : -1;\n end = !isNaN(end) ? end : -1;\n start -= buffer;\n start = Math.max(0, start);\n end += buffer;\n end = Math.min(itemsLength, end);\n return {\n topPadding,\n scrollHeight,\n start,\n end\n };\n }\n setDimensions(itemHeight, panelHeight) {\n const itemsPerViewport = Math.max(1, Math.floor(panelHeight / itemHeight));\n this._dimensions = {\n itemHeight,\n panelHeight,\n itemsPerViewport\n };\n }\n getScrollTo(itemTop, itemHeight, lastScroll) {\n const { panelHeight } = this.dimensions;\n const itemBottom = itemTop + itemHeight;\n const top = lastScroll;\n const bottom = top + panelHeight;\n if (panelHeight >= itemBottom && lastScroll === itemTop) {\n return null;\n }\n if (itemBottom > bottom) {\n return top + itemBottom - bottom;\n }\n else if (itemTop <= top) {\n return itemTop;\n }\n return null;\n }\n}\nNgDropdownPanelService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgDropdownPanelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgDropdownPanelService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgDropdownPanelService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgDropdownPanelService, decorators: [{\n type: Injectable\n }] });\n\nconst CSS_POSITIONS = ['top', 'right', 'bottom', 'left'];\nconst SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\nclass NgDropdownPanelComponent {\n constructor(_renderer, _zone, _panelService, _elementRef, _document) {\n this._renderer = _renderer;\n this._zone = _zone;\n this._panelService = _panelService;\n this._document = _document;\n this.items = [];\n this.position = 'auto';\n this.virtualScroll = false;\n this.filterValue = null;\n this.update = new EventEmitter();\n this.scroll = new EventEmitter();\n this.scrollToEnd = new EventEmitter();\n this.outsideClick = new EventEmitter();\n this._destroy$ = new Subject();\n this._scrollToEndFired = false;\n this._updateScrollHeight = false;\n this._lastScrollPosition = 0;\n this._dropdown = _elementRef.nativeElement;\n }\n get currentPosition() {\n return this._currentPosition;\n }\n get itemsLength() {\n return this._itemsLength;\n }\n set itemsLength(value) {\n if (value !== this._itemsLength) {\n this._itemsLength = value;\n this._onItemsLengthChanged();\n }\n }\n get _startOffset() {\n if (this.markedItem) {\n const { itemHeight, panelHeight } = this._panelService.dimensions;\n const offset = this.markedItem.index * itemHeight;\n return panelHeight > offset ? 0 : offset;\n }\n return 0;\n }\n ngOnInit() {\n this._select = this._dropdown.parentElement;\n this._virtualPadding = this.paddingElementRef.nativeElement;\n this._scrollablePanel = this.scrollElementRef.nativeElement;\n this._contentPanel = this.contentElementRef.nativeElement;\n this._handleScroll();\n this._handleOutsideClick();\n this._appendDropdown();\n this._setupMousedownListener();\n }\n ngOnChanges(changes) {\n if (changes.items) {\n const change = changes.items;\n this._onItemsChange(change.currentValue, change.firstChange);\n }\n }\n ngOnDestroy() {\n this._destroy$.next();\n this._destroy$.complete();\n this._destroy$.unsubscribe();\n if (this.appendTo) {\n this._renderer.removeChild(this._dropdown.parentNode, this._dropdown);\n }\n }\n scrollTo(option, startFromOption = false) {\n if (!option) {\n return;\n }\n const index = this.items.indexOf(option);\n if (index < 0 || index >= this.itemsLength) {\n return;\n }\n let scrollTo;\n if (this.virtualScroll) {\n const itemHeight = this._panelService.dimensions.itemHeight;\n scrollTo = this._panelService.getScrollTo(index * itemHeight, itemHeight, this._lastScrollPosition);\n }\n else {\n const item = this._dropdown.querySelector(`#${option.htmlId}`);\n const lastScroll = startFromOption ? item.offsetTop : this._lastScrollPosition;\n scrollTo = this._panelService.getScrollTo(item.offsetTop, item.clientHeight, lastScroll);\n }\n if (isDefined(scrollTo)) {\n this._scrollablePanel.scrollTop = scrollTo;\n }\n }\n scrollToTag() {\n const panel = this._scrollablePanel;\n panel.scrollTop = panel.scrollHeight - panel.clientHeight;\n }\n adjustPosition() {\n this._updateYPosition();\n }\n _handleDropdownPosition() {\n this._currentPosition = this._calculateCurrentPosition(this._dropdown);\n if (CSS_POSITIONS.includes(this._currentPosition)) {\n this._updateDropdownClass(this._currentPosition);\n }\n else {\n this._updateDropdownClass('bottom');\n }\n if (this.appendTo) {\n this._updateYPosition();\n }\n this._dropdown.style.opacity = '1';\n }\n _updateDropdownClass(currentPosition) {\n CSS_POSITIONS.forEach((position) => {\n const REMOVE_CSS_CLASS = `ng-select-${position}`;\n this._renderer.removeClass(this._dropdown, REMOVE_CSS_CLASS);\n this._renderer.removeClass(this._select, REMOVE_CSS_CLASS);\n });\n const ADD_CSS_CLASS = `ng-select-${currentPosition}`;\n this._renderer.addClass(this._dropdown, ADD_CSS_CLASS);\n this._renderer.addClass(this._select, ADD_CSS_CLASS);\n }\n _handleScroll() {\n this._zone.runOutsideAngular(() => {\n fromEvent(this.scrollElementRef.nativeElement, 'scroll')\n .pipe(takeUntil(this._destroy$), auditTime(0, SCROLL_SCHEDULER))\n .subscribe((e) => {\n const path = e.path || (e.composedPath && e.composedPath());\n const scrollTop = !path || path.length === 0 ? e.target.scrollTop : path[0].scrollTop;\n this._onContentScrolled(scrollTop);\n });\n });\n }\n _handleOutsideClick() {\n if (!this._document) {\n return;\n }\n this._zone.runOutsideAngular(() => {\n merge(fromEvent(this._document, 'touchstart', { capture: true }), fromEvent(this._document, 'mousedown', { capture: true })).pipe(takeUntil(this._destroy$))\n .subscribe($event => this._checkToClose($event));\n });\n }\n _checkToClose($event) {\n if (this._select.contains($event.target) || this._dropdown.contains($event.target)) {\n return;\n }\n const path = $event.path || ($event.composedPath && $event.composedPath());\n if ($event.target && $event.target.shadowRoot && path && path[0] && this._select.contains(path[0])) {\n return;\n }\n this._zone.run(() => this.outsideClick.emit());\n }\n _onItemsChange(items, firstChange) {\n this.items = items || [];\n this._scrollToEndFired = false;\n this.itemsLength = items.length;\n if (this.virtualScroll) {\n this._updateItemsRange(firstChange);\n }\n else {\n this._setVirtualHeight();\n this._updateItems(firstChange);\n }\n }\n _updateItems(firstChange) {\n this.update.emit(this.items);\n if (firstChange === false) {\n return;\n }\n this._zone.runOutsideAngular(() => {\n Promise.resolve().then(() => {\n const panelHeight = this._scrollablePanel.clientHeight;\n this._panelService.setDimensions(0, panelHeight);\n this._handleDropdownPosition();\n this.scrollTo(this.markedItem, firstChange);\n });\n });\n }\n _updateItemsRange(firstChange) {\n this._zone.runOutsideAngular(() => {\n this._measureDimensions().then(() => {\n if (firstChange) {\n this._renderItemsRange(this._startOffset);\n this._handleDropdownPosition();\n }\n else {\n this._renderItemsRange();\n }\n });\n });\n }\n _onContentScrolled(scrollTop) {\n if (this.virtualScroll) {\n this._renderItemsRange(scrollTop);\n }\n this._lastScrollPosition = scrollTop;\n this._fireScrollToEnd(scrollTop);\n }\n _updateVirtualHeight(height) {\n if (this._updateScrollHeight) {\n this._virtualPadding.style.height = `${height}px`;\n this._updateScrollHeight = false;\n }\n }\n _setVirtualHeight() {\n if (!this._virtualPadding) {\n return;\n }\n this._virtualPadding.style.height = `0px`;\n }\n _onItemsLengthChanged() {\n this._updateScrollHeight = true;\n }\n _renderItemsRange(scrollTop = null) {\n if (scrollTop && this._lastScrollPosition === scrollTop) {\n return;\n }\n scrollTop = scrollTop || this._scrollablePanel.scrollTop;\n const range = this._panelService.calculateItems(scrollTop, this.itemsLength, this.bufferAmount);\n this._updateVirtualHeight(range.scrollHeight);\n this._contentPanel.style.transform = `translateY(${range.topPadding}px)`;\n this._zone.run(() => {\n this.update.emit(this.items.slice(range.start, range.end));\n this.scroll.emit({ start: range.start, end: range.end });\n });\n if (isDefined(scrollTop) && this._lastScrollPosition === 0) {\n this._scrollablePanel.scrollTop = scrollTop;\n this._lastScrollPosition = scrollTop;\n }\n }\n _measureDimensions() {\n if (this._panelService.dimensions.itemHeight > 0 || this.itemsLength === 0) {\n return Promise.resolve(this._panelService.dimensions);\n }\n const [first] = this.items;\n this.update.emit([first]);\n return Promise.resolve().then(() => {\n const option = this._dropdown.querySelector(`#${first.htmlId}`);\n const optionHeight = option.clientHeight;\n this._virtualPadding.style.height = `${optionHeight * this.itemsLength}px`;\n const panelHeight = this._scrollablePanel.clientHeight;\n this._panelService.setDimensions(optionHeight, panelHeight);\n return this._panelService.dimensions;\n });\n }\n _fireScrollToEnd(scrollTop) {\n if (this._scrollToEndFired || scrollTop === 0) {\n return;\n }\n const padding = this.virtualScroll ?\n this._virtualPadding :\n this._contentPanel;\n if (scrollTop + this._dropdown.clientHeight >= padding.clientHeight - 1) {\n this._zone.run(() => this.scrollToEnd.emit());\n this._scrollToEndFired = true;\n }\n }\n _calculateCurrentPosition(dropdownEl) {\n if (this.position !== 'auto') {\n return this.position;\n }\n const selectRect = this._select.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const offsetTop = selectRect.top + window.pageYOffset;\n const height = selectRect.height;\n const dropdownHeight = dropdownEl.getBoundingClientRect().height;\n if (offsetTop + height + dropdownHeight > scrollTop + document.documentElement.clientHeight) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n _appendDropdown() {\n if (!this.appendTo) {\n return;\n }\n this._parent = document.querySelector(this.appendTo);\n if (!this._parent) {\n throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);\n }\n this._updateXPosition();\n this._parent.appendChild(this._dropdown);\n }\n _updateXPosition() {\n const select = this._select.getBoundingClientRect();\n const parent = this._parent.getBoundingClientRect();\n const offsetLeft = select.left - parent.left;\n this._dropdown.style.left = offsetLeft + 'px';\n this._dropdown.style.width = select.width + 'px';\n this._dropdown.style.minWidth = select.width + 'px';\n }\n _updateYPosition() {\n const select = this._select.getBoundingClientRect();\n const parent = this._parent.getBoundingClientRect();\n const delta = select.height;\n if (this._currentPosition === 'top') {\n const offsetBottom = parent.bottom - select.bottom;\n this._dropdown.style.bottom = offsetBottom + delta + 'px';\n this._dropdown.style.top = 'auto';\n }\n else if (this._currentPosition === 'bottom') {\n const offsetTop = select.top - parent.top;\n this._dropdown.style.top = offsetTop + delta + 'px';\n this._dropdown.style.bottom = 'auto';\n }\n }\n _setupMousedownListener() {\n this._zone.runOutsideAngular(() => {\n fromEvent(this._dropdown, 'mousedown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event) => {\n const target = event.target;\n if (target.tagName === 'INPUT') {\n return;\n }\n event.preventDefault();\n });\n });\n }\n}\nNgDropdownPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgDropdownPanelComponent, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }, { token: NgDropdownPanelService }, { token: i0.ElementRef }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nNgDropdownPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgDropdownPanelComponent, selector: \"ng-dropdown-panel\", inputs: { items: \"items\", markedItem: \"markedItem\", position: \"position\", appendTo: \"appendTo\", bufferAmount: \"bufferAmount\", virtualScroll: \"virtualScroll\", headerTemplate: \"headerTemplate\", footerTemplate: \"footerTemplate\", filterValue: \"filterValue\" }, outputs: { update: \"update\", scroll: \"scroll\", scrollToEnd: \"scrollToEnd\", outsideClick: \"outsideClick\" }, viewQueries: [{ propertyName: \"contentElementRef\", first: true, predicate: [\"content\"], descendants: true, read: ElementRef, static: true }, { propertyName: \"scrollElementRef\", first: true, predicate: [\"scroll\"], descendants: true, read: ElementRef, static: true }, { propertyName: \"paddingElementRef\", first: true, predicate: [\"padding\"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `\n
      \n \n
      \n
      \n
      \n
      \n \n
      \n
      \n
      \n \n
      \n `, isInline: true, dependencies: [{ kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgDropdownPanelComponent, decorators: [{\n type: Component,\n args: [{\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'ng-dropdown-panel',\n template: `\n
      \n \n
      \n
      \n
      \n
      \n \n
      \n
      \n
      \n \n
      \n `\n }]\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.NgZone }, { type: NgDropdownPanelService }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { items: [{\n type: Input\n }], markedItem: [{\n type: Input\n }], position: [{\n type: Input\n }], appendTo: [{\n type: Input\n }], bufferAmount: [{\n type: Input\n }], virtualScroll: [{\n type: Input\n }], headerTemplate: [{\n type: Input\n }], footerTemplate: [{\n type: Input\n }], filterValue: [{\n type: Input\n }], update: [{\n type: Output\n }], scroll: [{\n type: Output\n }], scrollToEnd: [{\n type: Output\n }], outsideClick: [{\n type: Output\n }], contentElementRef: [{\n type: ViewChild,\n args: ['content', { read: ElementRef, static: true }]\n }], scrollElementRef: [{\n type: ViewChild,\n args: ['scroll', { read: ElementRef, static: true }]\n }], paddingElementRef: [{\n type: ViewChild,\n args: ['padding', { read: ElementRef, static: true }]\n }] } });\n\nclass NgOptionComponent {\n constructor(elementRef) {\n this.elementRef = elementRef;\n this.stateChange$ = new Subject();\n this._disabled = false;\n }\n get disabled() { return this._disabled; }\n set disabled(value) { this._disabled = this._isDisabled(value); }\n get label() {\n return (this.elementRef.nativeElement.textContent || '').trim();\n }\n ngOnChanges(changes) {\n if (changes.disabled) {\n this.stateChange$.next({\n value: this.value,\n disabled: this._disabled\n });\n }\n }\n ngAfterViewChecked() {\n if (this.label !== this._previousLabel) {\n this._previousLabel = this.label;\n this.stateChange$.next({\n value: this.value,\n disabled: this._disabled,\n label: this.elementRef.nativeElement.innerHTML\n });\n }\n }\n ngOnDestroy() {\n this.stateChange$.complete();\n }\n _isDisabled(value) {\n return value != null && `${value}` !== 'false';\n }\n}\nNgOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nNgOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgOptionComponent, selector: \"ng-option\", inputs: { value: \"value\", disabled: \"disabled\" }, usesOnChanges: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgOptionComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'ng-option',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ``\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{\n type: Input\n }], disabled: [{\n type: Input\n }] } });\n\nclass NgSelectConfig {\n constructor() {\n this.notFoundText = 'No items found';\n this.typeToSearchText = 'Type to search';\n this.addTagText = 'Add item';\n this.loadingText = 'Loading...';\n this.clearAllText = 'Clear all';\n this.disableVirtualScroll = true;\n this.openOnEnter = true;\n this.appearance = 'underline';\n }\n}\nNgSelectConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgSelectConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nclass ConsoleService {\n warn(message) {\n console.warn(message);\n }\n}\nConsoleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: ConsoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nConsoleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: ConsoleService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: ConsoleService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nconst SELECTION_MODEL_FACTORY = new InjectionToken('ng-select-selection-model');\nclass NgSelectComponent {\n constructor(classes, autoFocus, config, newSelectionModel, _elementRef, _cd, _console) {\n this.classes = classes;\n this.autoFocus = autoFocus;\n this.config = config;\n this._cd = _cd;\n this._console = _console;\n this.markFirst = true;\n this.dropdownPosition = 'auto';\n this.loading = false;\n this.closeOnSelect = true;\n this.hideSelected = false;\n this.selectOnTab = false;\n this.bufferAmount = 4;\n this.selectableGroup = false;\n this.selectableGroupAsModel = true;\n this.searchFn = null;\n this.trackByFn = null;\n this.clearOnBackspace = true;\n this.labelForId = null;\n this.inputAttrs = {};\n this.readonly = false;\n this.searchWhileComposing = true;\n this.minTermLength = 0;\n this.editableSearchTerm = false;\n this.keyDownFn = (_) => true;\n this.multiple = false;\n this.addTag = false;\n this.searchable = true;\n this.clearable = true;\n this.isOpen = false;\n // output events\n this.blurEvent = new EventEmitter();\n this.focusEvent = new EventEmitter();\n this.changeEvent = new EventEmitter();\n this.openEvent = new EventEmitter();\n this.closeEvent = new EventEmitter();\n this.searchEvent = new EventEmitter();\n this.clearEvent = new EventEmitter();\n this.addEvent = new EventEmitter();\n this.removeEvent = new EventEmitter();\n this.scroll = new EventEmitter();\n this.scrollToEnd = new EventEmitter();\n this.useDefaultClass = true;\n this.viewPortItems = [];\n this.searchTerm = null;\n this.dropdownId = newId();\n this.escapeHTML = true;\n this._items = [];\n this._defaultLabel = 'label';\n this._pressedKeys = [];\n this._isComposing = false;\n this._destroy$ = new Subject();\n this._keyPress$ = new Subject();\n this._onChange = (_) => { };\n this._onTouched = () => { };\n this.clearItem = (item) => {\n const option = this.selectedItems.find(x => x.value === item);\n this.unselect(option);\n };\n this.trackByOption = (_, item) => {\n if (this.trackByFn) {\n return this.trackByFn(item.value);\n }\n return item;\n };\n this._mergeGlobalConfig(config);\n this.itemsList = new ItemsList(this, newSelectionModel());\n this.element = _elementRef.nativeElement;\n }\n get items() { return this._items; }\n ;\n set items(value) {\n if (value === null) {\n value = [];\n }\n this._itemsAreUsed = true;\n this._items = value;\n }\n ;\n get compareWith() { return this._compareWith; }\n set compareWith(fn) {\n if (fn !== undefined && fn !== null && !isFunction(fn)) {\n throw Error('`compareWith` must be a function.');\n }\n this._compareWith = fn;\n }\n get clearSearchOnAdd() {\n if (isDefined(this._clearSearchOnAdd)) {\n return this._clearSearchOnAdd;\n }\n else if (isDefined(this.config.clearSearchOnAdd)) {\n return this.config.clearSearchOnAdd;\n }\n return this.closeOnSelect;\n }\n ;\n set clearSearchOnAdd(value) {\n this._clearSearchOnAdd = value;\n }\n ;\n get disabled() { return this.readonly || this._disabled; }\n ;\n get filtered() { return (!!this.searchTerm && this.searchable || this._isComposing); }\n ;\n get single() { return !this.multiple; }\n ;\n get _editableSearchTerm() {\n return this.editableSearchTerm && !this.multiple;\n }\n get selectedItems() {\n return this.itemsList.selectedItems;\n }\n get selectedValues() {\n return this.selectedItems.map(x => x.value);\n }\n get hasValue() {\n return this.selectedItems.length > 0;\n }\n get currentPanelPosition() {\n if (this.dropdownPanel) {\n return this.dropdownPanel.currentPosition;\n }\n return undefined;\n }\n ngOnInit() {\n this._handleKeyPresses();\n this._setInputAttributes();\n }\n ngOnChanges(changes) {\n if (changes.multiple) {\n this.itemsList.clearSelected();\n }\n if (changes.items) {\n this._setItems(changes.items.currentValue || []);\n }\n if (changes.isOpen) {\n this._manualOpen = isDefined(changes.isOpen.currentValue);\n }\n }\n ngAfterViewInit() {\n if (!this._itemsAreUsed) {\n this.escapeHTML = false;\n this._setItemsFromNgOptions();\n }\n if (isDefined(this.autoFocus)) {\n this.focus();\n }\n }\n ngOnDestroy() {\n this._destroy$.next();\n this._destroy$.complete();\n }\n handleKeyDown($event) {\n const keyCode = KeyCode[$event.which];\n if (keyCode) {\n if (this.keyDownFn($event) === false) {\n return;\n }\n this.handleKeyCode($event);\n }\n else if ($event.key && $event.key.length === 1) {\n this._keyPress$.next($event.key.toLocaleLowerCase());\n }\n }\n handleKeyCode($event) {\n switch ($event.which) {\n case KeyCode.ArrowDown:\n this._handleArrowDown($event);\n break;\n case KeyCode.ArrowUp:\n this._handleArrowUp($event);\n break;\n case KeyCode.Space:\n this._handleSpace($event);\n break;\n case KeyCode.Enter:\n this._handleEnter($event);\n break;\n case KeyCode.Tab:\n this._handleTab($event);\n break;\n case KeyCode.Esc:\n this.close();\n $event.preventDefault();\n break;\n case KeyCode.Backspace:\n this._handleBackspace();\n break;\n }\n }\n handleMousedown($event) {\n const target = $event.target;\n if (target.tagName !== 'INPUT') {\n $event.preventDefault();\n }\n if (target.classList.contains('ng-clear-wrapper')) {\n this.handleClearClick();\n return;\n }\n if (target.classList.contains('ng-arrow-wrapper')) {\n this.handleArrowClick();\n return;\n }\n if (target.classList.contains('ng-value-icon')) {\n return;\n }\n if (!this.focused) {\n this.focus();\n }\n if (this.searchable) {\n this.open();\n }\n else {\n this.toggle();\n }\n }\n handleArrowClick() {\n if (this.isOpen) {\n this.close();\n }\n else {\n this.open();\n }\n }\n handleClearClick() {\n if (this.hasValue) {\n this.itemsList.clearSelected(true);\n this._updateNgModel();\n }\n this._clearSearch();\n this.focus();\n this.clearEvent.emit();\n this._onSelectionChanged();\n }\n clearModel() {\n if (!this.clearable) {\n return;\n }\n this.itemsList.clearSelected();\n this._updateNgModel();\n }\n writeValue(value) {\n this.itemsList.clearSelected();\n this._handleWriteValue(value);\n this._cd.markForCheck();\n }\n registerOnChange(fn) {\n this._onChange = fn;\n }\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n setDisabledState(state) {\n this._disabled = state;\n this._cd.markForCheck();\n }\n toggle() {\n if (!this.isOpen) {\n this.open();\n }\n else {\n this.close();\n }\n }\n open() {\n if (this.disabled || this.isOpen || this._manualOpen) {\n return;\n }\n if (!this._isTypeahead && !this.addTag && this.itemsList.noItemsToSelect) {\n return;\n }\n this.isOpen = true;\n this.itemsList.markSelectedOrDefault(this.markFirst);\n this.openEvent.emit();\n if (!this.searchTerm) {\n this.focus();\n }\n this.detectChanges();\n }\n close() {\n if (!this.isOpen || this._manualOpen) {\n return;\n }\n this.isOpen = false;\n this._isComposing = false;\n if (!this._editableSearchTerm) {\n this._clearSearch();\n }\n else {\n this.itemsList.resetFilteredItems();\n }\n this.itemsList.unmarkItem();\n this._onTouched();\n this.closeEvent.emit();\n this._cd.markForCheck();\n }\n toggleItem(item) {\n if (!item || item.disabled || this.disabled) {\n return;\n }\n if (this.multiple && item.selected) {\n this.unselect(item);\n }\n else {\n this.select(item);\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this._onSelectionChanged();\n }\n select(item) {\n if (!item.selected) {\n this.itemsList.select(item);\n if (this.clearSearchOnAdd && !this._editableSearchTerm) {\n this._clearSearch();\n }\n this._updateNgModel();\n if (this.multiple) {\n this.addEvent.emit(item.value);\n }\n }\n if (this.closeOnSelect || this.itemsList.noItemsToSelect) {\n this.close();\n }\n }\n focus() {\n this.searchInput.nativeElement.focus();\n }\n blur() {\n this.searchInput.nativeElement.blur();\n }\n unselect(item) {\n if (!item) {\n return;\n }\n this.itemsList.unselect(item);\n this.focus();\n this._updateNgModel();\n this.removeEvent.emit(item);\n }\n selectTag() {\n let tag;\n if (isFunction(this.addTag)) {\n tag = this.addTag(this.searchTerm);\n }\n else {\n tag = this._primitive ? this.searchTerm : { [this.bindLabel]: this.searchTerm };\n }\n const handleTag = (item) => this._isTypeahead || !this.isOpen ? this.itemsList.mapItem(item, null) : this.itemsList.addItem(item);\n if (isPromise(tag)) {\n tag.then(item => this.select(handleTag(item))).catch(() => { });\n }\n else if (tag) {\n this.select(handleTag(tag));\n }\n }\n showClear() {\n return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;\n }\n get showAddTag() {\n if (!this._validTerm) {\n return false;\n }\n const term = this.searchTerm.toLowerCase().trim();\n return this.addTag &&\n (!this.itemsList.filteredItems.some(x => x.label.toLowerCase() === term) &&\n (!this.hideSelected && this.isOpen || !this.selectedItems.some(x => x.label.toLowerCase() === term))) &&\n !this.loading;\n }\n showNoItemsFound() {\n const empty = this.itemsList.filteredItems.length === 0;\n return ((empty && !this._isTypeahead && !this.loading) ||\n (empty && this._isTypeahead && this._validTerm && !this.loading)) &&\n !this.showAddTag;\n }\n showTypeToSearch() {\n const empty = this.itemsList.filteredItems.length === 0;\n return empty && this._isTypeahead && !this._validTerm && !this.loading;\n }\n onCompositionStart() {\n this._isComposing = true;\n }\n onCompositionEnd(term) {\n this._isComposing = false;\n if (this.searchWhileComposing) {\n return;\n }\n this.filter(term);\n }\n filter(term) {\n if (this._isComposing && !this.searchWhileComposing) {\n return;\n }\n this.searchTerm = term;\n if (this._isTypeahead && (this._validTerm || this.minTermLength === 0)) {\n this.typeahead.next(term);\n }\n if (!this._isTypeahead) {\n this.itemsList.filter(this.searchTerm);\n if (this.isOpen) {\n this.itemsList.markSelectedOrDefault(this.markFirst);\n }\n }\n this.searchEvent.emit({ term, items: this.itemsList.filteredItems.map(x => x.value) });\n this.open();\n }\n onInputFocus($event) {\n if (this.focused) {\n return;\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this.element.classList.add('ng-select-focused');\n this.focusEvent.emit($event);\n this.focused = true;\n }\n onInputBlur($event) {\n this.element.classList.remove('ng-select-focused');\n this.blurEvent.emit($event);\n if (!this.isOpen && !this.disabled) {\n this._onTouched();\n }\n if (this._editableSearchTerm) {\n this._setSearchTermFromItems();\n }\n this.focused = false;\n }\n onItemHover(item) {\n if (item.disabled) {\n return;\n }\n this.itemsList.markItem(item);\n }\n detectChanges() {\n if (!this._cd.destroyed) {\n this._cd.detectChanges();\n }\n }\n _setSearchTermFromItems() {\n const selected = this.selectedItems && this.selectedItems[0];\n this.searchTerm = (selected && selected.label) || null;\n }\n _setItems(items) {\n const firstItem = items[0];\n this.bindLabel = this.bindLabel || this._defaultLabel;\n this._primitive = isDefined(firstItem) ? !isObject(firstItem) : this._primitive || this.bindLabel === this._defaultLabel;\n this.itemsList.setItems(items);\n if (items.length > 0 && this.hasValue) {\n this.itemsList.mapSelectedItems();\n }\n if (this.isOpen && isDefined(this.searchTerm) && !this._isTypeahead) {\n this.itemsList.filter(this.searchTerm);\n }\n if (this._isTypeahead || this.isOpen) {\n this.itemsList.markSelectedOrDefault(this.markFirst);\n }\n }\n _setItemsFromNgOptions() {\n const mapNgOptions = (options) => {\n this.items = options.map(option => ({\n $ngOptionValue: option.value,\n $ngOptionLabel: option.elementRef.nativeElement.innerHTML,\n disabled: option.disabled\n }));\n this.itemsList.setItems(this.items);\n if (this.hasValue) {\n this.itemsList.mapSelectedItems();\n }\n this.detectChanges();\n };\n const handleOptionChange = () => {\n const changedOrDestroyed = merge(this.ngOptions.changes, this._destroy$);\n merge(...this.ngOptions.map(option => option.stateChange$))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(option => {\n const item = this.itemsList.findItem(option.value);\n item.disabled = option.disabled;\n item.label = option.label || item.label;\n this._cd.detectChanges();\n });\n };\n this.ngOptions.changes\n .pipe(startWith(this.ngOptions), takeUntil(this._destroy$))\n .subscribe(options => {\n this.bindLabel = this._defaultLabel;\n mapNgOptions(options);\n handleOptionChange();\n });\n }\n _isValidWriteValue(value) {\n if (!isDefined(value) || (this.multiple && value === '') || Array.isArray(value) && value.length === 0) {\n return false;\n }\n const validateBinding = (item) => {\n if (!isDefined(this.compareWith) && isObject(item) && this.bindValue) {\n this._console.warn(`Setting object(${JSON.stringify(item)}) as your model with bindValue is not allowed unless [compareWith] is used.`);\n return false;\n }\n return true;\n };\n if (this.multiple) {\n if (!Array.isArray(value)) {\n this._console.warn('Multiple select ngModel should be array.');\n return false;\n }\n return value.every(item => validateBinding(item));\n }\n else {\n return validateBinding(value);\n }\n }\n _handleWriteValue(ngModel) {\n if (!this._isValidWriteValue(ngModel)) {\n return;\n }\n const select = (val) => {\n let item = this.itemsList.findItem(val);\n if (item) {\n this.itemsList.select(item);\n }\n else {\n const isValObject = isObject(val);\n const isPrimitive = !isValObject && !this.bindValue;\n if ((isValObject || isPrimitive)) {\n this.itemsList.select(this.itemsList.mapItem(val, null));\n }\n else if (this.bindValue) {\n item = {\n [this.bindLabel]: null,\n [this.bindValue]: val\n };\n this.itemsList.select(this.itemsList.mapItem(item, null));\n }\n }\n };\n if (this.multiple) {\n ngModel.forEach(item => select(item));\n }\n else {\n select(ngModel);\n }\n }\n _handleKeyPresses() {\n if (this.searchable) {\n return;\n }\n this._keyPress$\n .pipe(takeUntil(this._destroy$), tap(letter => this._pressedKeys.push(letter)), debounceTime(200), filter(() => this._pressedKeys.length > 0), map(() => this._pressedKeys.join('')))\n .subscribe(term => {\n const item = this.itemsList.findByLabel(term);\n if (item) {\n if (this.isOpen) {\n this.itemsList.markItem(item);\n this._scrollToMarked();\n this._cd.markForCheck();\n }\n else {\n this.select(item);\n }\n }\n this._pressedKeys = [];\n });\n }\n _setInputAttributes() {\n const input = this.searchInput.nativeElement;\n const attributes = {\n type: 'text',\n autocorrect: 'off',\n autocapitalize: 'off',\n autocomplete: this.labelForId ? 'off' : this.dropdownId,\n ...this.inputAttrs\n };\n for (const key of Object.keys(attributes)) {\n input.setAttribute(key, attributes[key]);\n }\n }\n _updateNgModel() {\n const model = [];\n for (const item of this.selectedItems) {\n if (this.bindValue) {\n let value = null;\n if (item.children) {\n const groupKey = this.groupValue ? this.bindValue : this.groupBy;\n value = item.value[groupKey || this.groupBy];\n }\n else {\n value = this.itemsList.resolveNested(item.value, this.bindValue);\n }\n model.push(value);\n }\n else {\n model.push(item.value);\n }\n }\n const selected = this.selectedItems.map(x => x.value);\n if (this.multiple) {\n this._onChange(model);\n this.changeEvent.emit(selected);\n }\n else {\n this._onChange(isDefined(model[0]) ? model[0] : null);\n this.changeEvent.emit(selected[0]);\n }\n this._cd.markForCheck();\n }\n _clearSearch() {\n if (!this.searchTerm) {\n return;\n }\n this._changeSearch(null);\n this.itemsList.resetFilteredItems();\n }\n _changeSearch(searchTerm) {\n this.searchTerm = searchTerm;\n if (this._isTypeahead) {\n this.typeahead.next(searchTerm);\n }\n }\n _scrollToMarked() {\n if (!this.isOpen || !this.dropdownPanel) {\n return;\n }\n this.dropdownPanel.scrollTo(this.itemsList.markedItem);\n }\n _scrollToTag() {\n if (!this.isOpen || !this.dropdownPanel) {\n return;\n }\n this.dropdownPanel.scrollToTag();\n }\n _onSelectionChanged() {\n if (this.isOpen && this.multiple && this.appendTo) {\n // Make sure items are rendered.\n this._cd.detectChanges();\n this.dropdownPanel.adjustPosition();\n }\n }\n _handleTab($event) {\n if (this.isOpen === false && !this.addTag) {\n return;\n }\n if (this.selectOnTab) {\n if (this.itemsList.markedItem) {\n this.toggleItem(this.itemsList.markedItem);\n $event.preventDefault();\n }\n else if (this.showAddTag) {\n this.selectTag();\n $event.preventDefault();\n }\n else {\n this.close();\n }\n }\n else {\n this.close();\n }\n }\n _handleEnter($event) {\n if (this.isOpen || this._manualOpen) {\n if (this.itemsList.markedItem) {\n this.toggleItem(this.itemsList.markedItem);\n }\n else if (this.showAddTag) {\n this.selectTag();\n }\n }\n else if (this.openOnEnter) {\n this.open();\n }\n else {\n return;\n }\n $event.preventDefault();\n }\n _handleSpace($event) {\n if (this.isOpen || this._manualOpen) {\n return;\n }\n this.open();\n $event.preventDefault();\n }\n _handleArrowDown($event) {\n if (this._nextItemIsTag(+1)) {\n this.itemsList.unmarkItem();\n this._scrollToTag();\n }\n else {\n this.itemsList.markNextItem();\n this._scrollToMarked();\n }\n this.open();\n $event.preventDefault();\n }\n _handleArrowUp($event) {\n if (!this.isOpen) {\n return;\n }\n if (this._nextItemIsTag(-1)) {\n this.itemsList.unmarkItem();\n this._scrollToTag();\n }\n else {\n this.itemsList.markPreviousItem();\n this._scrollToMarked();\n }\n $event.preventDefault();\n }\n _nextItemIsTag(nextStep) {\n const nextIndex = this.itemsList.markedIndex + nextStep;\n return this.addTag && this.searchTerm\n && this.itemsList.markedItem\n && (nextIndex < 0 || nextIndex === this.itemsList.filteredItems.length);\n }\n _handleBackspace() {\n if (this.searchTerm || !this.clearable || !this.clearOnBackspace || !this.hasValue) {\n return;\n }\n if (this.multiple) {\n this.unselect(this.itemsList.lastSelectedItem);\n }\n else {\n this.clearModel();\n }\n }\n get _isTypeahead() {\n return this.typeahead && this.typeahead.observers.length > 0;\n }\n get _validTerm() {\n const term = this.searchTerm && this.searchTerm.trim();\n return term && term.length >= this.minTermLength;\n }\n _mergeGlobalConfig(config) {\n this.placeholder = this.placeholder || config.placeholder;\n this.notFoundText = this.notFoundText || config.notFoundText;\n this.typeToSearchText = this.typeToSearchText || config.typeToSearchText;\n this.addTagText = this.addTagText || config.addTagText;\n this.loadingText = this.loadingText || config.loadingText;\n this.clearAllText = this.clearAllText || config.clearAllText;\n this.virtualScroll = isDefined(this.virtualScroll)\n ? this.virtualScroll\n : isDefined(config.disableVirtualScroll) ? !config.disableVirtualScroll : false;\n this.openOnEnter = isDefined(this.openOnEnter) ? this.openOnEnter : config.openOnEnter;\n this.appendTo = this.appendTo || config.appendTo;\n this.bindValue = this.bindValue || config.bindValue;\n this.bindLabel = this.bindLabel || config.bindLabel;\n this.appearance = this.appearance || config.appearance;\n }\n}\nNgSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectComponent, deps: [{ token: 'class', attribute: true }, { token: 'autofocus', attribute: true }, { token: NgSelectConfig }, { token: SELECTION_MODEL_FACTORY }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ConsoleService }], target: i0.ɵɵFactoryTarget.Component });\nNgSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.3\", type: NgSelectComponent, selector: \"ng-select\", inputs: { bindLabel: \"bindLabel\", bindValue: \"bindValue\", markFirst: \"markFirst\", placeholder: \"placeholder\", notFoundText: \"notFoundText\", typeToSearchText: \"typeToSearchText\", addTagText: \"addTagText\", loadingText: \"loadingText\", clearAllText: \"clearAllText\", appearance: \"appearance\", dropdownPosition: \"dropdownPosition\", appendTo: \"appendTo\", loading: \"loading\", closeOnSelect: \"closeOnSelect\", hideSelected: \"hideSelected\", selectOnTab: \"selectOnTab\", openOnEnter: \"openOnEnter\", maxSelectedItems: \"maxSelectedItems\", groupBy: \"groupBy\", groupValue: \"groupValue\", bufferAmount: \"bufferAmount\", virtualScroll: \"virtualScroll\", selectableGroup: \"selectableGroup\", selectableGroupAsModel: \"selectableGroupAsModel\", searchFn: \"searchFn\", trackByFn: \"trackByFn\", clearOnBackspace: \"clearOnBackspace\", labelForId: \"labelForId\", inputAttrs: \"inputAttrs\", tabIndex: \"tabIndex\", readonly: \"readonly\", searchWhileComposing: \"searchWhileComposing\", minTermLength: \"minTermLength\", editableSearchTerm: \"editableSearchTerm\", keyDownFn: \"keyDownFn\", typeahead: \"typeahead\", multiple: \"multiple\", addTag: \"addTag\", searchable: \"searchable\", clearable: \"clearable\", isOpen: \"isOpen\", items: \"items\", compareWith: \"compareWith\", clearSearchOnAdd: \"clearSearchOnAdd\" }, outputs: { blurEvent: \"blur\", focusEvent: \"focus\", changeEvent: \"change\", openEvent: \"open\", closeEvent: \"close\", searchEvent: \"search\", clearEvent: \"clear\", addEvent: \"add\", removeEvent: \"remove\", scroll: \"scroll\", scrollToEnd: \"scrollToEnd\" }, host: { listeners: { \"keydown\": \"handleKeyDown($event)\" }, properties: { \"class.ng-select-typeahead\": \"this.typeahead\", \"class.ng-select-multiple\": \"this.multiple\", \"class.ng-select-taggable\": \"this.addTag\", \"class.ng-select-searchable\": \"this.searchable\", \"class.ng-select-clearable\": \"this.clearable\", \"class.ng-select-opened\": \"this.isOpen\", \"class.ng-select\": \"this.useDefaultClass\", \"class.ng-select-disabled\": \"this.disabled\", \"class.ng-select-filtered\": \"this.filtered\", \"class.ng-select-single\": \"this.single\" } }, providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgSelectComponent),\n multi: true\n }, NgDropdownPanelService], queries: [{ propertyName: \"optionTemplate\", first: true, predicate: NgOptionTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"optgroupTemplate\", first: true, predicate: NgOptgroupTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"labelTemplate\", first: true, predicate: NgLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"multiLabelTemplate\", first: true, predicate: NgMultiLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"headerTemplate\", first: true, predicate: NgHeaderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"footerTemplate\", first: true, predicate: NgFooterTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"notFoundTemplate\", first: true, predicate: NgNotFoundTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"typeToSearchTemplate\", first: true, predicate: NgTypeToSearchTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"loadingTextTemplate\", first: true, predicate: NgLoadingTextTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"tagTemplate\", first: true, predicate: NgTagTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"loadingSpinnerTemplate\", first: true, predicate: NgLoadingSpinnerTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: \"ngOptions\", predicate: NgOptionComponent, descendants: true }], viewQueries: [{ propertyName: \"dropdownPanel\", first: true, predicate: i0.forwardRef(function () { return NgDropdownPanelComponent; }), descendants: true }, { propertyName: \"searchInput\", first: true, predicate: [\"searchInput\"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: \"\\n\\n
      \\n
      {{placeholder}}
      \\n\\n 0\\\">\\n
      \\n \\n \\u00D7\\n \\n \\n\\n \\n \\n
      \\n
      \\n\\n 0\\\"\\n [ngTemplateOutlet]=\\\"multiLabelTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ items: selectedValues, clear: clearItem }\\\">\\n \\n\\n
      \\n\\n \\n
      \\n
      \\n\\n \\n \\n
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\u00D7\\n \\n\\n \\n \\n \\n\\n\\n\\n\\n \\n
      \\n\\n \\n \\n \\n\\n \\n \\n
      \\n\\n
      \\n \\n {{addTagText}}\\\"{{searchTerm}}\\\"\\n \\n\\n \\n \\n
      \\n
      \\n\\n \\n \\n
      {{notFoundText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\n
      {{typeToSearchText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\n
      {{loadingText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n
      \\n\", styles: [\"@charset \\\"UTF-8\\\";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\\\"\\\\200b\\\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\\n\"], dependencies: [{ kind: \"directive\", type: i3.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i3.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: NgDropdownPanelComponent, selector: \"ng-dropdown-panel\", inputs: [\"items\", \"markedItem\", \"position\", \"appendTo\", \"bufferAmount\", \"virtualScroll\", \"headerTemplate\", \"footerTemplate\", \"filterValue\"], outputs: [\"update\", \"scroll\", \"scrollToEnd\", \"outsideClick\"] }, { kind: \"directive\", type: NgItemLabelDirective, selector: \"[ngItemLabel]\", inputs: [\"ngItemLabel\", \"escape\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ng-select', providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgSelectComponent),\n multi: true\n }, NgDropdownPanelService], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"\\n\\n
      \\n
      {{placeholder}}
      \\n\\n 0\\\">\\n
      \\n \\n \\u00D7\\n \\n \\n\\n \\n \\n
      \\n
      \\n\\n 0\\\"\\n [ngTemplateOutlet]=\\\"multiLabelTemplate\\\"\\n [ngTemplateOutletContext]=\\\"{ items: selectedValues, clear: clearItem }\\\">\\n \\n\\n
      \\n\\n \\n
      \\n
      \\n\\n \\n \\n
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\u00D7\\n \\n\\n \\n \\n \\n\\n\\n\\n\\n \\n
      \\n\\n \\n \\n \\n\\n \\n \\n
      \\n\\n
      \\n \\n {{addTagText}}\\\"{{searchTerm}}\\\"\\n \\n\\n \\n \\n
      \\n
      \\n\\n \\n \\n
      {{notFoundText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\n
      {{typeToSearchText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n \\n \\n
      {{loadingText}}
      \\n
      \\n\\n \\n \\n
      \\n\\n
      \\n\", styles: [\"@charset \\\"UTF-8\\\";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\\\"\\\\200b\\\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\\n\"] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['class']\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['autofocus']\n }] }, { type: NgSelectConfig }, { type: undefined, decorators: [{\n type: Inject,\n args: [SELECTION_MODEL_FACTORY]\n }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ConsoleService }]; }, propDecorators: { bindLabel: [{\n type: Input\n }], bindValue: [{\n type: Input\n }], markFirst: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], notFoundText: [{\n type: Input\n }], typeToSearchText: [{\n type: Input\n }], addTagText: [{\n type: Input\n }], loadingText: [{\n type: Input\n }], clearAllText: [{\n type: Input\n }], appearance: [{\n type: Input\n }], dropdownPosition: [{\n type: Input\n }], appendTo: [{\n type: Input\n }], loading: [{\n type: Input\n }], closeOnSelect: [{\n type: Input\n }], hideSelected: [{\n type: Input\n }], selectOnTab: [{\n type: Input\n }], openOnEnter: [{\n type: Input\n }], maxSelectedItems: [{\n type: Input\n }], groupBy: [{\n type: Input\n }], groupValue: [{\n type: Input\n }], bufferAmount: [{\n type: Input\n }], virtualScroll: [{\n type: Input\n }], selectableGroup: [{\n type: Input\n }], selectableGroupAsModel: [{\n type: Input\n }], searchFn: [{\n type: Input\n }], trackByFn: [{\n type: Input\n }], clearOnBackspace: [{\n type: Input\n }], labelForId: [{\n type: Input\n }], inputAttrs: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], readonly: [{\n type: Input\n }], searchWhileComposing: [{\n type: Input\n }], minTermLength: [{\n type: Input\n }], editableSearchTerm: [{\n type: Input\n }], keyDownFn: [{\n type: Input\n }], typeahead: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-typeahead']\n }], multiple: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-multiple']\n }], addTag: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-taggable']\n }], searchable: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-searchable']\n }], clearable: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-clearable']\n }], isOpen: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['class.ng-select-opened']\n }], items: [{\n type: Input\n }], compareWith: [{\n type: Input\n }], clearSearchOnAdd: [{\n type: Input\n }], blurEvent: [{\n type: Output,\n args: ['blur']\n }], focusEvent: [{\n type: Output,\n args: ['focus']\n }], changeEvent: [{\n type: Output,\n args: ['change']\n }], openEvent: [{\n type: Output,\n args: ['open']\n }], closeEvent: [{\n type: Output,\n args: ['close']\n }], searchEvent: [{\n type: Output,\n args: ['search']\n }], clearEvent: [{\n type: Output,\n args: ['clear']\n }], addEvent: [{\n type: Output,\n args: ['add']\n }], removeEvent: [{\n type: Output,\n args: ['remove']\n }], scroll: [{\n type: Output,\n args: ['scroll']\n }], scrollToEnd: [{\n type: Output,\n args: ['scrollToEnd']\n }], optionTemplate: [{\n type: ContentChild,\n args: [NgOptionTemplateDirective, { read: TemplateRef }]\n }], optgroupTemplate: [{\n type: ContentChild,\n args: [NgOptgroupTemplateDirective, { read: TemplateRef }]\n }], labelTemplate: [{\n type: ContentChild,\n args: [NgLabelTemplateDirective, { read: TemplateRef }]\n }], multiLabelTemplate: [{\n type: ContentChild,\n args: [NgMultiLabelTemplateDirective, { read: TemplateRef }]\n }], headerTemplate: [{\n type: ContentChild,\n args: [NgHeaderTemplateDirective, { read: TemplateRef }]\n }], footerTemplate: [{\n type: ContentChild,\n args: [NgFooterTemplateDirective, { read: TemplateRef }]\n }], notFoundTemplate: [{\n type: ContentChild,\n args: [NgNotFoundTemplateDirective, { read: TemplateRef }]\n }], typeToSearchTemplate: [{\n type: ContentChild,\n args: [NgTypeToSearchTemplateDirective, { read: TemplateRef }]\n }], loadingTextTemplate: [{\n type: ContentChild,\n args: [NgLoadingTextTemplateDirective, { read: TemplateRef }]\n }], tagTemplate: [{\n type: ContentChild,\n args: [NgTagTemplateDirective, { read: TemplateRef }]\n }], loadingSpinnerTemplate: [{\n type: ContentChild,\n args: [NgLoadingSpinnerTemplateDirective, { read: TemplateRef }]\n }], dropdownPanel: [{\n type: ViewChild,\n args: [forwardRef(() => NgDropdownPanelComponent)]\n }], searchInput: [{\n type: ViewChild,\n args: ['searchInput', { static: true }]\n }], ngOptions: [{\n type: ContentChildren,\n args: [NgOptionComponent, { descendants: true }]\n }], useDefaultClass: [{\n type: HostBinding,\n args: ['class.ng-select']\n }], disabled: [{\n type: HostBinding,\n args: ['class.ng-select-disabled']\n }], filtered: [{\n type: HostBinding,\n args: ['class.ng-select-filtered']\n }], single: [{\n type: HostBinding,\n args: ['class.ng-select-single']\n }], handleKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\nfunction DefaultSelectionModelFactory() {\n return new DefaultSelectionModel();\n}\nclass DefaultSelectionModel {\n constructor() {\n this._selected = [];\n }\n get value() {\n return this._selected;\n }\n select(item, multiple, groupAsModel) {\n item.selected = true;\n if (!item.children || (!multiple && groupAsModel)) {\n this._selected.push(item);\n }\n if (multiple) {\n if (item.parent) {\n const childrenCount = item.parent.children.length;\n const selectedCount = item.parent.children.filter(x => x.selected).length;\n item.parent.selected = childrenCount === selectedCount;\n }\n else if (item.children) {\n this._setChildrenSelectedState(item.children, true);\n this._removeChildren(item);\n if (groupAsModel && this._activeChildren(item)) {\n this._selected = [...this._selected.filter(x => x.parent !== item), item];\n }\n else {\n this._selected = [...this._selected, ...item.children.filter(x => !x.disabled)];\n }\n }\n }\n }\n unselect(item, multiple) {\n this._selected = this._selected.filter(x => x !== item);\n item.selected = false;\n if (multiple) {\n if (item.parent && item.parent.selected) {\n const children = item.parent.children;\n this._removeParent(item.parent);\n this._removeChildren(item.parent);\n this._selected.push(...children.filter(x => x !== item && !x.disabled));\n item.parent.selected = false;\n }\n else if (item.children) {\n this._setChildrenSelectedState(item.children, false);\n this._removeChildren(item);\n }\n }\n }\n clear(keepDisabled) {\n this._selected = keepDisabled ? this._selected.filter(x => x.disabled) : [];\n }\n _setChildrenSelectedState(children, selected) {\n for (const child of children) {\n if (child.disabled) {\n continue;\n }\n child.selected = selected;\n }\n }\n _removeChildren(parent) {\n this._selected = [\n ...this._selected.filter(x => x.parent !== parent),\n ...parent.children.filter(x => x.parent === parent && x.disabled && x.selected)\n ];\n }\n _removeParent(parent) {\n this._selected = this._selected.filter(x => x !== parent);\n }\n _activeChildren(item) {\n return item.children.every(x => !x.disabled || x.selected);\n }\n}\n\nclass NgSelectModule {\n}\nNgSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectModule, declarations: [NgDropdownPanelComponent,\n NgOptionComponent,\n NgSelectComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective,\n NgItemLabelDirective], imports: [CommonModule], exports: [NgSelectComponent,\n NgOptionComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective] });\nNgSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectModule, providers: [\n { provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }\n ], imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.3\", ngImport: i0, type: NgSelectModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n NgDropdownPanelComponent,\n NgOptionComponent,\n NgSelectComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective,\n NgItemLabelDirective\n ],\n imports: [\n CommonModule\n ],\n exports: [\n NgSelectComponent,\n NgOptionComponent,\n NgOptgroupTemplateDirective,\n NgOptionTemplateDirective,\n NgLabelTemplateDirective,\n NgMultiLabelTemplateDirective,\n NgHeaderTemplateDirective,\n NgFooterTemplateDirective,\n NgNotFoundTemplateDirective,\n NgTypeToSearchTemplateDirective,\n NgLoadingTextTemplateDirective,\n NgTagTemplateDirective,\n NgLoadingSpinnerTemplateDirective\n ],\n providers: [\n { provide: SELECTION_MODEL_FACTORY, useValue: DefaultSelectionModelFactory }\n ]\n }]\n }] });\n\n/*\n * Public API Surface of ng-select\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NgFooterTemplateDirective, NgHeaderTemplateDirective, NgItemLabelDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectComponent, NgSelectConfig, NgSelectModule, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, SELECTION_MODEL_FACTORY };\n","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind;\n(function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nexport class Notification {\n constructor(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n observe(observer) {\n return observeNotification(this, observer);\n }\n do(nextHandler, errorHandler, completeHandler) {\n const { kind, value, error } = this;\n return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n }\n accept(nextOrObserver, error, complete) {\n var _a;\n return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n ? this.observe(nextOrObserver)\n : this.do(nextOrObserver, error, complete);\n }\n toObservable() {\n const { kind, value, error } = this;\n const result = kind === 'N'\n ?\n of(value)\n :\n kind === 'E'\n ?\n throwError(() => error)\n :\n kind === 'C'\n ?\n EMPTY\n :\n 0;\n if (!result) {\n throw new TypeError(`Unexpected notification kind ${kind}`);\n }\n return result;\n }\n static createNext(value) {\n return new Notification('N', value);\n }\n static createError(err) {\n return new Notification('E', undefined, err);\n }\n static createComplete() {\n return Notification.completeNotification;\n }\n}\nNotification.completeNotification = new Notification('C');\nexport function observeNotification(notification, observer) {\n var _a, _b, _c;\n const { kind, value, error } = notification;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n return operate((source, subscriber) => {\n let element;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions;\n }\n else {\n ({ duration, element, connector } = elementOrOptions);\n }\n const groups = new Map();\n const notify = (cb) => {\n groups.forEach(cb);\n cb(subscriber);\n };\n const handleError = (err) => notify((consumer) => consumer.error(err));\n let activeGroups = 0;\n let teardownAttempted = false;\n const groupBySourceSubscriber = new OperatorSubscriber(subscriber, (value) => {\n try {\n const key = keySelector(value);\n let group = groups.get(key);\n if (!group) {\n groups.set(key, (group = connector ? connector() : new Subject()));\n const grouped = createGroupedObservable(key, group);\n subscriber.next(grouped);\n if (duration) {\n const durationSubscriber = createOperatorSubscriber(group, () => {\n group.complete();\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n }, undefined, undefined, () => groups.delete(key));\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));\n }\n }\n group.next(element ? element(value) : value);\n }\n catch (err) {\n handleError(err);\n }\n }, () => notify((consumer) => consumer.complete()), handleError, () => groups.clear(), () => {\n teardownAttempted = true;\n return activeGroups === 0;\n });\n source.subscribe(groupBySourceSubscriber);\n function createGroupedObservable(key, groupSubject) {\n const result = new Observable((groupSubscriber) => {\n activeGroups++;\n const innerSub = groupSubject.subscribe(groupSubscriber);\n return () => {\n innerSub.unsubscribe();\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n","import * as i3 from '@ngrx/store';\nimport { compose, ScannedActionsSubject, createAction, ROOT_STORE_PROVIDER, FEATURE_STATE_PROVIDER, Store } from '@ngrx/store';\nimport * as i1 from 'rxjs';\nimport { merge, Observable, Subject, defer, pipe, of } from 'rxjs';\nimport { ignoreElements, materialize, map, catchError, filter, groupBy, mergeMap, exhaustMap, dematerialize, take, concatMap, finalize, withLatestFrom } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, NgModule, Optional, Injector, SkipSelf, Self, ENVIRONMENT_INITIALIZER, inject, InjectFlags } from '@angular/core';\n\nconst DEFAULT_EFFECT_CONFIG = {\n dispatch: true,\n useEffectsErrorHandler: true,\n};\nconst CREATE_EFFECT_METADATA_KEY = '__@ngrx/effects_create__';\n\n/**\n * @description\n * Creates an effect from an `Observable` and an `EffectConfig`.\n *\n * @param source A function which returns an `Observable`.\n * @param config A `Partial` to configure the effect. By default, `dispatch` is true and `useEffectsErrorHandler` is true.\n * @returns If `EffectConfig`#`dispatch` is true, returns `Observable`. Else, returns `Observable`.\n *\n * @usageNotes\n *\n * ** Mapping to a different action **\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * map(() => FeatureActions.actionTwo())\n * )\n * );\n * ```\n *\n * ** Non-dispatching effects **\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * tap(() => console.log('Action One Dispatched'))\n * ),\n * { dispatch: false }\n * // FeatureActions.actionOne is not dispatched\n * );\n * ```\n */\nfunction createEffect(source, config) {\n const effect = source();\n const value = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config, // Overrides any defaults if values are provided\n };\n Object.defineProperty(effect, CREATE_EFFECT_METADATA_KEY, {\n value,\n });\n return effect;\n}\nfunction getCreateEffectMetadata(instance) {\n const propertyNames = Object.getOwnPropertyNames(instance);\n const metadata = propertyNames\n .filter((propertyName) => {\n if (instance[propertyName] &&\n instance[propertyName].hasOwnProperty(CREATE_EFFECT_METADATA_KEY)) {\n // If the property type has overridden `hasOwnProperty` we need to ensure\n // that the metadata is valid (containing a `dispatch` property)\n // https://github.com/ngrx/platform/issues/2975\n const property = instance[propertyName];\n return property[CREATE_EFFECT_METADATA_KEY].hasOwnProperty('dispatch');\n }\n return false;\n })\n .map((propertyName) => {\n const metaData = instance[propertyName][CREATE_EFFECT_METADATA_KEY];\n return {\n propertyName,\n ...metaData,\n };\n });\n return metadata;\n}\n\nfunction getSourceForInstance(instance) {\n return Object.getPrototypeOf(instance);\n}\n\nconst METADATA_KEY = '__@ngrx/effects__';\n/**\n * @deprecated The Effect decorator (`@Effect`) is deprecated in favor for the `createEffect` method.\n * See the docs for more info {@link https://ngrx.io/guide/migration/v11#the-effect-decorator}\n */\nfunction Effect(config = {}) {\n return function (target, propertyName) {\n const metadata = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config,\n propertyName,\n };\n addEffectMetadataEntry(target, metadata);\n };\n}\nfunction getEffectDecoratorMetadata(instance) {\n const effectsDecorators = compose(getEffectMetadataEntries, getSourceForInstance)(instance);\n return effectsDecorators;\n}\n/**\n * Type guard to detemine whether METADATA_KEY is already present on the Class\n * constructor\n */\nfunction hasMetadataEntries(sourceProto) {\n return sourceProto.constructor.hasOwnProperty(METADATA_KEY);\n}\n/** Add Effect Metadata to the Effect Class constructor under specific key */\nfunction addEffectMetadataEntry(sourceProto, metadata) {\n if (hasMetadataEntries(sourceProto)) {\n sourceProto.constructor[METADATA_KEY].push(metadata);\n }\n else {\n Object.defineProperty(sourceProto.constructor, METADATA_KEY, {\n value: [metadata],\n });\n }\n}\nfunction getEffectMetadataEntries(sourceProto) {\n return hasMetadataEntries(sourceProto)\n ? sourceProto.constructor[METADATA_KEY]\n : [];\n}\n\nfunction getEffectsMetadata(instance) {\n return getSourceMetadata(instance).reduce((acc, { propertyName, dispatch, useEffectsErrorHandler }) => {\n acc[propertyName] = { dispatch, useEffectsErrorHandler };\n return acc;\n }, {});\n}\nfunction getSourceMetadata(instance) {\n const effects = [\n getEffectDecoratorMetadata,\n getCreateEffectMetadata,\n ];\n return effects.reduce((sources, source) => sources.concat(source(instance)), []);\n}\n\nfunction mergeEffects(sourceInstance, globalErrorHandler, effectsErrorHandler) {\n const sourceName = getSourceForInstance(sourceInstance).constructor.name;\n const observables$ = getSourceMetadata(sourceInstance).map(({ propertyName, dispatch, useEffectsErrorHandler, }) => {\n const observable$ = typeof sourceInstance[propertyName] === 'function'\n ? sourceInstance[propertyName]()\n : sourceInstance[propertyName];\n const effectAction$ = useEffectsErrorHandler\n ? effectsErrorHandler(observable$, globalErrorHandler)\n : observable$;\n if (dispatch === false) {\n return effectAction$.pipe(ignoreElements());\n }\n const materialized$ = effectAction$.pipe(materialize());\n return materialized$.pipe(map((notification) => ({\n effect: sourceInstance[propertyName],\n notification,\n propertyName,\n sourceName,\n sourceInstance,\n })));\n });\n return merge(...observables$);\n}\n\nconst MAX_NUMBER_OF_RETRY_ATTEMPTS = 10;\nfunction defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft = MAX_NUMBER_OF_RETRY_ATTEMPTS) {\n return observable$.pipe(catchError((error) => {\n if (errorHandler)\n errorHandler.handleError(error);\n if (retryAttemptLeft <= 1) {\n return observable$; // last attempt\n }\n // Return observable that produces this particular effect\n return defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft - 1);\n }));\n}\n\nclass Actions extends Observable {\n constructor(source) {\n super();\n if (source) {\n this.source = source;\n }\n }\n lift(operator) {\n const observable = new Actions();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n}\n/** @nocollapse */ Actions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: Actions, deps: [{ token: ScannedActionsSubject }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ Actions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: Actions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: Actions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{\n type: Inject,\n args: [ScannedActionsSubject]\n }] }]; } });\n/**\n * `ofType` filters an Observable of `Actions` into an Observable of the actions\n * whose type strings are passed to it.\n *\n * For example, if `actions` has type `Actions`, and\n * the type of the `Addition` action is `add`, then\n * `actions.pipe(ofType('add'))` returns an `Observable`.\n *\n * Properly typing this function is hard and requires some advanced TS tricks\n * below.\n *\n * Type narrowing automatically works, as long as your `actions` object\n * starts with a `Actions` instead of generic `Actions`.\n *\n * For backwards compatibility, when one passes a single type argument\n * `ofType('something')` the result is an `Observable`. Note, that `T`\n * completely overrides any possible inference from 'something'.\n *\n * Unfortunately, for unknown 'actions: Actions' these types will produce\n * 'Observable'. In such cases one has to manually set the generic type\n * like `actions.ofType('add')`.\n *\n * @usageNotes\n *\n * Filter the Actions stream on the \"customers page loaded\" action\n *\n * ```ts\n * import { ofType } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * ofType(fromCustomers.pageLoaded)\n * )\n * ```\n */\nfunction ofType(...allowedTypes) {\n return filter((action) => allowedTypes.some((typeOrActionCreator) => {\n if (typeof typeOrActionCreator === 'string') {\n // Comparing the string to type\n return typeOrActionCreator === action.type;\n }\n // We are filtering by ActionCreator\n return typeOrActionCreator.type === action.type;\n }));\n}\n\nconst _ROOT_EFFECTS_GUARD = new InjectionToken('@ngrx/effects Internal Root Guard');\nconst USER_PROVIDED_EFFECTS = new InjectionToken('@ngrx/effects User Provided Effects');\nconst _ROOT_EFFECTS = new InjectionToken('@ngrx/effects Internal Root Effects');\nconst ROOT_EFFECTS = new InjectionToken('@ngrx/effects Root Effects');\nconst _FEATURE_EFFECTS = new InjectionToken('@ngrx/effects Internal Feature Effects');\nconst FEATURE_EFFECTS = new InjectionToken('@ngrx/effects Feature Effects');\nconst EFFECTS_ERROR_HANDLER = new InjectionToken('@ngrx/effects Effects Error Handler', { providedIn: 'root', factory: () => defaultEffectsErrorHandler });\n\nconst ROOT_EFFECTS_INIT = '@ngrx/effects/init';\nconst rootEffectsInit = createAction(ROOT_EFFECTS_INIT);\n\nfunction reportInvalidActions(output, reporter) {\n if (output.notification.kind === 'N') {\n const action = output.notification.value;\n const isInvalidAction = !isAction(action);\n if (isInvalidAction) {\n reporter.handleError(new Error(`Effect ${getEffectName(output)} dispatched an invalid action: ${stringify(action)}`));\n }\n }\n}\nfunction isAction(action) {\n return (typeof action !== 'function' &&\n action &&\n action.type &&\n typeof action.type === 'string');\n}\nfunction getEffectName({ propertyName, sourceInstance, sourceName, }) {\n const isMethod = typeof sourceInstance[propertyName] === 'function';\n return `\"${sourceName}.${String(propertyName)}${isMethod ? '()' : ''}\"`;\n}\nfunction stringify(action) {\n try {\n return JSON.stringify(action);\n }\n catch {\n return action;\n }\n}\n\nconst onIdentifyEffectsKey = 'ngrxOnIdentifyEffects';\nfunction isOnIdentifyEffects(instance) {\n return isFunction(instance, onIdentifyEffectsKey);\n}\nconst onRunEffectsKey = 'ngrxOnRunEffects';\nfunction isOnRunEffects(instance) {\n return isFunction(instance, onRunEffectsKey);\n}\nconst onInitEffects = 'ngrxOnInitEffects';\nfunction isOnInitEffects(instance) {\n return isFunction(instance, onInitEffects);\n}\nfunction isFunction(instance, functionName) {\n return (instance &&\n functionName in instance &&\n typeof instance[functionName] === 'function');\n}\n\nclass EffectSources extends Subject {\n constructor(errorHandler, effectsErrorHandler) {\n super();\n this.errorHandler = errorHandler;\n this.effectsErrorHandler = effectsErrorHandler;\n }\n addEffects(effectSourceInstance) {\n this.next(effectSourceInstance);\n }\n /**\n * @internal\n */\n toActions() {\n return this.pipe(groupBy(getSourceForInstance), mergeMap((source$) => {\n return source$.pipe(groupBy(effectsInstance));\n }), mergeMap((source$) => {\n const effect$ = source$.pipe(exhaustMap((sourceInstance) => {\n return resolveEffectSource(this.errorHandler, this.effectsErrorHandler)(sourceInstance);\n }), map((output) => {\n reportInvalidActions(output, this.errorHandler);\n return output.notification;\n }), filter((notification) => notification.kind === 'N' && notification.value != null), dematerialize());\n // start the stream with an INIT action\n // do this only for the first Effect instance\n const init$ = source$.pipe(take(1), filter(isOnInitEffects), map((instance) => instance.ngrxOnInitEffects()));\n return merge(effect$, init$);\n }));\n }\n}\n/** @nocollapse */ EffectSources.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectSources, deps: [{ token: i0.ErrorHandler }, { token: EFFECTS_ERROR_HANDLER }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ EffectSources.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectSources, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectSources, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Inject,\n args: [EFFECTS_ERROR_HANDLER]\n }] }]; } });\nfunction effectsInstance(sourceInstance) {\n if (isOnIdentifyEffects(sourceInstance)) {\n return sourceInstance.ngrxOnIdentifyEffects();\n }\n return '';\n}\nfunction resolveEffectSource(errorHandler, effectsErrorHandler) {\n return (sourceInstance) => {\n const mergedEffects$ = mergeEffects(sourceInstance, errorHandler, effectsErrorHandler);\n if (isOnRunEffects(sourceInstance)) {\n return sourceInstance.ngrxOnRunEffects(mergedEffects$);\n }\n return mergedEffects$;\n };\n}\n\nclass EffectsRunner {\n constructor(effectSources, store) {\n this.effectSources = effectSources;\n this.store = store;\n this.effectsSubscription = null;\n }\n get isStarted() {\n return !!this.effectsSubscription;\n }\n start() {\n if (!this.effectsSubscription) {\n this.effectsSubscription = this.effectSources\n .toActions()\n .subscribe(this.store);\n }\n }\n ngOnDestroy() {\n if (this.effectsSubscription) {\n this.effectsSubscription.unsubscribe();\n this.effectsSubscription = null;\n }\n }\n}\n/** @nocollapse */ EffectsRunner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRunner, deps: [{ token: EffectSources }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ EffectsRunner.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRunner, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRunner, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: EffectSources }, { type: i3.Store }]; } });\n\nclass EffectsRootModule {\n constructor(sources, runner, store, rootEffects, storeRootModule, storeFeatureModule, guard) {\n this.sources = sources;\n runner.start();\n rootEffects.forEach((effectSourceInstance) => sources.addEffects(effectSourceInstance));\n store.dispatch({ type: ROOT_EFFECTS_INIT });\n }\n addEffects(effectSourceInstance) {\n this.sources.addEffects(effectSourceInstance);\n }\n}\n/** @nocollapse */ EffectsRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRootModule, deps: [{ token: EffectSources }, { token: EffectsRunner }, { token: i3.Store }, { token: ROOT_EFFECTS }, { token: i3.StoreRootModule, optional: true }, { token: i3.StoreFeatureModule, optional: true }, { token: _ROOT_EFFECTS_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRootModule });\n/** @nocollapse */ EffectsRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRootModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsRootModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: EffectSources }, { type: EffectsRunner }, { type: i3.Store }, { type: undefined, decorators: [{\n type: Inject,\n args: [ROOT_EFFECTS]\n }] }, { type: i3.StoreRootModule, decorators: [{\n type: Optional\n }] }, { type: i3.StoreFeatureModule, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ROOT_EFFECTS_GUARD]\n }] }]; } });\n\nclass EffectsFeatureModule {\n constructor(root, effectSourceGroups, storeRootModule, storeFeatureModule) {\n effectSourceGroups.forEach((group) => group.forEach((effectSourceInstance) => root.addEffects(effectSourceInstance)));\n }\n}\n/** @nocollapse */ EffectsFeatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsFeatureModule, deps: [{ token: EffectsRootModule }, { token: FEATURE_EFFECTS }, { token: i3.StoreRootModule, optional: true }, { token: i3.StoreFeatureModule, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsFeatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsFeatureModule });\n/** @nocollapse */ EffectsFeatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsFeatureModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsFeatureModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: EffectsRootModule }, { type: undefined, decorators: [{\n type: Inject,\n args: [FEATURE_EFFECTS]\n }] }, { type: i3.StoreRootModule, decorators: [{\n type: Optional\n }] }, { type: i3.StoreFeatureModule, decorators: [{\n type: Optional\n }] }]; } });\n\nclass EffectsModule {\n static forFeature(featureEffects = []) {\n return {\n ngModule: EffectsFeatureModule,\n providers: [\n featureEffects,\n {\n provide: _FEATURE_EFFECTS,\n multi: true,\n useValue: featureEffects,\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: FEATURE_EFFECTS,\n multi: true,\n useFactory: createEffects,\n deps: [Injector, _FEATURE_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n static forRoot(rootEffects = []) {\n return {\n ngModule: EffectsRootModule,\n providers: [\n rootEffects,\n {\n provide: _ROOT_EFFECTS,\n useValue: [rootEffects],\n },\n {\n provide: _ROOT_EFFECTS_GUARD,\n useFactory: _provideForRootGuard,\n deps: [\n [EffectsRunner, new Optional(), new SkipSelf()],\n [_ROOT_EFFECTS, new Self()],\n ],\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: ROOT_EFFECTS,\n useFactory: createEffects,\n deps: [Injector, _ROOT_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n}\n/** @nocollapse */ EffectsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsModule });\n/** @nocollapse */ EffectsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: EffectsModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\nfunction createEffects(injector, effectGroups, userProvidedEffectGroups) {\n const mergedEffects = [];\n for (const effectGroup of effectGroups) {\n mergedEffects.push(...effectGroup);\n }\n for (const userProvidedEffectGroup of userProvidedEffectGroups) {\n mergedEffects.push(...userProvidedEffectGroup);\n }\n return createEffectInstances(injector, mergedEffects);\n}\nfunction createEffectInstances(injector, effects) {\n return effects.map((effect) => injector.get(effect));\n}\nfunction _provideForRootGuard(runner, rootEffects) {\n // check whether any effects are actually passed\n const hasEffects = !(rootEffects.length === 1 && rootEffects[0].length === 0);\n if (hasEffects && runner) {\n throw new TypeError(`EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * Wraps project fn with error handling making it safe to use in Effects.\n * Takes either a config with named properties that represent different possible\n * callbacks or project/error callbacks that are required.\n */\nfunction act(\n/** Allow to take either config object or project/error functions */\nconfigOrProject, errorFn) {\n const { project, error, complete, operator, unsubscribe } = typeof configOrProject === 'function'\n ? {\n project: configOrProject,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n error: errorFn,\n operator: concatMap,\n complete: undefined,\n unsubscribe: undefined,\n }\n : { ...configOrProject, operator: configOrProject.operator || concatMap };\n return (source) => defer(() => {\n const subject = new Subject();\n return merge(source.pipe(operator((input, index) => defer(() => {\n let completed = false;\n let errored = false;\n let projectedCount = 0;\n return project(input, index).pipe(materialize(), map((notification) => {\n switch (notification.kind) {\n case 'E':\n errored = true;\n return {\n kind: 'N',\n value: error(notification.error, input),\n };\n case 'C':\n completed = true;\n return complete\n ? {\n kind: 'N',\n value: complete(projectedCount, input),\n }\n : undefined;\n default:\n ++projectedCount;\n return notification;\n }\n }), filter((n) => n != null), dematerialize(), finalize(() => {\n if (!completed && !errored && unsubscribe) {\n subject.next(unsubscribe(projectedCount, input));\n }\n }));\n }))), subject);\n });\n}\n\n/**\n * `concatLatestFrom` combines the source value\n * and the last available value from a lazily evaluated Observable\n * in a new array\n *\n * @usageNotes\n *\n * Select the active customer from the NgRx Store\n *\n * ```ts\n * import { concatLatestFrom } from '@ngrx/effects';\n * import * as fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * concatLatestFrom(() => this.store.select(fromCustomers.selectActiveCustomer))\n * )\n * ```\n *\n * Select a customer from the NgRx Store by its id that is available on the action\n *\n * ```ts\n * import { concatLatestFrom } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * concatLatestFrom((action) => this.store.select(fromCustomers.selectCustomer(action.customerId)))\n * )\n * ```\n */\nfunction concatLatestFrom(observablesFactory) {\n return pipe(concatMap((value) => {\n const observables = observablesFactory(value);\n const observablesAsArray = Array.isArray(observables)\n ? observables\n : [observables];\n return of(value).pipe(withLatestFrom(...observablesAsArray));\n }));\n}\n\n/**\n * Runs the provided effects.\n * Can be called at the root and feature levels.\n *\n * @usageNotes\n *\n * ### Providing effects at the root level\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideEffects([RouterEffects])],\n * });\n * ```\n *\n * ### Providing effects at the feature level\n *\n * ```ts\n * const booksRoutes: Route[] = [\n * {\n * path: '',\n * providers: [provideEffects([BooksApiEffects])],\n * children: [\n * { path: '', component: BookListComponent },\n * { path: ':id', component: BookDetailsComponent },\n * ],\n * },\n * ];\n * ```\n */\nfunction provideEffects(effects) {\n return {\n ɵproviders: [\n effects,\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n inject(ROOT_STORE_PROVIDER);\n inject(FEATURE_STATE_PROVIDER, InjectFlags.Optional);\n const effectsRunner = inject(EffectsRunner);\n const effectSources = inject(EffectSources);\n const shouldInitEffects = !effectsRunner.isStarted;\n if (shouldInitEffects) {\n effectsRunner.start();\n }\n for (const effectsClass of effects) {\n const effectsInstance = inject(effectsClass);\n effectSources.addEffects(effectsInstance);\n }\n if (shouldInitEffects) {\n const store = inject(Store);\n store.dispatch(rootEffectsInit());\n }\n },\n },\n ],\n };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Actions, EFFECTS_ERROR_HANDLER, Effect, EffectSources, EffectsFeatureModule, EffectsModule, EffectsRootModule, EffectsRunner, ROOT_EFFECTS_INIT, USER_PROVIDED_EFFECTS, act, concatLatestFrom, createEffect, defaultEffectsErrorHandler, getEffectsMetadata, mergeEffects, ofType, provideEffects, rootEffectsInit };\n","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(Notification.createNext(value));\n }, () => {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n }, (err) => {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }));\n });\n}\n","import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber)));\n });\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';\nimport * as i2 from '@ngrx/store';\nimport { ActionsSubject, UPDATE, INIT, INITIAL_STATE, StateObservable, ReducerManagerDispatcher } from '@ngrx/store';\nimport { EMPTY, Observable, of, merge, queueScheduler, ReplaySubject } from 'rxjs';\nimport { share, filter, map, concatMap, timeout, debounceTime, catchError, take, takeUntil, switchMap, skip, observeOn, withLatestFrom, scan } from 'rxjs/operators';\n\nconst PERFORM_ACTION = 'PERFORM_ACTION';\nconst REFRESH = 'REFRESH';\nconst RESET = 'RESET';\nconst ROLLBACK = 'ROLLBACK';\nconst COMMIT = 'COMMIT';\nconst SWEEP = 'SWEEP';\nconst TOGGLE_ACTION = 'TOGGLE_ACTION';\nconst SET_ACTIONS_ACTIVE = 'SET_ACTIONS_ACTIVE';\nconst JUMP_TO_STATE = 'JUMP_TO_STATE';\nconst JUMP_TO_ACTION = 'JUMP_TO_ACTION';\nconst IMPORT_STATE = 'IMPORT_STATE';\nconst LOCK_CHANGES = 'LOCK_CHANGES';\nconst PAUSE_RECORDING = 'PAUSE_RECORDING';\nclass PerformAction {\n constructor(action, timestamp) {\n this.action = action;\n this.timestamp = timestamp;\n this.type = PERFORM_ACTION;\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' +\n 'Have you misspelled a constant?');\n }\n }\n}\nclass Refresh {\n constructor() {\n this.type = REFRESH;\n }\n}\nclass Reset {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = RESET;\n }\n}\nclass Rollback {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = ROLLBACK;\n }\n}\nclass Commit {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = COMMIT;\n }\n}\nclass Sweep {\n constructor() {\n this.type = SWEEP;\n }\n}\nclass ToggleAction {\n constructor(id) {\n this.id = id;\n this.type = TOGGLE_ACTION;\n }\n}\nclass SetActionsActive {\n constructor(start, end, active = true) {\n this.start = start;\n this.end = end;\n this.active = active;\n this.type = SET_ACTIONS_ACTIVE;\n }\n}\nclass JumpToState {\n constructor(index) {\n this.index = index;\n this.type = JUMP_TO_STATE;\n }\n}\nclass JumpToAction {\n constructor(actionId) {\n this.actionId = actionId;\n this.type = JUMP_TO_ACTION;\n }\n}\nclass ImportState {\n constructor(nextLiftedState) {\n this.nextLiftedState = nextLiftedState;\n this.type = IMPORT_STATE;\n }\n}\nclass LockChanges {\n constructor(status) {\n this.status = status;\n this.type = LOCK_CHANGES;\n }\n}\nclass PauseRecording {\n constructor(status) {\n this.status = status;\n this.type = PAUSE_RECORDING;\n }\n}\n\n/**\n * Chrome extension documentation\n * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md\n * Firefox extension documentation\n * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md\n */\nclass StoreDevtoolsConfig {\n constructor() {\n /**\n * Maximum allowed actions to be stored in the history tree (default: `false`)\n */\n this.maxAge = false;\n }\n}\nconst STORE_DEVTOOLS_CONFIG = new InjectionToken('@ngrx/store-devtools Options');\n/**\n * Used to provide a `StoreDevtoolsConfig` for the store-devtools.\n */\nconst INITIAL_OPTIONS = new InjectionToken('@ngrx/store-devtools Initial Config');\nfunction noMonitor() {\n return null;\n}\nconst DEFAULT_NAME = 'NgRx Store DevTools';\nfunction createConfig(optionsInput) {\n const DEFAULT_OPTIONS = {\n maxAge: false,\n monitor: noMonitor,\n actionSanitizer: undefined,\n stateSanitizer: undefined,\n name: DEFAULT_NAME,\n serialize: false,\n logOnly: false,\n autoPause: false,\n // Add all features explicitly. This prevent buggy behavior for\n // options like \"lock\" which might otherwise not show up.\n features: {\n pause: true,\n lock: true,\n persist: true,\n export: true,\n import: 'custom',\n jump: true,\n skip: true,\n reorder: true,\n dispatch: true,\n test: true, // Generate tests for the selected actions\n },\n };\n const options = typeof optionsInput === 'function' ? optionsInput() : optionsInput;\n const logOnly = options.logOnly\n ? { pause: true, export: true, test: true }\n : false;\n const features = options.features || logOnly || DEFAULT_OPTIONS.features;\n const config = Object.assign({}, DEFAULT_OPTIONS, { features }, options);\n if (config.maxAge && config.maxAge < 2) {\n throw new Error(`Devtools 'maxAge' cannot be less than 2, got ${config.maxAge}`);\n }\n return config;\n}\n\nfunction difference(first, second) {\n return first.filter((item) => second.indexOf(item) < 0);\n}\n/**\n * Provides an app's view into the state of the lifted store.\n */\nfunction unliftState(liftedState) {\n const { computedStates, currentStateIndex } = liftedState;\n // At start up NgRx dispatches init actions,\n // When these init actions are being filtered out by the predicate or safe/block list options\n // we don't have a complete computed states yet.\n // At this point it could happen that we're out of bounds, when this happens we fall back to the last known state\n if (currentStateIndex >= computedStates.length) {\n const { state } = computedStates[computedStates.length - 1];\n return state;\n }\n const { state } = computedStates[currentStateIndex];\n return state;\n}\nfunction unliftAction(liftedState) {\n return liftedState.actionsById[liftedState.nextActionId - 1];\n}\n/**\n * Lifts an app's action into an action on the lifted store.\n */\nfunction liftAction(action) {\n return new PerformAction(action, +Date.now());\n}\n/**\n * Sanitizes given actions with given function.\n */\nfunction sanitizeActions(actionSanitizer, actions) {\n return Object.keys(actions).reduce((sanitizedActions, actionIdx) => {\n const idx = Number(actionIdx);\n sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx);\n return sanitizedActions;\n }, {});\n}\n/**\n * Sanitizes given action with given function.\n */\nfunction sanitizeAction(actionSanitizer, action, actionIdx) {\n return {\n ...action,\n action: actionSanitizer(action.action, actionIdx),\n };\n}\n/**\n * Sanitizes given states with given function.\n */\nfunction sanitizeStates(stateSanitizer, states) {\n return states.map((computedState, idx) => ({\n state: sanitizeState(stateSanitizer, computedState.state, idx),\n error: computedState.error,\n }));\n}\n/**\n * Sanitizes given state with given function.\n */\nfunction sanitizeState(stateSanitizer, state, stateIdx) {\n return stateSanitizer(state, stateIdx);\n}\n/**\n * Read the config and tell if actions should be filtered\n */\nfunction shouldFilterActions(config) {\n return config.predicate || config.actionsSafelist || config.actionsBlocklist;\n}\n/**\n * Return a full filtered lifted state\n */\nfunction filterLiftedState(liftedState, predicate, safelist, blocklist) {\n const filteredStagedActionIds = [];\n const filteredActionsById = {};\n const filteredComputedStates = [];\n liftedState.stagedActionIds.forEach((id, idx) => {\n const liftedAction = liftedState.actionsById[id];\n if (!liftedAction)\n return;\n if (idx &&\n isActionFiltered(liftedState.computedStates[idx], liftedAction, predicate, safelist, blocklist)) {\n return;\n }\n filteredActionsById[id] = liftedAction;\n filteredStagedActionIds.push(id);\n filteredComputedStates.push(liftedState.computedStates[idx]);\n });\n return {\n ...liftedState,\n stagedActionIds: filteredStagedActionIds,\n actionsById: filteredActionsById,\n computedStates: filteredComputedStates,\n };\n}\n/**\n * Return true is the action should be ignored\n */\nfunction isActionFiltered(state, action, predicate, safelist, blockedlist) {\n const predicateMatch = predicate && !predicate(state, action.action);\n const safelistMatch = safelist &&\n !action.action.type.match(safelist.map((s) => escapeRegExp(s)).join('|'));\n const blocklistMatch = blockedlist &&\n action.action.type.match(blockedlist.map((s) => escapeRegExp(s)).join('|'));\n return predicateMatch || safelistMatch || blocklistMatch;\n}\n/**\n * Return string with escaped RegExp special characters\n * https://stackoverflow.com/a/6969486/1337347\n */\nfunction escapeRegExp(s) {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nclass DevtoolsDispatcher extends ActionsSubject {\n}\n/** @nocollapse */ DevtoolsDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ DevtoolsDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsDispatcher });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsDispatcher, decorators: [{\n type: Injectable\n }] });\n\nconst ExtensionActionTypes = {\n START: 'START',\n DISPATCH: 'DISPATCH',\n STOP: 'STOP',\n ACTION: 'ACTION',\n};\nconst REDUX_DEVTOOLS_EXTENSION = new InjectionToken('@ngrx/store-devtools Redux Devtools Extension');\nclass DevtoolsExtension {\n constructor(devtoolsExtension, config, dispatcher) {\n this.config = config;\n this.dispatcher = dispatcher;\n this.devtoolsExtension = devtoolsExtension;\n this.createActionStreams();\n }\n notify(action, state) {\n if (!this.devtoolsExtension) {\n return;\n }\n // Check to see if the action requires a full update of the liftedState.\n // If it is a simple action generated by the user's app and the recording\n // is not locked/paused, only send the action and the current state (fast).\n //\n // A full liftedState update (slow: serializes the entire liftedState) is\n // only required when:\n // a) redux-devtools-extension fires the @@Init action (ignored by\n // @ngrx/store-devtools)\n // b) an action is generated by an @ngrx module (e.g. @ngrx/effects/init\n // or @ngrx/store/update-reducers)\n // c) the state has been recomputed due to time-traveling\n // d) any action that is not a PerformAction to err on the side of\n // caution.\n if (action.type === PERFORM_ACTION) {\n if (state.isLocked || state.isPaused) {\n return;\n }\n const currentState = unliftState(state);\n if (shouldFilterActions(this.config) &&\n isActionFiltered(currentState, action, this.config.predicate, this.config.actionsSafelist, this.config.actionsBlocklist)) {\n return;\n }\n const sanitizedState = this.config.stateSanitizer\n ? sanitizeState(this.config.stateSanitizer, currentState, state.currentStateIndex)\n : currentState;\n const sanitizedAction = this.config.actionSanitizer\n ? sanitizeAction(this.config.actionSanitizer, action, state.nextActionId)\n : action;\n this.sendToReduxDevtools(() => this.extensionConnection.send(sanitizedAction, sanitizedState));\n }\n else {\n // Requires full state update\n const sanitizedLiftedState = {\n ...state,\n stagedActionIds: state.stagedActionIds,\n actionsById: this.config.actionSanitizer\n ? sanitizeActions(this.config.actionSanitizer, state.actionsById)\n : state.actionsById,\n computedStates: this.config.stateSanitizer\n ? sanitizeStates(this.config.stateSanitizer, state.computedStates)\n : state.computedStates,\n };\n this.sendToReduxDevtools(() => this.devtoolsExtension.send(null, sanitizedLiftedState, this.getExtensionConfig(this.config)));\n }\n }\n createChangesObservable() {\n if (!this.devtoolsExtension) {\n return EMPTY;\n }\n return new Observable((subscriber) => {\n const connection = this.devtoolsExtension.connect(this.getExtensionConfig(this.config));\n this.extensionConnection = connection;\n connection.init();\n connection.subscribe((change) => subscriber.next(change));\n return connection.unsubscribe;\n });\n }\n createActionStreams() {\n // Listens to all changes\n const changes$ = this.createChangesObservable().pipe(share());\n // Listen for the start action\n const start$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.START));\n // Listen for the stop action\n const stop$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.STOP));\n // Listen for lifted actions\n const liftedActions$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.DISPATCH), map((change) => this.unwrapAction(change.payload)), concatMap((action) => {\n if (action.type === IMPORT_STATE) {\n // State imports may happen in two situations:\n // 1. Explicitly by user\n // 2. User activated the \"persist state accross reloads\" option\n // and now the state is imported during reload.\n // Because of option 2, we need to give possible\n // lazy loaded reducers time to instantiate.\n // As soon as there is no UPDATE action within 1 second,\n // it is assumed that all reducers are loaded.\n return this.dispatcher.pipe(filter((action) => action.type === UPDATE), timeout(1000), debounceTime(1000), map(() => action), catchError(() => of(action)), take(1));\n }\n else {\n return of(action);\n }\n }));\n // Listen for unlifted actions\n const actions$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.ACTION), map((change) => this.unwrapAction(change.payload)));\n const actionsUntilStop$ = actions$.pipe(takeUntil(stop$));\n const liftedUntilStop$ = liftedActions$.pipe(takeUntil(stop$));\n this.start$ = start$.pipe(takeUntil(stop$));\n // Only take the action sources between the start/stop events\n this.actions$ = this.start$.pipe(switchMap(() => actionsUntilStop$));\n this.liftedActions$ = this.start$.pipe(switchMap(() => liftedUntilStop$));\n }\n unwrapAction(action) {\n return typeof action === 'string' ? eval(`(${action})`) : action;\n }\n getExtensionConfig(config) {\n const extensionOptions = {\n name: config.name,\n features: config.features,\n serialize: config.serialize,\n autoPause: config.autoPause ?? false,\n // The action/state sanitizers are not added to the config\n // because sanitation is done in this class already.\n // It is done before sending it to the devtools extension for consistency:\n // - If we call extensionConnection.send(...),\n // the extension would call the sanitizers.\n // - If we call devtoolsExtension.send(...) (aka full state update),\n // the extension would NOT call the sanitizers, so we have to do it ourselves.\n };\n if (config.maxAge !== false /* support === 0 */) {\n extensionOptions.maxAge = config.maxAge;\n }\n return extensionOptions;\n }\n sendToReduxDevtools(send) {\n try {\n send();\n }\n catch (err) {\n console.warn('@ngrx/store-devtools: something went wrong inside the redux devtools', err);\n }\n }\n}\n/** @nocollapse */ DevtoolsExtension.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsExtension, deps: [{ token: REDUX_DEVTOOLS_EXTENSION }, { token: STORE_DEVTOOLS_CONFIG }, { token: DevtoolsDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ DevtoolsExtension.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsExtension });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: DevtoolsExtension, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [REDUX_DEVTOOLS_EXTENSION]\n }] }, { type: StoreDevtoolsConfig, decorators: [{\n type: Inject,\n args: [STORE_DEVTOOLS_CONFIG]\n }] }, { type: DevtoolsDispatcher }]; } });\n\nconst INIT_ACTION = { type: INIT };\nconst RECOMPUTE = '@ngrx/store-devtools/recompute';\nconst RECOMPUTE_ACTION = { type: RECOMPUTE };\n/**\n * Computes the next entry in the log by applying an action.\n */\nfunction computeNextEntry(reducer, action, state, error, errorHandler) {\n if (error) {\n return {\n state,\n error: 'Interrupted by an error up the chain',\n };\n }\n let nextState = state;\n let nextError;\n try {\n nextState = reducer(state, action);\n }\n catch (err) {\n nextError = err.toString();\n errorHandler.handleError(err);\n }\n return {\n state: nextState,\n error: nextError,\n };\n}\n/**\n * Runs the reducer on invalidated actions to get a fresh computation log.\n */\nfunction recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused) {\n // Optimization: exit early and return the same reference\n // if we know nothing could have changed.\n if (minInvalidatedStateIndex >= computedStates.length &&\n computedStates.length === stagedActionIds.length) {\n return computedStates;\n }\n const nextComputedStates = computedStates.slice(0, minInvalidatedStateIndex);\n // If the recording is paused, recompute all states up until the pause state,\n // else recompute all states.\n const lastIncludedActionId = stagedActionIds.length - (isPaused ? 1 : 0);\n for (let i = minInvalidatedStateIndex; i < lastIncludedActionId; i++) {\n const actionId = stagedActionIds[i];\n const action = actionsById[actionId].action;\n const previousEntry = nextComputedStates[i - 1];\n const previousState = previousEntry ? previousEntry.state : committedState;\n const previousError = previousEntry ? previousEntry.error : undefined;\n const shouldSkip = skippedActionIds.indexOf(actionId) > -1;\n const entry = shouldSkip\n ? previousEntry\n : computeNextEntry(reducer, action, previousState, previousError, errorHandler);\n nextComputedStates.push(entry);\n }\n // If the recording is paused, the last state will not be recomputed,\n // because it's essentially not part of the state history.\n if (isPaused) {\n nextComputedStates.push(computedStates[computedStates.length - 1]);\n }\n return nextComputedStates;\n}\nfunction liftInitialState(initialCommittedState, monitorReducer) {\n return {\n monitorState: monitorReducer(undefined, {}),\n nextActionId: 1,\n actionsById: { 0: liftAction(INIT_ACTION) },\n stagedActionIds: [0],\n skippedActionIds: [],\n committedState: initialCommittedState,\n currentStateIndex: 0,\n computedStates: [],\n isLocked: false,\n isPaused: false,\n };\n}\n/**\n * Creates a history state reducer from an app's reducer.\n */\nfunction liftReducerWith(initialCommittedState, initialLiftedState, errorHandler, monitorReducer, options = {}) {\n /**\n * Manages how the history actions modify the history state.\n */\n return (reducer) => (liftedState, liftedAction) => {\n let { monitorState, actionsById, nextActionId, stagedActionIds, skippedActionIds, committedState, currentStateIndex, computedStates, isLocked, isPaused, } = liftedState || initialLiftedState;\n if (!liftedState) {\n // Prevent mutating initialLiftedState\n actionsById = Object.create(actionsById);\n }\n function commitExcessActions(n) {\n // Auto-commits n-number of excess actions.\n let excess = n;\n let idsToDelete = stagedActionIds.slice(1, excess + 1);\n for (let i = 0; i < idsToDelete.length; i++) {\n if (computedStates[i + 1].error) {\n // Stop if error is found. Commit actions up to error.\n excess = i;\n idsToDelete = stagedActionIds.slice(1, excess + 1);\n break;\n }\n else {\n delete actionsById[idsToDelete[i]];\n }\n }\n skippedActionIds = skippedActionIds.filter((id) => idsToDelete.indexOf(id) === -1);\n stagedActionIds = [0, ...stagedActionIds.slice(excess + 1)];\n committedState = computedStates[excess].state;\n computedStates = computedStates.slice(excess);\n currentStateIndex =\n currentStateIndex > excess ? currentStateIndex - excess : 0;\n }\n function commitChanges() {\n // Consider the last committed state the new starting point.\n // Squash any staged actions into a single committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = computedStates[currentStateIndex].state;\n currentStateIndex = 0;\n computedStates = [];\n }\n // By default, aggressively recompute every state whatever happens.\n // This has O(n) performance, so we'll override this to a sensible\n // value whenever we feel like we don't have to recompute the states.\n let minInvalidatedStateIndex = 0;\n switch (liftedAction.type) {\n case LOCK_CHANGES: {\n isLocked = liftedAction.status;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case PAUSE_RECORDING: {\n isPaused = liftedAction.status;\n if (isPaused) {\n // Add a pause action to signal the devtools-user the recording is paused.\n // The corresponding state will be overwritten on each update to always contain\n // the latest state (see Actions.PERFORM_ACTION).\n stagedActionIds = [...stagedActionIds, nextActionId];\n actionsById[nextActionId] = new PerformAction({\n type: '@ngrx/devtools/pause',\n }, +Date.now());\n nextActionId++;\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = computedStates.concat(computedStates[computedStates.length - 1]);\n if (currentStateIndex === stagedActionIds.length - 2) {\n currentStateIndex++;\n }\n minInvalidatedStateIndex = Infinity;\n }\n else {\n commitChanges();\n }\n break;\n }\n case RESET: {\n // Get back to the state the store was created with.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = initialCommittedState;\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case COMMIT: {\n commitChanges();\n break;\n }\n case ROLLBACK: {\n // Forget about any staged actions.\n // Start again from the last committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case TOGGLE_ACTION: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { id: actionId } = liftedAction;\n const index = skippedActionIds.indexOf(actionId);\n if (index === -1) {\n skippedActionIds = [actionId, ...skippedActionIds];\n }\n else {\n skippedActionIds = skippedActionIds.filter((id) => id !== actionId);\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(actionId);\n break;\n }\n case SET_ACTIONS_ACTIVE: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { start, end, active } = liftedAction;\n const actionIds = [];\n for (let i = start; i < end; i++)\n actionIds.push(i);\n if (active) {\n skippedActionIds = difference(skippedActionIds, actionIds);\n }\n else {\n skippedActionIds = [...skippedActionIds, ...actionIds];\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(start);\n break;\n }\n case JUMP_TO_STATE: {\n // Without recomputing anything, move the pointer that tell us\n // which state is considered the current one. Useful for sliders.\n currentStateIndex = liftedAction.index;\n // Optimization: we know the history has not changed.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case JUMP_TO_ACTION: {\n // Jumps to a corresponding state to a specific action.\n // Useful when filtering actions.\n const index = stagedActionIds.indexOf(liftedAction.actionId);\n if (index !== -1)\n currentStateIndex = index;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case SWEEP: {\n // Forget any actions that are currently being skipped.\n stagedActionIds = difference(stagedActionIds, skippedActionIds);\n skippedActionIds = [];\n currentStateIndex = Math.min(currentStateIndex, stagedActionIds.length - 1);\n break;\n }\n case PERFORM_ACTION: {\n // Ignore action and return state as is if recording is locked\n if (isLocked) {\n return liftedState || initialLiftedState;\n }\n if (isPaused ||\n (liftedState &&\n isActionFiltered(liftedState.computedStates[currentStateIndex], liftedAction, options.predicate, options.actionsSafelist, options.actionsBlocklist))) {\n // If recording is paused or if the action should be ignored, overwrite the last state\n // (corresponds to the pause action) and keep everything else as is.\n // This way, the app gets the new current state while the devtools\n // do not record another action.\n const lastState = computedStates[computedStates.length - 1];\n computedStates = [\n ...computedStates.slice(0, -1),\n computeNextEntry(reducer, liftedAction.action, lastState.state, lastState.error, errorHandler),\n ];\n minInvalidatedStateIndex = Infinity;\n break;\n }\n // Auto-commit as new actions come in.\n if (options.maxAge && stagedActionIds.length === options.maxAge) {\n commitExcessActions(1);\n }\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n const actionId = nextActionId++;\n // Mutation! This is the hottest path, and we optimize on purpose.\n // It is safe because we set a new key in a cache dictionary.\n actionsById[actionId] = liftedAction;\n stagedActionIds = [...stagedActionIds, actionId];\n // Optimization: we know that only the new action needs computing.\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n break;\n }\n case IMPORT_STATE: {\n // Completely replace everything.\n ({\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n } = liftedAction.nextLiftedState);\n break;\n }\n case INIT: {\n // Always recompute states on hot reload and init.\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n case UPDATE: {\n const stateHasErrors = computedStates.filter((state) => state.error).length > 0;\n if (stateHasErrors) {\n // Recompute all states\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n }\n else {\n // If not paused/locked, add a new action to signal devtools-user\n // that there was a reducer update.\n if (!isPaused && !isLocked) {\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n // Add a new action to only recompute state\n const actionId = nextActionId++;\n actionsById[actionId] = new PerformAction(liftedAction, +Date.now());\n stagedActionIds = [...stagedActionIds, actionId];\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n }\n // Recompute state history with latest reducer and update action\n computedStates = computedStates.map((cmp) => ({\n ...cmp,\n state: reducer(cmp.state, RECOMPUTE_ACTION),\n }));\n currentStateIndex = stagedActionIds.length - 1;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n commitExcessActions(stagedActionIds.length - options.maxAge);\n }\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n default: {\n // If the action is not recognized, it's a monitor action.\n // Optimization: a monitor action can't change history.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n }\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n monitorState = monitorReducer(monitorState, liftedAction);\n return {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n };\n };\n}\n\nclass StoreDevtools {\n constructor(dispatcher, actions$, reducers$, extension, scannedActions, errorHandler, initialState, config) {\n const liftedInitialState = liftInitialState(initialState, config.monitor);\n const liftReducer = liftReducerWith(initialState, liftedInitialState, errorHandler, config.monitor, config);\n const liftedAction$ = merge(merge(actions$.asObservable().pipe(skip(1)), extension.actions$).pipe(map(liftAction)), dispatcher, extension.liftedActions$).pipe(observeOn(queueScheduler));\n const liftedReducer$ = reducers$.pipe(map(liftReducer));\n const liftedStateSubject = new ReplaySubject(1);\n const liftedStateSubscription = liftedAction$\n .pipe(withLatestFrom(liftedReducer$), scan(({ state: liftedState }, [action, reducer]) => {\n let reducedLiftedState = reducer(liftedState, action);\n // On full state update\n // If we have actions filters, we must filter completely our lifted state to be sync with the extension\n if (action.type !== PERFORM_ACTION && shouldFilterActions(config)) {\n reducedLiftedState = filterLiftedState(reducedLiftedState, config.predicate, config.actionsSafelist, config.actionsBlocklist);\n }\n // Extension should be sent the sanitized lifted state\n extension.notify(action, reducedLiftedState);\n return { state: reducedLiftedState, action };\n }, { state: liftedInitialState, action: null }))\n .subscribe(({ state, action }) => {\n liftedStateSubject.next(state);\n if (action.type === PERFORM_ACTION) {\n const unliftedAction = action.action;\n scannedActions.next(unliftedAction);\n }\n });\n const extensionStartSubscription = extension.start$.subscribe(() => {\n this.refresh();\n });\n const liftedState$ = liftedStateSubject.asObservable();\n const state$ = liftedState$.pipe(map(unliftState));\n this.extensionStartSubscription = extensionStartSubscription;\n this.stateSubscription = liftedStateSubscription;\n this.dispatcher = dispatcher;\n this.liftedState = liftedState$;\n this.state = state$;\n }\n dispatch(action) {\n this.dispatcher.next(action);\n }\n next(action) {\n this.dispatcher.next(action);\n }\n error(error) { }\n complete() { }\n performAction(action) {\n this.dispatch(new PerformAction(action, +Date.now()));\n }\n refresh() {\n this.dispatch(new Refresh());\n }\n reset() {\n this.dispatch(new Reset(+Date.now()));\n }\n rollback() {\n this.dispatch(new Rollback(+Date.now()));\n }\n commit() {\n this.dispatch(new Commit(+Date.now()));\n }\n sweep() {\n this.dispatch(new Sweep());\n }\n toggleAction(id) {\n this.dispatch(new ToggleAction(id));\n }\n jumpToAction(actionId) {\n this.dispatch(new JumpToAction(actionId));\n }\n jumpToState(index) {\n this.dispatch(new JumpToState(index));\n }\n importState(nextLiftedState) {\n this.dispatch(new ImportState(nextLiftedState));\n }\n lockChanges(status) {\n this.dispatch(new LockChanges(status));\n }\n pauseRecording(status) {\n this.dispatch(new PauseRecording(status));\n }\n}\n/** @nocollapse */ StoreDevtools.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtools, deps: [{ token: DevtoolsDispatcher }, { token: i2.ActionsSubject }, { token: i2.ReducerObservable }, { token: DevtoolsExtension }, { token: i2.ScannedActionsSubject }, { token: i0.ErrorHandler }, { token: INITIAL_STATE }, { token: STORE_DEVTOOLS_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ StoreDevtools.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtools });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtools, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: DevtoolsDispatcher }, { type: i2.ActionsSubject }, { type: i2.ReducerObservable }, { type: DevtoolsExtension }, { type: i2.ScannedActionsSubject }, { type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }, { type: StoreDevtoolsConfig, decorators: [{\n type: Inject,\n args: [STORE_DEVTOOLS_CONFIG]\n }] }]; } });\n\nconst IS_EXTENSION_OR_MONITOR_PRESENT = new InjectionToken('@ngrx/store-devtools Is Devtools Extension or Monitor Present');\nfunction createIsExtensionOrMonitorPresent(extension, config) {\n return Boolean(extension) || config.monitor !== noMonitor;\n}\nfunction createReduxDevtoolsExtension() {\n const extensionKey = '__REDUX_DEVTOOLS_EXTENSION__';\n if (typeof window === 'object' &&\n typeof window[extensionKey] !== 'undefined') {\n return window[extensionKey];\n }\n else {\n return null;\n }\n}\n/**\n * Provides developer tools and instrumentation for `Store`.\n *\n * @usageNotes\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStoreDevtools({\n * maxAge: 25,\n * logOnly: environment.production,\n * }),\n * ],\n * });\n * ```\n */\nfunction provideStoreDevtools(options = {}) {\n return {\n ɵproviders: [\n DevtoolsExtension,\n DevtoolsDispatcher,\n StoreDevtools,\n {\n provide: INITIAL_OPTIONS,\n useValue: options,\n },\n {\n provide: IS_EXTENSION_OR_MONITOR_PRESENT,\n deps: [REDUX_DEVTOOLS_EXTENSION, STORE_DEVTOOLS_CONFIG],\n useFactory: createIsExtensionOrMonitorPresent,\n },\n {\n provide: REDUX_DEVTOOLS_EXTENSION,\n useFactory: createReduxDevtoolsExtension,\n },\n {\n provide: STORE_DEVTOOLS_CONFIG,\n deps: [INITIAL_OPTIONS],\n useFactory: createConfig,\n },\n {\n provide: StateObservable,\n deps: [StoreDevtools],\n useFactory: createStateObservable,\n },\n {\n provide: ReducerManagerDispatcher,\n useExisting: DevtoolsDispatcher,\n },\n ],\n };\n}\n\nfunction createStateObservable(devtools) {\n return devtools.state;\n}\nclass StoreDevtoolsModule {\n static instrument(options = {}) {\n return {\n ngModule: StoreDevtoolsModule,\n providers: [...provideStoreDevtools(options).ɵproviders],\n };\n }\n}\n/** @nocollapse */ StoreDevtoolsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreDevtoolsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtoolsModule });\n/** @nocollapse */ StoreDevtoolsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtoolsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.2\", ngImport: i0, type: StoreDevtoolsModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { INITIAL_OPTIONS, RECOMPUTE, REDUX_DEVTOOLS_EXTENSION, StoreDevtools, StoreDevtoolsConfig, StoreDevtoolsModule, provideStoreDevtools };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, Injectable, Inject, forwardRef, Directive, Input, Output, HostListener, Pipe, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { DOCUMENT } from '@angular/common';\n\nconst config = new InjectionToken('ngx-mask config');\nconst NEW_CONFIG = new InjectionToken('new ngx-mask config');\nconst INITIAL_CONFIG = new InjectionToken('initial ngx-mask config');\nconst initialConfig = {\n suffix: '',\n prefix: '',\n thousandSeparator: ' ',\n decimalMarker: ['.', ','],\n clearIfNotMatch: false,\n showTemplate: false,\n showMaskTyped: false,\n placeHolderCharacter: '_',\n dropSpecialCharacters: true,\n hiddenInput: undefined,\n shownMaskExpression: '',\n separatorLimit: '',\n allowNegativeNumbers: false,\n validation: true,\n // eslint-disable-next-line @typescript-eslint/quotes\n specialCharacters: ['-', '/', '(', ')', '.', ':', ' ', '+', ',', '@', '[', ']', '\"', \"'\"],\n leadZeroDateTime: false,\n triggerOnMaskChange: false,\n maskFilled: new EventEmitter(),\n patterns: {\n '0': {\n pattern: new RegExp('\\\\d'),\n },\n '9': {\n pattern: new RegExp('\\\\d'),\n optional: true,\n },\n X: {\n pattern: new RegExp('\\\\d'),\n symbol: '*',\n },\n A: {\n pattern: new RegExp('[a-zA-Z0-9]'),\n },\n S: {\n pattern: new RegExp('[a-zA-Z]'),\n },\n U: {\n pattern: new RegExp('[A-Z]'),\n },\n L: {\n pattern: new RegExp('[a-z]'),\n },\n d: {\n pattern: new RegExp('\\\\d'),\n },\n m: {\n pattern: new RegExp('\\\\d'),\n },\n M: {\n pattern: new RegExp('\\\\d'),\n },\n H: {\n pattern: new RegExp('\\\\d'),\n },\n h: {\n pattern: new RegExp('\\\\d'),\n },\n s: {\n pattern: new RegExp('\\\\d'),\n },\n },\n};\nconst timeMasks = ['Hh:m0:s0', 'Hh:m0', 'm0:s0'];\nconst withoutValidation = [\n 'percent',\n 'Hh',\n 's0',\n 'm0',\n 'separator',\n 'd0/M0/0000',\n 'd0/M0',\n 'd0',\n 'M0',\n];\n\nclass MaskApplierService {\n constructor(_config) {\n this._config = _config;\n this.maskExpression = '';\n this.actualValue = '';\n this.shownMaskExpression = '';\n this._formatWithSeparators = (str, thousandSeparatorChar, decimalChars, precision) => {\n let x = [];\n let decimalChar = '';\n if (Array.isArray(decimalChars)) {\n const regExp = new RegExp(decimalChars.map((v) => ('[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v)).join('|'));\n x = str.split(regExp);\n decimalChar = str.match(regExp)?.[0] ?? '';\n }\n else {\n x = str.split(decimalChars);\n decimalChar = decimalChars;\n }\n const decimals = x.length > 1 ? `${decimalChar}${x[1]}` : '';\n let res = x[0] ?? '';\n const separatorLimit = this.separatorLimit.replace(/\\s/g, '');\n if (separatorLimit && +separatorLimit) {\n if (res[0] === '-') {\n res = `-${res.slice(1, res.length).slice(0, separatorLimit.length)}`;\n }\n else {\n res = res.slice(0, separatorLimit.length);\n }\n }\n const rgx = /(\\d+)(\\d{3})/;\n while (thousandSeparatorChar && rgx.test(res)) {\n res = res.replace(rgx, '$1' + thousandSeparatorChar + '$2');\n }\n if (precision === undefined) {\n return res + decimals;\n }\n else if (precision === 0) {\n return res;\n }\n return res + decimals.substring(0, precision + 1);\n };\n this.percentage = (str) => {\n return Number(str) >= 0 && Number(str) <= 100;\n };\n this.getPrecision = (maskExpression) => {\n const x = maskExpression.split('.');\n if (x.length > 1) {\n return Number(x[x.length - 1]);\n }\n return Infinity;\n };\n this.checkAndRemoveSuffix = (inputValue) => {\n for (let i = this.suffix?.length - 1; i >= 0; i--) {\n const substr = this.suffix.substring(i, this.suffix?.length);\n if (inputValue.includes(substr) &&\n i !== this.suffix?.length - 1 &&\n (i - 1 < 0 ||\n !inputValue.includes(this.suffix.substring(i - 1, this.suffix?.length)))) {\n return inputValue.replace(substr, '');\n }\n }\n return inputValue;\n };\n this.checkInputPrecision = (inputValue, precision, decimalMarker) => {\n if (precision < Infinity) {\n // TODO need think about decimalMarker\n if (Array.isArray(decimalMarker)) {\n const marker = decimalMarker.find((dm) => dm !== this.thousandSeparator);\n // eslint-disable-next-line no-param-reassign\n decimalMarker = marker ? marker : decimalMarker[0];\n }\n const precisionRegEx = new RegExp(this._charToRegExpExpression(decimalMarker) + `\\\\d{${precision}}.*$`);\n const precisionMatch = inputValue.match(precisionRegEx) ?? [];\n const precisionMatchLength = precisionMatch[0]?.length ?? 0;\n if (precisionMatchLength - 1 > precision) {\n const diff = precisionMatchLength - 1 - precision;\n // eslint-disable-next-line no-param-reassign\n inputValue = inputValue.substring(0, inputValue.length - diff);\n }\n if (precision === 0 &&\n this._compareOrIncludes(inputValue[inputValue.length - 1], decimalMarker, this.thousandSeparator)) {\n // eslint-disable-next-line no-param-reassign\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n }\n return inputValue;\n };\n this._shift = new Set();\n this.clearIfNotMatch = this._config.clearIfNotMatch;\n this.dropSpecialCharacters = this._config.dropSpecialCharacters;\n this.maskSpecialCharacters = this._config.specialCharacters;\n this.maskAvailablePatterns = this._config.patterns;\n this.prefix = this._config.prefix;\n this.suffix = this._config.suffix;\n this.thousandSeparator = this._config.thousandSeparator;\n this.decimalMarker = this._config.decimalMarker;\n this.hiddenInput = this._config.hiddenInput;\n this.showMaskTyped = this._config.showMaskTyped;\n this.placeHolderCharacter = this._config.placeHolderCharacter;\n this.validation = this._config.validation;\n this.separatorLimit = this._config.separatorLimit;\n this.allowNegativeNumbers = this._config.allowNegativeNumbers;\n this.leadZeroDateTime = this._config.leadZeroDateTime;\n }\n applyMaskWithPattern(inputValue, maskAndPattern) {\n const [mask, customPattern] = maskAndPattern;\n this.customPattern = customPattern;\n return this.applyMask(inputValue, mask);\n }\n applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false, \n // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n cb = () => { }) {\n if (!maskExpression || typeof inputValue !== 'string') {\n return '';\n }\n let cursor = 0;\n let result = '';\n let multi = false;\n let backspaceShift = false;\n let shift = 1;\n let stepBack = false;\n if (inputValue.slice(0, this.prefix.length) === this.prefix) {\n // eslint-disable-next-line no-param-reassign\n inputValue = inputValue.slice(this.prefix.length, inputValue.length);\n }\n if (!!this.suffix && inputValue?.length > 0) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this.checkAndRemoveSuffix(inputValue);\n }\n const inputArray = inputValue.toString().split('');\n if (maskExpression === 'IP') {\n const valuesIP = inputValue.split('.');\n this.ipError = this._validIP(valuesIP);\n // eslint-disable-next-line no-param-reassign\n maskExpression = '099.099.099.099';\n }\n const arr = [];\n for (let i = 0; i < inputValue.length; i++) {\n if (inputValue[i]?.match('\\\\d')) {\n arr.push(inputValue[i] ?? '');\n }\n }\n if (maskExpression === 'CPF_CNPJ') {\n this.cpfCnpjError = arr.length !== 11 && arr.length !== 14;\n if (arr.length > 11) {\n // eslint-disable-next-line no-param-reassign\n maskExpression = '00.000.000/0000-00';\n }\n else {\n // eslint-disable-next-line no-param-reassign\n maskExpression = '000.000.000-00';\n }\n }\n if (maskExpression.startsWith('percent')) {\n if (inputValue.match('[a-z]|[A-Z]') ||\n // eslint-disable-next-line no-useless-escape\n inputValue.match(/[-!$%^&*()_+|~=`{}\\[\\]:\";'<>?,\\/.]/)) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this._stripToDecimal(inputValue);\n const precision = this.getPrecision(maskExpression);\n // eslint-disable-next-line no-param-reassign\n inputValue = this.checkInputPrecision(inputValue, precision, this.decimalMarker);\n }\n if (inputValue.indexOf('.') > 0 &&\n !this.percentage(inputValue.substring(0, inputValue.indexOf('.')))) {\n const base = inputValue.substring(0, inputValue.indexOf('.') - 1);\n // eslint-disable-next-line no-param-reassign\n inputValue = `${base}${inputValue.substring(inputValue.indexOf('.'), inputValue.length)}`;\n }\n if (this.percentage(inputValue)) {\n result = inputValue;\n }\n else {\n result = inputValue.substring(0, inputValue.length - 1);\n }\n }\n else if (maskExpression.startsWith('separator')) {\n if (inputValue.match('[wа-яА-Я]') ||\n inputValue.match('[ЁёА-я]') ||\n inputValue.match('[a-z]|[A-Z]') ||\n inputValue.match(/[-@#!$%\\\\^&*()_£¬'+|~=`{}\\]:\";<>.?/]/) ||\n inputValue.match('[^A-Za-z0-9,]')) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this._stripToDecimal(inputValue);\n }\n // eslint-disable-next-line no-param-reassign\n inputValue =\n inputValue.length > 1 &&\n inputValue[0] === '0' &&\n inputValue[1] !== this.thousandSeparator &&\n !this._compareOrIncludes(inputValue[1], this.decimalMarker, this.thousandSeparator) &&\n !backspaced\n ? inputValue.slice(0, inputValue.length - 1)\n : inputValue;\n if (backspaced) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this._compareOrIncludes(inputValue[inputValue.length - 1], this.decimalMarker, this.thousandSeparator)\n ? inputValue.slice(0, inputValue.length - 1)\n : inputValue;\n }\n // TODO: we had different rexexps here for the different cases... but tests dont seam to bother - check this\n // separator: no COMMA, dot-sep: no SPACE, COMMA OK, comma-sep: no SPACE, COMMA OK\n const thousandSeparatorCharEscaped = this._charToRegExpExpression(this.thousandSeparator);\n let invalidChars = '@#!$%^&*()_+|~=`{}\\\\[\\\\]:\\\\s,\\\\.\";<>?\\\\/'.replace(thousandSeparatorCharEscaped, '');\n //.replace(decimalMarkerEscaped, '');\n if (Array.isArray(this.decimalMarker)) {\n for (const marker of this.decimalMarker) {\n invalidChars = invalidChars.replace(this._charToRegExpExpression(marker), '');\n }\n }\n else {\n invalidChars = invalidChars.replace(this._charToRegExpExpression(this.decimalMarker), '');\n }\n const invalidCharRegexp = new RegExp('[' + invalidChars + ']');\n if (inputValue.match(invalidCharRegexp) ||\n (inputValue.length === 1 &&\n this._compareOrIncludes(inputValue, this.decimalMarker, this.thousandSeparator))) {\n // eslint-disable-next-line no-param-reassign\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n const precision = this.getPrecision(maskExpression);\n // eslint-disable-next-line no-param-reassign\n inputValue = this.checkInputPrecision(inputValue, precision, this.decimalMarker);\n const strForSep = inputValue.replace(new RegExp(thousandSeparatorCharEscaped, 'g'), '');\n result = this._formatWithSeparators(strForSep, this.thousandSeparator, this.decimalMarker, precision);\n const commaShift = result.indexOf(',') - inputValue.indexOf(',');\n const shiftStep = result.length - inputValue.length;\n if (shiftStep > 0 && result[position] !== ',') {\n backspaceShift = true;\n let _shift = 0;\n do {\n this._shift.add(position + _shift);\n _shift++;\n } while (_shift < shiftStep);\n }\n else if ((commaShift !== 0 &&\n position > 0 &&\n !(result.indexOf(',') >= position && position > 3)) ||\n (!(result.indexOf('.') >= position && position > 3) && shiftStep <= 0)) {\n this._shift.clear();\n backspaceShift = true;\n shift = shiftStep;\n // eslint-disable-next-line no-param-reassign\n position += shiftStep;\n this._shift.add(position);\n }\n else {\n this._shift.clear();\n }\n }\n else {\n for (\n // eslint-disable-next-line\n let i = 0, inputSymbol = inputArray[0]; i < inputArray.length; i++, inputSymbol = inputArray[i] ?? '') {\n if (cursor === maskExpression.length) {\n break;\n }\n if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? '') &&\n maskExpression[cursor + 1] === '?') {\n result += inputSymbol;\n cursor += 2;\n }\n else if (maskExpression[cursor + 1] === '*' &&\n multi &&\n this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2] ?? '')) {\n result += inputSymbol;\n cursor += 3;\n multi = false;\n }\n else if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? '') &&\n maskExpression[cursor + 1] === '*') {\n result += inputSymbol;\n multi = true;\n }\n else if (maskExpression[cursor + 1] === '?' &&\n this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2] ?? '')) {\n result += inputSymbol;\n cursor += 3;\n }\n else if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? '')) {\n if (maskExpression[cursor] === 'H') {\n if (Number(inputSymbol) > 2) {\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n if (maskExpression[cursor] === 'h') {\n if (result === '2' && Number(inputSymbol) > 3) {\n cursor += 1;\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === 'm') {\n if (Number(inputSymbol) > 5) {\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n if (maskExpression[cursor] === 's') {\n if (Number(inputSymbol) > 5) {\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n const daysCount = 31;\n if (maskExpression[cursor] === 'd') {\n if ((Number(inputSymbol) > 3 && this.leadZeroDateTime) ||\n Number(inputValue.slice(cursor, cursor + 2)) > daysCount ||\n inputValue[cursor + 1] === '/') {\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n if (maskExpression[cursor] === 'M') {\n const monthsCount = 12;\n // mask without day\n const withoutDays = cursor === 0 &&\n (Number(inputSymbol) > 2 ||\n Number(inputValue.slice(cursor, cursor + 2)) > monthsCount ||\n inputValue[cursor + 1] === '/');\n // day<10 && month<12 for input\n const day1monthInput = inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n ((inputValue[cursor - 2] === '/' &&\n Number(inputValue.slice(cursor - 1, cursor + 1)) > monthsCount &&\n inputValue[cursor] !== '/') ||\n inputValue[cursor] === '/' ||\n (inputValue[cursor - 3] === '/' &&\n Number(inputValue.slice(cursor - 2, cursor)) > monthsCount &&\n inputValue[cursor - 1] !== '/') ||\n inputValue[cursor - 1] === '/');\n // 10 monthsCount ||\n inputValue[cursor + 1] === '/');\n // day<10 && month<12 for paste whole data\n const day1monthPaste = Number(inputValue.slice(cursor - 3, cursor - 1)) > daysCount &&\n !inputValue.slice(cursor - 3, cursor - 1).includes('/') &&\n !inputValue.slice(cursor - 2, cursor).includes('/') &&\n Number(inputValue.slice(cursor - 2, cursor)) > monthsCount;\n // 10 monthsCount;\n if ((Number(inputSymbol) > 1 && this.leadZeroDateTime) ||\n withoutDays ||\n day1monthInput ||\n day2monthInput ||\n day1monthPaste ||\n day2monthPaste) {\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n result += inputSymbol;\n cursor++;\n }\n else if (inputSymbol === ' ' && maskExpression[cursor] === ' ') {\n result += inputSymbol;\n cursor++;\n }\n else if (this.maskSpecialCharacters.indexOf(maskExpression[cursor] ?? '') !== -1) {\n result += maskExpression[cursor];\n cursor++;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n }\n else if (this.maskSpecialCharacters.indexOf(inputSymbol) > -1 &&\n this.maskAvailablePatterns[maskExpression[cursor] ?? ''] &&\n this.maskAvailablePatterns[maskExpression[cursor] ?? '']?.optional) {\n if (!!inputArray[cursor] &&\n maskExpression !== '099.099.099.099' &&\n maskExpression !== '000.000.000-00' &&\n maskExpression !== '00.000.000/0000-00' &&\n !maskExpression.match(/^9+\\.0+$/)) {\n result += inputArray[cursor];\n }\n cursor++;\n i--;\n }\n else if (this.maskExpression[cursor + 1] === '*' &&\n this._findSpecialChar(this.maskExpression[cursor + 2] ?? '') &&\n this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] &&\n multi) {\n cursor += 3;\n result += inputSymbol;\n }\n else if (this.maskExpression[cursor + 1] === '?' &&\n this._findSpecialChar(this.maskExpression[cursor + 2] ?? '') &&\n this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] &&\n multi) {\n cursor += 3;\n result += inputSymbol;\n }\n else if (this.showMaskTyped &&\n this.maskSpecialCharacters.indexOf(inputSymbol) < 0 &&\n inputSymbol !== this.placeHolderCharacter) {\n stepBack = true;\n }\n }\n }\n if (result.length + 1 === maskExpression.length &&\n this.maskSpecialCharacters.indexOf(maskExpression[maskExpression.length - 1] ?? '') !==\n -1) {\n result += maskExpression[maskExpression.length - 1];\n }\n let newPosition = position + 1;\n while (this._shift.has(newPosition)) {\n shift++;\n newPosition++;\n }\n let actualShift = justPasted && !maskExpression.startsWith('separator')\n ? cursor\n : this._shift.has(position)\n ? shift\n : 0;\n if (stepBack) {\n actualShift--;\n }\n cb(actualShift, backspaceShift);\n if (shift < 0) {\n this._shift.clear();\n }\n let onlySpecial = false;\n if (backspaced) {\n onlySpecial = inputArray.every((char) => this.maskSpecialCharacters.includes(char));\n }\n let res = `${this.prefix}${onlySpecial ? '' : result}${this.suffix}`;\n if (result.length === 0) {\n res = `${this.prefix}${result}`;\n }\n return res;\n }\n _findSpecialChar(inputSymbol) {\n return this.maskSpecialCharacters.find((val) => val === inputSymbol);\n }\n _checkSymbolMask(inputSymbol, maskSymbol) {\n this.maskAvailablePatterns = this.customPattern\n ? this.customPattern\n : this.maskAvailablePatterns;\n return ((this.maskAvailablePatterns[maskSymbol]?.pattern &&\n this.maskAvailablePatterns[maskSymbol]?.pattern.test(inputSymbol)) ??\n false);\n }\n _stripToDecimal(str) {\n return str\n .split('')\n .filter((i, idx) => {\n const isDecimalMarker = typeof this.decimalMarker === 'string'\n ? i === this.decimalMarker\n : // TODO (inepipenko) use utility type\n this.decimalMarker.includes(i);\n return (i.match('^-?\\\\d') ||\n i === this.thousandSeparator ||\n isDecimalMarker ||\n (i === '-' && idx === 0 && this.allowNegativeNumbers));\n })\n .join('');\n }\n _charToRegExpExpression(char) {\n // if (Array.isArray(char)) {\n // \treturn char.map((v) => ('[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v)).join('|');\n // }\n if (char) {\n const charsToEscape = '[\\\\^$.|?*+()';\n return char === ' ' ? '\\\\s' : charsToEscape.indexOf(char) >= 0 ? `\\\\${char}` : char;\n }\n return char;\n }\n _shiftStep(maskExpression, cursor, inputLength) {\n const shiftStep = /[*?]/g.test(maskExpression.slice(0, cursor))\n ? inputLength\n : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n }\n _compareOrIncludes(value, comparedValue, excludedValue) {\n return Array.isArray(comparedValue)\n ? comparedValue.filter((v) => v !== excludedValue).includes(value)\n : value === comparedValue;\n }\n _validIP(valuesIP) {\n return !(valuesIP.length === 4 &&\n !valuesIP.some((value, index) => {\n if (valuesIP.length !== index + 1) {\n return value === '' || Number(value) > 255;\n }\n return value === '' || Number(value.substring(0, 3)) > 255;\n }));\n }\n}\nMaskApplierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskApplierService, deps: [{ token: config }], target: i0.ɵɵFactoryTarget.Injectable });\nMaskApplierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskApplierService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskApplierService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [config]\n }] }]; } });\n\nclass MaskService extends MaskApplierService {\n constructor(document, _config, _elementRef, _renderer) {\n super(_config);\n this.document = document;\n this._config = _config;\n this._elementRef = _elementRef;\n this._renderer = _renderer;\n this.maskExpression = '';\n this.isNumberValue = false;\n this.placeHolderCharacter = '_';\n this.maskIsShown = '';\n this.selStart = null;\n this.selEnd = null;\n /**\n * Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,\n * since writeValue should be a one way only process of writing the DOM value based on the Angular model value.\n */\n this.writingValue = false;\n this.maskChanged = false;\n this.triggerOnMaskChange = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n this.onChange = (_) => { };\n }\n // eslint-disable-next-line complexity\n applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false, \n // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n cb = () => { }) {\n if (!maskExpression) {\n return inputValue !== this.actualValue ? this.actualValue : inputValue;\n }\n this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : '';\n if (this.maskExpression === 'IP' && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || '#');\n }\n if (this.maskExpression === 'CPF_CNPJ' && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || '#');\n }\n if (!inputValue && this.showMaskTyped) {\n this.formControlResult(this.prefix);\n return this.prefix + this.maskIsShown;\n }\n const getSymbol = !!inputValue && typeof this.selStart === 'number'\n ? inputValue[this.selStart] ?? ''\n : '';\n let newInputValue = '';\n if (this.hiddenInput !== undefined && !this.writingValue) {\n let actualResult = this.actualValue.split('');\n // eslint-disable @typescript-eslint/no-unused-expressions\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n inputValue !== '' && actualResult.length\n ? typeof this.selStart === 'number' && typeof this.selEnd === 'number'\n ? inputValue.length > actualResult.length\n ? actualResult.splice(this.selStart, 0, getSymbol)\n : inputValue.length < actualResult.length\n ? actualResult.length - inputValue.length === 1\n ? actualResult.splice(this.selStart - 1, 1)\n : actualResult.splice(this.selStart, this.selEnd - this.selStart)\n : null\n : null\n : (actualResult = []);\n if (this.showMaskTyped) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this.removeMask(inputValue);\n }\n // eslint-enable @typescript-eslint/no-unused-expressions\n newInputValue =\n this.actualValue.length && actualResult.length <= inputValue.length\n ? this.shiftTypedSymbols(actualResult.join(''))\n : inputValue;\n }\n if (this.showMaskTyped) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this.removeMask(inputValue);\n }\n newInputValue = Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;\n const result = super.applyMask(newInputValue, maskExpression, position, justPasted, backspaced, cb);\n this.actualValue = this.getActualValue(result);\n // handle some separator implications:\n // a.) adjust decimalMarker default (. -> ,) if thousandSeparator is a dot\n if (this.thousandSeparator === '.' && this.decimalMarker === '.') {\n this.decimalMarker = ',';\n }\n // b) remove decimal marker from list of special characters to mask\n if (this.maskExpression.startsWith('separator') && this.dropSpecialCharacters === true) {\n this.maskSpecialCharacters = this.maskSpecialCharacters.filter((item) => !this._compareOrIncludes(item, this.decimalMarker, this.thousandSeparator) //item !== this.decimalMarker, // !\n );\n }\n this.formControlResult(result);\n if (!this.showMaskTyped) {\n if (this.hiddenInput) {\n return result && result.length\n ? this.hideInput(result, this.maskExpression)\n : result;\n }\n return result;\n }\n const resLen = result.length;\n const prefNmask = this.prefix + this.maskIsShown;\n if (this.maskExpression.includes('H')) {\n const countSkipedSymbol = this._numberSkipedSymbols(result);\n return result + prefNmask.slice(resLen + countSkipedSymbol);\n }\n else if (this.maskExpression === 'IP' || this.maskExpression === 'CPF_CNPJ') {\n return result + prefNmask;\n }\n return result + prefNmask.slice(resLen);\n }\n // get the number of characters that were shifted\n _numberSkipedSymbols(value) {\n const regex = /(^|\\D)(\\d\\D)/g;\n let match = regex.exec(value);\n let countSkipedSymbol = 0;\n while (match != null) {\n countSkipedSymbol += 1;\n match = regex.exec(value);\n }\n return countSkipedSymbol;\n }\n applyValueChanges(position, justPasted, backspaced, \n // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n cb = () => { }) {\n const formElement = this._elementRef.nativeElement;\n formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, backspaced, cb);\n if (formElement === this._getActiveElement()) {\n return;\n }\n this.clearIfNotMatchFn();\n }\n hideInput(inputValue, maskExpression) {\n return inputValue\n .split('')\n .map((curr, index) => {\n if (this.maskAvailablePatterns &&\n this.maskAvailablePatterns[maskExpression[index] ?? ''] &&\n this.maskAvailablePatterns[maskExpression[index] ?? '']?.symbol) {\n return this.maskAvailablePatterns[maskExpression[index] ?? '']?.symbol;\n }\n return curr;\n })\n .join('');\n }\n // this function is not necessary, it checks result against maskExpression\n getActualValue(res) {\n const compare = res.split('').filter((symbol, i) => {\n const maskChar = this.maskExpression[i] ?? '';\n return (this._checkSymbolMask(symbol, maskChar) ||\n (this.maskSpecialCharacters.includes(maskChar) && symbol === maskChar));\n });\n if (compare.join('') === res) {\n return compare.join('');\n }\n return res;\n }\n shiftTypedSymbols(inputValue) {\n let symbolToReplace = '';\n const newInputValue = (inputValue &&\n inputValue.split('').map((currSymbol, index) => {\n if (this.maskSpecialCharacters.includes(inputValue[index + 1] ?? '') &&\n inputValue[index + 1] !== this.maskExpression[index + 1]) {\n symbolToReplace = currSymbol;\n return inputValue[index + 1];\n }\n if (symbolToReplace.length) {\n const replaceSymbol = symbolToReplace;\n symbolToReplace = '';\n return replaceSymbol;\n }\n return currSymbol;\n })) ||\n [];\n return newInputValue.join('');\n }\n /**\n * Convert number value to string\n * 3.1415 -> '3.1415'\n * 1e-7 -> '0.0000001'\n */\n numberToString(value) {\n if (!value && value !== 0) {\n return String(value);\n }\n return Number(value).toLocaleString('fullwide', {\n useGrouping: false,\n maximumFractionDigits: 20,\n });\n }\n showMaskInInput(inputVal) {\n if (this.showMaskTyped && !!this.shownMaskExpression) {\n if (this.maskExpression.length !== this.shownMaskExpression.length) {\n throw new Error('Mask expression must match mask placeholder length');\n }\n else {\n return this.shownMaskExpression;\n }\n }\n else if (this.showMaskTyped) {\n if (inputVal) {\n if (this.maskExpression === 'IP') {\n return this._checkForIp(inputVal);\n }\n if (this.maskExpression === 'CPF_CNPJ') {\n return this._checkForCpfCnpj(inputVal);\n }\n }\n return this.maskExpression.replace(/\\w/g, this.placeHolderCharacter);\n }\n return '';\n }\n clearIfNotMatchFn() {\n const formElement = this._elementRef.nativeElement;\n if (this.clearIfNotMatch &&\n this.prefix.length + this.maskExpression.length + this.suffix.length !==\n formElement.value.replace(/_/g, '').length) {\n this.formElementProperty = ['value', ''];\n this.applyMask(formElement.value, this.maskExpression);\n }\n }\n set formElementProperty([name, value]) {\n Promise.resolve().then(() => this._renderer.setProperty(this._elementRef.nativeElement, name, value));\n }\n checkSpecialCharAmount(mask) {\n const chars = mask\n .split('')\n .filter((item) => this._findSpecialChar(item));\n return chars.length;\n }\n removeMask(inputValue) {\n return this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.maskSpecialCharacters.concat('_').concat(this.placeHolderCharacter));\n }\n _checkForIp(inputVal) {\n if (inputVal === '#') {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n const arr = [];\n for (let i = 0; i < inputVal.length; i++) {\n const value = inputVal[i] ?? '';\n if (!value) {\n continue;\n }\n if (value.match('\\\\d')) {\n arr.push(value);\n }\n }\n if (arr.length <= 3) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 3 && arr.length <= 6) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 6 && arr.length <= 9) {\n return this.placeHolderCharacter;\n }\n if (arr.length > 9 && arr.length <= 12) {\n return '';\n }\n return '';\n }\n _checkForCpfCnpj(inputVal) {\n const cpf = `${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n const cnpj = `${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n if (inputVal === '#') {\n return cpf;\n }\n const arr = [];\n for (let i = 0; i < inputVal.length; i++) {\n const value = inputVal[i] ?? '';\n if (!value) {\n continue;\n }\n if (value.match('\\\\d')) {\n arr.push(value);\n }\n }\n if (arr.length <= 3) {\n return cpf.slice(arr.length, cpf.length);\n }\n if (arr.length > 3 && arr.length <= 6) {\n return cpf.slice(arr.length + 1, cpf.length);\n }\n if (arr.length > 6 && arr.length <= 9) {\n return cpf.slice(arr.length + 2, cpf.length);\n }\n if (arr.length > 9 && arr.length < 11) {\n return cpf.slice(arr.length + 3, cpf.length);\n }\n if (arr.length === 11) {\n return '';\n }\n if (arr.length === 12) {\n if (inputVal.length === 17) {\n return cnpj.slice(16, cnpj.length);\n }\n return cnpj.slice(15, cnpj.length);\n }\n if (arr.length > 12 && arr.length <= 14) {\n return cnpj.slice(arr.length + 4, cnpj.length);\n }\n return '';\n }\n /**\n * Recursively determine the current active element by navigating the Shadow DOM until the Active Element is found.\n */\n _getActiveElement(document = this.document) {\n const shadowRootEl = document?.activeElement?.shadowRoot;\n if (!shadowRootEl?.activeElement) {\n return document.activeElement;\n }\n else {\n return this._getActiveElement(shadowRootEl);\n }\n }\n /**\n * Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue\n * is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual\n * DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular\n * model value too. Therefore, we don't trigger onChange in this scenario.\n * @param inputValue the current form input value\n */\n formControlResult(inputValue) {\n if (this.writingValue || (!this.triggerOnMaskChange && this.maskChanged)) {\n this.maskChanged = false;\n return;\n }\n if (Array.isArray(this.dropSpecialCharacters)) {\n this.onChange(this._toNumber(this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.dropSpecialCharacters)));\n }\n else if (this.dropSpecialCharacters) {\n this.onChange(this._toNumber(this._checkSymbols(inputValue)));\n }\n else {\n this.onChange(this._removeSuffix(inputValue));\n }\n }\n _toNumber(value) {\n if (!this.isNumberValue || value === '') {\n return value;\n }\n const num = Number(value);\n return Number.isNaN(num) ? value : num;\n }\n _removeMask(value, specialCharactersForRemove) {\n return value ? value.replace(this._regExpForRemove(specialCharactersForRemove), '') : value;\n }\n _removePrefix(value) {\n if (!this.prefix) {\n return value;\n }\n return value ? value.replace(this.prefix, '') : value;\n }\n _removeSuffix(value) {\n if (!this.suffix) {\n return value;\n }\n return value ? value.replace(this.suffix, '') : value;\n }\n _retrieveSeparatorValue(result) {\n return this._removeMask(this._removeSuffix(this._removePrefix(result)), this.maskSpecialCharacters);\n }\n _regExpForRemove(specialCharactersForRemove) {\n return new RegExp(specialCharactersForRemove.map((item) => `\\\\${item}`).join('|'), 'gi');\n }\n _replaceDecimalMarkerToDot(value) {\n const markers = Array.isArray(this.decimalMarker)\n ? this.decimalMarker\n : [this.decimalMarker];\n return value.replace(this._regExpForRemove(markers), '.');\n }\n _checkSymbols(result) {\n if (result === '') {\n return result;\n }\n const separatorPrecision = this._retrieveSeparatorPrecision(this.maskExpression);\n const separatorValue = this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(result));\n if (!this.isNumberValue) {\n return separatorValue;\n }\n if (separatorPrecision) {\n if (result === this.decimalMarker) {\n return null;\n }\n return this._checkPrecision(this.maskExpression, separatorValue);\n }\n else {\n return Number(separatorValue);\n }\n }\n // TODO should think about helpers or separting decimal precision to own property\n _retrieveSeparatorPrecision(maskExpretion) {\n const matcher = maskExpretion.match(new RegExp(`^separator\\\\.([^d]*)`));\n return matcher ? Number(matcher[1]) : null;\n }\n _checkPrecision(separatorExpression, separatorValue) {\n if (separatorExpression.indexOf('2') > 0) {\n return Number(separatorValue).toFixed(2);\n }\n return Number(separatorValue);\n }\n}\nMaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskService, deps: [{ token: DOCUMENT }, { token: config }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });\nMaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [config]\n }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; } });\n\nclass MaskDirective {\n constructor(document, _maskService, _config) {\n this.document = document;\n this._maskService = _maskService;\n this._config = _config;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n this.maskExpression = '';\n this.specialCharacters = [];\n this.patterns = {};\n this.prefix = '';\n this.suffix = '';\n this.thousandSeparator = ' ';\n this.decimalMarker = '.';\n this.dropSpecialCharacters = null;\n this.hiddenInput = null;\n this.showMaskTyped = null;\n this.placeHolderCharacter = null;\n this.shownMaskExpression = null;\n this.showTemplate = null;\n this.clearIfNotMatch = null;\n this.validation = null;\n this.separatorLimit = null;\n this.allowNegativeNumbers = null;\n this.leadZeroDateTime = null;\n this.triggerOnMaskChange = null;\n this.maskFilled = new EventEmitter();\n this._maskValue = '';\n this._position = null;\n this._maskExpressionArray = [];\n this._justPasted = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any\n this.onChange = (_) => { };\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n this.onTouch = () => { };\n }\n ngOnChanges(changes) {\n const { maskExpression, specialCharacters, patterns, prefix, suffix, thousandSeparator, decimalMarker, dropSpecialCharacters, hiddenInput, showMaskTyped, placeHolderCharacter, shownMaskExpression, showTemplate, clearIfNotMatch, validation, separatorLimit, allowNegativeNumbers, leadZeroDateTime, triggerOnMaskChange, } = changes;\n if (maskExpression) {\n if (maskExpression.currentValue !== maskExpression.previousValue &&\n !maskExpression.firstChange) {\n this._maskService.maskChanged = true;\n }\n if (maskExpression.currentValue && maskExpression.currentValue.split('||').length > 1) {\n this._maskExpressionArray = maskExpression.currentValue\n .split('||')\n .sort((a, b) => {\n return a.length - b.length;\n });\n this._setMask();\n }\n else {\n this._maskExpressionArray = [];\n this._maskValue = maskExpression.currentValue || '';\n this._maskService.maskExpression = this._maskValue;\n }\n }\n if (specialCharacters) {\n if (!specialCharacters.currentValue || !Array.isArray(specialCharacters.currentValue)) {\n return;\n }\n else {\n this._maskService.maskSpecialCharacters = specialCharacters.currentValue || [];\n }\n }\n // Only overwrite the mask available patterns if a pattern has actually been passed in\n if (patterns && patterns.currentValue) {\n this._maskService.maskAvailablePatterns = patterns.currentValue;\n }\n if (prefix) {\n this._maskService.prefix = prefix.currentValue;\n }\n if (suffix) {\n this._maskService.suffix = suffix.currentValue;\n }\n if (thousandSeparator) {\n this._maskService.thousandSeparator = thousandSeparator.currentValue;\n }\n if (decimalMarker) {\n this._maskService.decimalMarker = decimalMarker.currentValue;\n }\n if (dropSpecialCharacters) {\n this._maskService.dropSpecialCharacters = dropSpecialCharacters.currentValue;\n }\n if (hiddenInput) {\n this._maskService.hiddenInput = hiddenInput.currentValue;\n }\n if (showMaskTyped) {\n this._maskService.showMaskTyped = showMaskTyped.currentValue;\n }\n if (placeHolderCharacter) {\n this._maskService.placeHolderCharacter = placeHolderCharacter.currentValue;\n }\n if (shownMaskExpression) {\n this._maskService.shownMaskExpression = shownMaskExpression.currentValue;\n }\n if (showTemplate) {\n this._maskService.showTemplate = showTemplate.currentValue;\n }\n if (clearIfNotMatch) {\n this._maskService.clearIfNotMatch = clearIfNotMatch.currentValue;\n }\n if (validation) {\n this._maskService.validation = validation.currentValue;\n }\n if (separatorLimit) {\n this._maskService.separatorLimit = separatorLimit.currentValue;\n }\n if (allowNegativeNumbers) {\n this._maskService.allowNegativeNumbers = allowNegativeNumbers.currentValue;\n if (this._maskService.allowNegativeNumbers) {\n this._maskService.maskSpecialCharacters =\n this._maskService.maskSpecialCharacters.filter((c) => c !== '-');\n }\n }\n if (leadZeroDateTime) {\n this._maskService.leadZeroDateTime = leadZeroDateTime.currentValue;\n }\n if (triggerOnMaskChange) {\n this._maskService.triggerOnMaskChange = triggerOnMaskChange.currentValue;\n }\n this._applyMask();\n }\n // eslint-disable-next-line complexity\n validate({ value }) {\n if (!this._maskService.validation || !this._maskValue) {\n return null;\n }\n if (this._maskService.ipError) {\n return this._createValidationError(value);\n }\n if (this._maskService.cpfCnpjError) {\n return this._createValidationError(value);\n }\n if (this._maskValue.startsWith('separator')) {\n return null;\n }\n if (withoutValidation.includes(this._maskValue)) {\n return null;\n }\n if (this._maskService.clearIfNotMatch) {\n return null;\n }\n if (timeMasks.includes(this._maskValue)) {\n return this._validateTime(value);\n }\n if (value && value.toString().length >= 1) {\n let counterOfOpt = 0;\n for (const key in this._maskService.maskAvailablePatterns) {\n if (this._maskService.maskAvailablePatterns[key]?.optional) {\n if (this._maskValue.indexOf(key) !== this._maskValue.lastIndexOf(key)) {\n const opt = this._maskValue\n .split('')\n .filter((i) => i === key)\n .join('');\n counterOfOpt += opt.length;\n }\n else if (this._maskValue.indexOf(key) !== -1) {\n counterOfOpt++;\n }\n if (this._maskValue.indexOf(key) !== -1 &&\n value.toString().length >= this._maskValue.indexOf(key)) {\n return null;\n }\n if (counterOfOpt === this._maskValue.length) {\n return null;\n }\n }\n }\n if (this._maskValue.indexOf('{') === 1 &&\n value.toString().length ===\n this._maskValue.length +\n Number((this._maskValue.split('{')[1] ?? '').split('}')[0]) -\n 4) {\n return null;\n }\n if (this._maskValue.indexOf('*') === 1 || this._maskValue.indexOf('?') === 1) {\n return null;\n }\n else if ((this._maskValue.indexOf('*') > 1 &&\n value.toString().length < this._maskValue.indexOf('*')) ||\n (this._maskValue.indexOf('?') > 1 &&\n value.toString().length < this._maskValue.indexOf('?')) ||\n this._maskValue.indexOf('{') === 1) {\n return this._createValidationError(value);\n }\n if (this._maskValue.indexOf('*') === -1 || this._maskValue.indexOf('?') === -1) {\n const length = this._maskService.dropSpecialCharacters\n ? this._maskValue.length -\n this._maskService.checkSpecialCharAmount(this._maskValue) -\n counterOfOpt\n : this._maskValue.length - counterOfOpt;\n if (value.toString().length < length) {\n return this._createValidationError(value);\n }\n }\n }\n if (value) {\n this.maskFilled.emit();\n return null;\n }\n return null;\n }\n onPaste() {\n this._justPasted = true;\n }\n onModelChange(value) {\n // on form reset we need to update the actualValue\n if ((value === '' || value === null || value === undefined) &&\n this._maskService.actualValue) {\n this._maskService.actualValue = this._maskService.getActualValue('');\n }\n }\n onInput(e) {\n const el = e.target;\n this._inputValue = el.value;\n this._setMask();\n if (!this._maskValue) {\n this.onChange(el.value);\n return;\n }\n const position = el.selectionStart === 1\n ? el.selectionStart + this._maskService.prefix.length\n : el.selectionStart;\n let caretShift = 0;\n let backspaceShift = false;\n this._maskService.applyValueChanges(position, this._justPasted, this._code === 'Backspace' || this._code === 'Delete', (shift, _backspaceShift) => {\n this._justPasted = false;\n caretShift = shift;\n backspaceShift = _backspaceShift;\n });\n // only set the selection if the element is active\n if (this._getActiveElement() !== el) {\n return;\n }\n this._position =\n this._position === 1 && this._inputValue.length === 1 ? null : this._position;\n let positionToApply = this._position\n ? this._inputValue.length + position + caretShift\n : position + (this._code === 'Backspace' && !backspaceShift ? 0 : caretShift);\n if (positionToApply > this._getActualInputLength()) {\n positionToApply = this._getActualInputLength();\n }\n if (positionToApply < 0) {\n positionToApply = 0;\n }\n el.setSelectionRange(positionToApply, positionToApply);\n this._position = null;\n }\n onBlur() {\n if (this._maskValue) {\n this._maskService.clearIfNotMatchFn();\n }\n this.onTouch();\n }\n onClick(e) {\n if (!this._maskValue) {\n return;\n }\n const el = e.target;\n const posStart = 0;\n const posEnd = 0;\n if (el !== null &&\n el.selectionStart !== null &&\n el.selectionStart === el.selectionEnd &&\n el.selectionStart > this._maskService.prefix.length &&\n // eslint-disable-next-line\n e.keyCode !== 38) {\n if (this._maskService.showMaskTyped) {\n // We are showing the mask in the input\n this._maskService.maskIsShown = this._maskService.showMaskInInput();\n if (el.setSelectionRange &&\n this._maskService.prefix + this._maskService.maskIsShown === el.value) {\n // the input ONLY contains the mask, so position the cursor at the start\n el.focus();\n el.setSelectionRange(posStart, posEnd);\n }\n else {\n // the input contains some characters already\n if (el.selectionStart > this._maskService.actualValue.length) {\n // if the user clicked beyond our value's length, position the cursor at the end of our value\n el.setSelectionRange(this._maskService.actualValue.length, this._maskService.actualValue.length);\n }\n }\n }\n }\n const nextValue = el &&\n (!el.value || el.value === this._maskService.prefix\n ? this._maskService.prefix + this._maskService.maskIsShown\n : el.value);\n /** Fix of cursor position jumping to end in most browsers no matter where cursor is inserted onFocus */\n if (el && el.value !== nextValue) {\n el.value = nextValue;\n }\n /** fix of cursor position with prefix when mouse click occur */\n if (el &&\n (el.selectionStart || el.selectionEnd) <=\n this._maskService.prefix.length) {\n el.selectionStart = this._maskService.prefix.length;\n return;\n }\n /** select only inserted text */\n if (el && el.selectionEnd > this._getActualInputLength()) {\n el.selectionEnd = this._getActualInputLength();\n }\n }\n // eslint-disable-next-line complexity\n onKeyDown(e) {\n if (!this._maskValue) {\n return;\n }\n this._code = e.code ? e.code : e.key;\n const el = e.target;\n this._inputValue = el.value;\n this._setMask();\n if (e.keyCode === 38) {\n e.preventDefault();\n }\n if (e.keyCode === 37 || e.keyCode === 8 || e.keyCode === 46) {\n if (e.keyCode === 8 && el.value.length === 0) {\n el.selectionStart = el.selectionEnd;\n }\n if (e.keyCode === 8 && el.selectionStart !== 0) {\n // If specialChars is false, (shouldn't ever happen) then set to the defaults\n this.specialCharacters = this.specialCharacters?.length\n ? this.specialCharacters\n : this._config.specialCharacters;\n if (this.prefix.length > 1 && el.selectionStart <= this.prefix.length) {\n el.setSelectionRange(this.prefix.length, el.selectionEnd);\n }\n else {\n if (this._inputValue.length !== el.selectionStart &&\n el.selectionStart !== 1) {\n while (this.specialCharacters.includes((this._inputValue[el.selectionStart - 1] ?? '').toString()) &&\n ((this.prefix.length >= 1 &&\n el.selectionStart > this.prefix.length) ||\n this.prefix.length === 0)) {\n el.setSelectionRange(el.selectionStart - 1, el.selectionEnd);\n }\n }\n }\n }\n this.checkSelectionOnDeletion(el);\n if (this._maskService.prefix.length &&\n el.selectionStart <= this._maskService.prefix.length &&\n el.selectionEnd <= this._maskService.prefix.length) {\n e.preventDefault();\n }\n const cursorStart = el.selectionStart;\n if (e.keyCode === 8 &&\n !el.readOnly &&\n cursorStart === 0 &&\n el.selectionEnd === el.value.length &&\n el.value.length !== 0) {\n this._position = this._maskService.prefix ? this._maskService.prefix.length : 0;\n this._maskService.applyMask(this._maskService.prefix, this._maskService.maskExpression, this._position);\n }\n }\n if (!!this.suffix &&\n this.suffix.length > 1 &&\n this._inputValue.length - this.suffix.length < el.selectionStart) {\n el.setSelectionRange(this._inputValue.length - this.suffix.length, this._inputValue.length);\n }\n else if ((e.keyCode === 65 && e.ctrlKey) ||\n (e.keyCode === 65 && e.metaKey) // Cmd + A (Mac)\n ) {\n el.setSelectionRange(0, this._getActualInputLength());\n e.preventDefault();\n }\n this._maskService.selStart = el.selectionStart;\n this._maskService.selEnd = el.selectionEnd;\n }\n /** It writes the value in the input */\n async writeValue(inputValue) {\n if (typeof inputValue === 'object' && inputValue !== null && 'value' in inputValue) {\n if ('disable' in inputValue) {\n this.setDisabledState(Boolean(inputValue.disable));\n }\n // eslint-disable-next-line no-param-reassign\n inputValue = inputValue.value;\n }\n if (typeof inputValue === 'number' || this._maskValue.startsWith('separator')) {\n // eslint-disable-next-line no-param-reassign\n inputValue = this._maskService.numberToString(inputValue);\n if (!Array.isArray(this.decimalMarker)) {\n // eslint-disable-next-line no-param-reassign\n inputValue =\n this.decimalMarker !== '.'\n ? inputValue.replace('.', this.decimalMarker)\n : inputValue;\n }\n this._maskService.isNumberValue = true;\n }\n if (typeof inputValue !== 'string') {\n // eslint-disable-next-line no-param-reassign\n inputValue = '';\n }\n this._inputValue = inputValue;\n this._setMask();\n if ((inputValue && this._maskService.maskExpression) ||\n (this._maskService.maskExpression &&\n (this._maskService.prefix || this._maskService.showMaskTyped))) {\n // Let the service we know we are writing value so that triggering onChange function won't happen during applyMask\n this._maskService.writingValue = true;\n this._maskService.formElementProperty = [\n 'value',\n this._maskService.applyMask(inputValue, this._maskService.maskExpression),\n ];\n // Let the service know we've finished writing value\n this._maskService.writingValue = false;\n }\n else {\n this._maskService.formElementProperty = ['value', inputValue];\n }\n this._inputValue = inputValue;\n }\n registerOnChange(fn) {\n this._maskService.onChange = this.onChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouch = fn;\n }\n _getActiveElement(document = this.document) {\n const shadowRootEl = document?.activeElement?.shadowRoot;\n if (!shadowRootEl?.activeElement) {\n return document.activeElement;\n }\n else {\n return this._getActiveElement(shadowRootEl);\n }\n }\n checkSelectionOnDeletion(el) {\n el.selectionStart = Math.min(Math.max(this.prefix.length, el.selectionStart), this._inputValue.length - this.suffix.length);\n el.selectionEnd = Math.min(Math.max(this.prefix.length, el.selectionEnd), this._inputValue.length - this.suffix.length);\n }\n /** It disables the input element */\n setDisabledState(isDisabled) {\n this._maskService.formElementProperty = ['disabled', isDisabled];\n }\n _repeatPatternSymbols(maskExp) {\n return ((maskExp.match(/{[0-9]+}/) &&\n maskExp\n .split('')\n .reduce((accum, currVal, index) => {\n this._start = currVal === '{' ? index : this._start;\n if (currVal !== '}') {\n return this._maskService._findSpecialChar(currVal)\n ? accum + currVal\n : accum;\n }\n this._end = index;\n const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));\n const replaceWith = new Array(repeatNumber + 1).join(maskExp[this._start - 1]);\n return accum + replaceWith;\n }, '')) ||\n maskExp);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _applyMask() {\n this._maskService.maskExpression = this._repeatPatternSymbols(this._maskValue || '');\n this._maskService.formElementProperty = [\n 'value',\n this._maskService.applyMask(this._inputValue, this._maskService.maskExpression),\n ];\n }\n _validateTime(value) {\n const rowMaskLen = this._maskValue\n .split('')\n .filter((s) => s !== ':').length;\n if (!value) {\n return null; // Don't validate empty values to allow for optional form control\n }\n if ((+(value[value.length - 1] ?? -1) === 0 && value.length < rowMaskLen) ||\n value.length <= rowMaskLen - 2) {\n return this._createValidationError(value);\n }\n return null;\n }\n _getActualInputLength() {\n return (this._maskService.actualValue.length ||\n this._maskService.actualValue.length + this._maskService.prefix.length);\n }\n _createValidationError(actualValue) {\n return {\n mask: {\n requiredMask: this._maskValue,\n actualValue,\n },\n };\n }\n _setMask() {\n if (this._maskExpressionArray.length > 0) {\n this._maskExpressionArray.some((mask) => {\n const test = this._maskService.removeMask(this._inputValue)?.length <=\n this._maskService.removeMask(mask)?.length;\n if (this._inputValue && test) {\n this._maskValue = mask;\n this.maskExpression = mask;\n this._maskService.maskExpression = mask;\n return test;\n }\n else {\n const expression = this._maskExpressionArray[this._maskExpressionArray.length - 1] ?? '';\n this._maskValue =\n this.maskExpression =\n this._maskService.maskExpression =\n expression;\n }\n });\n }\n }\n}\nMaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskDirective, deps: [{ token: DOCUMENT }, { token: MaskService }, { token: config }], target: i0.ɵɵFactoryTarget.Directive });\nMaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.2.8\", type: MaskDirective, selector: \"input[mask], textarea[mask]\", inputs: { maskExpression: [\"mask\", \"maskExpression\"], specialCharacters: \"specialCharacters\", patterns: \"patterns\", prefix: \"prefix\", suffix: \"suffix\", thousandSeparator: \"thousandSeparator\", decimalMarker: \"decimalMarker\", dropSpecialCharacters: \"dropSpecialCharacters\", hiddenInput: \"hiddenInput\", showMaskTyped: \"showMaskTyped\", placeHolderCharacter: \"placeHolderCharacter\", shownMaskExpression: \"shownMaskExpression\", showTemplate: \"showTemplate\", clearIfNotMatch: \"clearIfNotMatch\", validation: \"validation\", separatorLimit: \"separatorLimit\", allowNegativeNumbers: \"allowNegativeNumbers\", leadZeroDateTime: \"leadZeroDateTime\", triggerOnMaskChange: \"triggerOnMaskChange\" }, outputs: { maskFilled: \"maskFilled\" }, host: { listeners: { \"paste\": \"onPaste()\", \"ngModelChange\": \"onModelChange($event)\", \"input\": \"onInput($event)\", \"blur\": \"onBlur()\", \"click\": \"onClick($event)\", \"keydown\": \"onKeyDown($event)\" } }, providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n MaskService,\n ], exportAs: [\"mask\", \"ngxMask\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskDirective, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[mask], textarea[mask]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaskDirective),\n multi: true,\n },\n MaskService,\n ],\n exportAs: 'mask,ngxMask',\n }]\n }], ctorParameters: function () { return [{ type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: MaskService }, { type: undefined, decorators: [{\n type: Inject,\n args: [config]\n }] }]; }, propDecorators: { maskExpression: [{\n type: Input,\n args: ['mask']\n }], specialCharacters: [{\n type: Input\n }], patterns: [{\n type: Input\n }], prefix: [{\n type: Input\n }], suffix: [{\n type: Input\n }], thousandSeparator: [{\n type: Input\n }], decimalMarker: [{\n type: Input\n }], dropSpecialCharacters: [{\n type: Input\n }], hiddenInput: [{\n type: Input\n }], showMaskTyped: [{\n type: Input\n }], placeHolderCharacter: [{\n type: Input\n }], shownMaskExpression: [{\n type: Input\n }], showTemplate: [{\n type: Input\n }], clearIfNotMatch: [{\n type: Input\n }], validation: [{\n type: Input\n }], separatorLimit: [{\n type: Input\n }], allowNegativeNumbers: [{\n type: Input\n }], leadZeroDateTime: [{\n type: Input\n }], triggerOnMaskChange: [{\n type: Input\n }], maskFilled: [{\n type: Output\n }], onPaste: [{\n type: HostListener,\n args: ['paste']\n }], onModelChange: [{\n type: HostListener,\n args: ['ngModelChange', ['$event']]\n }], onInput: [{\n type: HostListener,\n args: ['input', ['$event']]\n }], onBlur: [{\n type: HostListener,\n args: ['blur']\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event']]\n }], onKeyDown: [{\n type: HostListener,\n args: ['keydown', ['$event']]\n }] } });\n\nclass MaskPipe {\n constructor(_maskService) {\n this._maskService = _maskService;\n }\n transform(value, mask, thousandSeparator = null) {\n if (!value && typeof value !== 'number') {\n return '';\n }\n if (thousandSeparator) {\n this._maskService.thousandSeparator = thousandSeparator;\n }\n if (typeof mask === 'string') {\n return this._maskService.applyMask(`${value}`, mask);\n }\n return this._maskService.applyMaskWithPattern(`${value}`, mask);\n }\n}\nMaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskPipe, deps: [{ token: MaskApplierService }], target: i0.ɵɵFactoryTarget.Pipe });\nMaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskPipe, name: \"mask\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: MaskPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'mask',\n pure: true,\n }]\n }], ctorParameters: function () { return [{ type: MaskApplierService }]; } });\n\n/**\n * @internal\n */\nfunction _configFactory(initConfig, configValue) {\n return configValue instanceof Function\n ? { ...initConfig, ...configValue() }\n : { ...initConfig, ...configValue };\n}\nclass NgxMaskModule {\n static forRoot(configValue) {\n return {\n ngModule: NgxMaskModule,\n providers: [\n {\n provide: NEW_CONFIG,\n useValue: configValue,\n },\n {\n provide: INITIAL_CONFIG,\n useValue: initialConfig,\n },\n {\n provide: config,\n useFactory: _configFactory,\n deps: [INITIAL_CONFIG, NEW_CONFIG],\n },\n MaskApplierService,\n ],\n };\n }\n static forChild() {\n return {\n ngModule: NgxMaskModule,\n };\n }\n}\nNgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: NgxMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.2.8\", ngImport: i0, type: NgxMaskModule, declarations: [MaskDirective, MaskPipe], exports: [MaskDirective, MaskPipe] });\nNgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: NgxMaskModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.2.8\", ngImport: i0, type: NgxMaskModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [MaskDirective, MaskPipe],\n declarations: [MaskDirective, MaskPipe],\n }]\n }] });\n\nconst commonjsGlobal = typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : typeof self !== 'undefined'\n ? self\n : {};\n(function () {\n if (!commonjsGlobal.KeyboardEvent) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n commonjsGlobal.KeyboardEvent = function (_eventType, _init) { };\n }\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { INITIAL_CONFIG, MaskApplierService, MaskDirective, MaskPipe, MaskService, NEW_CONFIG, NgxMaskModule, _configFactory, config, initialConfig, timeMasks, withoutValidation };\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}"],"x_google_ignoreList":[289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348]}
      \n {{headerText}}\n \n {{dataAccessor(data, name)}}\n \n {{headerText}}\n \n {{dataAccessor(data, name)}}\n