{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 79554db90751511c3e95","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./dist/packages/common/dist/common.es5.js","webpack:///./build/packages/sp-clientsvc/es5/src/objectpath.js","webpack:///./build/packages/sp-clientsvc/es5/src/opactionbuilders.js","webpack:///./build/packages/sp-clientsvc/es5/src/opbuilders.js","webpack:///./dist/packages/logging/dist/logging.es5.js","webpack:///./dist/packages/odata/dist/odata.es5.js","webpack:///./build/packages/sp-clientsvc/es5/src/utils.js","webpack:///./build/packages/sp-clientsvc/es5/src/parsers.js","webpack:///(webpack)/buildin/global.js","webpack:///./build/packages/sp-clientsvc/es5/src/clintsvcqueryable.js","webpack:///./build/packages/sp-clientsvc/es5/index.js","webpack:///./build/packages/sp-clientsvc/es5/src/clientsvc.js","webpack:///./build/packages/sp-clientsvc/es5/src/batch.js","webpack:///./node_modules/adal-angular/dist/adal.min.js","webpack:///./dist/packages/sp/dist/sp.es5.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AC7DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;;AAEO;AACP;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEO;AACP;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEO;AACP;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEO;AACP,mCAAmC,oCAAoC;AACvE;;AAEO;AACP;AACA;;AAEO;AACP;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEO;AACP,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEO;AACP,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEO;AACP;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,6BAA6B,oBAAoB,gDAAgD,gBAAgB,EAAE,KAAK;AACjJ;;AAEO;AACP;AACA;AACA,2GAA2G,sFAAsF,aAAa,EAAE;AAChN,sBAAsB,8BAA8B,gDAAgD,uDAAuD,EAAE,EAAE,GAAG;AAClK,4CAA4C,sCAAsC,UAAU,oBAAoB,EAAE,EAAE,UAAU;AAC9H;;AAEO;AACP,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP,4CAA4C;AAC5C;;;;;;;;ACzLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACkC;AACqB;;AAEvD;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,iCAAiC,mCAAmC,EAAE;AACtE,8BAA8B,6DAA6D,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,qBAAqB;AACtD,4BAA4B,uBAAuB,aAAa,GAAG;AACnE;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,EAAE,gBAAgB,aAAa;AAChG;AACA,0BAA0B,sCAAsC;AAChE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,GAAG;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mDAAmD;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sBAAsB,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,6EAAM;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,4EAA4E,yCAAyC,kBAAkB,EAAE,EAAE;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,4BAA4B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAE8Y;AAC/Y;;;;;;;;;ACnzBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2D;AACX;AACQ;AACV;AAC9C;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4BAA4B,SAAS;AACrC,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACqB;AACtB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,iCAAiC,6BAA6B,UAAU,GAAG;AAC3E;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iFAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,iFAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mEAAM,GAAG;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,qEAAQ;AACnD;AACA,gBAAgB,6EAAU;AAC1B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,qEAAQ;AAClD;AACA,gBAAgB,6EAAU;AAC1B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,2EAAc,cAAc,qCAAqC;AAC/G;AACA,gBAAgB,6EAAU;AAC1B;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,YAAY,iFAAoB;AAChC;AACA;AACA;AACA,oBAAoB,2EAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B,sC;;;;;;;ACjRA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AACP;AACA;AACO;AACP;AACA;AACO;AACP;AACA;AACA;AACA,sCAAsC,yBAAyB;AAC/D,2CAA2C,8BAA8B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,6DAA6D,EAAE;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,6DAA6D,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,yEAAyE,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4C;;;;;;;ACrFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AACnC;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,eAAe,+DAAU;AACzB;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,eAAe,+DAAU;AACzB;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,eAAe,+DAAU;AACzB;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,eAAe,+DAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA,CAAC;AACuB;AACjB;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe,+DAAU;AACzB;AACA,sC;;;;;;;AC3FA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,2CAA2C,4CAA4C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD,6BAA6B,iCAAiC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wDAAwD;AACrF;AACA;AACA,CAAC;AACD;AACA;AACA,wCAAwC,kCAAkC;AAC1E,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,+BAA+B,sBAAsB;AACrD,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,wDAAwD,8BAA8B,EAAE;AACxF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAE8D;AAC/D;;;;;;;;AC3NA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACkJ;AACpG;AACR;;AAEtC;AACA;AACA;AACA,0BAA0B,oEAAO,uBAAuB,kEAAa;AACrE,yBAAyB,kEAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,iCAAiC,qEAAgB;AACjD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,2BAA2B,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,sCAAsC,kEAAkE,EAAE;AAC1G,uCAAuC,4CAA4C,EAAE;AACrF,qCAAqC,kBAAkB,EAAE;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gEAAG;AACf,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAG;AACpB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA,YAAY,mEAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,4DAAM;AACV,cAAc,4DAAM,yDAAyD;AAC7E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA,qDAAqD,0BAA0B,EAAE;AACjF,QAAQ,4DAAM;AACd;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA,iDAAiD,gEAAG;AACpD,gBAAgB,4DAAM;AACtB;AACA;AACA;AACA,YAAY,4DAAM;AAClB;AACA,mEAAmE,kBAAkB,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAM;AAClB,sBAAsB,4DAAM,qCAAqC;AACjE;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAM;AACtB;AACA;AACA,mCAAmC,mEAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4DAAM;AAC9B,kCAAkC,4DAAM,qCAAqC;AAC7E;AACA;AACA,yBAAyB;AACzB,4BAA4B,mEAAM;AAClC;AACA;AACA;AACA,4BAA4B,gEAAG;AAC/B;AACA;AACA,6EAA6E,qBAAqB,EAAE;AACpG;AACA;AACA,gBAAgB,4DAAM;AACtB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mEAAM;AAC1B;AACA;AACA,gBAAgB,4DAAM;AACtB;AACA;AACA;AACA;AACA,gBAAgB,4DAAM;AACtB;AACA;AACA,2BAA2B,mEAAM,sBAAsB,GAAG,uBAAuB;AACjF;AACA,+CAA+C,uCAAuC,EAAE;AACxF,6CAA6C,mCAAmC,EAAE;AAClF,0CAA0C,qBAAqB,EAAE;AACjE,yCAAyC,kBAAkB,EAAE;AAC7D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAM;AACtB,0BAA0B,4DAAM,qCAAqC;AACrE;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gBAAgB,4DAAM;AACtB,0BAA0B,4DAAM,qCAAqC;AACrE;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,IAAI,iEAAU;AACd;AACA;AACA,IAAI,iEAAU;AACd;AACA;AACA,IAAI,iEAAU;AACd;AACA;AACA,IAAI,iEAAU;AACd;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yEAAY;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yEAAY;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kEAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D,iCAAiC,cAAc;AAC/C,4GAA4G,sBAAsB,EAAE;AACpI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,2BAA2B;AAC3D,6GAA6G,sBAAsB,EAAE;AACrI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,2BAA2B;AAC3D,8GAA8G,sBAAsB,EAAE;AACtI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,2BAA2B;AAC3D,+GAA+G,sBAAsB,EAAE;AACvI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,2BAA2B;AAC3D,4GAA4G,sBAAsB,EAAE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAO;AAC3B;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mCAAmC;AACnE,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,gCAAgC,mCAAmC;AACnE,iCAAiC,cAAc;AAC/C,4GAA4G,sBAAsB,EAAE;AACpI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,mCAAmC;AACnE,6GAA6G,sBAAsB,EAAE;AACrI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,mCAAmC;AACnE,8GAA8G,sBAAsB,EAAE;AACtI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,mCAAmC;AACnE,+GAA+G,sBAAsB,EAAE;AACvI;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,mCAAmC;AACnE,4GAA4G,sBAAsB,EAAE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iFAAoB;AACvC,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA,kCAAkC,YAAY,oEAAO,GAAG;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iCAAiC,EAAE;AAClE,+BAA+B,4BAA4B,EAAE;AAC7D,+BAA+B,kCAAkC,EAAE;AACnE,+BAA+B,iBAAiB,EAAE;AAClD;AACA;AACA,CAAC;;AAEwQ;AACzQ;;;;;;;;ACxsBA;AAAA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;ACxBA;AAAA;AAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qCAAqC,gEAAG;AACxC,gCAAgC,gEAAG;AACnC;AACA;AACA,SAAS;AACT;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA,qEAAqE,mFAAsB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,mFAAsB;AAC3F,8BAA8B,gEAAG;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B,mC;;;;;;AClFA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AAC0F;AACpE;AACD;AACP;AAC0C;AACzC;AACD;AAC/C;AACA;AACA,IAAI,wDAAiB;AACrB;AACA,gCAAgC,aAAa;AAC7C,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oEAAO;AAChC,iBAAiB,iFAAoB;AACrC,yCAAyC,oEAAe;AACxD;AACA;AACA;AACA;AACA,yBAAyB,oEAAO;AAChC,iBAAiB,iFAAoB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,0BAA0B,EAAE;AAC9H;AACA;AACA,eAAe,iFAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mEAAM;AAC9B;AACA,QAAQ,6EAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qEAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,eAAe;AAC/C,aAAa,iFAAoB;AACjC;AACA,yBAAyB,oEAAkB;AAC3C;AACA;AACA;AACA,sBAAsB,mEAAM;AAC5B;AACA,aAAa;AACb;AACA;AACA,iBAAiB,gEAAG;AACpB,0BAA0B,mEAAM;AAChC;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,0EAAO;AACtE,iDAAiD,QAAQ,mEAAM,wBAAwB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,+DAA+D,0EAAO;AACtE,iDAAiD,4BAA4B,QAAQ,mEAAM,gBAAgB,EAAE,EAAE,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,kEAAkE,0EAAO;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,kEAAkE,0EAAO;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mFAAgB,+BAA+B,kCAAkC,EAAE;AAC3F,+BAA+B,0EAAO;AACtC,iDAAiD,QAAQ,mEAAM,wBAAwB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sEAAa;AAC5B,YAAY,yEAAY;AACxB;AACA,YAAY,yEAAY;AACxB,YAAY,yEAAY;AACxB;AACA;AACA,aAAa;AACb,sBAAsB,mEAAM,WAAW,mBAAmB;AAC1D;AACA;AACA;AACA,6DAA6D,wEAAW;AACxE,oBAAoB,iFAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,kEAAc;AAC9D;AACA;AACA,+FAA+F,QAAQ;AACvG;AACA;AACA;AACA;AACA;AACA,4CAA4C,YAAY,6DAAY,GAAG,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oEAAO;AAClC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iFAAoB;AACvC,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA,mCAAmC,+EAAY;AAC/C;AACA;AACA,oBAAoB,2DAAM,4CAA4C,6EAAU;AAChF;AACA;AACA;AACA;AACA,CAAC,CAAC,6DAAS;AACmB;AAC9B,6C;;;;;;;ACtTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AAChC,iC;;;;;;;ACDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AACN;AACP;AACM;AACN;AACH;AACF;AACxB,qC;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AACK;AACwB;AACL;AACwC;AACjD;AACJ;AACG;AACD;AAC9C;AACA;AACA;AACA;AACA,IAAI,wDAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,8DAAU;AACe;AAC3B;AACA,IAAI,wDAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yEAAY,yBAAyB,qCAAqC;AAC/F,sBAAsB,oEAAO;AAC7B,4BAA4B,oEAAO,MAAM,wEAAW,MAAM,6EAAU;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA,gCAAgC,0EAAa;AAC7C,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6EAAgB,aAAa,oEAAO;AAC/D;AACA,2BAA2B,0EAAa;AACxC;AACA;AACA;AACA;AACA,2BAA2B,oEAAO,sBAAsB,wEAAW;AACnE,iBAAiB;AACjB;AACA;AACA,4EAA4E,cAAc,EAAE;AAC5F;AACA,2CAA2C,0EAAa;AACxD,iBAAiB;AACjB;AACA;AACA;AACA,2BAA2B,+DAAU;AACrC,aAAa,yBAAyB,mCAAmC,EAAE;AAC3E;AACA;AACA;AACA,6BAA6B,oEAAkB;AAC/C,0CAA0C,wEAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA,kBAAkB,2EAAmB;AACrC;AACA,QAAQ,4DAAM;AACd;AACA;AACA,YAAY,4DAAM;AAClB;AACA,gBAAgB,4DAAM;AACtB,gDAAgD,2FAA2F,EAAE;AAC7I,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC,CAAC,8EAAkB;AACpB;AACA;AACA;AACA;AACA,IAAI,wDAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oEAAkB;AACpB;AACA;AACA;AACA;AACA,IAAI,wDAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,+DAA+D,2BAA2B,EAAE;AAC5F;AACA;AACA,CAAC,CAAC,wEAAoB;AACtB,iC;;;;;;AC5JA;AACA,qCAAqC,aAAa,yCAAyC,sBAAsB,0DAA0D,qBAAqB,8CAA8C,iBAAiB,mKAAmK,yfAAyf,+MAA+M,gCAAgC,mBAAmB,+CAA+C,kCAAkC,8GAA8G,4HAA4H,2FAA2F,mHAAmH,sCAAsC,6LAA6L,uDAAuD,s0BAAs0B,8CAA8C,+CAA+C,mDAAmD,oEAAoE,yBAAyB,mBAAmB,oDAAoD,kEAAkE,gfAAgf,6FAA6F,mPAAmP,8DAA8D,IAAI,oXAAoX,4BAA4B,SAAS,mHAAmH,uEAAuE,+SAA+S,6DAA6D,2GAA2G,YAAY,kEAAkE,kEAAkE,oHAAoH,mCAAmC,2CAA2C,oCAAoC,wIAAwI,oJAAoJ,IAAI,iBAAiB,2RAA2R,WAAW,IAAI,0DAA0D,YAAY,gBAAgB,MAAM,wCAAwC,0CAA0C,8DAA8D,kDAAkD,wDAAwD,GAAG,yBAAyB,SAAS,EAAE,wBAAwB,4DAA4D,6BAA6B,0DAA0D,uDAAuD,+EAA+E,4DAA4D,qCAAqC,+JAA+J,0JAA0J,0DAA0D,gCAAgC,oDAAoD,iDAAiD,kEAAkE,4GAA4G,WAAW,4IAA4I,0BAA0B,YAAY,4CAA4C,QAAQ,+CAA+C,SAAS,UAAU,+EAA+E,EAAE,6DAA6D,kDAAkD,kEAAkE,0GAA0G,8EAA8E,yXAAyX,6DAA6D,oCAAoC,qFAAqF,0MAA0M,+IAA+I,2QAA2Q,gFAAgF,0CAA0C,8EAA8E,qCAAqC,0HAA0H,mEAAmE,8KAA8K,WAAW,sBAAsB,gGAAgG,8GAA8G,2BAA2B,8OAA8O,gCAAgC,0DAA0D,WAAW,wBAAwB,QAAQ,sBAAsB,yBAAyB,+DAA+D,MAAM,4DAA4D,wHAAwH,6BAA6B,4xBAA4xB,qEAAqE,wHAAwH,iHAAiH,wNAAwN,yBAAyB,6IAA6I,oFAAoF,0GAA0G,0GAA0G,sLAAsL,sEAAsE,wHAAwH,oBAAoB,iHAAiH,wNAAwN,yBAAyB,mEAAmE,oFAAoF,0GAA0G,0GAA0G,sRAAsR,wDAAwD,iGAAiG,uDAAuD,mnBAAmnB,uDAAuD,sBAAsB,6CAA6C,YAAY,sBAAsB,iIAAiI,qDAAqD,mEAAmE,iTAAiT,mDAAmD,kCAAkC,MAAM,iDAAiD,KAAK,oBAAoB,0MAA0M,0DAA0D,sDAAsD,oCAAoC,qDAAqD,sEAAsE,6CAA6C,oDAAoD,sMAAsM,gEAAgE,oMAAoM,yPAAyP,wCAAwC,qDAAqD,SAAS,yDAAyD,qCAAqC,iGAAiG,sBAAsB,yIAAyI,sDAAsD,mGAAmG,wDAAwD,mBAAmB,2BAA2B,oJAAoJ,0DAA0D,yDAAyD,4DAA4D,mBAAmB,8BAA8B,sBAAsB,uEAAuE,qKAAqK,WAAW,SAAS,sEAAsE,4FAA4F,iCAAiC,gCAAgC,gCAAgC,WAAW,+BAA+B,gBAAgB,QAAQ,SAAS,yDAAyD,0DAA0D,MAAM,0CAA0C,YAAY,WAAW,uCAAuC,SAAS,yDAAyD,wDAAwD,MAAM,0CAA0C,YAAY,WAAW,8FAA8F,wDAAwD,MAAM,0CAA0C,YAAY,WAAW,oGAAoG,SAAS,mEAAmE,MAAM,qBAAqB,8CAA8C,SAAS,+DAA+D,yCAAyC,2IAA2I,kDAAkD,6GAA6G,mYAAmY,sBAAsB,uLAAuL,MAAM,utDAAutD,+QAA+Q,kGAAkG,oEAAoE,2DAA2D,wCAAwC,mEAAmE,4HAA4H,0LAA0L,6DAA6D,6CAA6C,yBAAyB,kEAAkE,yDAAyD,gBAAgB,2TAA2T,qCAAqC,wiBAAwiB,oFAAoF,IAAI,cAAc,SAAS,gEAAgE,4JAA4J,+DAA+D,eAAe,2CAA2C,kGAAkG,sCAAsC,6DAA6D,yBAAyB,kBAAkB,IAAI,wDAAwD,uGAAuG,SAAS,2DAA2D,YAAY,wEAAwE,kJAAkJ,qDAAqD,0EAA0E,8BAA8B,eAAe,+EAA+E,iCAAiC,IAAI,MAAM,wHAAwH,sEAAsE,MAAM,cAAc,oDAAoD,MAAM,kFAAkF,SAAS,wDAAwD,gCAAgC,yDAAyD,kFAAkF,yCAAyC,yFAAyF,2CAA2C,4DAA4D,SAAS,aAAa,mXAAmX,mDAAmD,mDAAmD,mBAAmB,0DAA0D,kDAAkD,4CAA4C,MAAM,gBAAgB,EAAE,gCAAgC,SAAS,2DAA2D,yBAAyB,WAAW,SAAS,SAAS,kDAAkD,qCAAqC,yBAAyB,yBAAyB,weAAwe,mFAAmF,KAAK,6GAA6G,SAAS,wDAAwD,8CAA8C,iDAAiD,4CAA4C,2DAA2D,eAAe,2CAA2C,iCAAiC,OAAO,0HAA0H,uCAAuC,+NAA+N,qKAAqK,sDAAsD,UAAU,2DAA2D,uFAAuF,uFAAuF,MAAM,2BAA2B,2DAA2D,+BAA+B,SAAS,0HAA0H,sDAAsD,gTAAgT,kEAAkE,IAAI,2NAA2N,SAAS,UAAU,oEAAoE,IAAI,qOAAqO,SAAS,UAAU,0DAA0D,yCAAyC,SAAS,gDAAgD,SAAS,4DAA4D,0DAA0D,uDAAuD,qBAAqB,wCAAwC,oCAAoC,mPAAmP,qDAAqD,iDAAiD,kDAAkD,mDAAmD;AAC5q+B,mDAAmD,qDAAqD,sDAAsD,wDAAwD,oDAAoD,qDAAqD,sDAAsD,qDAAqD,sDAAsD,wDAAwD,yDAAyD,wDAAwD,eAAe,qHAAqH,oCAAoC,wBAAwB,G;;;;;;;ACFz0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACiP;AACnM;AACR;AACyH;;AAE/J;AACA,QAAQ,gFAAmB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,gEAAG;AACX;AACA,YAAY,gEAAG;AACf;AACA;AACA,iBAAiB,gEAAG;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,gEAAG,qBAAqB,gEAAG;AACvC;AACA;AACA;AACA,iBAAiB,gEAAG;AACpB;AACA;AACA,iBAAiB,gEAAG;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA,WAAW,4DAAO;AAClB;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA,mBAAmB,mEAAM;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mEAAM;AACzB,SAAS;AACT;AACA;AACA,CAAC,CAAC,mEAAe;AACjB;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mEAAM;AAC7B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mEAAM;AAC7B,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC,CAAC,mEAAe;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,kEAAa;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,kEAAa;AACtC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,kEAAa;AACtC;AACA;AACA;AACA,gBAAgB,kEAAa,8BAA8B,kEAAa;AACxE,uBAAuB,kEAAa;AACpC;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,kEAAa;AACtC;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY,gEAAW,GAAG;AAC9D;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oEAAO;AACzB;AACA,wCAAwC;AACxC,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,qBAAqB,mEAAM;AAC3B;AACA,SAAS;AACT,6BAA6B,sEAAkB;AAC/C,6DAA6D,mCAAmC,EAAE;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,+BAA+B,8CAA8C;AAC7E;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,mBAAmB,mEAAM,WAAW,gDAAgD;AACpF;AACA;AACA,QAAQ,yEAAY;AACpB;AACA,QAAQ,yEAAY;AACpB;AACA;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAM,QAAQ,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,QAAQ,yEAAY;AACpB,kBAAkB,mEAAM,WAAW,sBAAsB;AACzD;AACA,sEAAsE,8BAA8B,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM;AACpD,2BAA2B,2EAAc;AACzC,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iCAAiC,cAAc;AAC/C,mBAAmB,mEAAM,WAAW,gBAAgB;AACpD;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,mBAAmB,mEAAM,WAAW,iBAAiB;AACrD;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,mBAAmB,mEAAM,WAAW,kBAAkB;AACtD;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,mBAAmB,mEAAM,WAAW,mBAAmB;AACvD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,0EAAa;AACzB;AACA;AACA;AACA;AACA;AACA,2BAA2B,oEAAO;AAClC;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB,+BAA+B,oEAAO;AACtC;AACA,qBAAqB,gEAAG;AACxB,+BAA+B,oEAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,oEAAO;AAC1C;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0EAAa;AAC7B;AACA,6BAA6B,oEAAO;AACpC;AACA;AACA;AACA;AACA;AACA,uBAAuB,oEAAO;AAC9B,6BAA6B,oEAAO;AACpC;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAM;AAClB;AACA;AACA,SAAS;AACT;AACA;AACA,2EAA2E,0BAA0B,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,yFAAyF,QAAQ;AACjG;AACA,YAAY,yEAAY;AACxB;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oEAAO;AAClC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC,CAAC,kEAAc;AAChB;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,kBAAkB,gEAAG,CAAC,mEAAM;AAC5B;AACA;AACA,aAAa;AACb,SAAS,qBAAqB,yBAAyB,EAAE,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gEAAS;AACrB;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,CAAC,mEAAM,uBAAuB,uBAAuB;AAC1E,SAAS,oBAAoB,wCAAwC,EAAE;AACvE;AACA;AACA,8BAA8B,iEAAU;AACxC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU,0BAA0B,EAAE,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,kBAAkB,iEAAU;AAC5B;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG,CAAC,mEAAM;AACjC,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iEAAU;AAC1C;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iEAAU;AACpD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B,6BAA6B,mEAAM,EAAE,cAAc,6BAA6B,EAAE;AAClF;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD,SAAS;AACT,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sBAAsB,iEAAU;AAChC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gEAAG;AACf,+BAA+B,mEAAM,EAAE,cAAc,qBAAqB,EAAE;AAC5E;AACA,uBAAuB,gEAAG,CAAC,mEAAM;AACjC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,6BAA6B,iEAAU;AACvC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACA,CAAC,oEAAoE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA;AACA;AACA,CAAC,wDAAwD;AACzD;AACA;AACA;AACA;AACA,CAAC,sDAAsD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;;AAE3B;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gEAAG;AACtB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,sCAAsC,sBAAsB;AAC5D;AACA;AACA;AACA;AACA,sBAAsB,gEAAG,kCAAkC,SAAS,cAAc,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mEAAM;AACjC;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,sBAAsB,gEAAG;AACzB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA,kBAAkB,mEAAM;AACxB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,gEAAG,0CAA0C,SAAS,cAAc,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mEAAM;AACjC;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA,kBAAkB,gEAAG;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA,kBAAkB,gEAAG;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,iBAAiB;AACxC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kDAAkD;AACnF;AACA,kBAAkB,gEAAG,EAAE,mCAAmC;AAC1D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,yBAAyB,EAAE;AACxG;AACA;AACA;AACA;AACA,8EAA8E,yBAAyB,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gEAAG;AACzB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB;AACvD;AACA;AACA;AACA;AACA;AACA,qCAAqC,oEAAO;AAC5C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,qDAAqD,qCAAqC;AAC1F,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yCAAyC;AACvE,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB;AACvD,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yCAAyC;AACvE,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB;AACvD,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB;AACvD,uCAAuC,uBAAuB;AAC9D,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,gBAAgB;AACvC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,kBAAkB;AACzC,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,cAAc,iEAAU;AACxB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0BAA0B,iEAAU;AACpC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA,mEAAmE,UAAU,4BAA4B,EAAE,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA,mBAAmB,mEAAM;AACzB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gEAAG;AACzB;AACA;AACA,iBAAiB;AACjB,aAAa,qBAAqB,iBAAiB,EAAE;AACrD,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA,SAAS;AACT,+EAA+E,iBAAiB;AAChG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,+BAA+B,gCAAgC;AAC/D,4CAA4C,yBAAyB;AACrE,uBAAuB,gEAAG;AAC1B;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA,SAAS;AACT,8BAA8B,iBAAiB;AAC/C,oBAAoB;AACpB,SAAS;AACT;AACA;AACA,oCAAoC,iEAAU;AAC9C;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA,iBAAiB,iEAAU;AAC3B;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gCAAgC;AACpF;AACA,SAAS,EAAE,EAAE,EAAE,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,oDAAoD,gCAAgC,uCAAuC,EAAE,EAAE,EAAE;AACjI;AACA;AACA,0CAA0C,iEAAU;AACpD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8DAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8DAAU;AAC5C;AACA;AACA;AACA;AACA;AACA,kCAAkC,gEAAY;AAC9C;AACA;AACA;AACA;AACA;AACA,kCAAkC,8DAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,qBAAqB,kCAAkC,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,4CAA4C,yBAAyB;AACrE,uBAAuB,gEAAG;AAC1B;AACA;AACA,SAAS;AACT,mDAAmD,iBAAiB;AACpE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sBAAsB,iEAAU;AAChC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU,0BAA0B,EAAE,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,6CAA6C;AACpE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iEAAU;AAC1C;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B,0BAA0B,mEAAM;AAChC,SAAS;AACT,kEAAkE,iBAAiB;AACnF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA,SAAS;AACT,oDAAoD,iBAAiB;AACrE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA;AACA,+CAA+C,mEAAM;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,8BAA8B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mEAAM;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,kDAAkD;AACzF,sCAAsC,uCAAuC;AAC7E,+CAA+C,2BAA2B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mEAAM;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,oBAAoB,mEAAM,EAAE,yBAAyB;AACrD;AACA;AACA,oBAAoB,mEAAM,EAAE,yBAAyB;AACrD;AACA,iDAAiD,mEAAM;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA,oBAAoB,mEAAM,EAAE,yBAAyB;AACrD;AACA;AACA,oBAAoB,mEAAM,EAAE,yBAAyB;AACrD;AACA,mDAAmD,mEAAM;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,kCAAkC,iBAAiB;AACnD,wCAAwC,wBAAwB;AAChE,oCAAoC,oBAAoB;AACxD,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mEAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA;AACA;AACA,8CAA8C,mEAAM;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,mEAAM;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B,wBAAwB,mEAAM;AAC9B;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iDAAiD,mEAAM;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,sDAAsD,mEAAM;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mEAAM;AACjD;AACA;AACA,wBAAwB,iEAAU;AAClC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D,uBAAuB,gEAAG,CAAC,mEAAM;AACjC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA,YAAY,iEAAU;AACtB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT,8BAA8B,2BAA2B,qCAAqC,EAAE;AAChG,oBAAoB;AACpB,SAAS;AACT;AACA,oBAAoB,iEAAU;AAC9B;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA,SAAS;AACT,+BAA+B,2BAA2B,qCAAqC,EAAE;AACjG,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG,CAAC,mEAAM,EAAE,cAAc,gCAAgC,EAAE;AACnF,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,iEAAU;AACxD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,UAAU,4BAA4B,EAAE,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,gBAAgB;AAClD,4CAA4C,4BAA4B;AACxE,4CAA4C,yBAAyB;AACrE,0BAA0B,mEAAM;AAChC;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT,8BAA8B,OAAO,gEAAG,eAAe;AACvD,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,gBAAgB;AAClD,4CAA4C,4BAA4B;AACxE,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA;AACA,sCAAsC,mEAAM,sBAAsB,kFAAkF;AACpJ;AACA;AACA;AACA,6BAA6B,6EAA6E;AAC1G,iBAAiB,sBAAsB,kBAAkB,EAAE;AAC3D,aAAa;AACb;AACA,6BAA6B,iFAAiF;AAC9G,iBAAiB,sBAAsB,kBAAkB,EAAE;AAC3D,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sBAAsB,iEAAU;AAChC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C,uBAAuB,gEAAG,CAAC,mEAAM;AACjC,2BAA2B,oBAAoB;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,UAAU,mEAAM,EAAE,gBAAgB,2BAA2B,EAAE,UAAU;AAChG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,UAAU,mEAAM,EAAE,gBAAgB,yBAAyB,EAAE,UAAU;AAC9F,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,UAAU,mEAAM,EAAE,gBAAgB,kCAAkC,EAAE,UAAU;AACvG,SAAS,GAAG,sBAAsB,iBAAiB,EAAE,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA,gCAAgC,mEAAM;AACtC,wBAAwB,mEAAM;AAC9B;AACA;AACA,kBAAkB,gEAAG;AACrB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,qCAAqC,EAAE;AAClJ;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,gGAAgG;AAChG;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0BAA0B;AAC/D,qBAAqB;AACrB,iCAAiC,kDAAkD;AACnF,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,uBAAuB,gEAAG,CAAC,mEAAM;AACjC,sDAAsD,iBAAiB;AACvE,mBAAmB,mEAAM;AACzB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iEAAU;AACtC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,uBAAuB,gEAAG,CAAC,mEAAM;AACjC,qDAAqD,iBAAiB;AACtE,mBAAmB,mEAAM;AACzB,SAAS;AACT;AACA;AACA,0BAA0B,iEAAU;AACpC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD,sCAAsC,kCAAkC,kBAAkB;AAC1F,QAAQ,4DAAM;AACd;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD,oDAAoD,mCAAmC;AACvF;AACA;AACA,2BAA2B,gEAAG,CAAC,mEAAM;AACrC,6DAA6D,iBAAiB;AAC9E;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iEAAU;AAChC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C,oDAAoD,mCAAmC;AACvF;AACA;AACA;AACA,+BAA+B,gEAAG,CAAC,mEAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa,sBAAsB,kBAAkB,EAAE;AACvD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,YAAY;AAC5C;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA,kBAAkB,gEAAG,EAAE,kEAAkE;AACzF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA,mBAAmB,iEAAU;AAC7B;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gBAAgB,EAAE;AAC3D;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gEAAG,eAAe,gEAAG;AACvD;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,CAAC,CAAC,mEAAe;AACjB;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,CAAC,CAAC,mEAAe;;AAEjB;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE,mCAAmC,sBAAsB;AACzD;AACA;AACA,+BAA+B,6BAA6B,EAAE;AAC9D,mCAAmC,6DAA6D,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sBAAsB,iEAAU;AAChC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6CAA6C;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2CAA2C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,8DAAU,KAAK,WAAW,qCAAqC,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,8DAAU,KAAK,WAAW,qCAAqC,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA,yDAAyD,gEAAY,KAAK,WAAW,qCAAqC,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA,yDAAyD,8DAAU,KAAK,WAAW,qCAAqC,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,qBAAqB,wBAAwB,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA,mBAAmB,mEAAM;AACzB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA,uBAAuB,oEAAO;AAC9B;AACA,kBAAkB,8IAA8I;AAChK;AACA;AACA;AACA,0BAA0B,oJAAoJ;AAC9K;AACA,aAAa;AACb;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA,sBAAsB,8JAA8J;AACpL;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iEAAU;AACtC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,gBAAgB;AAChB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA,CAAC,oEAAoE;AACrE;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;;AAE7C;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA,8BAA8B,kDAAkD;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAA+F,yCAAyC;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA;AACA,YAAY,4DAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oEAAO;AACpD;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0EAAa,8BAA8B,oEAAO;AAC5E,gBAAgB,4DAAM;AACtB;AACA;AACA;AACA,wBAAwB,gEAAG,wBAAwB,gEAAG;AACtD;AACA;AACA;AACA;AACA,kEAAkE,cAAc;AAChF;AACA;AACA;AACA;AACA;AACA,gBAAgB,yEAAY;AAC5B;AACA;AACA,oBAAoB,yEAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,cAAc;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,iBAAiB;AACjB;AACA;AACA,YAAY,4DAAM;AAClB,gCAAgC,oEAAO;AACvC,oCAAoC,iBAAiB,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAM;AACtB;AACA;AACA,oBAAoB,4DAAM;AAC1B,oDAAoD,mFAAmF,EAAE;AACzI,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC,CAAC,8DAAU;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,gBAAgB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA,YAAY,gEAAG;AACf;AACA;AACA,iBAAiB,gEAAG;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD,0CAA0C,0BAA0B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,4BAA4B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oEAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB,qEAAqE,EAAE;AACvH,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAG;AAClB,kCAAkC;AAClC,iCAAiC;AACjC,uBAAuB,WAAW;AAClC,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,kBAAkB,kBAAkB,MAAM,YAAY,MAAM;AACpF;AACA;AACA;AACA,mDAAmD,8BAA8B,EAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,KAAK;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,sCAAsC,gCAAgC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB,EAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA,2BAA2B,qCAAqC;AAChE;AACA,+BAA+B,iDAAiD;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2DAA2D,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8DAA8D,EAAE;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,0DAA0D,EAAE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C,iDAAiD,mCAAmC,EAAE;AACtF;AACA;AACA,CAAC;AACD;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,sBAAsB,oEAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,wCAAwC,EAAE;AACrH;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,gCAAgC,eAAe;AAC/C,+BAA+B,WAAW;AAC1C,4BAA4B,MAAM,oEAAO,GAAG;AAC5C,qCAAqC,oBAAoB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,8DAA8D,mFAAsB;AACpF,2BAA2B,mFAAsB;AACjD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA,gCAAgC,aAAa;AAC7C,kCAAkC,eAAe;AACjD,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mFAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,+BAA+B,EAAE;AAC/G;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,gCAAgC,EAAE;AACjH;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA,qCAAqC,kBAAkB;AACvD,uCAAuC,oBAAoB;AAC3D,mCAAmC,gBAAgB;AACnD,wCAAwC,qBAAqB;AAC7D,gDAAgD,+BAA+B;AAC/E,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mEAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,mFAAsB;AACnF;AACA;AACA;AACA,iCAAiC,mFAAsB;AACvD,2BAA2B,mFAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD,uBAAuB,gEAAG,CAAC,mEAAM;AACjC;AACA;AACA;AACA,SAAS;AACT,2DAA2D,iBAAiB;AAC5E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA;AACA,SAAS;AACT,kEAAkE,iBAAiB;AACnF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,iBAAiB,iEAAU;AAC3B;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD,+BAA+B,YAAY;AAC3C,yCAAyC,wBAAwB;AACjE,0CAA0C,yBAAyB;AACnE;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,uBAAuB,iEAAU;AACjC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,yBAAyB,iEAAU;AACnC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ,gEAAG,mDAAmD,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oEAAO;AACnC;AACA;AACA;AACA,kCAAkC,QAAQ,gEAAG,mDAAmD,EAAE;AAClG;AACA;AACA,4BAA4B,iEAAU;AACtC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA,8BAA8B,iEAAU;AACxC;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yBAAyB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C,4BAA4B,aAAa;AACzC;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B,qBAAqB,mEAAM;AAC3B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wDAAwD,wEAAW;AACnE,gBAAgB,iFAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kEAAc;AACzD;AACA;AACA,8BAA8B,iBAAiB,wBAAwB,sDAAsD,EAAE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAG,4BAA4B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iEAAU;AACvB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,gEAAG;AAC1D,oBAAoB,mEAAM;AAC1B;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wDAAwD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAAG,sCAAsC,oCAAoC,EAAE,iBAAiB,oBAAoB;AAC7I;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,oCAAoC,8BAA8B;AAClE,gBAAgB,gEAAG;AACnB;AACA;AACA,UAAU,GAAG;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iEAAU;AAC9B;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4BAA4B,iEAAU;AACtC;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,8CAA8C,8BAA8B;AAC5E;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,wDAAwD,iEAAU;AAClE;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,kBAAkB;AACpD,kCAAkC,iBAAiB;AACnD,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B,0BAA0B,mEAAM;AAChC,+BAA+B,sCAAsC;AACrE,aAAa;AACb,SAAS;AACT,mDAAmD,iBAAiB;AACpE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oBAAoB,iEAAU;AAC9B;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA,eAAe,iEAAU;AACzB;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,8CAA8C,2BAA2B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG,CAAC,mEAAM;AACjC,2BAA2B,mBAAmB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT,yDAAyD,iBAAiB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA,SAAS;AACT,yDAAyD,iBAAiB;AAC1E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA,kCAAkC,iBAAiB;AACnD,8CAA8C,6BAA6B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG,EAAE,UAAU,mEAAM,EAAE,gBAAgB,2BAA2B,EAAE,UAAU;AACrG,yDAAyD,iBAAiB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,eAAe;AACjD;AACA,kBAAkB,gEAAG;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2CAA2C;AAC1E,sCAAsC,6BAA6B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2CAA2C;AAC1E;AACA;AACA;AACA,kBAAkB,iEAAU;AAC5B;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,qEAAqE,yBAAyB,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gEAAG;AACnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG;AAChG;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA,oBAAoB,iEAAU;AAC9B;AACA;AACA;AACA,CAAC;;AAED;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iCAAiC;AAC3E;AACA;AACA;AACA;AACA,aAAa,qBAAqB,kBAAkB,EAAE,sBAAsB,kBAAkB,EAAE;AAChG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA;AACA;AACA,SAAS;AACT;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gEAAG;AAC1B;AACA;AACA;AACA,SAAS;AACT;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG,EAAE,qBAAqB;AAC5C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,sCAAsC,iEAAU;AAChD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAG;AAClB,2BAA2B,mEAAM;AACjC,SAAS;AACT;AACA;AACA,0DAA0D,iEAAU;AACpE;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yDAAyD;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,yDAAyD;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,yDAAyD;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAG;AAClB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kCAAkC,iEAAU;AAC5C;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gEAAG;AACtB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gEAAG;AACtB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gEAAG;AACtB,SAAS;AACT;AACA;AACA,sCAAsC,iEAAU;AAChD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;;AAE7C;AACA;AACA;AACA;AACA,IAAI,gEAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gEAAG;AACrB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mEAAM;AAC9B;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,gCAAgC,mEAAM;AACtC,qBAAqB,oBAAoB;AACzC,aAAa;AACb;AACA;AACA,gCAAgC,mEAAM;AACtC,qBAAqB,oBAAoB;AACzC,aAAa;AACb;AACA;AACA,gCAAgC,mEAAM;AACtC,sBAAsB,qBAAqB;AAC3C,aAAa;AACb;AACA;AACA,gCAAgC,mEAAM;AACtC;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAE8qD;AAC9qD","file":"sp-clientsvc.es5.umd.bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pnp.sp-clientsvc\"] = factory();\n\telse\n\t\troot[\"pnp.sp-clientsvc\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 79554db90751511c3e95","/*! *****************************************************************************\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\nexport function __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\nexport var __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\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(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\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __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\nexport function __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}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/tslib/tslib.es6.js\n// module id = 0\n// module chunks = 0","/**\n@license\n * @pnp/common v1.2.0 - pnp - provides shared functionality across all pnp libraries\n * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)\n * Copyright (c) 2018 Microsoft\n * docs: https://pnp.github.io/pnpjs/\n * source: https:github.com/pnp/pnpjs\n * bugs: https://github.com/pnp/pnpjs/issues\n */\nimport { __extends } from 'tslib';\nimport { inject } from 'adal-angular/dist/adal.min.js';\n\nvar global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\n/**\r\n * Gets a callback function which will maintain context across async calls.\r\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\r\n *\r\n * @param context The object that will be the 'this' value in the callback\r\n * @param method The method to which we will apply the context and parameters\r\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\r\n */\r\nfunction getCtxCallback(context, method) {\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n return function () {\r\n method.apply(context, params);\r\n };\r\n}\r\n/**\r\n * Adds a value to a date\r\n *\r\n * @param date The date to which we will add units, done in local time\r\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\r\n * @param units The amount to add to date of the given interval\r\n *\r\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\r\n */\r\nfunction dateAdd(date, interval, units) {\r\n var ret = new Date(date); // don't change original date\r\n switch (interval.toLowerCase()) {\r\n case \"year\":\r\n ret.setFullYear(ret.getFullYear() + units);\r\n break;\r\n case \"quarter\":\r\n ret.setMonth(ret.getMonth() + 3 * units);\r\n break;\r\n case \"month\":\r\n ret.setMonth(ret.getMonth() + units);\r\n break;\r\n case \"week\":\r\n ret.setDate(ret.getDate() + 7 * units);\r\n break;\r\n case \"day\":\r\n ret.setDate(ret.getDate() + units);\r\n break;\r\n case \"hour\":\r\n ret.setTime(ret.getTime() + units * 3600000);\r\n break;\r\n case \"minute\":\r\n ret.setTime(ret.getTime() + units * 60000);\r\n break;\r\n case \"second\":\r\n ret.setTime(ret.getTime() + units * 1000);\r\n break;\r\n default:\r\n ret = undefined;\r\n break;\r\n }\r\n return ret;\r\n}\r\n/**\r\n * Combines an arbitrary set of paths ensuring and normalizes the slashes\r\n *\r\n * @param paths 0 to n path parts to combine\r\n */\r\nfunction combine() {\r\n var paths = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paths[_i] = arguments[_i];\r\n }\r\n return paths\r\n .filter(function (path) { return !stringIsNullOrEmpty(path); })\r\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\r\n .join(\"/\")\r\n .replace(/\\\\/g, \"/\");\r\n}\r\n/**\r\n * Gets a random string of chars length\r\n *\r\n * https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript\r\n *\r\n * @param chars The length of the random string to generate\r\n */\r\nfunction getRandomString(chars) {\r\n var text = new Array(chars);\r\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n for (var i = 0; i < chars; i++) {\r\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\r\n }\r\n return text.join(\"\");\r\n}\r\n/**\r\n * Gets a random GUID value\r\n *\r\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\r\n */\r\n/* tslint:disable no-bitwise */\r\nfunction getGUID() {\r\n var d = new Date().getTime();\r\n var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\r\n var r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n return guid;\r\n}\r\n/* tslint:enable */\r\n/**\r\n * Determines if a given value is a function\r\n *\r\n * @param cf The thing to test for functionness\r\n */\r\nfunction isFunc(cf) {\r\n return typeof cf === \"function\";\r\n}\r\n/**\r\n * Determines if an object is both defined and not null\r\n * @param obj Object to test\r\n */\r\nfunction objectDefinedNotNull(obj) {\r\n return typeof obj !== \"undefined\" && obj !== null;\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Array or not.\r\n*/\r\nfunction isArray(array) {\r\n if (Array.isArray) {\r\n return Array.isArray(array);\r\n }\r\n return array && typeof array.length === \"number\" && array.constructor === Array;\r\n}\r\n/**\r\n * Provides functionality to extend the given object by doing a shallow copy\r\n *\r\n * @param target The object to which properties will be copied\r\n * @param source The source object from which properties will be copied\r\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\r\n * @param filter If provided allows additional filtering on what properties are copied (propName: string) => boolean\r\n *\r\n */\r\nfunction extend(target, source, noOverwrite, filter) {\r\n if (noOverwrite === void 0) { noOverwrite = false; }\r\n if (filter === void 0) { filter = function () { return true; }; }\r\n if (!objectDefinedNotNull(source)) {\r\n return target;\r\n }\r\n // ensure we don't overwrite things we don't want overwritten\r\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\r\n // final filter we will use\r\n var f = function (v) { return check(target, v) && filter(v); };\r\n return Object.getOwnPropertyNames(source)\r\n .filter(f)\r\n .reduce(function (t, v) {\r\n t[v] = source[v];\r\n return t;\r\n }, target);\r\n}\r\n/**\r\n * Determines if a given url is absolute\r\n *\r\n * @param url The url to check to see if it is absolute\r\n */\r\nfunction isUrlAbsolute(url) {\r\n return /^https?:\\/\\/|^\\/\\//i.test(url);\r\n}\r\n/**\r\n * Determines if a string is null or empty or undefined\r\n *\r\n * @param s The string to test\r\n */\r\nfunction stringIsNullOrEmpty(s) {\r\n return s === undefined || s === null || s.length < 1;\r\n}\r\n/**\r\n * Gets an attribute value from an html/xml string block. NOTE: if the input attribute value has\r\n * RegEx special characters they will be escaped in the returned string\r\n *\r\n * @param html HTML to search\r\n * @param attrName The name of the attribute to find\r\n */\r\nfunction getAttrValueFromString(html, attrName) {\r\n // make the input safe for regex\r\n html = html.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n var reg = new RegExp(attrName + \"\\\\s*?=\\\\s*?(\\\"|')([^\\\\1]*?)\\\\1\", \"i\");\r\n var match = reg.exec(html);\r\n return match !== null && match.length > 0 ? match[2] : null;\r\n}\r\n/**\r\n * Ensures guid values are represented consistently as \"ea123463-137d-4ae3-89b8-cf3fc578ca05\"\r\n *\r\n * @param guid The candidate guid\r\n */\r\nfunction sanitizeGuid(guid) {\r\n if (stringIsNullOrEmpty(guid)) {\r\n return guid;\r\n }\r\n var matches = /([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})/i.exec(guid);\r\n return matches === null ? guid : matches[1];\r\n}\r\n/**\r\n * Shorthand for oToS\r\n *\r\n * @param o Any type of object\r\n */\r\nfunction jsS(o) {\r\n return JSON.stringify(o);\r\n}\r\n/**\r\n * Shorthand for Object.hasOwnProperty\r\n *\r\n * @param o Object to check for\r\n * @param p Name of the property\r\n */\r\nfunction hOP(o, p) {\r\n return Object.hasOwnProperty.call(o, p);\r\n}\r\n/**\r\n * Generates a ~unique hash code for this ObjectPathQueue\r\n *\r\n * From: https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript\r\n */\r\n// tslint:disable:no-bitwise\r\nfunction getHashCode(s) {\r\n var hash = 0;\r\n if (s.length === 0) {\r\n return hash;\r\n }\r\n for (var i = 0; i < s.length; i++) {\r\n var chr = s.charCodeAt(i);\r\n hash = ((hash << 5) - hash) + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n}\r\n// tslint:enable:no-bitwise\n\nfunction mergeHeaders(target, source) {\r\n if (source !== undefined && source !== null) {\r\n var temp = new Request(\"\", { headers: source });\r\n temp.headers.forEach(function (value, name) {\r\n target.append(name, value);\r\n });\r\n }\r\n}\r\nfunction mergeOptions(target, source) {\r\n if (objectDefinedNotNull(source)) {\r\n var headers = extend(target.headers || {}, source.headers);\r\n target = extend(target, source);\r\n target.headers = headers;\r\n }\r\n}\r\n/**\r\n * Makes requests using the global/window fetch API\r\n */\r\nvar FetchClient = /** @class */ (function () {\r\n function FetchClient() {\r\n }\r\n FetchClient.prototype.fetch = function (url, options) {\r\n return global$1.fetch(url, options);\r\n };\r\n return FetchClient;\r\n}());\r\n/**\r\n * Makes requests using the fetch API adding the supplied token to the Authorization header\r\n */\r\nvar BearerTokenFetchClient = /** @class */ (function (_super) {\r\n __extends(BearerTokenFetchClient, _super);\r\n function BearerTokenFetchClient(_token) {\r\n var _this = _super.call(this) || this;\r\n _this._token = _token;\r\n return _this;\r\n }\r\n Object.defineProperty(BearerTokenFetchClient.prototype, \"token\", {\r\n get: function () {\r\n return this._token;\r\n },\r\n set: function (token) {\r\n this._token = token;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n BearerTokenFetchClient.prototype.fetch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var headers = new Headers();\r\n mergeHeaders(headers, options.headers);\r\n headers.set(\"Authorization\", \"Bearer \" + this._token);\r\n options.headers = headers;\r\n return _super.prototype.fetch.call(this, url, options);\r\n };\r\n return BearerTokenFetchClient;\r\n}(FetchClient));\n\n/**\r\n * Azure AD Client for use in the browser\r\n */\r\nvar AdalClient = /** @class */ (function (_super) {\r\n __extends(AdalClient, _super);\r\n /**\r\n * Creates a new instance of AdalClient\r\n * @param clientId Azure App Id\r\n * @param tenant Office 365 tenant (Ex: {tenant}.onmicrosoft.com)\r\n * @param redirectUri The redirect url used to authenticate the\r\n */\r\n function AdalClient(clientId, tenant, redirectUri) {\r\n var _this = _super.call(this, null) || this;\r\n _this.clientId = clientId;\r\n _this.tenant = tenant;\r\n _this.redirectUri = redirectUri;\r\n return _this;\r\n }\r\n /**\r\n * Creates a new AdalClient using the values of the supplied SPFx context\r\n *\r\n * @param spfxContext Current SPFx context\r\n * @param clientId Optional client id to use instead of the built-in SPFx id\r\n * @description Using this method and the default clientId requires that the features described in\r\n * this article https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient are activated in the tenant. If not you can\r\n * creat your own app, grant permissions and use that clientId here along with the SPFx context\r\n */\r\n AdalClient.fromSPFxContext = function (spfxContext, cliendId) {\r\n if (cliendId === void 0) { cliendId = \"c58637bb-e2e1-4312-8a00-04b5ffcd3403\"; }\r\n // this \"magic\" client id is the one to which permissions are granted behind the scenes\r\n // this redirectUrl is the page as used by spfx\r\n return new AdalClient(cliendId, spfxContext.pageContext.aadInfo.tenantId.toString(), combine(window.location.origin, \"/_forms/spfxsinglesignon.aspx\"));\r\n };\r\n /**\r\n * Conducts the fetch opertation against the AAD secured resource\r\n *\r\n * @param url Absolute URL for the request\r\n * @param options Any fetch options passed to the underlying fetch implementation\r\n */\r\n AdalClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n if (!isUrlAbsolute(url)) {\r\n throw new Error(\"You must supply absolute urls to AdalClient.fetch.\");\r\n }\r\n // the url we are calling is the resource\r\n return this.getToken(this.getResource(url)).then(function (token) {\r\n _this.token = token;\r\n return _super.prototype.fetch.call(_this, url, options);\r\n });\r\n };\r\n /**\r\n * Gets a token based on the current user\r\n *\r\n * @param resource The resource for which we are requesting a token\r\n */\r\n AdalClient.prototype.getToken = function (resource) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n _this.ensureAuthContext().then(function (_) { return _this.login(); }).then(function (_) {\r\n AdalClient._authContext.acquireToken(resource, function (message, token) {\r\n if (message) {\r\n return reject(new Error(message));\r\n }\r\n resolve(token);\r\n });\r\n }).catch(reject);\r\n });\r\n };\r\n /**\r\n * Ensures we have created and setup the adal AuthenticationContext instance\r\n */\r\n AdalClient.prototype.ensureAuthContext = function () {\r\n var _this = this;\r\n return new Promise(function (resolve) {\r\n if (AdalClient._authContext === null) {\r\n AdalClient._authContext = inject({\r\n clientId: _this.clientId,\r\n displayCall: function (url) {\r\n if (_this._displayCallback) {\r\n _this._displayCallback(url);\r\n }\r\n },\r\n navigateToLoginRequestUrl: false,\r\n redirectUri: _this.redirectUri,\r\n tenant: _this.tenant,\r\n });\r\n }\r\n resolve();\r\n });\r\n };\r\n /**\r\n * Ensures the current user is logged in\r\n */\r\n AdalClient.prototype.login = function () {\r\n var _this = this;\r\n if (this._loginPromise) {\r\n return this._loginPromise;\r\n }\r\n this._loginPromise = new Promise(function (resolve, reject) {\r\n if (AdalClient._authContext.getCachedUser()) {\r\n return resolve();\r\n }\r\n _this._displayCallback = function (url) {\r\n var popupWindow = window.open(url, \"login\", \"width=483, height=600\");\r\n if (!popupWindow) {\r\n return reject(new Error(\"Could not open pop-up window for auth. Likely pop-ups are blocked by the browser.\"));\r\n }\r\n if (popupWindow && popupWindow.focus) {\r\n popupWindow.focus();\r\n }\r\n var pollTimer = window.setInterval(function () {\r\n if (!popupWindow || popupWindow.closed || popupWindow.closed === undefined) {\r\n window.clearInterval(pollTimer);\r\n }\r\n try {\r\n if (popupWindow.document.URL.indexOf(_this.redirectUri) !== -1) {\r\n window.clearInterval(pollTimer);\r\n AdalClient._authContext.handleWindowCallback(popupWindow.location.hash);\r\n popupWindow.close();\r\n resolve();\r\n }\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n }, 30);\r\n };\r\n // this triggers the login process\r\n _this.ensureAuthContext().then(function (_) {\r\n AdalClient._authContext._loginInProgress = false;\r\n AdalClient._authContext.login();\r\n _this._displayCallback = null;\r\n });\r\n });\r\n return this._loginPromise;\r\n };\r\n /**\r\n * Parses out the root of the request url to use as the resource when getting the token\r\n *\r\n * After: https://gist.github.com/jlong/2428561\r\n * @param url The url to parse\r\n */\r\n AdalClient.prototype.getResource = function (url) {\r\n var parser = document.createElement(\"a\");\r\n parser.href = url;\r\n return parser.protocol + \"//\" + parser.hostname;\r\n };\r\n /**\r\n * Our auth context\r\n */\r\n AdalClient._authContext = null;\r\n return AdalClient;\r\n}(BearerTokenFetchClient));\n\n/**\r\n * Used to calculate the object properties, with polyfill if needed\r\n */\r\nvar objectEntries = isFunc(Object.entries) ? Object.entries : function (o) { return Object.keys(o).map(function (k) { return [k, o[k]]; }); };\r\n/**\r\n * Converts the supplied object to a map\r\n *\r\n * @param o The object to map\r\n */\r\nfunction objectToMap(o) {\r\n if (o !== undefined && o !== null) {\r\n return new Map(objectEntries(o));\r\n }\r\n return new Map();\r\n}\r\n/**\r\n * Merges to Map instances together, overwriting values in target with matching keys, last in wins\r\n *\r\n * @param target map into which the other maps are merged\r\n * @param maps One or more maps to merge into the target\r\n */\r\nfunction mergeMaps(target) {\r\n var maps = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n maps[_i - 1] = arguments[_i];\r\n }\r\n for (var i = 0; i < maps.length; i++) {\r\n maps[i].forEach(function (v, k) {\r\n target.set(k, v);\r\n });\r\n }\r\n return target;\r\n}\n\nfunction setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\n// lable mapping for known config values\r\nvar s = [\r\n \"defaultCachingStore\",\r\n \"defaultCachingTimeoutSeconds\",\r\n \"globalCacheDisable\",\r\n \"enableCacheExpiration\",\r\n \"cacheExpirationIntervalMilliseconds\",\r\n \"spfxContext\",\r\n];\r\nvar RuntimeConfigImpl = /** @class */ (function () {\r\n function RuntimeConfigImpl(_v) {\r\n if (_v === void 0) { _v = new Map(); }\r\n this._v = _v;\r\n // setup defaults\r\n this._v.set(s[0], \"session\");\r\n this._v.set(s[1], 60);\r\n this._v.set(s[2], false);\r\n this._v.set(s[3], false);\r\n this._v.set(s[4], 750);\r\n this._v.set(s[5], null);\r\n }\r\n /**\r\n *\r\n * @param config The set of properties to add to the globa configuration instance\r\n */\r\n RuntimeConfigImpl.prototype.extend = function (config) {\r\n this._v = mergeMaps(this._v, objectToMap(config));\r\n };\r\n RuntimeConfigImpl.prototype.get = function (key) {\r\n return this._v.get(key);\r\n };\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingStore\", {\r\n get: function () {\r\n return this.get(s[0]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingTimeoutSeconds\", {\r\n get: function () {\r\n return this.get(s[1]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"globalCacheDisable\", {\r\n get: function () {\r\n return this.get(s[2]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"enableCacheExpiration\", {\r\n get: function () {\r\n return this.get(s[3]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"cacheExpirationIntervalMilliseconds\", {\r\n get: function () {\r\n return this.get(s[4]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spfxContext\", {\r\n get: function () {\r\n return this.get(s[5]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RuntimeConfigImpl;\r\n}());\r\nvar _runtimeConfig = new RuntimeConfigImpl();\r\nvar RuntimeConfig = _runtimeConfig;\n\n/**\r\n * A wrapper class to provide a consistent interface to browser based storage\r\n *\r\n */\r\nvar PnPClientStorageWrapper = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the PnPClientStorageWrapper class\r\n *\r\n * @constructor\r\n */\r\n function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\r\n if (defaultTimeoutMinutes === void 0) { defaultTimeoutMinutes = -1; }\r\n this.store = store;\r\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\r\n this.enabled = this.test();\r\n // if the cache timeout is enabled call the handler\r\n // this will clear any expired items and set the timeout function\r\n if (RuntimeConfig.enableCacheExpiration) {\r\n this.cacheExpirationHandler();\r\n }\r\n }\r\n /**\r\n * Get a value from storage, or null if that value does not exist\r\n *\r\n * @param key The key whose value we want to retrieve\r\n */\r\n PnPClientStorageWrapper.prototype.get = function (key) {\r\n if (!this.enabled) {\r\n return null;\r\n }\r\n var o = this.store.getItem(key);\r\n if (!objectDefinedNotNull(o)) {\r\n return null;\r\n }\r\n var persistable = JSON.parse(o);\r\n if (new Date(persistable.expiration) <= new Date()) {\r\n this.delete(key);\r\n return null;\r\n }\r\n else {\r\n return persistable.value;\r\n }\r\n };\r\n /**\r\n * Adds a value to the underlying storage\r\n *\r\n * @param key The key to use when storing the provided value\r\n * @param o The value to store\r\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\r\n */\r\n PnPClientStorageWrapper.prototype.put = function (key, o, expire) {\r\n if (this.enabled) {\r\n this.store.setItem(key, this.createPersistable(o, expire));\r\n }\r\n };\r\n /**\r\n * Deletes a value from the underlying storage\r\n *\r\n * @param key The key of the pair we want to remove from storage\r\n */\r\n PnPClientStorageWrapper.prototype.delete = function (key) {\r\n if (this.enabled) {\r\n this.store.removeItem(key);\r\n }\r\n };\r\n /**\r\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\r\n *\r\n * @param key The key to use when storing the provided value\r\n * @param getter A function which will upon execution provide the desired value\r\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\r\n */\r\n PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) {\r\n var _this = this;\r\n if (!this.enabled) {\r\n return getter();\r\n }\r\n return new Promise(function (resolve) {\r\n var o = _this.get(key);\r\n if (o == null) {\r\n getter().then(function (d) {\r\n _this.put(key, d, expire);\r\n resolve(d);\r\n });\r\n }\r\n else {\r\n resolve(o);\r\n }\r\n });\r\n };\r\n /**\r\n * Deletes any expired items placed in the store by the pnp library, leaves other items untouched\r\n */\r\n PnPClientStorageWrapper.prototype.deleteExpired = function () {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (!_this.enabled) {\r\n resolve();\r\n }\r\n try {\r\n for (var i = 0; i < _this.store.length; i++) {\r\n var key = _this.store.key(i);\r\n if (key !== null) {\r\n // test the stored item to see if we stored it\r\n if (/[\"|']?pnp[\"|']? ?: ?1/i.test(_this.store.getItem(key))) {\r\n // get those items as get will delete from cache if they are expired\r\n _this.get(key);\r\n }\r\n }\r\n }\r\n resolve();\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n };\r\n /**\r\n * Used to determine if the wrapped storage is available currently\r\n */\r\n PnPClientStorageWrapper.prototype.test = function () {\r\n var str = \"t\";\r\n try {\r\n this.store.setItem(str, str);\r\n this.store.removeItem(str);\r\n return true;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Creates the persistable to store\r\n */\r\n PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) {\r\n if (expire === undefined) {\r\n // ensure we are by default inline with the global library setting\r\n var defaultTimeout = RuntimeConfig.defaultCachingTimeoutSeconds;\r\n if (this.defaultTimeoutMinutes > 0) {\r\n defaultTimeout = this.defaultTimeoutMinutes * 60;\r\n }\r\n expire = dateAdd(new Date(), \"second\", defaultTimeout);\r\n }\r\n return jsS({ pnp: 1, expiration: expire, value: o });\r\n };\r\n /**\r\n * Deletes expired items added by this library in this.store and sets a timeout to call itself\r\n */\r\n PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () {\r\n var _this = this;\r\n this.deleteExpired().then(function (_) {\r\n // call ourself in the future\r\n setTimeout(getCtxCallback(_this, _this.cacheExpirationHandler), RuntimeConfig.cacheExpirationIntervalMilliseconds);\r\n }).catch(function (e) {\r\n console.error(e);\r\n });\r\n };\r\n return PnPClientStorageWrapper;\r\n}());\r\n/**\r\n * A thin implementation of in-memory storage for use in nodejs\r\n */\r\nvar MemoryStorage = /** @class */ (function () {\r\n function MemoryStorage(_store) {\r\n if (_store === void 0) { _store = new Map(); }\r\n this._store = _store;\r\n }\r\n Object.defineProperty(MemoryStorage.prototype, \"length\", {\r\n get: function () {\r\n return this._store.size;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n MemoryStorage.prototype.clear = function () {\r\n this._store.clear();\r\n };\r\n MemoryStorage.prototype.getItem = function (key) {\r\n return this._store.get(key);\r\n };\r\n MemoryStorage.prototype.key = function (index) {\r\n return Array.from(this._store)[index][0];\r\n };\r\n MemoryStorage.prototype.removeItem = function (key) {\r\n this._store.delete(key);\r\n };\r\n MemoryStorage.prototype.setItem = function (key, data) {\r\n this._store.set(key, data);\r\n };\r\n return MemoryStorage;\r\n}());\r\n/**\r\n * A class that will establish wrappers for both local and session storage\r\n */\r\nvar PnPClientStorage = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the PnPClientStorage class\r\n *\r\n * @constructor\r\n */\r\n function PnPClientStorage(_local, _session) {\r\n if (_local === void 0) { _local = null; }\r\n if (_session === void 0) { _session = null; }\r\n this._local = _local;\r\n this._session = _session;\r\n }\r\n Object.defineProperty(PnPClientStorage.prototype, \"local\", {\r\n /**\r\n * Provides access to the local storage of the browser\r\n */\r\n get: function () {\r\n if (this._local === null) {\r\n this._local = this.getStore(\"local\");\r\n }\r\n return this._local;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PnPClientStorage.prototype, \"session\", {\r\n /**\r\n * Provides access to the session storage of the browser\r\n */\r\n get: function () {\r\n if (this._session === null) {\r\n this._session = this.getStore(\"session\");\r\n }\r\n return this._session;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n PnPClientStorage.prototype.getStore = function (name) {\r\n if (name === \"local\") {\r\n return new PnPClientStorageWrapper(typeof (localStorage) === \"undefined\" ? new MemoryStorage() : localStorage);\r\n }\r\n return new PnPClientStorageWrapper(typeof (sessionStorage) === \"undefined\" ? new MemoryStorage() : sessionStorage);\r\n };\r\n return PnPClientStorage;\r\n}());\n\nexport { AdalClient, objectToMap, mergeMaps, setup, RuntimeConfigImpl, RuntimeConfig, mergeHeaders, mergeOptions, FetchClient, BearerTokenFetchClient, PnPClientStorageWrapper, PnPClientStorage, getCtxCallback, dateAdd, combine, getRandomString, getGUID, isFunc, objectDefinedNotNull, isArray, extend, isUrlAbsolute, stringIsNullOrEmpty, getAttrValueFromString, sanitizeGuid, jsS, hOP, getHashCode };\n//# sourceMappingURL=common.es5.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/packages/common/dist/common.es5.js\n// module id = 1\n// module chunks = 0","import { extend, objectDefinedNotNull } from \"@pnp/common\";\r\nimport { objectPath } from \"./opactionbuilders\";\r\nimport { property, staticProperty } from \"./opbuilders\";\r\nimport { writeObjectPathBody } from \"./utils\";\r\n/**\r\n * Represents an ObjectPath used when querying ProcessQuery\r\n */\r\nvar ObjectPath = /** @class */ (function () {\r\n function ObjectPath(path, actions, id, replaceAfter) {\r\n if (actions === void 0) { actions = []; }\r\n if (id === void 0) { id = -1; }\r\n if (replaceAfter === void 0) { replaceAfter = []; }\r\n this.path = path;\r\n this.actions = actions;\r\n this.id = id;\r\n this.replaceAfter = replaceAfter;\r\n }\r\n return ObjectPath;\r\n}());\r\nexport { ObjectPath };\r\n/**\r\n * Replaces all found instance of the $$ID$$ placeholder in the supplied xml string\r\n *\r\n * @param id New value to be insterted\r\n * @param xml The existing xml fragment in which the replace should occur\r\n */\r\nexport function opSetId(id, xml) {\r\n return xml.replace(/\\$\\$ID\\$\\$/g, id);\r\n}\r\n/**\r\n * Replaces all found instance of the $$PATH_ID$$ placeholder in the supplied xml string\r\n *\r\n * @param id New value to be insterted\r\n * @param xml The existing xml fragment in which the replace should occur\r\n */\r\nexport function opSetPathId(id, xml) {\r\n return xml.replace(/\\$\\$PATH_ID\\$\\$/g, id);\r\n}\r\n/**\r\n * Replaces all found instance of the $$PARENT_ID$$ placeholder in the supplied xml string\r\n *\r\n * @param id New value to be insterted\r\n * @param xml The existing xml fragment in which the replace should occur\r\n */\r\nexport function opSetParentId(id, xml) {\r\n return xml.replace(/\\$\\$PARENT_ID\\$\\$/g, id);\r\n}\r\n/**\r\n * Replaces all found instance of the $$OP_PARAM_ID$$ placeholder in the supplied xml string\r\n *\r\n * @param map A mapping where [index] = replaced_object_path_id\r\n * @param xml The existing xml fragment in which the replace should occur\r\n * @param indexMapper Used when creating batches, not meant for direct use external to this library\r\n */\r\nexport function opSetPathParamId(map, xml, indexMapper) {\r\n if (indexMapper === void 0) { indexMapper = function (n) { return n; }; }\r\n // this approach works because input params must come before the things that need them\r\n // meaning the right id will always be in the map\r\n var matches = /\\$\\$OP_PARAM_ID_(\\d+)\\$\\$/ig.exec(xml);\r\n if (matches !== null) {\r\n for (var i = 1; i < matches.length; i++) {\r\n var index = parseInt(matches[i], 10);\r\n var regex = new RegExp(\"\\\\$\\\\$OP_PARAM_ID_\" + index + \"\\\\$\\\\$\", \"ig\");\r\n xml = xml.replace(regex, map[indexMapper(index)].toString());\r\n }\r\n }\r\n return xml;\r\n}\r\n/**\r\n * Represents a collection of IObjectPaths\r\n */\r\nvar ObjectPathQueue = /** @class */ (function () {\r\n function ObjectPathQueue(_paths, _relationships) {\r\n if (_paths === void 0) { _paths = []; }\r\n if (_relationships === void 0) { _relationships = {}; }\r\n this._paths = _paths;\r\n this._relationships = _relationships;\r\n this._contextIndex = -1;\r\n this._siteIndex = -1;\r\n this._webIndex = -1;\r\n }\r\n /**\r\n * Adds an object path to the queue\r\n *\r\n * @param op The action to add\r\n * @returns The index of the added object path\r\n */\r\n ObjectPathQueue.prototype.add = function (op) {\r\n this.dirty();\r\n this._paths.push(op);\r\n return this.lastIndex;\r\n };\r\n ObjectPathQueue.prototype.addChildRelationship = function (parentIndex, childIndex) {\r\n if (objectDefinedNotNull(this._relationships[\"_\" + parentIndex])) {\r\n this._relationships[\"_\" + parentIndex].push(childIndex);\r\n }\r\n else {\r\n this._relationships[\"_\" + parentIndex] = [childIndex];\r\n }\r\n };\r\n ObjectPathQueue.prototype.getChildRelationship = function (parentIndex) {\r\n if (objectDefinedNotNull(this._relationships[\"_\" + parentIndex])) {\r\n return this._relationships[\"_\" + parentIndex];\r\n }\r\n else {\r\n return [];\r\n }\r\n };\r\n ObjectPathQueue.prototype.getChildRelationships = function () {\r\n return this._relationships;\r\n };\r\n /**\r\n * Appends an action to the supplied IObjectPath, replacing placeholders\r\n *\r\n * @param op IObjectPath to which the action will be appended\r\n * @param action The action to append\r\n */\r\n ObjectPathQueue.prototype.appendAction = function (op, action) {\r\n this.dirty();\r\n op.actions.push(action);\r\n return this;\r\n };\r\n /**\r\n * Appends an action to the last IObjectPath in the collection\r\n *\r\n * @param action\r\n */\r\n ObjectPathQueue.prototype.appendActionToLast = function (action) {\r\n this.dirty();\r\n return this.appendAction(this.last, action);\r\n };\r\n /**\r\n * Creates a copy of this ObjectPathQueue\r\n */\r\n ObjectPathQueue.prototype.clone = function () {\r\n var clone = new ObjectPathQueue(this.toArray(), extend({}, this._relationships));\r\n clone._contextIndex = this._contextIndex;\r\n clone._siteIndex = this._siteIndex;\r\n clone._webIndex = this._webIndex;\r\n return clone;\r\n };\r\n /**\r\n * Gets a copy of this instance's paths\r\n */\r\n ObjectPathQueue.prototype.toArray = function () {\r\n return this._paths.slice(0);\r\n };\r\n Object.defineProperty(ObjectPathQueue.prototype, \"last\", {\r\n /**\r\n * The last IObjectPath instance added to this collection\r\n */\r\n get: function () {\r\n if (this._paths.length < 1) {\r\n return null;\r\n }\r\n return this._paths[this.lastIndex];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ObjectPathQueue.prototype, \"lastIndex\", {\r\n /**\r\n * Index of the last IObjectPath added to the queue\r\n */\r\n get: function () {\r\n return this._paths.length - 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ObjectPathQueue.prototype, \"siteIndex\", {\r\n /**\r\n * Gets the index of the current site in the queue\r\n */\r\n get: function () {\r\n if (this._siteIndex < 0) {\r\n // this needs to be here in case we create it\r\n var contextIndex = this.contextIndex;\r\n this._siteIndex = this.add(property(\"Site\", \r\n // actions\r\n objectPath()));\r\n this.addChildRelationship(contextIndex, this._siteIndex);\r\n }\r\n return this._siteIndex;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ObjectPathQueue.prototype, \"webIndex\", {\r\n /**\r\n * Gets the index of the current web in the queue\r\n */\r\n get: function () {\r\n if (this._webIndex < 0) {\r\n // this needs to be here in case we create it\r\n var contextIndex = this.contextIndex;\r\n this._webIndex = this.add(property(\"Web\", \r\n // actions\r\n objectPath()));\r\n this.addChildRelationship(contextIndex, this._webIndex);\r\n }\r\n return this._webIndex;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ObjectPathQueue.prototype, \"contextIndex\", {\r\n /**\r\n * Gets the index of the Current context in the queue, can be used to establish parent -> child rels\r\n */\r\n get: function () {\r\n if (this._contextIndex < 0) {\r\n this._contextIndex = this.add(staticProperty(\"Current\", \"{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}\", \r\n // actions\r\n objectPath()));\r\n }\r\n return this._contextIndex;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ObjectPathQueue.prototype.toBody = function () {\r\n if (objectDefinedNotNull(this._xml)) {\r\n return this._xml;\r\n }\r\n // create our xml payload\r\n this._xml = writeObjectPathBody(this.toIndexedTree());\r\n return this._xml;\r\n };\r\n /**\r\n * Conducts the string replacements for id, parent id, and path id\r\n *\r\n * @returns The tree with all string replacements made\r\n */\r\n ObjectPathQueue.prototype.toIndexedTree = function () {\r\n var _this = this;\r\n var builderIndex = -1;\r\n var lastOpId = -1;\r\n var idIndexMap = [];\r\n return this.toArray().map(function (op, index, arr) {\r\n var opId = ++builderIndex;\r\n // track the array index => opId relationship\r\n idIndexMap.push(opId);\r\n // do path replacements\r\n op.path = opSetPathParamId(idIndexMap, opSetId(opId.toString(), op.path));\r\n if (lastOpId >= 0) {\r\n // if we have a parent do the replace\r\n op.path = opSetParentId(lastOpId.toString(), op.path);\r\n }\r\n // rewrite actions with placeholders replaced\r\n op.actions = op.actions.map(function (a) {\r\n var actionId = ++builderIndex;\r\n return opSetId(actionId.toString(), opSetPathId(opId.toString(), a));\r\n });\r\n // handle any specific child relationships\r\n _this.getChildRelationship(index).forEach(function (childIndex) {\r\n // set the parent id for our non-immediate children, thus removing the token so it isn't overwritten\r\n arr[childIndex].path = opSetParentId(opId.toString(), arr[childIndex].path);\r\n });\r\n // and remember our last object path id for the parent replace above\r\n lastOpId = opId;\r\n return op;\r\n });\r\n };\r\n /**\r\n * Dirties this queue clearing any cached data\r\n */\r\n ObjectPathQueue.prototype.dirty = function () {\r\n this._xml = null;\r\n };\r\n return ObjectPathQueue;\r\n}());\r\nexport { ObjectPathQueue };\r\n//# sourceMappingURL=objectpath.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/packages/sp-clientsvc/es5/src/objectpath.js\n// module id = 2\n// module chunks = 0","export function objectPath() {\r\n return \"\";\r\n}\r\nexport function identityQuery() {\r\n return \"\";\r\n}\r\nexport function opQuery(selectProperties, childSelectProperties) {\r\n // this is fairly opaque behavior, but is the simplest way to convey the required information.\r\n // if selectProperties.length === 0 or null then select all\r\n // else select indicated properties\r\n if (selectProperties === void 0) { selectProperties = null; }\r\n if (childSelectProperties === void 0) { childSelectProperties = null; }\r\n // if childSelectProperties === null do not include that block\r\n // if childSelectProperties.length === 0 then select all\r\n // else select indicated properties\r\n var builder = [];\r\n builder.push(\"\");\r\n if (selectProperties === null || selectProperties.length < 1) {\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n }\r\n else {\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n [].push.apply(builder, selectProperties.map(function (p) { return \"\"; }));\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n }\r\n if (childSelectProperties !== null) {\r\n if (childSelectProperties.length < 1) {\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n }\r\n else {\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n [].push.apply(builder, childSelectProperties.map(function (p) { return \"\"; }));\r\n builder.push(\"\");\r\n builder.push(\"\");\r\n }\r\n }\r\n builder.push(\"\");\r\n return builder.join(\"\");\r\n}\r\nexport function setProperty(name, type, value) {\r\n var builder = [];\r\n builder.push(\"\");\r\n builder.push(\"\" + value + \"\");\r\n builder.push(\"\");\r\n return builder.join(\"\");\r\n}\r\nexport function methodAction(name, params) {\r\n var builder = [];\r\n builder.push(\"\");\r\n if (params !== null) {\r\n var arrParams = params.toArray();\r\n if (arrParams.length < 1) {\r\n builder.push(\"\");\r\n }\r\n else {\r\n builder.push(\"\");\r\n [].push.apply(builder, arrParams.map(function (p) { return \"\" + p.value + \"\"; }));\r\n builder.push(\"\");\r\n }\r\n }\r\n builder.push(\"\");\r\n return builder.join(\"\");\r\n}\r\nexport function objectProperties(o) {\r\n return Object.getOwnPropertyNames(o).map(function (name) {\r\n var value = o[name];\r\n if (typeof value === \"boolean\") {\r\n return setProperty(name, \"Boolean\", \"\" + value);\r\n }\r\n else if (typeof value === \"number\") {\r\n return setProperty(name, \"Number\", \"\" + value);\r\n }\r\n else if (typeof value === \"string\") {\r\n return setProperty(name, \"String\", \"\" + value);\r\n }\r\n return \"\";\r\n }, []);\r\n}\r\n//# sourceMappingURL=opactionbuilders.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/packages/sp-clientsvc/es5/src/opactionbuilders.js\n// module id = 3\n// module chunks = 0","import { ObjectPath } from \"./objectpath\";\r\nexport function property(name) {\r\n var actions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n actions[_i - 1] = arguments[_i];\r\n }\r\n return new ObjectPath(\"\", actions);\r\n}\r\nexport function staticMethod(name, typeId) {\r\n var actions = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n actions[_i - 2] = arguments[_i];\r\n }\r\n return new ObjectPath(\"\", actions);\r\n}\r\nexport function staticProperty(name, typeId) {\r\n var actions = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n actions[_i - 2] = arguments[_i];\r\n }\r\n return new ObjectPath(\"\", actions);\r\n}\r\nexport function objConstructor(typeId) {\r\n var actions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n actions[_i - 1] = arguments[_i];\r\n }\r\n return new ObjectPath(\"\", actions);\r\n}\r\n/**\r\n * Used to build parameters when calling methods\r\n */\r\nvar MethodParams = /** @class */ (function () {\r\n function MethodParams(_p) {\r\n if (_p === void 0) { _p = []; }\r\n this._p = _p;\r\n }\r\n MethodParams.build = function (initValues) {\r\n if (initValues === void 0) { initValues = []; }\r\n var params = new MethodParams();\r\n [].push.apply(params._p, initValues);\r\n return params;\r\n };\r\n MethodParams.prototype.string = function (value) {\r\n return this.a(\"String\", value);\r\n };\r\n MethodParams.prototype.number = function (value) {\r\n return this.a(\"Number\", value.toString());\r\n };\r\n MethodParams.prototype.boolean = function (value) {\r\n return this.a(\"Boolean\", value.toString());\r\n };\r\n MethodParams.prototype.objectPath = function (inputIndex) {\r\n return this.a(\"ObjectPath\", inputIndex.toString());\r\n };\r\n MethodParams.prototype.toArray = function () {\r\n return this._p;\r\n };\r\n MethodParams.prototype.a = function (type, value) {\r\n this._p.push({ type: type, value: value });\r\n return this;\r\n };\r\n return MethodParams;\r\n}());\r\nexport { MethodParams };\r\nexport function method(name, params) {\r\n var actions = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n actions[_i - 2] = arguments[_i];\r\n }\r\n var builder = [];\r\n builder.push(\"\");\r\n if (params !== null) {\r\n var arrParams = params.toArray();\r\n if (arrParams.length < 1) {\r\n builder.push(\"\");\r\n }\r\n else {\r\n builder.push(\"\");\r\n [].push.apply(builder, arrParams.map(function (p) {\r\n if (p.type === \"ObjectPath\") {\r\n return \"\";\r\n }\r\n return \"\" + p.value + \"\";\r\n }));\r\n builder.push(\"\");\r\n }\r\n }\r\n builder.push(\"\");\r\n return new ObjectPath(builder.join(\"\"), actions);\r\n}\r\n//# sourceMappingURL=opbuilders.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/packages/sp-clientsvc/es5/src/opbuilders.js\n// module id = 4\n// module chunks = 0","/**\n@license\n * @pnp/logging v1.2.0 - pnp - light-weight, subscribable logging framework\n * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)\n * Copyright (c) 2018 Microsoft\n * docs: https://pnp.github.io/pnpjs/\n * source: https:github.com/pnp/pnpjs\n * bugs: https://github.com/pnp/pnpjs/issues\n */\n/**\r\n * Class used to subscribe ILogListener and log messages throughout an application\r\n *\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger() {\r\n }\r\n Object.defineProperty(Logger, \"activeLogLevel\", {\r\n /**\r\n * Gets or sets the active log level to apply for log filtering\r\n */\r\n get: function () {\r\n return Logger.instance.activeLogLevel;\r\n },\r\n set: function (value) {\r\n Logger.instance.activeLogLevel = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Logger, \"instance\", {\r\n get: function () {\r\n if (Logger._instance === undefined || Logger._instance === null) {\r\n Logger._instance = new LoggerImpl();\r\n }\r\n return Logger._instance;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds ILogListener instances to the set of subscribed listeners\r\n *\r\n * @param listeners One or more listeners to subscribe to this log\r\n */\r\n Logger.subscribe = function () {\r\n var listeners = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n listeners[_i] = arguments[_i];\r\n }\r\n listeners.map(function (listener) { return Logger.instance.subscribe(listener); });\r\n };\r\n /**\r\n * Clears the subscribers collection, returning the collection before modifiction\r\n */\r\n Logger.clearSubscribers = function () {\r\n return Logger.instance.clearSubscribers();\r\n };\r\n Object.defineProperty(Logger, \"count\", {\r\n /**\r\n * Gets the current subscriber count\r\n */\r\n get: function () {\r\n return Logger.instance.count;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Writes the supplied string to the subscribed listeners\r\n *\r\n * @param message The message to write\r\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)\r\n */\r\n Logger.write = function (message, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n Logger.instance.log({ level: level, message: message });\r\n };\r\n /**\r\n * Writes the supplied string to the subscribed listeners\r\n *\r\n * @param json The json object to stringify and write\r\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)\r\n */\r\n Logger.writeJSON = function (json, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n this.write(JSON.stringify(json), level);\r\n };\r\n /**\r\n * Logs the supplied entry to the subscribed listeners\r\n *\r\n * @param entry The message to log\r\n */\r\n Logger.log = function (entry) {\r\n Logger.instance.log(entry);\r\n };\r\n /**\r\n * Logs an error object to the subscribed listeners\r\n *\r\n * @param err The error object\r\n */\r\n Logger.error = function (err) {\r\n Logger.instance.log({ data: err, level: 3 /* Error */, message: err.message });\r\n };\r\n return Logger;\r\n}());\r\nvar LoggerImpl = /** @class */ (function () {\r\n function LoggerImpl(activeLogLevel, subscribers) {\r\n if (activeLogLevel === void 0) { activeLogLevel = 2 /* Warning */; }\r\n if (subscribers === void 0) { subscribers = []; }\r\n this.activeLogLevel = activeLogLevel;\r\n this.subscribers = subscribers;\r\n }\r\n LoggerImpl.prototype.subscribe = function (listener) {\r\n this.subscribers.push(listener);\r\n };\r\n LoggerImpl.prototype.clearSubscribers = function () {\r\n var s = this.subscribers.slice(0);\r\n this.subscribers.length = 0;\r\n return s;\r\n };\r\n Object.defineProperty(LoggerImpl.prototype, \"count\", {\r\n get: function () {\r\n return this.subscribers.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LoggerImpl.prototype.write = function (message, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n this.log({ level: level, message: message });\r\n };\r\n LoggerImpl.prototype.log = function (entry) {\r\n if (entry !== undefined && this.activeLogLevel <= entry.level) {\r\n this.subscribers.map(function (subscriber) { return subscriber.log(entry); });\r\n }\r\n };\r\n return LoggerImpl;\r\n}());\n\n/**\r\n * A set of logging levels\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\r\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\r\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\r\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\r\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\r\n})(LogLevel || (LogLevel = {}));\n\n/**\r\n * Implementation of LogListener which logs to the console\r\n *\r\n */\r\nvar ConsoleListener = /** @class */ (function () {\r\n function ConsoleListener() {\r\n }\r\n /**\r\n * Any associated data that a given logging listener may choose to log or ignore\r\n *\r\n * @param entry The information to be logged\r\n */\r\n ConsoleListener.prototype.log = function (entry) {\r\n var msg = this.format(entry);\r\n switch (entry.level) {\r\n case 0 /* Verbose */:\r\n case 1 /* Info */:\r\n console.log(msg);\r\n break;\r\n case 2 /* Warning */:\r\n console.warn(msg);\r\n break;\r\n case 3 /* Error */:\r\n console.error(msg);\r\n break;\r\n }\r\n };\r\n /**\r\n * Formats the message\r\n *\r\n * @param entry The information to format into a string\r\n */\r\n ConsoleListener.prototype.format = function (entry) {\r\n var msg = [];\r\n msg.push(\"Message: \" + entry.message);\r\n if (entry.data !== undefined) {\r\n msg.push(\" Data: \" + JSON.stringify(entry.data));\r\n }\r\n return msg.join(\"\");\r\n };\r\n return ConsoleListener;\r\n}());\r\n/**\r\n * Implementation of LogListener which logs to the supplied function\r\n *\r\n */\r\nvar FunctionListener = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the FunctionListener class\r\n *\r\n * @constructor\r\n * @param method The method to which any logging data will be passed\r\n */\r\n function FunctionListener(method) {\r\n this.method = method;\r\n }\r\n /**\r\n * Any associated data that a given logging listener may choose to log or ignore\r\n *\r\n * @param entry The information to be logged\r\n */\r\n FunctionListener.prototype.log = function (entry) {\r\n this.method(entry);\r\n };\r\n return FunctionListener;\r\n}());\n\nexport { Logger, LogLevel, ConsoleListener, FunctionListener };\n//# sourceMappingURL=logging.es5.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/packages/logging/dist/logging.es5.js\n// module id = 5\n// module chunks = 0","/**\n@license\n * @pnp/odata v1.2.0 - pnp - provides shared odata functionality and base classes\n * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)\n * Copyright (c) 2018 Microsoft\n * docs: https://pnp.github.io/pnpjs/\n * source: https:github.com/pnp/pnpjs\n * bugs: https://github.com/pnp/pnpjs/issues\n */\nimport { RuntimeConfig, dateAdd, PnPClientStorage, isFunc, hOP, extend, combine, mergeOptions, objectDefinedNotNull, getGUID } from '@pnp/common';\nimport { __extends, __decorate } from 'tslib';\nimport { Logger } from '@pnp/logging';\n\nvar CachingOptions = /** @class */ (function () {\r\n function CachingOptions(key) {\r\n this.key = key;\r\n this.expiration = dateAdd(new Date(), \"second\", RuntimeConfig.defaultCachingTimeoutSeconds);\r\n this.storeName = RuntimeConfig.defaultCachingStore;\r\n }\r\n Object.defineProperty(CachingOptions.prototype, \"store\", {\r\n get: function () {\r\n if (this.storeName === \"local\") {\r\n return CachingOptions.storage.local;\r\n }\r\n else {\r\n return CachingOptions.storage.session;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CachingOptions.storage = new PnPClientStorage();\r\n return CachingOptions;\r\n}());\r\nvar CachingParserWrapper = /** @class */ (function () {\r\n function CachingParserWrapper(parser, cacheOptions) {\r\n this.parser = parser;\r\n this.cacheOptions = cacheOptions;\r\n }\r\n CachingParserWrapper.prototype.parse = function (response) {\r\n var _this = this;\r\n return this.parser.parse(response).then(function (r) { return _this.cacheData(r); });\r\n };\r\n CachingParserWrapper.prototype.cacheData = function (data) {\r\n if (this.cacheOptions.store !== null) {\r\n this.cacheOptions.store.put(this.cacheOptions.key, data, this.cacheOptions.expiration);\r\n }\r\n return data;\r\n };\r\n return CachingParserWrapper;\r\n}());\n\nvar ODataParserBase = /** @class */ (function () {\r\n function ODataParserBase() {\r\n }\r\n ODataParserBase.prototype.parse = function (r) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (_this.handleError(r, reject)) {\r\n _this.parseImpl(r, resolve, reject);\r\n }\r\n });\r\n };\r\n ODataParserBase.prototype.parseImpl = function (r, resolve, reject) {\r\n var _this = this;\r\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\r\n resolve({});\r\n }\r\n else {\r\n // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545)\r\n r.text()\r\n .then(function (txt) { return txt.replace(/\\s/ig, \"\").length > 0 ? JSON.parse(txt) : {}; })\r\n .then(function (json) { return resolve(_this.parseODataJSON(json)); })\r\n .catch(function (e) { return reject(e); });\r\n }\r\n };\r\n /**\r\n * Handles a response with ok === false by parsing the body and creating a ProcessHttpClientResponseException\r\n * which is passed to the reject delegate. This method returns true if there is no error, otherwise false\r\n *\r\n * @param r Current response object\r\n * @param reject reject delegate for the surrounding promise\r\n */\r\n ODataParserBase.prototype.handleError = function (r, reject) {\r\n if (!r.ok) {\r\n // read the response as text, it may not be valid json\r\n r.json().then(function (json) {\r\n // include the headers as they contain diagnostic information\r\n var data = {\r\n responseBody: json,\r\n responseHeaders: r.headers,\r\n };\r\n reject(new Error(\"Error making HttpClient request in queryable: [\" + r.status + \"] \" + r.statusText + \" ::> \" + JSON.stringify(data)));\r\n }).catch(function (e) {\r\n reject(new Error(\"Error making HttpClient request in queryable: [\" + r.status + \"] \" + r.statusText + \" ::> \" + e));\r\n });\r\n }\r\n return r.ok;\r\n };\r\n /**\r\n * Normalizes the json response by removing the various nested levels\r\n *\r\n * @param json json object to parse\r\n */\r\n ODataParserBase.prototype.parseODataJSON = function (json) {\r\n var result = json;\r\n if (hOP(json, \"d\")) {\r\n if (hOP(json.d, \"results\")) {\r\n result = json.d.results;\r\n }\r\n else {\r\n result = json.d;\r\n }\r\n }\r\n else if (hOP(json, \"value\")) {\r\n result = json.value;\r\n }\r\n return result;\r\n };\r\n return ODataParserBase;\r\n}());\r\nvar ODataDefaultParser = /** @class */ (function (_super) {\r\n __extends(ODataDefaultParser, _super);\r\n function ODataDefaultParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return ODataDefaultParser;\r\n}(ODataParserBase));\r\nvar TextParser = /** @class */ (function (_super) {\r\n __extends(TextParser, _super);\r\n function TextParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TextParser.prototype.parseImpl = function (r, resolve) {\r\n r.text().then(resolve);\r\n };\r\n return TextParser;\r\n}(ODataParserBase));\r\nvar BlobParser = /** @class */ (function (_super) {\r\n __extends(BlobParser, _super);\r\n function BlobParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n BlobParser.prototype.parseImpl = function (r, resolve) {\r\n r.blob().then(resolve);\r\n };\r\n return BlobParser;\r\n}(ODataParserBase));\r\nvar JSONParser = /** @class */ (function (_super) {\r\n __extends(JSONParser, _super);\r\n function JSONParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n JSONParser.prototype.parseImpl = function (r, resolve) {\r\n r.json().then(resolve);\r\n };\r\n return JSONParser;\r\n}(ODataParserBase));\r\nvar BufferParser = /** @class */ (function (_super) {\r\n __extends(BufferParser, _super);\r\n function BufferParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n BufferParser.prototype.parseImpl = function (r, resolve) {\r\n if (isFunc(r.arrayBuffer)) {\r\n r.arrayBuffer().then(resolve);\r\n }\r\n else {\r\n r.buffer().then(resolve);\r\n }\r\n };\r\n return BufferParser;\r\n}(ODataParserBase));\r\nvar LambdaParser = /** @class */ (function () {\r\n function LambdaParser(parser) {\r\n this.parser = parser;\r\n }\r\n LambdaParser.prototype.parse = function (r) {\r\n return this.parser(r);\r\n };\r\n return LambdaParser;\r\n}());\n\n/**\r\n * Resolves the context's result value\r\n *\r\n * @param context The current context\r\n */\r\nfunction returnResult(context) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 0 /* Verbose */ ? context.result : {},\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Returning result from pipeline. Set logging to verbose to see data.\",\r\n });\r\n return Promise.resolve(context.result || null);\r\n}\r\n/**\r\n * Sets the result on the context\r\n */\r\nfunction setResult(context, value) {\r\n return new Promise(function (resolve) {\r\n context.result = value;\r\n context.hasResult = true;\r\n resolve(context);\r\n });\r\n}\r\n/**\r\n * Invokes the next method in the provided context's pipeline\r\n *\r\n * @param c The current request context\r\n */\r\nfunction next(c) {\r\n if (c.pipeline.length > 0) {\r\n return c.pipeline.shift()(c);\r\n }\r\n else {\r\n return Promise.resolve(c);\r\n }\r\n}\r\n/**\r\n * Executes the current request context's pipeline\r\n *\r\n * @param context Current context\r\n */\r\nfunction pipe(context) {\r\n if (context.pipeline.length < 1) {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 2 /* Warning */);\r\n }\r\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\r\n Logger.error(e);\r\n throw e;\r\n });\r\n if (context.isBatched) {\r\n // this will block the batch's execute method from returning until the child requets have been resolved\r\n context.batch.addResolveBatchDependency(promise);\r\n }\r\n return promise;\r\n}\r\n/**\r\n * decorator factory applied to methods in the pipeline to control behavior\r\n */\r\nfunction requestPipelineMethod(alwaysRun) {\r\n if (alwaysRun === void 0) { alwaysRun = false; }\r\n return function (target, propertyKey, descriptor) {\r\n var method = descriptor.value;\r\n descriptor.value = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\r\n if (!alwaysRun && args.length > 0 && hOP(args[0], \"hasResult\") && args[0].hasResult) {\r\n Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", 0 /* Verbose */);\r\n return Promise.resolve(args[0]);\r\n }\r\n // apply the tagged method\r\n Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Calling request pipeline method \" + propertyKey + \".\", 0 /* Verbose */);\r\n // then chain the next method in the context's pipeline - allows for dynamic pipeline\r\n return method.apply(target, args).then(function (ctx) { return next(ctx); });\r\n };\r\n };\r\n}\r\n/**\r\n * Contains the methods used within the request pipeline\r\n */\r\nvar PipelineMethods = /** @class */ (function () {\r\n function PipelineMethods() {\r\n }\r\n /**\r\n * Logs the start of the request\r\n */\r\n PipelineMethods.logStart = function (context) {\r\n return new Promise(function (resolve) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Beginning \" + context.verb + \" request (\" + context.requestAbsoluteUrl + \")\",\r\n });\r\n resolve(context);\r\n });\r\n };\r\n /**\r\n * Handles caching of the request\r\n */\r\n PipelineMethods.caching = function (context) {\r\n return new Promise(function (resolve) {\r\n // handle caching, if applicable\r\n if (context.isCached) {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Caching is enabled for request, checking cache...\", 1 /* Info */);\r\n var cacheOptions = new CachingOptions(context.requestAbsoluteUrl.toLowerCase());\r\n if (context.cachingOptions !== undefined) {\r\n cacheOptions = extend(cacheOptions, context.cachingOptions);\r\n }\r\n // we may not have a valid store\r\n if (cacheOptions.store !== null) {\r\n // check if we have the data in cache and if so resolve the promise and return\r\n var data = cacheOptions.store.get(cacheOptions.key);\r\n if (data !== null) {\r\n // ensure we clear any held batch dependency we are resolving from the cache\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : data,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value returned from cache.\",\r\n });\r\n if (isFunc(context.batchDependency)) {\r\n context.batchDependency();\r\n }\r\n // handle the case where a parser needs to take special actions with a cached result\r\n if (hOP(context.parser, \"hydrate\")) {\r\n data = context.parser.hydrate(data);\r\n }\r\n return setResult(context, data).then(function (ctx) { return resolve(ctx); });\r\n }\r\n }\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value not found in cache.\", 1 /* Info */);\r\n // if we don't then wrap the supplied parser in the caching parser wrapper\r\n // and send things on their way\r\n context.parser = new CachingParserWrapper(context.parser, cacheOptions);\r\n }\r\n return resolve(context);\r\n });\r\n };\r\n /**\r\n * Sends the request\r\n */\r\n PipelineMethods.send = function (context) {\r\n return new Promise(function (resolve, reject) {\r\n // send or batch the request\r\n if (context.isBatched) {\r\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\r\n var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser, context.requestId);\r\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\r\n if (isFunc(context.batchDependency)) {\r\n context.batchDependency();\r\n }\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Batching request in batch \" + context.batch.batchId + \".\", 1 /* Info */);\r\n // we set the result as the promise which will be resolved by the batch's execution\r\n resolve(setResult(context, p));\r\n }\r\n else {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Sending request.\", 1 /* Info */);\r\n // we are not part of a batch, so proceed as normal\r\n var client = context.clientFactory();\r\n var opts = extend(context.options || {}, { method: context.verb });\r\n client.fetch(context.requestAbsoluteUrl, opts)\r\n .then(function (response) { return context.parser.parse(response); })\r\n .then(function (result) { return setResult(context, result); })\r\n .then(function (ctx) { return resolve(ctx); })\r\n .catch(function (e) { return reject(e); });\r\n }\r\n });\r\n };\r\n /**\r\n * Logs the end of the request\r\n */\r\n PipelineMethods.logEnd = function (context) {\r\n return new Promise(function (resolve) {\r\n if (context.isBatched) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") \" + context.verb + \" request will complete in batch \" + context.batch.batchId + \".\",\r\n });\r\n }\r\n else {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Completing \" + context.verb + \" request.\",\r\n });\r\n }\r\n resolve(context);\r\n });\r\n };\r\n __decorate([\r\n requestPipelineMethod(true)\r\n ], PipelineMethods, \"logStart\", null);\r\n __decorate([\r\n requestPipelineMethod()\r\n ], PipelineMethods, \"caching\", null);\r\n __decorate([\r\n requestPipelineMethod()\r\n ], PipelineMethods, \"send\", null);\r\n __decorate([\r\n requestPipelineMethod(true)\r\n ], PipelineMethods, \"logEnd\", null);\r\n return PipelineMethods;\r\n}());\r\nfunction getDefaultPipeline() {\r\n return [\r\n PipelineMethods.logStart,\r\n PipelineMethods.caching,\r\n PipelineMethods.send,\r\n PipelineMethods.logEnd,\r\n ].slice(0);\r\n}\n\nvar Queryable = /** @class */ (function () {\r\n function Queryable() {\r\n this._query = new Map();\r\n this._options = {};\r\n this._url = \"\";\r\n this._parentUrl = \"\";\r\n this._useCaching = false;\r\n this._cachingOptions = null;\r\n }\r\n /**\r\n * Gets the currentl url\r\n *\r\n */\r\n Queryable.prototype.toUrl = function () {\r\n return this._url;\r\n };\r\n /**\r\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\r\n *\r\n * @param pathPart The string to concatonate to the url\r\n */\r\n Queryable.prototype.concat = function (pathPart) {\r\n this._url += pathPart;\r\n return this;\r\n };\r\n Object.defineProperty(Queryable.prototype, \"query\", {\r\n /**\r\n * Provides access to the query builder for this url\r\n *\r\n */\r\n get: function () {\r\n return this._query;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets custom options for current object and all derived objects accessible via chaining\r\n *\r\n * @param options custom options\r\n */\r\n Queryable.prototype.configure = function (options) {\r\n mergeOptions(this._options, options);\r\n return this;\r\n };\r\n /**\r\n * Configures this instance from the configure options of the supplied instance\r\n *\r\n * @param o Instance from which options should be taken\r\n */\r\n Queryable.prototype.configureFrom = function (o) {\r\n mergeOptions(this._options, o._options);\r\n return this;\r\n };\r\n /**\r\n * Enables caching for this request\r\n *\r\n * @param options Defines the options used when caching this request\r\n */\r\n Queryable.prototype.usingCaching = function (options) {\r\n if (!RuntimeConfig.globalCacheDisable) {\r\n this._useCaching = true;\r\n if (options !== undefined) {\r\n this._cachingOptions = options;\r\n }\r\n }\r\n return this;\r\n };\r\n Queryable.prototype.getCore = function (parser, options) {\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n if (options === void 0) { options = {}; }\r\n return this.toRequestContext(\"GET\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n Queryable.prototype.postCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.toRequestContext(\"POST\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n Queryable.prototype.patchCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.toRequestContext(\"PATCH\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n Queryable.prototype.deleteCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.toRequestContext(\"DELETE\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n Queryable.prototype.putCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.toRequestContext(\"PUT\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n /**\r\n * Appends the given string and normalizes \"/\" chars\r\n *\r\n * @param pathPart The string to append\r\n */\r\n Queryable.prototype.append = function (pathPart) {\r\n this._url = combine(this._url, pathPart);\r\n };\r\n Object.defineProperty(Queryable.prototype, \"parentUrl\", {\r\n /**\r\n * Gets the parent url used when creating this instance\r\n *\r\n */\r\n get: function () {\r\n return this._parentUrl;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Extends this queryable from the provided parent\r\n *\r\n * @param parent Parent queryable from which we will derive a base url\r\n * @param path Additional path\r\n */\r\n Queryable.prototype.extend = function (parent, path) {\r\n this._parentUrl = parent._url;\r\n this._url = combine(this._parentUrl, path);\r\n this.configureFrom(parent);\r\n };\r\n return Queryable;\r\n}());\r\nvar ODataQueryable = /** @class */ (function (_super) {\r\n __extends(ODataQueryable, _super);\r\n function ODataQueryable() {\r\n var _this = _super.call(this) || this;\r\n _this._batch = null;\r\n return _this;\r\n }\r\n /**\r\n * Adds this query to the supplied batch\r\n *\r\n * @example\r\n * ```\r\n *\r\n * let b = pnp.sp.createBatch();\r\n * pnp.sp.web.inBatch(b).get().then(...);\r\n * b.execute().then(...)\r\n * ```\r\n */\r\n ODataQueryable.prototype.inBatch = function (batch) {\r\n if (this.batch !== null) {\r\n throw new Error(\"This query is already part of a batch.\");\r\n }\r\n this._batch = batch;\r\n return this;\r\n };\r\n /**\r\n * Gets the currentl url\r\n *\r\n */\r\n ODataQueryable.prototype.toUrl = function () {\r\n return this._url;\r\n };\r\n /**\r\n * Executes the currently built request\r\n *\r\n * @param parser Allows you to specify a parser to handle the result\r\n * @param getOptions The options used for this request\r\n */\r\n ODataQueryable.prototype.get = function (parser, options) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n if (options === void 0) { options = {}; }\r\n return this.getCore(parser, options);\r\n };\r\n ODataQueryable.prototype.getCore = function (parser, options) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n if (options === void 0) { options = {}; }\r\n return this.toRequestContext(\"GET\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n ODataQueryable.prototype.postCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return this.toRequestContext(\"POST\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n ODataQueryable.prototype.patchCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return this.toRequestContext(\"PATCH\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n ODataQueryable.prototype.deleteCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return this.toRequestContext(\"DELETE\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n ODataQueryable.prototype.putCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return this.toRequestContext(\"PUT\", options, parser, getDefaultPipeline()).then(function (context) { return pipe(context); });\r\n };\r\n /**\r\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\r\n */\r\n ODataQueryable.prototype.addBatchDependency = function () {\r\n if (this._batch !== null) {\r\n return this._batch.addDependency();\r\n }\r\n return function () { return null; };\r\n };\r\n Object.defineProperty(ODataQueryable.prototype, \"hasBatch\", {\r\n /**\r\n * Indicates if the current query has a batch associated\r\n *\r\n */\r\n get: function () {\r\n return objectDefinedNotNull(this._batch);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ODataQueryable.prototype, \"batch\", {\r\n /**\r\n * The batch currently associated with this query or null\r\n *\r\n */\r\n get: function () {\r\n return this.hasBatch ? this._batch : null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ODataQueryable;\r\n}(Queryable));\n\nvar ODataBatch = /** @class */ (function () {\r\n function ODataBatch(_batchId) {\r\n if (_batchId === void 0) { _batchId = getGUID(); }\r\n this._batchId = _batchId;\r\n this._reqs = [];\r\n this._deps = [];\r\n this._rDeps = [];\r\n }\r\n Object.defineProperty(ODataBatch.prototype, \"batchId\", {\r\n get: function () {\r\n return this._batchId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ODataBatch.prototype, \"requests\", {\r\n /**\r\n * The requests contained in this batch\r\n */\r\n get: function () {\r\n return this._reqs;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n *\r\n * @param url Request url\r\n * @param method Request method (GET, POST, etc)\r\n * @param options Any request options\r\n * @param parser The parser used to handle the eventual return from the query\r\n * @param id An identifier used to track a request within a batch\r\n */\r\n ODataBatch.prototype.add = function (url, method, options, parser, id) {\r\n var info = {\r\n id: id,\r\n method: method.toUpperCase(),\r\n options: options,\r\n parser: parser,\r\n reject: null,\r\n resolve: null,\r\n url: url,\r\n };\r\n var p = new Promise(function (resolve, reject) {\r\n info.resolve = resolve;\r\n info.reject = reject;\r\n });\r\n this._reqs.push(info);\r\n return p;\r\n };\r\n /**\r\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\r\n * MUST be cleared using the returned resolve delegate to allow batches to run\r\n */\r\n ODataBatch.prototype.addDependency = function () {\r\n var resolver = function () { return void (0); };\r\n this._deps.push(new Promise(function (resolve) {\r\n resolver = resolve;\r\n }));\r\n return resolver;\r\n };\r\n /**\r\n * The batch's execute method will not resolve util any promises added here resolve\r\n *\r\n * @param p The dependent promise\r\n */\r\n ODataBatch.prototype.addResolveBatchDependency = function (p) {\r\n this._rDeps.push(p);\r\n };\r\n /**\r\n * Execute the current batch and resolve the associated promises\r\n *\r\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\r\n */\r\n ODataBatch.prototype.execute = function () {\r\n var _this = this;\r\n // we need to check the dependencies twice due to how different engines handle things.\r\n // We can get a second set of promises added during the first set resolving\r\n return Promise.all(this._deps)\r\n .then(function () { return Promise.all(_this._deps); })\r\n .then(function () { return _this.executeImpl(); })\r\n .then(function () { return Promise.all(_this._rDeps); })\r\n .then(function () { return void (0); });\r\n };\r\n return ODataBatch;\r\n}());\n\nexport { CachingOptions, CachingParserWrapper, ODataParserBase, ODataDefaultParser, TextParser, BlobParser, JSONParser, BufferParser, LambdaParser, setResult, pipe, requestPipelineMethod, PipelineMethods, getDefaultPipeline, Queryable, ODataQueryable, ODataBatch };\n//# sourceMappingURL=odata.es5.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/packages/odata/dist/odata.es5.js\n// module id = 6\n// module chunks = 0","/**\r\n * Transforms an array of object paths into a request xml body. Does not do placeholder substitutions.\r\n *\r\n * @param objectPaths The object paths for which we want to generate a body\r\n */\r\nexport function writeObjectPathBody(objectPaths) {\r\n var actions = [];\r\n var paths = [];\r\n objectPaths.forEach(function (op) {\r\n paths.push(op.path);\r\n actions.push.apply(actions, op.actions);\r\n });\r\n // create our xml payload\r\n return [\r\n \"\",\r\n \"\",\r\n actions.join(\"\"),\r\n \"\",\r\n \"\",\r\n paths.join(\"\"),\r\n \"\",\r\n \"\",\r\n ].join(\"\");\r\n}\r\n//# sourceMappingURL=utils.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/packages/sp-clientsvc/es5/src/utils.js\n// module id = 7\n// module chunks = 0","import { getAttrValueFromString, jsS, hOP } from \"@pnp/common\";\r\n/**\r\n * Used within the request pipeline to parse ProcessQuery results\r\n */\r\nvar ProcessQueryParser = /** @class */ (function () {\r\n function ProcessQueryParser(op) {\r\n this.op = op;\r\n }\r\n /**\r\n * Parses the response checking for errors\r\n *\r\n * @param r Response object\r\n */\r\n ProcessQueryParser.prototype.parse = function (r) {\r\n var _this = this;\r\n return r.text().then(function (t) {\r\n if (!r.ok) {\r\n throw new Error(t);\r\n }\r\n try {\r\n return JSON.parse(t);\r\n }\r\n catch (e) {\r\n // special case in ProcessQuery where we got an error back, but it is not in json format\r\n throw new Error(t);\r\n }\r\n }).then(function (parsed) {\r\n // here we need to check for an error body\r\n if (parsed.length > 0 && hOP(parsed[0], \"ErrorInfo\") && parsed[0].ErrorInfo !== null) {\r\n throw new Error(jsS(parsed[0].ErrorInfo));\r\n }\r\n return _this.findResult(parsed);\r\n });\r\n };\r\n ProcessQueryParser.prototype.findResult = function (json) {\r\n for (var i = 0; i < this.op.actions.length; i++) {\r\n var a = this.op.actions[i];\r\n // let's see if the result is null based on the ObjectPath action, if it exists\r\n // \r\n if (/^\r\n if (/^ opId relationship\r\n idIndexMap.push(opId);\r\n var path = opSetPathParamId(idIndexMap, opSetId(opId.toString(), op.path), indexMappingFunction);\r\n if (lastOpId >= 0) {\r\n path = opSetParentId(lastOpId.toString(), path);\r\n }\r\n // rewrite actions with placeholders replaced\r\n var opActions = op.actions.map(function (a) {\r\n var actionId = ++_this._builderIndex;\r\n return opSetId(actionId.toString(), opSetPathId(opId.toString(), a));\r\n });\r\n // handle any specific child relationships\r\n // the childIndex is reduced by 1 because we are removing the Session Path\r\n pathQueue.getChildRelationship(index + 1).map(function (i) { return i - 1; }).forEach(function (childIndex) {\r\n // set the parent id for our non-immediate children\r\n arr[childIndex].path = opSetParentId(opId.toString(), arr[childIndex].path);\r\n });\r\n // and remember our last object path id for the parent replace above\r\n lastOpId = opId;\r\n // return our now substituted path and actions as a new object path instance\r\n return new ObjectPath(path, opActions);\r\n }).forEach(function (op) { return _this._objectPaths.add(op); });\r\n // get this once\r\n var obPaths = _this._objectPaths.toArray();\r\n // create a new parser to handle finding the result based on the path\r\n var parser = new ProcessQueryParser(obPaths[obPaths.length - 1]);\r\n if (request.parser instanceof CachingParserWrapper) {\r\n // handle special case of caching\r\n request.parser = new ProcessQueryCachingParserWrapper(parser, request.parser);\r\n }\r\n else {\r\n request.parser = parser;\r\n }\r\n // add the request to our batch requests\r\n _this._requests.push(request);\r\n // remove the temp property\r\n delete request.options.clientsvc_ObjectPaths;\r\n });\r\n };\r\n BatchExecutor.prototype.execute = function () {\r\n var _this = this;\r\n Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this._requests.length + \" requests.\", 1 /* Info */);\r\n // create our request body from all the merged object paths\r\n var options = {\r\n body: writeObjectPathBody(this._objectPaths.toArray()),\r\n };\r\n Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", 1 /* Info */);\r\n // send the batch\r\n return _super.prototype.postCore.call(this, options, new BatchParser()).then(function (rawResponse) {\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", 1 /* Info */);\r\n return _this._requests.reduce(function (chain, request) {\r\n Logger.write(\"[\" + request.id + \"] (\" + (new Date()).getTime() + \") Resolving request in batch \" + _this.batchId + \".\", 1 /* Info */);\r\n return chain.then(function (_) { return request.parser.findResult(rawResponse).then(request.resolve).catch(request.reject); });\r\n }, Promise.resolve());\r\n });\r\n };\r\n return BatchExecutor;\r\n}(ClientSvcQueryable));\r\n/**\r\n * Used to return the raw results from parsing the batch\r\n */\r\nvar BatchParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(BatchParser, _super);\r\n function BatchParser() {\r\n return _super.call(this, null) || this;\r\n }\r\n BatchParser.prototype.findResult = function (json) {\r\n // we leave it to the individual request parsers to find their results in the raw json body\r\n return json;\r\n };\r\n return BatchParser;\r\n}(ProcessQueryParser));\r\n/**\r\n * Handles processing batched results that are also cached\r\n */\r\nvar ProcessQueryCachingParserWrapper = /** @class */ (function (_super) {\r\n tslib_1.__extends(ProcessQueryCachingParserWrapper, _super);\r\n function ProcessQueryCachingParserWrapper(parser, wrapper) {\r\n return _super.call(this, parser, wrapper.cacheOptions) || this;\r\n }\r\n ProcessQueryCachingParserWrapper.prototype.findResult = function (json) {\r\n var _this = this;\r\n return this.parser.findResult(json).then(function (d) { return _this.cacheData(d); });\r\n };\r\n return ProcessQueryCachingParserWrapper;\r\n}(CachingParserWrapper));\r\n//# sourceMappingURL=batch.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/packages/sp-clientsvc/es5/src/batch.js\n// module id = 13\n// module chunks = 0","/*! adal-angular v1.0.17 2018-02-27 */\r\nvar AuthenticationContext=function(){\"use strict\";return AuthenticationContext=function(a){if(this.REQUEST_TYPE={LOGIN:\"LOGIN\",RENEW_TOKEN:\"RENEW_TOKEN\",UNKNOWN:\"UNKNOWN\"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:\"id_token token\",TOKEN:\"token\"},this.CONSTANTS={ACCESS_TOKEN:\"access_token\",EXPIRES_IN:\"expires_in\",ID_TOKEN:\"id_token\",ERROR_DESCRIPTION:\"error_description\",SESSION_STATE:\"session_state\",ERROR:\"error\",STORAGE:{TOKEN_KEYS:\"adal.token.keys\",ACCESS_TOKEN_KEY:\"adal.access.token.key\",EXPIRATION_KEY:\"adal.expiration.key\",STATE_LOGIN:\"adal.state.login\",STATE_RENEW:\"adal.state.renew\",NONCE_IDTOKEN:\"adal.nonce.idtoken\",SESSION_STATE:\"adal.session.state\",USERNAME:\"adal.username\",IDTOKEN:\"adal.idtoken\",ERROR:\"adal.error\",ERROR_DESCRIPTION:\"adal.error.description\",LOGIN_REQUEST:\"adal.login.request\",LOGIN_ERROR:\"adal.login.error\",RENEW_STATUS:\"adal.token.renew.status\",ANGULAR_LOGIN_REQUEST:\"adal.angular.login.request\"},RESOURCE_DELIMETER:\"|\",CACHE_DELIMETER:\"||\",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:\"Canceled\",TOKEN_RENEW_STATUS_COMPLETED:\"Completed\",TOKEN_RENEW_STATUS_IN_PROGRESS:\"In Progress\",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:\"ERROR:\",1:\"WARNING:\",2:\"INFO:\",3:\"VERBOSE:\"},POPUP_WIDTH:483,POPUP_HEIGHT:600},AuthenticationContext.prototype._singletonInstance)return AuthenticationContext.prototype._singletonInstance;if(AuthenticationContext.prototype._singletonInstance=this,this.instance=\"https://login.microsoftonline.com/\",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,a.displayCall&&\"function\"!=typeof a.displayCall)throw new Error(\"displayCall is not a function\");if(!a.clientId)throw new Error(\"clientId is required\");this.config=this._cloneConfig(a),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&\"function\"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split(\"?\")[0].split(\"#\")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split(\"?\")[0].split(\"#\")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},\"undefined\"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(a){}}),AuthenticationContext.prototype.login=function(){if(this._loginInProgress)return void this.info(\"Login in progress\");this._loginInProgress=!0;var a=this._guid();this.config.state=a,this._idTokenNonce=this._guid();var b=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);b&&\"\"!==b?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,\"\"):b=window.location.href,this.verbose(\"Expected state: \"+a+\" startPage:\"+b),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,b),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,\"\"),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,a,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,\"\"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,\"\");var c=this._getNavigateUrl(\"id_token\",null)+\"&nonce=\"+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(c):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,\"\"),this._renewStates.push(a),this.registerCallback(a,this.config.clientId,this.callback),this._loginPopup(c)):this.promptUser(c)},AuthenticationContext.prototype._openPopup=function(a,b,c,d){try{var e=window.screenLeft?window.screenLeft:window.screenX,f=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,i=g/2-c/2+e,j=h/2-d/2+f,k=window.open(a,b,\"width=\"+c+\", height=\"+d+\", top=\"+j+\", left=\"+i);return k.focus&&k.focus(),k}catch(a){return this.warn(\"Error opening popup, \"+a.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},AuthenticationContext.prototype._handlePopupError=function(a,b,c,d,e){this.warn(d),this._saveItem(this.CONSTANTS.STORAGE.ERROR,c),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,d),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,e),b&&this._activeRenewals[b]&&(this._activeRenewals[b]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,a&&a(d,null,c)},AuthenticationContext.prototype._loginPopup=function(a,b,c){var d=this._openPopup(a,\"login\",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),e=c||this.callback;if(null==d){var f=\"Popup Window is null. This can happen if you are using IE\";return void this._handlePopupError(e,b,\"Error opening popup\",f,f)}if(this._openedWindows.push(d),-1!=this.config.redirectUri.indexOf(\"#\"))var g=this.config.redirectUri.split(\"#\")[0];else var g=this.config.redirectUri;var h=this,i=window.setInterval(function(){if(!d||d.closed||void 0===d.closed){var a=\"Popup Window closed\",c=\"Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge\";return h.isAngular&&h._broadcast(\"adal:popUpClosed\",c+h.CONSTANTS.RESOURCE_DELIMETER+a),h._handlePopupError(e,b,a,c,c),void window.clearInterval(i)}try{var f=d.location;if(-1!=encodeURI(f.href).indexOf(encodeURI(g)))return h.isAngular?h._broadcast(\"adal:popUpHashChanged\",f.hash):h.handleWindowCallback(f.hash),window.clearInterval(i),h._loginInProgress=!1,h._acquireTokenInProgress=!1,h.info(\"Closing popup window\"),h._openedWindows=[],void d.close()}catch(a){}},1)},AuthenticationContext.prototype._broadcast=function(a,b){!function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent(\"CustomEvent\");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}if(\"function\"==typeof window.CustomEvent)return!1;a.prototype=window.Event.prototype,window.CustomEvent=a}();var c=new CustomEvent(a,{detail:b});window.dispatchEvent(c)},AuthenticationContext.prototype.loginInProgress=function(){return this._loginInProgress},AuthenticationContext.prototype._hasResource=function(a){var b=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return b&&!this._isEmpty(b)&&b.indexOf(a+this.CONSTANTS.RESOURCE_DELIMETER)>-1},AuthenticationContext.prototype.getCachedToken=function(a){if(!this._hasResource(a))return null;var b=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+a),c=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+a),d=this.config.expireOffsetSeconds||300;return c&&c>this._now()+d?b:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+a,\"\"),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+a,0),null)},AuthenticationContext.prototype.getCachedUser=function(){if(this._user)return this._user;var a=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(a),this._user},AuthenticationContext.prototype.registerCallback=function(a,b,c){this._activeRenewals[b]=a,this._callBacksMappedToRenewStates[a]||(this._callBacksMappedToRenewStates[a]=[]);var d=this;this._callBacksMappedToRenewStates[a].push(c),this._callBackMappedToRenewStates[a]||(this._callBackMappedToRenewStates[a]=function(c,e,f,g){d._activeRenewals[b]=null;for(var h=0;h-1)){var b=this._user.profile.upn.split(\"@\");a+=\"&domain_hint=\"+encodeURIComponent(b[b.length-1])}return a},AuthenticationContext.prototype._createUser=function(a){var b=null,c=this._extractIdToken(a);return c&&c.hasOwnProperty(\"aud\")&&(c.aud.toLowerCase()===this.config.clientId.toLowerCase()?(b={userName:\"\",profile:c},c.hasOwnProperty(\"upn\")?b.userName=c.upn:c.hasOwnProperty(\"email\")&&(b.userName=c.email)):this.warn(\"IdToken has invalid aud field\")),b},AuthenticationContext.prototype._getHash=function(a){return a.indexOf(\"#/\")>-1?a=a.substring(a.indexOf(\"#/\")+2):a.indexOf(\"#\")>-1&&(a=a.substring(1)),a},AuthenticationContext.prototype.isCallback=function(a){a=this._getHash(a);var b=this._deserialize(a);return b.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||b.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||b.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},AuthenticationContext.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},AuthenticationContext.prototype.getRequestInfo=function(a){a=this._getHash(a);var b=this._deserialize(a),c={valid:!1,parameters:{},stateMatch:!1,stateResponse:\"\",requestType:this.REQUEST_TYPE.UNKNOWN};if(b&&(c.parameters=b,b.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||b.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||b.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){c.valid=!0;var d=\"\";if(!b.hasOwnProperty(\"state\"))return this.warn(\"No state returned\"),c;if(this.verbose(\"State: \"+b.state),d=b.state,c.stateResponse=d,this._matchState(c))return c;if(!c.stateMatch&&window.parent){c.requestType=this._requestType;for(var e=this._renewStates,f=0;f-1&&b+1-1)return null;if(this.config&&this.config.endpoints)for(var c in this.config.endpoints)if(a.indexOf(c)>-1)return this.config.endpoints[c];return a.indexOf(\"http://\")>-1||a.indexOf(\"https://\")>-1?this._getHostFromUri(a)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},AuthenticationContext.prototype._getHostFromUri=function(a){var b=String(a).replace(/^(https?:)\\/\\//,\"\");return b=b.split(\"/\")[0]},AuthenticationContext.prototype.handleWindowCallback=function(a){if(null==a&&(a=window.location.hash),this.isCallback(a)){var b=null,c=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(b=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,c=!0):window.parent&&window.parent._adalInstance&&(b=window.parent._adalInstance);var d,e,f=b.getRequestInfo(a),g=null;e=c||window.parent!==window?b._callBackMappedToRenewStates[f.stateResponse]:b.callback,b.info(\"Returned from redirect url\"),b.saveTokenFromHash(f),f.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?b.verbose(\"Window is in iframe, acquiring token silently\"):b.verbose(\"acquiring token interactive in progress\"),d=f.parameters[b.CONSTANTS.ACCESS_TOKEN]||f.parameters[b.CONSTANTS.ID_TOKEN],g=b.CONSTANTS.ACCESS_TOKEN):f.requestType===this.REQUEST_TYPE.LOGIN&&(d=f.parameters[b.CONSTANTS.ID_TOKEN],g=b.CONSTANTS.ID_TOKEN);var h=f.parameters[b.CONSTANTS.ERROR_DESCRIPTION],i=f.parameters[b.CONSTANTS.ERROR];try{e&&e(h,d,i,g)}catch(a){b.error(\"Error occurred in user defined callback function: \"+a)}window.parent!==window||c||(b.config.navigateToLoginRequestUrl?window.location.href=b._getItem(b.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash=\"\")}},AuthenticationContext.prototype._getNavigateUrl=function(a,b){var c=\"common\";this.config.tenant&&(c=this.config.tenant);var d=this.instance+c+\"/oauth2/authorize\"+this._serialize(a,this.config,b)+this._addLibMetadata();return this.info(\"Navigate url:\"+d),d},AuthenticationContext.prototype._extractIdToken=function(a){var b=this._decodeJwt(a);if(!b)return null;try{var c=b.JWSPayload,d=this._base64DecodeStringUrlSafe(c);return d?JSON.parse(d):(this.info(\"The returned id_token could not be base64 url safe decoded.\"),null)}catch(a){this.error(\"The returned id_token could not be decoded\",a)}return null},AuthenticationContext.prototype._base64DecodeStringUrlSafe=function(a){return a=a.replace(/-/g,\"+\").replace(/_/g,\"/\"),window.atob?decodeURIComponent(escape(window.atob(a))):decodeURIComponent(escape(this._decode(a)))},AuthenticationContext.prototype._decode=function(a){var b=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";a=String(a).replace(/=+$/,\"\");var c=a.length;if(c%4==1)throw new Error(\"The token to be decoded is not correctly encoded.\");for(var d,e,f,g,h,i,j,k,l=\"\",m=0;m>16&255,j=h>>8&255,l+=String.fromCharCode(i,j);break}if(m+1===c-1){h=d<<18|e<<12,i=h>>16&255,l+=String.fromCharCode(i);break}h=d<<18|e<<12|f<<6|g,i=h>>16&255,j=h>>8&255,k=255&h,l+=String.fromCharCode(i,j,k)}return l},AuthenticationContext.prototype._decodeJwt=function(a){if(this._isEmpty(a))return null;var b=/^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/,c=b.exec(a);return!c||c.length<4?(this.warn(\"The returned id_token is not parseable.\"),null):{header:c[1],JWSPayload:c[2],JWSSig:c[3]}},AuthenticationContext.prototype._convertUrlSafeToRegularBase64EncodedString=function(a){return a.replace(\"-\",\"+\").replace(\"_\",\"/\")},AuthenticationContext.prototype._serialize=function(a,b,c){var d=[];if(null!==b){d.push(\"?response_type=\"+a),d.push(\"client_id=\"+encodeURIComponent(b.clientId)),c&&d.push(\"resource=\"+encodeURIComponent(c)),d.push(\"redirect_uri=\"+encodeURIComponent(b.redirectUri)),d.push(\"state=\"+encodeURIComponent(b.state)),b.hasOwnProperty(\"slice\")&&d.push(\"slice=\"+encodeURIComponent(b.slice)),b.hasOwnProperty(\"extraQueryParameter\")&&d.push(b.extraQueryParameter);var e=b.correlationId?b.correlationId:this._guid();d.push(\"client-request-id=\"+encodeURIComponent(e))}return d.join(\"&\")},AuthenticationContext.prototype._deserialize=function(a){var b,c=/\\+/g,d=/([^&=]+)=([^&]*)/g,e=function(a){return decodeURIComponent(a.replace(c,\" \"))},f={};for(b=d.exec(a);b;)f[e(b[1])]=e(b[2]),b=d.exec(a);return f},AuthenticationContext.prototype._decimalToHex=function(a){for(var b=a.toString(16);b.length<2;)b=\"0\"+b;return b},AuthenticationContext.prototype._guid=function(){var a=window.crypto||window.msCrypto;if(a&&a.getRandomValues){var b=new Uint8Array(16);return a.getRandomValues(b),b[6]|=64,b[6]&=79,b[8]|=128,b[8]&=191,this._decimalToHex(b[0])+this._decimalToHex(b[1])+this._decimalToHex(b[2])+this._decimalToHex(b[3])+\"-\"+this._decimalToHex(b[4])+this._decimalToHex(b[5])+\"-\"+this._decimalToHex(b[6])+this._decimalToHex(b[7])+\"-\"+this._decimalToHex(b[8])+this._decimalToHex(b[9])+\"-\"+this._decimalToHex(b[10])+this._decimalToHex(b[11])+this._decimalToHex(b[12])+this._decimalToHex(b[13])+this._decimalToHex(b[14])+this._decimalToHex(b[15])}for(var c=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\",d=\"0123456789abcdef\",e=0,f=\"\",g=0;g<36;g++)\"-\"!==c[g]&&\"4\"!==c[g]&&(e=16*Math.random()|0),\"x\"===c[g]?f+=d[e]:\"y\"===c[g]?(e&=3,e|=8,f+=d[e]):f+=c[g];return f},AuthenticationContext.prototype._expiresIn=function(a){return a||(a=3599),this._now()+parseInt(a,10)},AuthenticationContext.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},AuthenticationContext.prototype._addAdalFrame=function(a){if(void 0!==a){this.info(\"Add adal frame to document:\"+a);var b=document.getElementById(a);if(!b){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf(\"MSIE 5.0\"))){var c=document.createElement(\"iframe\");c.setAttribute(\"id\",a),c.setAttribute(\"aria-hidden\",\"true\"),c.style.visibility=\"hidden\",c.style.position=\"absolute\",c.style.width=c.style.height=c.borderWidth=\"0px\",b=document.getElementsByTagName(\"body\")[0].appendChild(c)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML(\"beforeEnd\",'');window.frames&&window.frames[a]&&(b=window.frames[a])}return b}},AuthenticationContext.prototype._saveItem=function(a,b,c){if(this.config&&this.config.cacheLocation&&\"localStorage\"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info(\"Local storage is not supported\"),!1;if(c){var d=this._getItem(a)||\"\";localStorage.setItem(a,d+b+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(a,b);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(a,b),!0):(this.info(\"Session storage is not supported\"),!1)},AuthenticationContext.prototype._getItem=function(a){return this.config&&this.config.cacheLocation&&\"localStorage\"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(a):(this.info(\"Local storage is not supported\"),null):this._supportsSessionStorage()?sessionStorage.getItem(a):(this.info(\"Session storage is not supported\"),null)},AuthenticationContext.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem(\"storageTest\",\"A\"),\"A\"==window.localStorage.getItem(\"storageTest\")&&(window.localStorage.removeItem(\"storageTest\"),!window.localStorage.getItem(\"storageTest\")))}catch(a){return!1}},AuthenticationContext.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem(\"storageTest\",\"A\"),\"A\"==window.sessionStorage.getItem(\"storageTest\")&&(window.sessionStorage.removeItem(\"storageTest\"),!window.sessionStorage.getItem(\"storageTest\")))}catch(a){return!1}},AuthenticationContext.prototype._cloneConfig=function(a){if(null===a||\"object\"!=typeof a)return a;var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},AuthenticationContext.prototype._addLibMetadata=function(){return\"&x-client-SKU=Js&x-client-Ver=\"+this._libVersion()},AuthenticationContext.prototype.log=function(a,b,c,d){if(a<=Logging.level){if(!Logging.piiLoggingEnabled&&d)return;var e=(new Date).toUTCString(),f=\"\";f=this.config.correlationId?e+\":\"+this.config.correlationId+\"-\"+this._libVersion()+\"-\"+this.CONSTANTS.LEVEL_STRING_MAP[a]+\" \"+b:e+\":\"+this._libVersion()+\"-\"+this.CONSTANTS.LEVEL_STRING_MAP[a]+\" \"+b,c&&(f+=\"\\nstack:\\n\"+c.stack),Logging.log(f)}},AuthenticationContext.prototype.error=function(a,b){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,a,b)},AuthenticationContext.prototype.warn=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,a,null)},AuthenticationContext.prototype.info=function(a){\r\nthis.log(this.CONSTANTS.LOGGING_LEVEL.INFO,a,null)},AuthenticationContext.prototype.verbose=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,a,null)},AuthenticationContext.prototype.errorPii=function(a,b){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,a,b,!0)},AuthenticationContext.prototype.warnPii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,a,null,!0)},AuthenticationContext.prototype.infoPii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,a,null,!0)},AuthenticationContext.prototype.verbosePii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,a,null,!0)},AuthenticationContext.prototype._libVersion=function(){return\"1.0.17\"},\"undefined\"!=typeof module&&module.exports&&(module.exports=AuthenticationContext,module.exports.inject=function(a){return new AuthenticationContext(a)}),AuthenticationContext}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/adal-angular/dist/adal.min.js\n// module id = 14\n// module chunks = 0","/**\n@license\n * @pnp/sp v1.2.0 - pnp - provides a fluent api for working with SharePoint REST\n * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)\n * Copyright (c) 2018 Microsoft\n * docs: https://pnp.github.io/pnpjs/\n * source: https:github.com/pnp/pnpjs\n * bugs: https://github.com/pnp/pnpjs/issues\n */\nimport { stringIsNullOrEmpty, extend, combine, hOP, RuntimeConfig, FetchClient, mergeHeaders, getCtxCallback, isUrlAbsolute, mergeOptions, getGUID, jsS, getAttrValueFromString, dateAdd, getHashCode, objectDefinedNotNull } from '@pnp/common';\nimport { __extends, __decorate } from 'tslib';\nimport { Logger } from '@pnp/logging';\nimport { ODataParserBase, ODataDefaultParser, ODataQueryable, TextParser, BlobParser, JSONParser, BufferParser, ODataBatch, CachingOptions } from '@pnp/odata';\n\nfunction extractWebUrl(candidateUrl) {\r\n if (stringIsNullOrEmpty(candidateUrl)) {\r\n return \"\";\r\n }\r\n var index = candidateUrl.indexOf(\"_api/\");\r\n if (index < 0) {\r\n index = candidateUrl.indexOf(\"_vti_bin/\");\r\n }\r\n if (index > -1) {\r\n return candidateUrl.substr(0, index);\r\n }\r\n // if all else fails just give them what they gave us back\r\n return candidateUrl;\r\n}\n\nfunction odataUrlFrom(candidate) {\r\n var parts = [];\r\n var s = [\"odata.type\", \"odata.editLink\", \"__metadata\", \"odata.metadata\"];\r\n if (hOP(candidate, s[0]) && candidate[s[0]] === \"SP.Web\") {\r\n // webs return an absolute url in the editLink\r\n if (hOP(candidate, s[1])) {\r\n parts.push(candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[2])) {\r\n // we are dealing with verbose, which has an absolute uri\r\n parts.push(candidate.__metadata.uri);\r\n }\r\n }\r\n else {\r\n if (hOP(candidate, s[3]) && hOP(candidate, s[1])) {\r\n // we are dealign with minimal metadata (default)\r\n parts.push(extractWebUrl(candidate[s[3]]), \"_api\", candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[1])) {\r\n parts.push(\"_api\", candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[2])) {\r\n // we are dealing with verbose, which has an absolute uri\r\n parts.push(candidate.__metadata.uri);\r\n }\r\n }\r\n if (parts.length < 1) {\r\n Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", 2 /* Warning */);\r\n return \"\";\r\n }\r\n return combine.apply(void 0, parts);\r\n}\r\nvar SPODataEntityParserImpl = /** @class */ (function (_super) {\r\n __extends(SPODataEntityParserImpl, _super);\r\n function SPODataEntityParserImpl(factory) {\r\n var _this = _super.call(this) || this;\r\n _this.factory = factory;\r\n _this.hydrate = function (d) {\r\n var o = new _this.factory(odataUrlFrom(d), null);\r\n return extend(o, d);\r\n };\r\n return _this;\r\n }\r\n SPODataEntityParserImpl.prototype.parse = function (r) {\r\n var _this = this;\r\n return _super.prototype.parse.call(this, r).then(function (d) {\r\n var o = new _this.factory(odataUrlFrom(d), null);\r\n return extend(o, d);\r\n });\r\n };\r\n return SPODataEntityParserImpl;\r\n}(ODataParserBase));\r\nvar SPODataEntityArrayParserImpl = /** @class */ (function (_super) {\r\n __extends(SPODataEntityArrayParserImpl, _super);\r\n function SPODataEntityArrayParserImpl(factory) {\r\n var _this = _super.call(this) || this;\r\n _this.factory = factory;\r\n _this.hydrate = function (d) {\r\n return d.map(function (v) {\r\n var o = new _this.factory(odataUrlFrom(v), null);\r\n return extend(o, v);\r\n });\r\n };\r\n return _this;\r\n }\r\n SPODataEntityArrayParserImpl.prototype.parse = function (r) {\r\n var _this = this;\r\n return _super.prototype.parse.call(this, r).then(function (d) {\r\n return d.map(function (v) {\r\n var o = new _this.factory(odataUrlFrom(v), null);\r\n return extend(o, v);\r\n });\r\n });\r\n };\r\n return SPODataEntityArrayParserImpl;\r\n}(ODataParserBase));\r\nfunction spODataEntity(factory) {\r\n return new SPODataEntityParserImpl(factory);\r\n}\r\nfunction spODataEntityArray(factory) {\r\n return new SPODataEntityArrayParserImpl(factory);\r\n}\n\nfunction setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\nvar SPRuntimeConfigImpl = /** @class */ (function () {\r\n function SPRuntimeConfigImpl() {\r\n }\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"headers\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n if (spPart !== undefined && spPart.headers !== undefined) {\r\n return spPart.headers;\r\n }\r\n return {};\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"baseUrl\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n if (spPart !== undefined && spPart.baseUrl !== undefined) {\r\n return spPart.baseUrl;\r\n }\r\n if (RuntimeConfig.spfxContext !== undefined && RuntimeConfig.spfxContext !== null) {\r\n return RuntimeConfig.spfxContext.pageContext.web.absoluteUrl;\r\n }\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"fetchClientFactory\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n // use a configured factory firt\r\n if (spPart !== undefined && spPart.fetchClientFactory !== undefined) {\r\n return spPart.fetchClientFactory;\r\n }\r\n else {\r\n return function () { return new FetchClient(); };\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SPRuntimeConfigImpl;\r\n}());\r\nvar SPRuntimeConfig = new SPRuntimeConfigImpl();\n\nvar CachedDigest = /** @class */ (function () {\r\n function CachedDigest() {\r\n }\r\n return CachedDigest;\r\n}());\r\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\r\nvar digests = new Map();\r\nvar DigestCache = /** @class */ (function () {\r\n function DigestCache(_httpClient, _digests) {\r\n if (_digests === void 0) { _digests = digests; }\r\n this._httpClient = _httpClient;\r\n this._digests = _digests;\r\n }\r\n DigestCache.prototype.getDigest = function (webUrl) {\r\n var _this = this;\r\n var cachedDigest = this._digests.get(webUrl);\r\n if (cachedDigest !== undefined) {\r\n var now = new Date();\r\n if (now < cachedDigest.expiration) {\r\n return Promise.resolve(cachedDigest.value);\r\n }\r\n }\r\n var url = combine(webUrl, \"/_api/contextinfo\");\r\n var headers = {\r\n \"Accept\": \"application/json;odata=verbose\",\r\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\r\n };\r\n return this._httpClient.fetchRaw(url, {\r\n cache: \"no-cache\",\r\n credentials: \"same-origin\",\r\n headers: extend(headers, SPRuntimeConfig.headers, true),\r\n method: \"POST\",\r\n }).then(function (response) {\r\n var parser = new ODataDefaultParser();\r\n return parser.parse(response).then(function (d) { return d.GetContextWebInformation; });\r\n }).then(function (data) {\r\n var newCachedDigest = new CachedDigest();\r\n newCachedDigest.value = data.FormDigestValue;\r\n var seconds = data.FormDigestTimeoutSeconds;\r\n var expiration = new Date();\r\n expiration.setTime(expiration.getTime() + 1000 * seconds);\r\n newCachedDigest.expiration = expiration;\r\n _this._digests.set(webUrl, newCachedDigest);\r\n return newCachedDigest.value;\r\n });\r\n };\r\n DigestCache.prototype.clear = function () {\r\n this._digests.clear();\r\n };\r\n return DigestCache;\r\n}());\n\nvar SPHttpClient = /** @class */ (function () {\r\n function SPHttpClient(_impl) {\r\n if (_impl === void 0) { _impl = SPRuntimeConfig.fetchClientFactory(); }\r\n this._impl = _impl;\r\n this._digestCache = new DigestCache(this);\r\n }\r\n SPHttpClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\r\n var headers = new Headers();\r\n // first we add the global headers so they can be overwritten by any passed in locally to this call\r\n mergeHeaders(headers, SPRuntimeConfig.headers);\r\n // second we add the local options so we can overwrite the globals\r\n mergeHeaders(headers, options.headers);\r\n // lastly we apply any default headers we need that may not exist\r\n if (!headers.has(\"Accept\")) {\r\n headers.append(\"Accept\", \"application/json\");\r\n }\r\n if (!headers.has(\"Content-Type\")) {\r\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n if (!headers.has(\"X-ClientService-ClientTag\")) {\r\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-1.2.0\");\r\n }\r\n if (!headers.has(\"User-Agent\")) {\r\n // this marks the requests for understanding by the service\r\n headers.append(\"User-Agent\", \"NONISV|SharePointPnP|PnPCoreJS/1.2.0\");\r\n }\r\n opts = extend(opts, { headers: headers });\r\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\r\n // if we have either a request digest or an authorization header we don't need a digest\r\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\r\n return this._digestCache.getDigest(extractWebUrl(url))\r\n .then(function (digest) {\r\n headers.append(\"X-RequestDigest\", digest);\r\n return _this.fetchRaw(url, opts);\r\n });\r\n }\r\n }\r\n return this.fetchRaw(url, opts);\r\n };\r\n SPHttpClient.prototype.fetchRaw = function (url, options) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n // here we need to normalize the headers\r\n var rawHeaders = new Headers();\r\n mergeHeaders(rawHeaders, options.headers);\r\n options = extend(options, { headers: rawHeaders });\r\n var retry = function (ctx) {\r\n _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\r\n // Check if request was throttled - http status code 429\r\n // Check if request failed due to server unavailable - http status code 503\r\n if (response.status !== 429 && response.status !== 503) {\r\n ctx.reject(response);\r\n }\r\n // grab our current delay\r\n var delay = ctx.delay;\r\n // Increment our counters.\r\n ctx.delay *= 2;\r\n ctx.attempts++;\r\n // If we have exceeded the retry count, reject.\r\n if (ctx.retryCount <= ctx.attempts) {\r\n ctx.reject(response);\r\n }\r\n // Set our retry timeout for {delay} milliseconds.\r\n setTimeout(getCtxCallback(_this, retry, ctx), delay);\r\n });\r\n };\r\n return new Promise(function (resolve, reject) {\r\n var retryContext = {\r\n attempts: 0,\r\n delay: 100,\r\n reject: reject,\r\n resolve: resolve,\r\n retryCount: 7,\r\n };\r\n retry.call(_this, retryContext);\r\n });\r\n };\r\n SPHttpClient.prototype.get = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"GET\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.post = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"POST\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.patch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"PATCH\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.delete = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"DELETE\" });\r\n return this.fetch(url, opts);\r\n };\r\n return SPHttpClient;\r\n}());\n\nvar global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\n/**\r\n * Ensures that a given url is absolute for the current web based on context\r\n *\r\n * @param candidateUrl The url to make absolute\r\n *\r\n */\r\nfunction toAbsoluteUrl(candidateUrl) {\r\n return new Promise(function (resolve) {\r\n if (isUrlAbsolute(candidateUrl)) {\r\n // if we are already absolute, then just return the url\r\n return resolve(candidateUrl);\r\n }\r\n if (SPRuntimeConfig.baseUrl !== null) {\r\n // base url specified either with baseUrl of spfxContext config property\r\n return resolve(combine(SPRuntimeConfig.baseUrl, candidateUrl));\r\n }\r\n if (global$1._spPageContextInfo !== undefined) {\r\n // operating in classic pages\r\n if (hOP(global$1._spPageContextInfo, \"webAbsoluteUrl\")) {\r\n return resolve(combine(global$1._spPageContextInfo.webAbsoluteUrl, candidateUrl));\r\n }\r\n else if (hOP(global$1._spPageContextInfo, \"webServerRelativeUrl\")) {\r\n return resolve(combine(global$1._spPageContextInfo.webServerRelativeUrl, candidateUrl));\r\n }\r\n }\r\n // does window.location exist and have a certain path part in it?\r\n if (global$1.location !== undefined) {\r\n var baseUrl_1 = global$1.location.toString().toLowerCase();\r\n [\"/_layouts/\", \"/siteassets/\"].forEach(function (s) {\r\n var index = baseUrl_1.indexOf(s);\r\n if (index > 0) {\r\n return resolve(combine(baseUrl_1.substr(0, index), candidateUrl));\r\n }\r\n });\r\n }\r\n return resolve(candidateUrl);\r\n });\r\n}\n\nfunction metadata(type) {\r\n return {\r\n \"__metadata\": { \"type\": type },\r\n };\r\n}\n\n/**\r\n * SharePointQueryable Base Class\r\n *\r\n */\r\nvar SharePointQueryable = /** @class */ (function (_super) {\r\n __extends(SharePointQueryable, _super);\r\n /**\r\n * Creates a new instance of the SharePointQueryable class\r\n *\r\n * @constructor\r\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\r\n *\r\n */\r\n function SharePointQueryable(baseUrl, path) {\r\n var _this = _super.call(this) || this;\r\n _this._forceCaching = false;\r\n if (typeof baseUrl === \"string\") {\r\n // we need to do some extra parsing to get the parent url correct if we are\r\n // being created from just a string.\r\n if (isUrlAbsolute(baseUrl) || baseUrl.lastIndexOf(\"/\") < 0) {\r\n _this._parentUrl = baseUrl;\r\n _this._url = combine(baseUrl, path);\r\n }\r\n else if (baseUrl.lastIndexOf(\"/\") > baseUrl.lastIndexOf(\"(\")) {\r\n // .../items(19)/fields\r\n var index = baseUrl.lastIndexOf(\"/\");\r\n _this._parentUrl = baseUrl.slice(0, index);\r\n path = combine(baseUrl.slice(index), path);\r\n _this._url = combine(_this._parentUrl, path);\r\n }\r\n else {\r\n // .../items(19)\r\n var index = baseUrl.lastIndexOf(\"(\");\r\n _this._parentUrl = baseUrl.slice(0, index);\r\n _this._url = combine(baseUrl, path);\r\n }\r\n }\r\n else {\r\n _this.extend(baseUrl, path);\r\n var target = baseUrl.query.get(\"@target\");\r\n if (target !== undefined) {\r\n _this.query.set(\"@target\", target);\r\n }\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Creates a new instance of the supplied factory and extends this into that new instance\r\n *\r\n * @param factory constructor for the new SharePointQueryable\r\n */\r\n SharePointQueryable.prototype.as = function (factory) {\r\n var o = new factory(this._url, null);\r\n return extend(o, this, true);\r\n };\r\n /**\r\n * Gets the full url with query information\r\n *\r\n */\r\n SharePointQueryable.prototype.toUrlAndQuery = function () {\r\n var aliasedParams = new Map(this.query);\r\n var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) {\r\n Logger.write(\"Rewriting aliased parameter from match \" + match + \" to label: \" + labelName + \" value: \" + value, 0 /* Verbose */);\r\n aliasedParams.set(labelName, \"'\" + value + \"'\");\r\n return labelName;\r\n });\r\n if (aliasedParams.size > 0) {\r\n var char = url.indexOf(\"?\") > -1 ? \"&\" : \"?\";\r\n url += \"\" + char + Array.from(aliasedParams).map(function (v) { return v[0] + \"=\" + v[1]; }).join(\"&\");\r\n }\r\n return url;\r\n };\r\n /**\r\n * Choose which fields to return\r\n *\r\n * @param selects One or more fields to return\r\n */\r\n SharePointQueryable.prototype.select = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n if (selects.length > 0) {\r\n this.query.set(\"$select\", selects.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Expands fields such as lookups to get additional data\r\n *\r\n * @param expands The Fields for which to expand the values\r\n */\r\n SharePointQueryable.prototype.expand = function () {\r\n var expands = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n expands[_i] = arguments[_i];\r\n }\r\n if (expands.length > 0) {\r\n this.query.set(\"$expand\", expands.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Gets a parent for this instance as specified\r\n *\r\n * @param factory The contructor for the class to create\r\n */\r\n SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) {\r\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\r\n var parent = new factory(baseUrl, path).configureFrom(this);\r\n var t = \"@target\";\r\n if (this.query.has(t)) {\r\n parent.query.set(t, this.query.get(t));\r\n }\r\n if (batch !== undefined) {\r\n parent = parent.inBatch(batch);\r\n }\r\n return parent;\r\n };\r\n /**\r\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\r\n * @param factory Constructor used to create the new instance\r\n * @param additionalPath Any additional path to include in the clone\r\n * @param includeBatch If true this instance's batch will be added to the cloned instance\r\n */\r\n SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\r\n if (includeBatch === void 0) { includeBatch = true; }\r\n var clone = new factory(this, additionalPath).configureFrom(this);\r\n var t = \"@target\";\r\n if (this.query.has(t)) {\r\n clone.query.set(t, this.query.get(t));\r\n }\r\n if (includeBatch && this.hasBatch) {\r\n clone = clone.inBatch(this.batch);\r\n }\r\n return clone;\r\n };\r\n /**\r\n * Converts the current instance to a request context\r\n *\r\n * @param verb The request verb\r\n * @param options The set of supplied request options\r\n * @param parser The supplied ODataParser instance\r\n * @param pipeline Optional request processing pipeline\r\n */\r\n SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { return; };\r\n return toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\r\n mergeOptions(options, _this._options);\r\n // build our request context\r\n var context = {\r\n batch: _this.batch,\r\n batchDependency: dependencyDispose,\r\n cachingOptions: _this._cachingOptions,\r\n clientFactory: function () { return new SPHttpClient(); },\r\n isBatched: _this.hasBatch,\r\n isCached: _this._forceCaching || (_this._useCaching && /^get$/i.test(verb)),\r\n options: options,\r\n parser: parser,\r\n pipeline: pipeline,\r\n requestAbsoluteUrl: url,\r\n requestId: getGUID(),\r\n verb: verb,\r\n };\r\n return context;\r\n });\r\n };\r\n return SharePointQueryable;\r\n}(ODataQueryable));\r\n/**\r\n * Represents a REST collection which can be filtered, paged, and selected\r\n *\r\n */\r\nvar SharePointQueryableCollection = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableCollection, _super);\r\n function SharePointQueryableCollection() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\r\n *\r\n * @param filter The string representing the filter query\r\n */\r\n SharePointQueryableCollection.prototype.filter = function (filter) {\r\n this.query.set(\"$filter\", filter);\r\n return this;\r\n };\r\n /**\r\n * Orders based on the supplied fields\r\n *\r\n * @param orderby The name of the field on which to sort\r\n * @param ascending If false DESC is appended, otherwise ASC (default)\r\n */\r\n SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\r\n if (ascending === void 0) { ascending = true; }\r\n var o = \"$orderby\";\r\n var query = this.query.has(o) ? this.query.get(o).split(\",\") : [];\r\n query.push(orderBy + \" \" + (ascending ? \"asc\" : \"desc\"));\r\n this.query.set(o, query.join(\",\"));\r\n return this;\r\n };\r\n /**\r\n * Skips the specified number of items\r\n *\r\n * @param skip The number of items to skip\r\n */\r\n SharePointQueryableCollection.prototype.skip = function (skip) {\r\n this.query.set(\"$skip\", skip.toString());\r\n return this;\r\n };\r\n /**\r\n * Limits the query to only return the specified number of items\r\n *\r\n * @param top The query row limit\r\n */\r\n SharePointQueryableCollection.prototype.top = function (top) {\r\n this.query.set(\"$top\", top.toString());\r\n return this;\r\n };\r\n /**\r\n * Curries the getById function\r\n *\r\n * @param factory Class to create for the id\r\n */\r\n SharePointQueryableCollection.prototype._getById = function (factory) {\r\n var _this = this;\r\n return function (id) {\r\n if (typeof id === \"number\") {\r\n return (new factory(_this)).concat(\"(\" + id + \")\");\r\n }\r\n else {\r\n return (new factory(_this)).concat(\"('\" + id + \"')\");\r\n }\r\n };\r\n };\r\n return SharePointQueryableCollection;\r\n}(SharePointQueryable));\r\n/**\r\n * Represents an instance that can be selected\r\n *\r\n */\r\nvar SharePointQueryableInstance = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableInstance, _super);\r\n function SharePointQueryableInstance() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Curries the update function into the common pieces\r\n *\r\n * @param type\r\n * @param mapper\r\n */\r\n SharePointQueryableInstance.prototype._update = function (type, mapper) {\r\n var _this = this;\r\n return function (props) { return _this.postCore({\r\n body: jsS(extend(metadata(type), props)),\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (d) { return mapper(d, props); }); };\r\n };\r\n /**\r\n * Deletes this instance\r\n *\r\n */\r\n SharePointQueryableInstance.prototype._delete = function () {\r\n return this.postCore({\r\n headers: {\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Deletes this instance with an etag value in the headers\r\n *\r\n * @param eTag eTag to delete\r\n */\r\n SharePointQueryableInstance.prototype._deleteWithETag = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n return SharePointQueryableInstance;\r\n}(SharePointQueryable));\r\n/**\r\n * Decorator used to specify the default path for SharePointQueryable objects\r\n *\r\n * @param path\r\n */\r\nfunction defaultPath(path) {\r\n return function (target) {\r\n return /** @class */ (function (_super) {\r\n __extends(class_1, _super);\r\n function class_1() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return _super.call(this, args[0], args.length > 1 && args[1] !== undefined ? args[1] : path) || this;\r\n }\r\n return class_1;\r\n }(target));\r\n };\r\n}\n\n/**\r\n * Describes a collection of all site collection users\r\n *\r\n */\r\nvar SiteUsers = /** @class */ (function (_super) {\r\n __extends(SiteUsers, _super);\r\n function SiteUsers() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a user from the collection by id\r\n *\r\n * @param id The id of the user to retrieve\r\n */\r\n _this.getById = _this._getById(SiteUser);\r\n return _this;\r\n }\r\n SiteUsers_1 = SiteUsers;\r\n /**\r\n * Gets a user from the collection by email\r\n *\r\n * @param email The email address of the user to retrieve\r\n */\r\n SiteUsers.prototype.getByEmail = function (email) {\r\n return new SiteUser(this, \"getByEmail('\" + email + \"')\");\r\n };\r\n /**\r\n * Gets a user from the collection by login name\r\n *\r\n * @param loginName The login name of the user to retrieve\r\n */\r\n SiteUsers.prototype.getByLoginName = function (loginName) {\r\n var su = new SiteUser(this);\r\n su.concat(\"(@v)\");\r\n su.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return su;\r\n };\r\n /**\r\n * Removes a user from the collection by id\r\n *\r\n * @param id The id of the user to remove\r\n */\r\n SiteUsers.prototype.removeById = function (id) {\r\n return this.clone(SiteUsers_1, \"removeById(\" + id + \")\").postCore();\r\n };\r\n /**\r\n * Removes a user from the collection by login name\r\n *\r\n * @param loginName The login name of the user to remove\r\n */\r\n SiteUsers.prototype.removeByLoginName = function (loginName) {\r\n var o = this.clone(SiteUsers_1, \"removeByLoginName(@v)\");\r\n o.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return o.postCore();\r\n };\r\n /**\r\n * Adds a user to a group\r\n *\r\n * @param loginName The login name of the user to add to the group\r\n *\r\n */\r\n SiteUsers.prototype.add = function (loginName) {\r\n var _this = this;\r\n return this.clone(SiteUsers_1, null).postCore({\r\n body: jsS(extend(metadata(\"SP.User\"), { LoginName: loginName })),\r\n }).then(function () { return _this.getByLoginName(loginName); });\r\n };\r\n var SiteUsers_1;\r\n SiteUsers = SiteUsers_1 = __decorate([\r\n defaultPath(\"siteusers\")\r\n ], SiteUsers);\r\n return SiteUsers;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single user\r\n *\r\n */\r\nvar SiteUser = /** @class */ (function (_super) {\r\n __extends(SiteUser, _super);\r\n function SiteUser() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this user instance with the supplied properties\r\n *\r\n * @param properties A plain object of property names and values to update for the user\r\n */\r\n _this.update = _this._update(\"SP.User\", function (data) { return ({ data: data, user: _this }); });\r\n /**\r\n * Delete this user\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(SiteUser.prototype, \"groups\", {\r\n /**\r\n * Gets the groups for this user\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this, \"groups\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SiteUser;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Represents the current user\r\n */\r\nvar CurrentUser = /** @class */ (function (_super) {\r\n __extends(CurrentUser, _super);\r\n function CurrentUser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n CurrentUser = __decorate([\r\n defaultPath(\"currentuser\")\r\n ], CurrentUser);\r\n return CurrentUser;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Principal Type enum\r\n *\r\n */\r\nvar PrincipalType;\r\n(function (PrincipalType) {\r\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\r\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\r\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\r\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\r\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\r\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\r\n})(PrincipalType || (PrincipalType = {}));\r\n/**\r\n * Describes a collection of site groups\r\n *\r\n */\r\nvar SiteGroups = /** @class */ (function (_super) {\r\n __extends(SiteGroups, _super);\r\n function SiteGroups() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a group from the collection by id\r\n *\r\n * @param id The id of the group to retrieve\r\n */\r\n _this.getById = _this._getById(SiteGroup);\r\n return _this;\r\n }\r\n SiteGroups_1 = SiteGroups;\r\n /**\r\n * Adds a new group to the site collection\r\n *\r\n * @param props The group properties object of property names and values to be set for the group\r\n */\r\n SiteGroups.prototype.add = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend(metadata(\"SP.Group\"), properties));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n group: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Gets a group from the collection by name\r\n *\r\n * @param groupName The name of the group to retrieve\r\n */\r\n SiteGroups.prototype.getByName = function (groupName) {\r\n return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\r\n };\r\n /**\r\n * Removes the group with the specified member id from the collection\r\n *\r\n * @param id The id of the group to remove\r\n */\r\n SiteGroups.prototype.removeById = function (id) {\r\n return this.clone(SiteGroups_1, \"removeById('\" + id + \"')\").postCore();\r\n };\r\n /**\r\n * Removes the cross-site group with the specified name from the collection\r\n *\r\n * @param loginName The name of the group to remove\r\n */\r\n SiteGroups.prototype.removeByLoginName = function (loginName) {\r\n return this.clone(SiteGroups_1, \"removeByLoginName('\" + loginName + \"')\").postCore();\r\n };\r\n var SiteGroups_1;\r\n SiteGroups = SiteGroups_1 = __decorate([\r\n defaultPath(\"sitegroups\")\r\n ], SiteGroups);\r\n return SiteGroups;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single group\r\n *\r\n */\r\nvar SiteGroup = /** @class */ (function (_super) {\r\n __extends(SiteGroup, _super);\r\n function SiteGroup() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.update = _this._update(\"SP.Group\", function (d, p) {\r\n var retGroup = _this;\r\n if (hOP(p, \"Title\")) {\r\n /* tslint:disable-next-line no-string-literal */\r\n retGroup = _this.getParent(SiteGroup, _this.parentUrl, \"getByName('\" + p[\"Title\"] + \"')\");\r\n }\r\n return {\r\n data: d,\r\n group: retGroup,\r\n };\r\n });\r\n return _this;\r\n }\r\n Object.defineProperty(SiteGroup.prototype, \"users\", {\r\n /**\r\n * Gets the users for this group\r\n *\r\n */\r\n get: function () {\r\n return new SiteUsers(this, \"users\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SiteGroup;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a set of role assignments for the current scope\r\n *\r\n */\r\nvar RoleAssignments = /** @class */ (function (_super) {\r\n __extends(RoleAssignments, _super);\r\n function RoleAssignments() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets the role assignment associated with the specified principal id from the collection.\r\n *\r\n * @param id The id of the role assignment\r\n */\r\n _this.getById = _this._getById(RoleAssignment);\r\n return _this;\r\n }\r\n RoleAssignments_1 = RoleAssignments;\r\n /**\r\n * Adds a new role assignment with the specified principal and role definitions to the collection\r\n *\r\n * @param principalId The id of the user or group to assign permissions to\r\n * @param roleDefId The id of the role definition that defines the permissions to assign\r\n *\r\n */\r\n RoleAssignments.prototype.add = function (principalId, roleDefId) {\r\n return this.clone(RoleAssignments_1, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\r\n };\r\n /**\r\n * Removes the role assignment with the specified principal and role definition from the collection\r\n *\r\n * @param principalId The id of the user or group in the role assignment\r\n * @param roleDefId The id of the role definition in the role assignment\r\n *\r\n */\r\n RoleAssignments.prototype.remove = function (principalId, roleDefId) {\r\n return this.clone(RoleAssignments_1, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\r\n };\r\n var RoleAssignments_1;\r\n RoleAssignments = RoleAssignments_1 = __decorate([\r\n defaultPath(\"roleassignments\")\r\n ], RoleAssignments);\r\n return RoleAssignments;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a role assignment\r\n *\r\n */\r\nvar RoleAssignment = /** @class */ (function (_super) {\r\n __extends(RoleAssignment, _super);\r\n function RoleAssignment() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Deletes this role assignment\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(RoleAssignment.prototype, \"groups\", {\r\n /**\r\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this, \"groups\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RoleAssignment.prototype, \"bindings\", {\r\n /**\r\n * Gets the role definition bindings for this role assignment\r\n *\r\n */\r\n get: function () {\r\n return new RoleDefinitionBindings(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RoleAssignment;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Describes a collection of role definitions\r\n *\r\n */\r\nvar RoleDefinitions = /** @class */ (function (_super) {\r\n __extends(RoleDefinitions, _super);\r\n function RoleDefinitions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets the role definition with the specified id from the collection\r\n *\r\n * @param id The id of the role definition\r\n *\r\n */\r\n _this.getById = _this._getById(RoleDefinition);\r\n return _this;\r\n }\r\n /**\r\n * Gets the role definition with the specified name\r\n *\r\n * @param name The name of the role definition\r\n *\r\n */\r\n RoleDefinitions.prototype.getByName = function (name) {\r\n return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\r\n };\r\n /**\r\n * Gets the role definition with the specified role type\r\n *\r\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\r\n *\r\n */\r\n RoleDefinitions.prototype.getByType = function (roleTypeKind) {\r\n return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\r\n };\r\n /**\r\n * Creates a role definition\r\n *\r\n * @param name The new role definition's name\r\n * @param description The new role definition's description\r\n * @param order The order in which the role definition appears\r\n * @param basePermissions The permissions mask for this role definition\r\n *\r\n */\r\n RoleDefinitions.prototype.add = function (name, description, order, basePermissions) {\r\n var _this = this;\r\n var postBody = jsS({\r\n BasePermissions: extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\r\n Description: description,\r\n Name: name,\r\n Order: order,\r\n __metadata: { \"type\": \"SP.RoleDefinition\" },\r\n });\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n definition: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n RoleDefinitions = __decorate([\r\n defaultPath(\"roledefinitions\")\r\n ], RoleDefinitions);\r\n return RoleDefinitions;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a role definition\r\n *\r\n */\r\nvar RoleDefinition = /** @class */ (function (_super) {\r\n __extends(RoleDefinition, _super);\r\n function RoleDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Deletes this role definition\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n /* tslint:enable */\r\n }\r\n /**\r\n * Updates this role definition with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the role definition\r\n */\r\n /* tslint:disable no-string-literal */\r\n RoleDefinition.prototype.update = function (properties) {\r\n var _this = this;\r\n var s = [\"BasePermissions\"];\r\n if (hOP(properties, s[0]) !== undefined) {\r\n properties[s[0]] = extend({ __metadata: { type: \"SP.\" + s[0] } }, properties[s[0]]);\r\n }\r\n var postBody = jsS(extend(metadata(\"SP.RoleDefinition\"), properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n var retDef = _this;\r\n if (hOP(properties, \"Name\")) {\r\n var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, \"\");\r\n retDef = parent_1.getByName(properties[\"Name\"]);\r\n }\r\n return {\r\n data: data,\r\n definition: retDef,\r\n };\r\n });\r\n };\r\n return RoleDefinition;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Describes the role definitons bound to a role assignment object\r\n *\r\n */\r\nvar RoleDefinitionBindings = /** @class */ (function (_super) {\r\n __extends(RoleDefinitionBindings, _super);\r\n function RoleDefinitionBindings() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RoleDefinitionBindings = __decorate([\r\n defaultPath(\"roledefinitionbindings\")\r\n ], RoleDefinitionBindings);\r\n return RoleDefinitionBindings;\r\n}(SharePointQueryableCollection));\n\n/**\r\n * Determines the display mode of the given control or view\r\n */\r\nvar ControlMode;\r\n(function (ControlMode) {\r\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\r\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\r\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\r\n})(ControlMode || (ControlMode = {}));\r\n/**\r\n * Specifies the type of the field.\r\n */\r\nvar FieldTypes;\r\n(function (FieldTypes) {\r\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\r\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\r\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\r\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\r\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\r\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\r\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\r\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\r\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\r\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\r\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\r\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\r\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\r\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\r\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\r\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\r\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\r\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\r\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\r\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\r\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\r\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\r\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\r\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\r\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\r\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\r\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\r\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\r\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\r\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\r\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\r\n})(FieldTypes || (FieldTypes = {}));\r\nvar DateTimeFieldFormatType;\r\n(function (DateTimeFieldFormatType) {\r\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\r\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\r\n})(DateTimeFieldFormatType || (DateTimeFieldFormatType = {}));\r\n/**\r\n * Specifies the control settings while adding a field.\r\n */\r\nvar AddFieldOptions;\r\n(function (AddFieldOptions) {\r\n /**\r\n * Specify that a new field added to the list must also be added to the default content type in the site collection\r\n */\r\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\r\n /**\r\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\r\n /**\r\n * Specify that a new field must not be added to any other content type\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\r\n /**\r\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\r\n /**\r\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\r\n /**\r\n * Specify that a new field that is added to the specified list must also be added to the default list view\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\r\n /**\r\n * Specify to confirm that no other field has the same display name\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\r\n})(AddFieldOptions || (AddFieldOptions = {}));\r\nvar CalendarType;\r\n(function (CalendarType) {\r\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\r\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\r\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\r\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\r\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\r\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\r\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\r\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\r\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\r\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\r\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\r\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\r\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\r\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\r\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\r\n})(CalendarType || (CalendarType = {}));\r\nvar UrlFieldFormatType;\r\n(function (UrlFieldFormatType) {\r\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\r\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\r\n})(UrlFieldFormatType || (UrlFieldFormatType = {}));\r\nvar PermissionKind;\r\n(function (PermissionKind) {\r\n /**\r\n * Has no permissions on the Site. Not available through the user interface.\r\n */\r\n PermissionKind[PermissionKind[\"EmptyMask\"] = 0] = \"EmptyMask\";\r\n /**\r\n * View items in lists, documents in document libraries, and Web discussion comments.\r\n */\r\n PermissionKind[PermissionKind[\"ViewListItems\"] = 1] = \"ViewListItems\";\r\n /**\r\n * Add items to lists, documents to document libraries, and Web discussion comments.\r\n */\r\n PermissionKind[PermissionKind[\"AddListItems\"] = 2] = \"AddListItems\";\r\n /**\r\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\r\n * in documents, and customize Web Part Pages in document libraries.\r\n */\r\n PermissionKind[PermissionKind[\"EditListItems\"] = 3] = \"EditListItems\";\r\n /**\r\n * Delete items from a list, documents from a document library, and Web discussion\r\n * comments in documents.\r\n */\r\n PermissionKind[PermissionKind[\"DeleteListItems\"] = 4] = \"DeleteListItems\";\r\n /**\r\n * Approve a minor version of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"ApproveItems\"] = 5] = \"ApproveItems\";\r\n /**\r\n * View the source of documents with server-side file handlers.\r\n */\r\n PermissionKind[PermissionKind[\"OpenItems\"] = 6] = \"OpenItems\";\r\n /**\r\n * View past versions of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"ViewVersions\"] = 7] = \"ViewVersions\";\r\n /**\r\n * Delete past versions of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"DeleteVersions\"] = 8] = \"DeleteVersions\";\r\n /**\r\n * Discard or check in a document which is checked out to another user.\r\n */\r\n PermissionKind[PermissionKind[\"CancelCheckout\"] = 9] = \"CancelCheckout\";\r\n /**\r\n * Create, change, and delete personal views of lists.\r\n */\r\n PermissionKind[PermissionKind[\"ManagePersonalViews\"] = 10] = \"ManagePersonalViews\";\r\n /**\r\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\r\n */\r\n PermissionKind[PermissionKind[\"ManageLists\"] = 12] = \"ManageLists\";\r\n /**\r\n * View forms, views, and application pages, and enumerate lists.\r\n */\r\n PermissionKind[PermissionKind[\"ViewFormPages\"] = 13] = \"ViewFormPages\";\r\n /**\r\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\r\n * The list permissions in the site do not change.\r\n */\r\n PermissionKind[PermissionKind[\"AnonymousSearchAccessList\"] = 14] = \"AnonymousSearchAccessList\";\r\n /**\r\n * Allow users to open a Site, list, or folder to access items inside that container.\r\n */\r\n PermissionKind[PermissionKind[\"Open\"] = 17] = \"Open\";\r\n /**\r\n * View pages in a Site.\r\n */\r\n PermissionKind[PermissionKind[\"ViewPages\"] = 18] = \"ViewPages\";\r\n /**\r\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\r\n * a Windows SharePoint Services compatible editor.\r\n */\r\n PermissionKind[PermissionKind[\"AddAndCustomizePages\"] = 19] = \"AddAndCustomizePages\";\r\n /**\r\n * Apply a theme or borders to the entire Site.\r\n */\r\n PermissionKind[PermissionKind[\"ApplyThemeAndBorder\"] = 20] = \"ApplyThemeAndBorder\";\r\n /**\r\n * Apply a style sheet (.css file) to the Site.\r\n */\r\n PermissionKind[PermissionKind[\"ApplyStyleSheets\"] = 21] = \"ApplyStyleSheets\";\r\n /**\r\n * View reports on Site usage.\r\n */\r\n PermissionKind[PermissionKind[\"ViewUsageData\"] = 22] = \"ViewUsageData\";\r\n /**\r\n * Create a Site using Self-Service Site Creation.\r\n */\r\n PermissionKind[PermissionKind[\"CreateSSCSite\"] = 23] = \"CreateSSCSite\";\r\n /**\r\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\r\n */\r\n PermissionKind[PermissionKind[\"ManageSubwebs\"] = 24] = \"ManageSubwebs\";\r\n /**\r\n * Create a group of users that can be used anywhere within the site collection.\r\n */\r\n PermissionKind[PermissionKind[\"CreateGroups\"] = 25] = \"CreateGroups\";\r\n /**\r\n * Create and change permission levels on the Site and assign permissions to users\r\n * and groups.\r\n */\r\n PermissionKind[PermissionKind[\"ManagePermissions\"] = 26] = \"ManagePermissions\";\r\n /**\r\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\r\n * and WebDAV interfaces.\r\n */\r\n PermissionKind[PermissionKind[\"BrowseDirectories\"] = 27] = \"BrowseDirectories\";\r\n /**\r\n * View information about users of the Site.\r\n */\r\n PermissionKind[PermissionKind[\"BrowseUserInfo\"] = 28] = \"BrowseUserInfo\";\r\n /**\r\n * Add or remove personal Web Parts on a Web Part Page.\r\n */\r\n PermissionKind[PermissionKind[\"AddDelPrivateWebParts\"] = 29] = \"AddDelPrivateWebParts\";\r\n /**\r\n * Update Web Parts to display personalized information.\r\n */\r\n PermissionKind[PermissionKind[\"UpdatePersonalWebParts\"] = 30] = \"UpdatePersonalWebParts\";\r\n /**\r\n * Grant the ability to perform all administration tasks for the Site as well as\r\n * manage content, activate, deactivate, or edit properties of Site scoped Features\r\n * through the object model or through the user interface (UI). When granted on the\r\n * root Site of a Site Collection, activate, deactivate, or edit properties of\r\n * site collection scoped Features through the object model. To browse to the Site\r\n * Collection Features page and activate or deactivate Site Collection scoped Features\r\n * through the UI, you must be a Site Collection administrator.\r\n */\r\n PermissionKind[PermissionKind[\"ManageWeb\"] = 31] = \"ManageWeb\";\r\n /**\r\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\r\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\r\n */\r\n PermissionKind[PermissionKind[\"AnonymousSearchAccessWebLists\"] = 32] = \"AnonymousSearchAccessWebLists\";\r\n /**\r\n * Use features that launch client applications. Otherwise, users must work on documents\r\n * locally and upload changes.\r\n */\r\n PermissionKind[PermissionKind[\"UseClientIntegration\"] = 37] = \"UseClientIntegration\";\r\n /**\r\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\r\n */\r\n PermissionKind[PermissionKind[\"UseRemoteAPIs\"] = 38] = \"UseRemoteAPIs\";\r\n /**\r\n * Manage alerts for all users of the Site.\r\n */\r\n PermissionKind[PermissionKind[\"ManageAlerts\"] = 39] = \"ManageAlerts\";\r\n /**\r\n * Create e-mail alerts.\r\n */\r\n PermissionKind[PermissionKind[\"CreateAlerts\"] = 40] = \"CreateAlerts\";\r\n /**\r\n * Allows a user to change his or her user information, such as adding a picture.\r\n */\r\n PermissionKind[PermissionKind[\"EditMyUserInfo\"] = 41] = \"EditMyUserInfo\";\r\n /**\r\n * Enumerate permissions on Site, list, folder, document, or list item.\r\n */\r\n PermissionKind[PermissionKind[\"EnumeratePermissions\"] = 63] = \"EnumeratePermissions\";\r\n /**\r\n * Has all permissions on the Site. Not available through the user interface.\r\n */\r\n PermissionKind[PermissionKind[\"FullMask\"] = 65] = \"FullMask\";\r\n})(PermissionKind || (PermissionKind = {}));\r\n/**\r\n * Specifies the type of a principal.\r\n */\r\n/* tslint:disable:no-bitwise */\r\nvar PrincipalType$1;\r\n(function (PrincipalType) {\r\n /**\r\n * Enumeration whose value specifies no principal type.\r\n */\r\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\r\n /**\r\n * Enumeration whose value specifies a user as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\r\n /**\r\n * Enumeration whose value specifies a distribution list as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\r\n /**\r\n * Enumeration whose value specifies a security group as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\r\n /**\r\n * Enumeration whose value specifies a group as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\r\n /**\r\n * Enumeration whose value specifies all principal types.\r\n */\r\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\r\n})(PrincipalType$1 || (PrincipalType$1 = {}));\r\n/* tslint:enable:no-bitwise */\r\n/**\r\n * Specifies the source of a principal.\r\n */\r\n/* tslint:disable:no-bitwise */\r\nvar PrincipalSource;\r\n(function (PrincipalSource) {\r\n /**\r\n * Enumeration whose value specifies no principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"None\"] = 0] = \"None\";\r\n /**\r\n * Enumeration whose value specifies user information list as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"UserInfoList\"] = 1] = \"UserInfoList\";\r\n /**\r\n * Enumeration whose value specifies Active Directory as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"Windows\"] = 2] = \"Windows\";\r\n /**\r\n * Enumeration whose value specifies the current membership provider as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"MembershipProvider\"] = 4] = \"MembershipProvider\";\r\n /**\r\n * Enumeration whose value specifies the current role provider as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"RoleProvider\"] = 8] = \"RoleProvider\";\r\n /**\r\n * Enumeration whose value specifies all principal sources.\r\n */\r\n PrincipalSource[PrincipalSource[\"All\"] = 15] = \"All\";\r\n})(PrincipalSource || (PrincipalSource = {}));\r\n/* tslint:enable:no-bitwise */\r\nvar RoleType;\r\n(function (RoleType) {\r\n RoleType[RoleType[\"None\"] = 0] = \"None\";\r\n RoleType[RoleType[\"Guest\"] = 1] = \"Guest\";\r\n RoleType[RoleType[\"Reader\"] = 2] = \"Reader\";\r\n RoleType[RoleType[\"Contributor\"] = 3] = \"Contributor\";\r\n RoleType[RoleType[\"WebDesigner\"] = 4] = \"WebDesigner\";\r\n RoleType[RoleType[\"Administrator\"] = 5] = \"Administrator\";\r\n})(RoleType || (RoleType = {}));\r\nvar PageType;\r\n(function (PageType) {\r\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\r\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\r\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\r\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\r\n PageType[PageType[\"View\"] = 3] = \"View\";\r\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\r\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\r\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\r\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\r\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\r\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\r\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\r\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\r\n})(PageType || (PageType = {}));\r\nvar SharingLinkKind;\r\n(function (SharingLinkKind) {\r\n /**\r\n * Uninitialized link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Uninitialized\"] = 0] = \"Uninitialized\";\r\n /**\r\n * Direct link to the object being shared\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Direct\"] = 1] = \"Direct\";\r\n /**\r\n * Organization-shareable link to the object being shared with view permissions\r\n */\r\n SharingLinkKind[SharingLinkKind[\"OrganizationView\"] = 2] = \"OrganizationView\";\r\n /**\r\n * Organization-shareable link to the object being shared with edit permissions\r\n */\r\n SharingLinkKind[SharingLinkKind[\"OrganizationEdit\"] = 3] = \"OrganizationEdit\";\r\n /**\r\n * View only anonymous link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"AnonymousView\"] = 4] = \"AnonymousView\";\r\n /**\r\n * Read/Write anonymous link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"AnonymousEdit\"] = 5] = \"AnonymousEdit\";\r\n /**\r\n * Flexible sharing Link where properties can change without affecting link URL\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Flexible\"] = 6] = \"Flexible\";\r\n})(SharingLinkKind || (SharingLinkKind = {}));\r\n/**\r\n * Indicates the role of the sharing link\r\n */\r\nvar SharingRole;\r\n(function (SharingRole) {\r\n SharingRole[SharingRole[\"None\"] = 0] = \"None\";\r\n SharingRole[SharingRole[\"View\"] = 1] = \"View\";\r\n SharingRole[SharingRole[\"Edit\"] = 2] = \"Edit\";\r\n SharingRole[SharingRole[\"Owner\"] = 3] = \"Owner\";\r\n})(SharingRole || (SharingRole = {}));\r\nvar SharingOperationStatusCode;\r\n(function (SharingOperationStatusCode) {\r\n /**\r\n * The share operation completed without errors.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CompletedSuccessfully\"] = 0] = \"CompletedSuccessfully\";\r\n /**\r\n * The share operation completed and generated requests for access.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessRequestsQueued\"] = 1] = \"AccessRequestsQueued\";\r\n /**\r\n * The share operation failed as there were no resolved users.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"NoResolvedUsers\"] = -1] = \"NoResolvedUsers\";\r\n /**\r\n * The share operation failed due to insufficient permissions.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessDenied\"] = -2] = \"AccessDenied\";\r\n /**\r\n * The share operation failed when attempting a cross site share, which is not supported.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CrossSiteRequestNotSupported\"] = -3] = \"CrossSiteRequestNotSupported\";\r\n /**\r\n * The sharing operation failed due to an unknown error.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"UnknowError\"] = -4] = \"UnknowError\";\r\n /**\r\n * The text you typed is too long. Please shorten it.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"EmailBodyTooLong\"] = -5] = \"EmailBodyTooLong\";\r\n /**\r\n * The maximum number of unique scopes in the list has been exceeded.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"ListUniqueScopesExceeded\"] = -6] = \"ListUniqueScopesExceeded\";\r\n /**\r\n * The share operation failed because a sharing capability is disabled in the site.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CapabilityDisabled\"] = -7] = \"CapabilityDisabled\";\r\n /**\r\n * The specified object for the share operation is not supported.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"ObjectNotSupported\"] = -8] = \"ObjectNotSupported\";\r\n /**\r\n * A SharePoint group cannot contain another SharePoint group.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"NestedGroupsNotSupported\"] = -9] = \"NestedGroupsNotSupported\";\r\n})(SharingOperationStatusCode || (SharingOperationStatusCode = {}));\r\nvar SPSharedObjectType;\r\n(function (SPSharedObjectType) {\r\n SPSharedObjectType[SPSharedObjectType[\"Unknown\"] = 0] = \"Unknown\";\r\n SPSharedObjectType[SPSharedObjectType[\"File\"] = 1] = \"File\";\r\n SPSharedObjectType[SPSharedObjectType[\"Folder\"] = 2] = \"Folder\";\r\n SPSharedObjectType[SPSharedObjectType[\"Item\"] = 3] = \"Item\";\r\n SPSharedObjectType[SPSharedObjectType[\"List\"] = 4] = \"List\";\r\n SPSharedObjectType[SPSharedObjectType[\"Web\"] = 5] = \"Web\";\r\n SPSharedObjectType[SPSharedObjectType[\"Max\"] = 6] = \"Max\";\r\n})(SPSharedObjectType || (SPSharedObjectType = {}));\r\nvar SharingDomainRestrictionMode;\r\n(function (SharingDomainRestrictionMode) {\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"None\"] = 0] = \"None\";\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"AllowList\"] = 1] = \"AllowList\";\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"BlockList\"] = 2] = \"BlockList\";\r\n})(SharingDomainRestrictionMode || (SharingDomainRestrictionMode = {}));\r\nvar RenderListDataOptions;\r\n(function (RenderListDataOptions) {\r\n RenderListDataOptions[RenderListDataOptions[\"None\"] = 0] = \"None\";\r\n RenderListDataOptions[RenderListDataOptions[\"ContextInfo\"] = 1] = \"ContextInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListData\"] = 2] = \"ListData\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListSchema\"] = 4] = \"ListSchema\";\r\n RenderListDataOptions[RenderListDataOptions[\"MenuView\"] = 8] = \"MenuView\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListContentType\"] = 16] = \"ListContentType\";\r\n RenderListDataOptions[RenderListDataOptions[\"FileSystemItemId\"] = 32] = \"FileSystemItemId\";\r\n RenderListDataOptions[RenderListDataOptions[\"ClientFormSchema\"] = 64] = \"ClientFormSchema\";\r\n RenderListDataOptions[RenderListDataOptions[\"QuickLaunch\"] = 128] = \"QuickLaunch\";\r\n RenderListDataOptions[RenderListDataOptions[\"Spotlight\"] = 256] = \"Spotlight\";\r\n RenderListDataOptions[RenderListDataOptions[\"Visualization\"] = 512] = \"Visualization\";\r\n RenderListDataOptions[RenderListDataOptions[\"ViewMetadata\"] = 1024] = \"ViewMetadata\";\r\n RenderListDataOptions[RenderListDataOptions[\"DisableAutoHyperlink\"] = 2048] = \"DisableAutoHyperlink\";\r\n RenderListDataOptions[RenderListDataOptions[\"EnableMediaTAUrls\"] = 4096] = \"EnableMediaTAUrls\";\r\n RenderListDataOptions[RenderListDataOptions[\"ParentInfo\"] = 8192] = \"ParentInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"PageContextInfo\"] = 16384] = \"PageContextInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"ClientSideComponentManifest\"] = 32768] = \"ClientSideComponentManifest\";\r\n})(RenderListDataOptions || (RenderListDataOptions = {}));\r\nvar FieldUserSelectionMode;\r\n(function (FieldUserSelectionMode) {\r\n FieldUserSelectionMode[FieldUserSelectionMode[\"PeopleAndGroups\"] = 1] = \"PeopleAndGroups\";\r\n FieldUserSelectionMode[FieldUserSelectionMode[\"PeopleOnly\"] = 0] = \"PeopleOnly\";\r\n})(FieldUserSelectionMode || (FieldUserSelectionMode = {}));\r\nvar ChoiceFieldFormatType;\r\n(function (ChoiceFieldFormatType) {\r\n ChoiceFieldFormatType[ChoiceFieldFormatType[\"Dropdown\"] = 0] = \"Dropdown\";\r\n ChoiceFieldFormatType[ChoiceFieldFormatType[\"RadioButtons\"] = 1] = \"RadioButtons\";\r\n})(ChoiceFieldFormatType || (ChoiceFieldFormatType = {}));\r\n/**\r\n * Specifies the originating zone of a request received.\r\n */\r\nvar UrlZone;\r\n(function (UrlZone) {\r\n /**\r\n * Specifies the default zone used for requests unless another zone is specified.\r\n */\r\n UrlZone[UrlZone[\"DefaultZone\"] = 0] = \"DefaultZone\";\r\n /**\r\n * Specifies an intranet zone.\r\n */\r\n UrlZone[UrlZone[\"Intranet\"] = 1] = \"Intranet\";\r\n /**\r\n * Specifies an Internet zone.\r\n */\r\n UrlZone[UrlZone[\"Internet\"] = 2] = \"Internet\";\r\n /**\r\n * Specifies a custom zone.\r\n */\r\n UrlZone[UrlZone[\"Custom\"] = 3] = \"Custom\";\r\n /**\r\n * Specifies an extranet zone.\r\n */\r\n UrlZone[UrlZone[\"Extranet\"] = 4] = \"Extranet\";\r\n})(UrlZone || (UrlZone = {}));\n\nvar SharePointQueryableSecurable = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableSecurable, _super);\r\n function SharePointQueryableSecurable() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"roleAssignments\", {\r\n /**\r\n * Gets the set of role assignments for this item\r\n *\r\n */\r\n get: function () {\r\n return new RoleAssignments(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"firstUniqueAncestorSecurableObject\", {\r\n /**\r\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the effective permissions for the user supplied\r\n *\r\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\r\n */\r\n SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) {\r\n var q = this.clone(SharePointQueryable, \"getUserEffectivePermissions(@user)\");\r\n q.query.set(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get().then(function (r) {\r\n // handle verbose mode\r\n return hOP(r, \"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\r\n });\r\n };\r\n /**\r\n * Gets the effective permissions for the current user\r\n */\r\n SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () {\r\n var _this = this;\r\n // remove need to reference Web here, which created a circular build issue\r\n var w = new SharePointQueryableInstance(\"_api/web\", \"currentuser\");\r\n return w.select(\"LoginName\").get().then(function (user) {\r\n return _this.getUserEffectivePermissions(user.LoginName);\r\n });\r\n };\r\n /**\r\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\r\n *\r\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\r\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\r\n */\r\n SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) {\r\n if (copyRoleAssignments === void 0) { copyRoleAssignments = false; }\r\n if (clearSubscopes === void 0) { clearSubscopes = false; }\r\n return this.clone(SharePointQueryableSecurable, \"breakroleinheritance(copyroleassignments=\" + copyRoleAssignments + \", clearsubscopes=\" + clearSubscopes + \")\").postCore();\r\n };\r\n /**\r\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\r\n *\r\n */\r\n SharePointQueryableSecurable.prototype.resetRoleInheritance = function () {\r\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\r\n };\r\n /**\r\n * Determines if a given user has the appropriate permissions\r\n *\r\n * @param loginName The user to check\r\n * @param permission The permission being checked\r\n */\r\n SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) {\r\n var _this = this;\r\n return this.getUserEffectivePermissions(loginName).then(function (perms) {\r\n return _this.hasPermissions(perms, permission);\r\n });\r\n };\r\n /**\r\n * Determines if the current user has the requested permissions\r\n *\r\n * @param permission The permission we wish to check\r\n */\r\n SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) {\r\n var _this = this;\r\n return this.getCurrentUserEffectivePermissions().then(function (perms) {\r\n return _this.hasPermissions(perms, permission);\r\n });\r\n };\r\n /**\r\n * Taken from sp.js, checks the supplied permissions against the mask\r\n *\r\n * @param value The security principal's permissions on the given object\r\n * @param perm The permission checked against the value\r\n */\r\n /* tslint:disable:no-bitwise */\r\n SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) {\r\n if (!perm) {\r\n return true;\r\n }\r\n if (perm === PermissionKind.FullMask) {\r\n return (value.High & 32767) === 32767 && value.Low === 65535;\r\n }\r\n perm = perm - 1;\r\n var num = 1;\r\n if (perm >= 0 && perm < 32) {\r\n num = num << perm;\r\n return 0 !== (value.Low & num);\r\n }\r\n else if (perm >= 32 && perm < 64) {\r\n num = num << perm - 32;\r\n return 0 !== (value.High & num);\r\n }\r\n return false;\r\n };\r\n return SharePointQueryableSecurable;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Internal helper class used to augment classes to include sharing functionality\r\n */\r\nvar SharePointQueryableShareable = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableShareable, _super);\r\n function SharePointQueryableShareable() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a sharing link for the supplied\r\n *\r\n * @param kind The kind of link to share\r\n * @param expiration The optional expiration for this link\r\n */\r\n SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) {\r\n if (expiration === void 0) { expiration = null; }\r\n // date needs to be an ISO string or null\r\n var expString = expiration !== null ? expiration.toISOString() : null;\r\n // clone using the factory and send the request\r\n return this.clone(SharePointQueryableShareable, \"shareLink\").postCore({\r\n body: jsS({\r\n request: {\r\n createLink: true,\r\n emailData: null,\r\n settings: {\r\n expiration: expString,\r\n linkKind: kind,\r\n },\r\n },\r\n }),\r\n });\r\n };\r\n /**\r\n * Shares this instance with the supplied users\r\n *\r\n * @param loginNames Resolved login names to share\r\n * @param role The role\r\n * @param requireSignin True to require the user is authenticated, otherwise false\r\n * @param propagateAcl True to apply this share to all children\r\n * @param emailData If supplied an email will be sent with the indicated properties\r\n */\r\n SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) {\r\n var _this = this;\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n if (propagateAcl === void 0) { propagateAcl = false; }\r\n // handle the multiple input types\r\n if (!Array.isArray(loginNames)) {\r\n loginNames = [loginNames];\r\n }\r\n var userStr = jsS(loginNames.map(function (login) { return { Key: login }; }));\r\n var roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\r\n // start by looking up the role definition id we need to set the roleValue\r\n // remove need to reference Web here, which created a circular build issue\r\n var w = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\r\n return w.select(\"Id\").filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\r\n if (!Array.isArray(def) || def.length < 1) {\r\n throw new Error(\"Could not locate a role defintion with RoleTypeKind \" + roleFilter);\r\n }\r\n var postBody = {\r\n includeAnonymousLinkInEmail: requireSignin,\r\n peoplePickerInput: userStr,\r\n propagateAcl: propagateAcl,\r\n roleValue: \"role:\" + def[0].Id,\r\n useSimplifiedRoles: true,\r\n };\r\n if (emailData !== undefined) {\r\n postBody = extend(postBody, {\r\n emailBody: emailData.body,\r\n emailSubject: emailData.subject !== undefined ? emailData.subject : \"\",\r\n sendEmail: true,\r\n });\r\n }\r\n return _this.clone(SharePointQueryableShareable, \"shareObject\").postCore({\r\n body: jsS(postBody),\r\n });\r\n });\r\n };\r\n /**\r\n * Shares an object based on the supplied options\r\n *\r\n * @param options The set of options to send to the ShareObject method\r\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\r\n */\r\n SharePointQueryableShareable.prototype.shareObject = function (options, bypass) {\r\n var _this = this;\r\n if (bypass === void 0) { bypass = false; }\r\n if (bypass) {\r\n // if the bypass flag is set send the supplied parameters directly to the service\r\n return this.sendShareObjectRequest(options);\r\n }\r\n // extend our options with some defaults\r\n options = extend(options, {\r\n group: null,\r\n includeAnonymousLinkInEmail: false,\r\n propagateAcl: false,\r\n useSimplifiedRoles: true,\r\n }, true);\r\n return this.getRoleValue(options.role, options.group).then(function (roleValue) {\r\n // handle the multiple input types\r\n if (!Array.isArray(options.loginNames)) {\r\n options.loginNames = [options.loginNames];\r\n }\r\n var userStr = jsS(options.loginNames.map(function (login) { return { Key: login }; }));\r\n var postBody = {\r\n peoplePickerInput: userStr,\r\n roleValue: roleValue,\r\n url: options.url,\r\n };\r\n if (options.emailData !== undefined && options.emailData !== null) {\r\n postBody = extend(postBody, {\r\n emailBody: options.emailData.body,\r\n emailSubject: options.emailData.subject !== undefined ? options.emailData.subject : \"Shared with you.\",\r\n sendEmail: true,\r\n });\r\n }\r\n return _this.sendShareObjectRequest(postBody);\r\n });\r\n };\r\n /**\r\n * Calls the web's UnshareObject method\r\n *\r\n * @param url The url of the object to unshare\r\n */\r\n SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) {\r\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore({\r\n body: jsS({\r\n url: url,\r\n }),\r\n });\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n SharePointQueryableShareable.prototype.checkPermissions = function (recipients) {\r\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postCore({\r\n body: jsS({\r\n recipients: recipients,\r\n }),\r\n });\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n */\r\n SharePointQueryableShareable.prototype.getSharingInformation = function (request) {\r\n if (request === void 0) { request = null; }\r\n return this.clone(SharePointQueryableShareable, \"getSharingInformation\").postCore({\r\n body: jsS({\r\n request: request,\r\n }),\r\n });\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postCore({\r\n body: jsS({\r\n useSimplifiedRoles: useSimplifiedRoles,\r\n }),\r\n });\r\n };\r\n /**\r\n * Unshares this object\r\n */\r\n SharePointQueryableShareable.prototype.unshareObject = function () {\r\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore();\r\n };\r\n /**\r\n * Deletes a link by type\r\n *\r\n * @param kind Deletes a sharing link by the kind of link\r\n */\r\n SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) {\r\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\r\n body: jsS({ linkKind: kind }),\r\n });\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId\r\n */\r\n SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) {\r\n if (shareId === void 0) { shareId = \"00000000-0000-0000-0000-000000000000\"; }\r\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\r\n body: jsS({ linkKind: kind, shareId: shareId }),\r\n });\r\n };\r\n /**\r\n * Calculates the roleValue string used in the sharing query\r\n *\r\n * @param role The Sharing Role\r\n * @param group The Group type\r\n */\r\n SharePointQueryableShareable.prototype.getRoleValue = function (role, group) {\r\n // we will give group precedence, because we had to make a choice\r\n if (group !== undefined && group !== null) {\r\n switch (group) {\r\n case RoleType.Contributor:\r\n // remove need to reference Web here, which created a circular build issue\r\n var memberGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedmembergroup\");\r\n return memberGroup.select(\"Id\").get().then(function (g) { return \"group: \" + g.Id; });\r\n case RoleType.Reader:\r\n case RoleType.Guest:\r\n // remove need to reference Web here, which created a circular build issue\r\n var visitorGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedvisitorgroup\");\r\n return visitorGroup.select(\"Id\").get().then(function (g) { return \"group: \" + g.Id; });\r\n default:\r\n throw new Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\r\n }\r\n }\r\n else {\r\n var roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\r\n // remove need to reference Web here, which created a circular build issue\r\n var roleDefs = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\r\n return roleDefs.select(\"Id\").top(1).filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\r\n if (def.length < 1) {\r\n throw new Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\r\n }\r\n return \"role: \" + def[0].Id;\r\n });\r\n }\r\n };\r\n SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) {\r\n return Promise.resolve(new SharePointQueryableInstance(extractWebUrl(candidate), \"/_api/SP.Web.ShareObject\"));\r\n };\r\n SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) {\r\n return this.getShareObjectWeb(this.toUrl()).then(function (web) {\r\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\r\n body: jsS(options),\r\n });\r\n });\r\n };\r\n return SharePointQueryableShareable;\r\n}(SharePointQueryable));\r\nvar SharePointQueryableShareableWeb = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableShareableWeb, _super);\r\n function SharePointQueryableShareableWeb() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this web with the supplied users\r\n * @param loginNames The resolved login names to share\r\n * @param role The role to share this web\r\n * @param emailData Optional email data\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) {\r\n var _this = this;\r\n if (role === void 0) { role = SharingRole.View; }\r\n var dependency = this.addBatchDependency();\r\n // remove need to reference Web here, which created a circular build issue\r\n var web = new SharePointQueryableInstance(extractWebUrl(this.toUrl()), \"/_api/web/url\");\r\n return web.get().then(function (url) {\r\n dependency();\r\n return _this.shareObject(combine(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\r\n });\r\n };\r\n /**\r\n * Provides direct access to the static web.ShareObject method\r\n *\r\n * @param url The url to share\r\n * @param loginNames Resolved loginnames string[] of a single login name string\r\n * @param roleValue Role value\r\n * @param emailData Optional email data\r\n * @param groupId Optional group id\r\n * @param propagateAcl\r\n * @param includeAnonymousLinkInEmail\r\n * @param useSimplifiedRoles\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) {\r\n if (propagateAcl === void 0) { propagateAcl = false; }\r\n if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; }\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, null).shareObject({\r\n emailData: emailData,\r\n group: group,\r\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\r\n loginNames: loginNames,\r\n propagateAcl: propagateAcl,\r\n role: role,\r\n url: url,\r\n useSimplifiedRoles: useSimplifiedRoles,\r\n });\r\n };\r\n /**\r\n * Supplies a method to pass any set of arguments to ShareObject\r\n *\r\n * @param options The set of options to send to ShareObject\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) {\r\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\r\n };\r\n /**\r\n * Unshares the object\r\n *\r\n * @param url The url of the object to stop sharing\r\n */\r\n SharePointQueryableShareableWeb.prototype.unshareObject = function (url) {\r\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\r\n };\r\n return SharePointQueryableShareableWeb;\r\n}(SharePointQueryableSecurable));\r\nvar SharePointQueryableShareableItem = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableShareableItem, _super);\r\n function SharePointQueryableShareableItem() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a link suitable for sharing for this item\r\n *\r\n * @param kind The type of link to share\r\n * @param expiration The optional expiration date\r\n */\r\n SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) {\r\n if (kind === void 0) { kind = SharingLinkKind.OrganizationView; }\r\n if (expiration === void 0) { expiration = null; }\r\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\r\n };\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) {\r\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n */\r\n SharePointQueryableShareableItem.prototype.getSharingInformation = function (request) {\r\n if (request === void 0) { request = null; }\r\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request);\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\r\n };\r\n /**\r\n * Unshare this item\r\n */\r\n SharePointQueryableShareableItem.prototype.unshare = function () {\r\n return this.clone(SharePointQueryableShareable, null).unshareObject();\r\n };\r\n /**\r\n * Deletes a sharing link by kind\r\n *\r\n * @param kind Deletes a sharing link by the kind of link\r\n */\r\n SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) {\r\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId\r\n */\r\n SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) {\r\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\r\n };\r\n return SharePointQueryableShareableItem;\r\n}(SharePointQueryableSecurable));\r\nvar FileFolderShared = /** @class */ (function (_super) {\r\n __extends(FileFolderShared, _super);\r\n function FileFolderShared() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a link suitable for sharing\r\n *\r\n * @param kind The kind of link to get\r\n * @param expiration Optional, an expiration for this link\r\n */\r\n FileFolderShared.prototype.getShareLink = function (kind, expiration) {\r\n if (kind === void 0) { kind = SharingLinkKind.OrganizationView; }\r\n if (expiration === void 0) { expiration = null; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getShareLink(kind, expiration);\r\n });\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n FileFolderShared.prototype.checkSharingPermissions = function (recipients) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.checkPermissions(recipients);\r\n });\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n */\r\n FileFolderShared.prototype.getSharingInformation = function (request) {\r\n if (request === void 0) { request = null; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getSharingInformation(request);\r\n });\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\r\n });\r\n };\r\n /**\r\n * Unshare this item\r\n */\r\n FileFolderShared.prototype.unshare = function () {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.unshareObject();\r\n });\r\n };\r\n /**\r\n * Deletes a sharing link by the kind of link\r\n *\r\n * @param kind The kind of link to be deleted.\r\n */\r\n FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.deleteLinkByKind(kind);\r\n });\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId The share id to delete\r\n */\r\n FileFolderShared.prototype.unshareLink = function (kind, shareId) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.unshareLink(kind, shareId);\r\n });\r\n };\r\n /**\r\n * For files and folders we need to use the associated item end point\r\n */\r\n FileFolderShared.prototype.getShareable = function () {\r\n var _this = this;\r\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\r\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.id\").get().then(function (d) {\r\n var shareable = new SharePointQueryableShareable(odataUrlFrom(d));\r\n // we need to handle batching\r\n if (_this.hasBatch) {\r\n shareable = shareable.inBatch(_this.batch);\r\n }\r\n return shareable;\r\n });\r\n };\r\n return FileFolderShared;\r\n}(SharePointQueryableInstance));\r\nvar SharePointQueryableShareableFile = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableShareableFile, _super);\r\n function SharePointQueryableShareableFile() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param shareEverything Share everything in this folder, even items with unique permissions.\r\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\r\n });\r\n };\r\n return SharePointQueryableShareableFile;\r\n}(FileFolderShared));\r\nvar SharePointQueryableShareableFolder = /** @class */ (function (_super) {\r\n __extends(SharePointQueryableShareableFolder, _super);\r\n function SharePointQueryableShareableFolder() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param shareEverything Share everything in this folder, even items with unique permissions.\r\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n if (shareEverything === void 0) { shareEverything = false; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\r\n });\r\n };\r\n return SharePointQueryableShareableFolder;\r\n}(FileFolderShared));\n\nvar LimitedWebPartManager = /** @class */ (function (_super) {\r\n __extends(LimitedWebPartManager, _super);\r\n function LimitedWebPartManager() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(LimitedWebPartManager.prototype, \"webparts\", {\r\n /**\r\n * Gets the set of web part definitions contained by this web part manager\r\n *\r\n */\r\n get: function () {\r\n return new WebPartDefinitions(this, \"webparts\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Exports a webpart definition\r\n *\r\n * @param id the GUID id of the definition to export\r\n */\r\n LimitedWebPartManager.prototype.export = function (id) {\r\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\r\n body: jsS({ webPartId: id }),\r\n });\r\n };\r\n /**\r\n * Imports a webpart\r\n *\r\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\r\n */\r\n LimitedWebPartManager.prototype.import = function (xml) {\r\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\r\n body: jsS({ webPartXml: xml }),\r\n });\r\n };\r\n return LimitedWebPartManager;\r\n}(SharePointQueryable));\r\nvar WebPartDefinitions = /** @class */ (function (_super) {\r\n __extends(WebPartDefinitions, _super);\r\n function WebPartDefinitions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a web part definition from the collection by id\r\n *\r\n * @param id The storage ID of the SPWebPartDefinition to retrieve\r\n */\r\n _this.getById = _this._getById(WebPartDefinition);\r\n return _this;\r\n }\r\n /**\r\n * Gets a web part definition from the collection by storage id\r\n *\r\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\r\n */\r\n WebPartDefinitions.prototype.getByControlId = function (id) {\r\n return new WebPartDefinition(this, \"getByControlId('\" + id + \"')\");\r\n };\r\n return WebPartDefinitions;\r\n}(SharePointQueryableCollection));\r\nvar WebPartDefinition = /** @class */ (function (_super) {\r\n __extends(WebPartDefinition, _super);\r\n function WebPartDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(WebPartDefinition.prototype, \"webpart\", {\r\n /**\r\n * Gets the webpart information associated with this definition\r\n */\r\n get: function () {\r\n return new WebPart(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\r\n */\r\n WebPartDefinition.prototype.saveChanges = function () {\r\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\r\n };\r\n /**\r\n * Moves the Web Part to a different location on a Web Part Page\r\n *\r\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\r\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\r\n */\r\n WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) {\r\n return this.clone(WebPartDefinition, \"MoveWebPartTo(zoneID='\" + zoneId + \"', zoneIndex=\" + zoneIndex + \")\").postCore();\r\n };\r\n /**\r\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\r\n */\r\n WebPartDefinition.prototype.close = function () {\r\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\r\n };\r\n /**\r\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\r\n */\r\n WebPartDefinition.prototype.open = function () {\r\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\r\n };\r\n /**\r\n * Removes a webpart from a page, all settings will be lost\r\n */\r\n WebPartDefinition.prototype.delete = function () {\r\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\r\n };\r\n return WebPartDefinition;\r\n}(SharePointQueryableInstance));\r\nvar WebPart = /** @class */ (function (_super) {\r\n __extends(WebPart, _super);\r\n function WebPart() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n WebPart = __decorate([\r\n defaultPath(\"webpart\")\r\n ], WebPart);\r\n return WebPart;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of Folder objects\r\n *\r\n */\r\nvar Folders = /** @class */ (function (_super) {\r\n __extends(Folders, _super);\r\n function Folders() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Folders_1 = Folders;\r\n /**\r\n * Gets a folder by folder name\r\n *\r\n */\r\n Folders.prototype.getByName = function (name) {\r\n var f = new Folder(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Adds a new folder to the current folder (relative) or any folder (absolute)\r\n *\r\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\r\n * @returns The new Folder and the raw response.\r\n */\r\n Folders.prototype.add = function (url) {\r\n var _this = this;\r\n return this.clone(Folders_1, \"add('\" + url + \"')\").postCore().then(function (response) {\r\n return {\r\n data: response,\r\n folder: _this.getByName(url),\r\n };\r\n });\r\n };\r\n var Folders_1;\r\n Folders = Folders_1 = __decorate([\r\n defaultPath(\"folders\")\r\n ], Folders);\r\n return Folders;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single Folder instance\r\n *\r\n */\r\nvar Folder = /** @class */ (function (_super) {\r\n __extends(Folder, _super);\r\n function Folder() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.update = _this._update(\"SP.Folder\", function (data) { return ({ data: data, folder: _this }); });\r\n return _this;\r\n }\r\n Object.defineProperty(Folder.prototype, \"contentTypeOrder\", {\r\n /**\r\n * Specifies the sequence in which content types are displayed.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"contentTypeOrder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"files\", {\r\n /**\r\n * Gets this folder's files\r\n *\r\n */\r\n get: function () {\r\n return new Files(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"folders\", {\r\n /**\r\n * Gets this folder's sub folders\r\n *\r\n */\r\n get: function () {\r\n return new Folders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"listItemAllFields\", {\r\n /**\r\n * Gets this folder's list item field values\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"parentFolder\", {\r\n /**\r\n * Gets the parent folder, if available\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"parentFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"properties\", {\r\n /**\r\n * Gets this folder's properties\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"properties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"serverRelativeUrl\", {\r\n /**\r\n * Gets this folder's server relative url\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"serverRelativeUrl\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"uniqueContentTypeOrder\", {\r\n /**\r\n * Gets a value that specifies the content type order.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Delete this folder\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n Folder.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.clone(Folder, null).postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n Folder.prototype.recycle = function () {\r\n return this.clone(Folder, \"recycle\").postCore();\r\n };\r\n /**\r\n * Gets the associated list item for this folder, loading the default properties\r\n */\r\n Folder.prototype.getItem = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n var q = this.listItemAllFields;\r\n return q.select.apply(q, selects).get().then(function (d) {\r\n return extend(new Item(odataUrlFrom(d)), d);\r\n });\r\n };\r\n /**\r\n * Moves a folder to destination path\r\n *\r\n * @param destUrl Absolute or relative URL of the destination path\r\n */\r\n Folder.prototype.moveTo = function (destUrl) {\r\n var _this = this;\r\n return this.select(\"ServerRelativeUrl\").get().then(function (_a) {\r\n var srcUrl = _a.ServerRelativeUrl;\r\n var client = new SPHttpClient();\r\n var webBaseUrl = _this.toUrl().split(\"/_api\")[0];\r\n var hostUrl = webBaseUrl.replace(\"://\", \"___\").split(\"/\")[0].replace(\"___\", \"://\");\r\n var methodUrl = webBaseUrl + \"/_api/SP.MoveCopyUtil.MoveFolder()\";\r\n return client.post(methodUrl, {\r\n body: jsS({\r\n destUrl: destUrl.indexOf(\"http\") === 0 ? destUrl : \"\" + hostUrl + destUrl,\r\n srcUrl: \"\" + hostUrl + srcUrl,\r\n }),\r\n }).then(function (r) { return r.json(); });\r\n });\r\n };\r\n return Folder;\r\n}(SharePointQueryableShareableFolder));\n\n/**\r\n * Describes a collection of content types\r\n *\r\n */\r\nvar ContentTypes = /** @class */ (function (_super) {\r\n __extends(ContentTypes, _super);\r\n function ContentTypes() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(ContentType);\r\n return _this;\r\n }\r\n ContentTypes_1 = ContentTypes;\r\n /**\r\n * Adds an existing contenttype to a content type collection\r\n *\r\n * @param contentTypeId in the following format, for example: 0x010102\r\n */\r\n ContentTypes.prototype.addAvailableContentType = function (contentTypeId) {\r\n var _this = this;\r\n var postBody = jsS({\r\n \"contentTypeId\": contentTypeId,\r\n });\r\n return this.clone(ContentTypes_1, \"addAvailableContentType\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n contentType: _this.getById(data.id),\r\n data: data,\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new content type to the collection\r\n *\r\n * @param id The desired content type id for the new content type (also determines the parent content type)\r\n * @param name The name of the content type\r\n * @param description The description of the content type\r\n * @param group The group in which to add the content type\r\n * @param additionalSettings Any additional settings to provide when creating the content type\r\n *\r\n */\r\n ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (group === void 0) { group = \"Custom Content Types\"; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var postBody = jsS(Object.assign(metadata(\"SP.ContentType\"), {\r\n \"Description\": description,\r\n \"Group\": group,\r\n \"Id\": { \"StringValue\": id },\r\n \"Name\": name,\r\n }, additionalSettings));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return { contentType: _this.getById(data.id), data: data };\r\n });\r\n };\r\n var ContentTypes_1;\r\n ContentTypes = ContentTypes_1 = __decorate([\r\n defaultPath(\"contenttypes\")\r\n ], ContentTypes);\r\n return ContentTypes;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single ContentType instance\r\n *\r\n */\r\nvar ContentType = /** @class */ (function (_super) {\r\n __extends(ContentType, _super);\r\n function ContentType() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this content type\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(ContentType.prototype, \"fieldLinks\", {\r\n /**\r\n * Gets the column (also known as field) references in the content type.\r\n */\r\n get: function () {\r\n return new FieldLinks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"fields\", {\r\n /**\r\n * Gets a value that specifies the collection of fields for the content type.\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"fields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"parent\", {\r\n /**\r\n * Gets the parent content type of the content type.\r\n */\r\n get: function () {\r\n return new ContentType(this, \"parent\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"workflowAssociations\", {\r\n /**\r\n * Gets a value that specifies the collection of workflow associations for the content type.\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"workflowAssociations\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ContentType;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Represents a collection of field link instances\r\n */\r\nvar FieldLinks = /** @class */ (function (_super) {\r\n __extends(FieldLinks, _super);\r\n function FieldLinks() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(FieldLink);\r\n return _this;\r\n }\r\n FieldLinks = __decorate([\r\n defaultPath(\"fieldlinks\")\r\n ], FieldLinks);\r\n return FieldLinks;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Represents a field link instance\r\n */\r\nvar FieldLink = /** @class */ (function (_super) {\r\n __extends(FieldLink, _super);\r\n function FieldLink() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return FieldLink;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of Item objects\r\n *\r\n */\r\nvar AttachmentFiles = /** @class */ (function (_super) {\r\n __extends(AttachmentFiles, _super);\r\n function AttachmentFiles() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n AttachmentFiles_1 = AttachmentFiles;\r\n /**\r\n * Gets a Attachment File by filename\r\n *\r\n * @param name The name of the file, including extension.\r\n */\r\n AttachmentFiles.prototype.getByName = function (name) {\r\n var f = new AttachmentFile(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Adds a new attachment to the collection. Not supported for batching.\r\n *\r\n * @param name The name of the file, including extension.\r\n * @param content The Base64 file content.\r\n */\r\n AttachmentFiles.prototype.add = function (name, content) {\r\n var _this = this;\r\n return this.clone(AttachmentFiles_1, \"add(FileName='\" + name + \"')\", false).postCore({\r\n body: content,\r\n }).then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(name),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds multiple new attachment to the collection. Not supported for batching.\r\n *\r\n * @files name The collection of files to add\r\n */\r\n AttachmentFiles.prototype.addMultiple = function (files) {\r\n var _this = this;\r\n // add the files in series so we don't get update conflicts\r\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles_1, \"add(FileName='\" + file.name + \"')\", false).postCore({\r\n body: file.content,\r\n }); }); }, Promise.resolve());\r\n };\r\n /**\r\n * Delete multiple attachments from the collection. Not supported for batching.\r\n *\r\n * @files name The collection of files to delete\r\n */\r\n AttachmentFiles.prototype.deleteMultiple = function () {\r\n var _this = this;\r\n var files = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n files[_i] = arguments[_i];\r\n }\r\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.getByName(file).delete(); }); }, Promise.resolve());\r\n };\r\n var AttachmentFiles_1;\r\n AttachmentFiles = AttachmentFiles_1 = __decorate([\r\n defaultPath(\"AttachmentFiles\")\r\n ], AttachmentFiles);\r\n return AttachmentFiles;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single attachment file instance\r\n *\r\n */\r\nvar AttachmentFile = /** @class */ (function (_super) {\r\n __extends(AttachmentFile, _super);\r\n function AttachmentFile() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n /**\r\n * Gets the contents of the file as text\r\n *\r\n */\r\n AttachmentFile.prototype.getText = function () {\r\n return this.getParsed(new TextParser());\r\n };\r\n /**\r\n * Gets the contents of the file as a blob, does not work in Node.js\r\n *\r\n */\r\n AttachmentFile.prototype.getBlob = function () {\r\n return this.getParsed(new BlobParser());\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\r\n */\r\n AttachmentFile.prototype.getBuffer = function () {\r\n return this.getParsed(new BufferParser());\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\r\n */\r\n AttachmentFile.prototype.getJSON = function () {\r\n return this.getParsed(new JSONParser());\r\n };\r\n /**\r\n * Sets the content of a file. Not supported for batching\r\n *\r\n * @param content The value to set for the file contents\r\n */\r\n AttachmentFile.prototype.setContent = function (content) {\r\n var _this = this;\r\n return this.clone(AttachmentFile, \"$value\", false).postCore({\r\n body: content,\r\n headers: {\r\n \"X-HTTP-Method\": \"PUT\",\r\n },\r\n }).then(function (_) { return new AttachmentFile(_this); });\r\n };\r\n // /**\r\n // * Delete this attachment file\r\n // *\r\n // * @param eTag Value used in the IF-Match header, by default \"*\"\r\n // */\r\n // public delete(eTag = \"*\"): Promise {\r\n // return this.postCore({\r\n // headers: {\r\n // \"IF-Match\": eTag,\r\n // \"X-HTTP-Method\": \"DELETE\",\r\n // },\r\n // });\r\n // }\r\n AttachmentFile.prototype.getParsed = function (parser) {\r\n return this.clone(AttachmentFile, \"$value\", false).get(parser);\r\n };\r\n return AttachmentFile;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes the views available in the current context\r\n *\r\n */\r\nvar Views = /** @class */ (function (_super) {\r\n __extends(Views, _super);\r\n function Views() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a view by guid id\r\n *\r\n * @param id The GUID id of the view\r\n */\r\n _this.getById = _this._getById(View);\r\n return _this;\r\n }\r\n Views_1 = Views;\r\n /**\r\n * Gets a view by title (case-sensitive)\r\n *\r\n * @param title The case-sensitive title of the view\r\n */\r\n Views.prototype.getByTitle = function (title) {\r\n return new View(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Adds a new view to the collection\r\n *\r\n * @param title The new views's title\r\n * @param personalView True if this is a personal view, otherwise false, default = false\r\n * @param additionalSettings Will be passed as part of the view creation body\r\n */\r\n Views.prototype.add = function (title, personalView, additionalSettings) {\r\n var _this = this;\r\n if (personalView === void 0) { personalView = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var postBody = jsS(Object.assign(metadata(\"SP.View\"), {\r\n \"PersonalView\": personalView,\r\n \"Title\": title,\r\n }, additionalSettings));\r\n return this.clone(Views_1, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n view: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n var Views_1;\r\n Views = Views_1 = __decorate([\r\n defaultPath(\"views\")\r\n ], Views);\r\n return Views;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single View instance\r\n *\r\n */\r\nvar View = /** @class */ (function (_super) {\r\n __extends(View, _super);\r\n function View() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this view intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the view\r\n */\r\n _this.update = _this._update(\"SP.View\", function (data) { return ({ data: data, view: _this }); });\r\n /**\r\n * Delete this view\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(View.prototype, \"fields\", {\r\n get: function () {\r\n return new ViewFields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the list view as HTML.\r\n *\r\n */\r\n View.prototype.renderAsHtml = function () {\r\n return this.clone(SharePointQueryable, \"renderashtml\").get();\r\n };\r\n return View;\r\n}(SharePointQueryableInstance));\r\nvar ViewFields = /** @class */ (function (_super) {\r\n __extends(ViewFields, _super);\r\n function ViewFields() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ViewFields_1 = ViewFields;\r\n /**\r\n * Gets a value that specifies the XML schema that represents the collection.\r\n */\r\n ViewFields.prototype.getSchemaXml = function () {\r\n return this.clone(SharePointQueryable, \"schemaxml\").get();\r\n };\r\n /**\r\n * Adds the field with the specified field internal name or display name to the collection.\r\n *\r\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\r\n */\r\n ViewFields.prototype.add = function (fieldTitleOrInternalName) {\r\n return this.clone(ViewFields_1, \"addviewfield('\" + fieldTitleOrInternalName + \"')\").postCore();\r\n };\r\n /**\r\n * Moves the field with the specified field internal name to the specified position in the collection.\r\n *\r\n * @param fieldInternalName The case-sensitive internal name of the field to move.\r\n * @param index The zero-based index of the new position for the field.\r\n */\r\n ViewFields.prototype.move = function (fieldInternalName, index) {\r\n return this.clone(ViewFields_1, \"moveviewfieldto\").postCore({\r\n body: jsS({ \"field\": fieldInternalName, \"index\": index }),\r\n });\r\n };\r\n /**\r\n * Removes all the fields from the collection.\r\n */\r\n ViewFields.prototype.removeAll = function () {\r\n return this.clone(ViewFields_1, \"removeallviewfields\").postCore();\r\n };\r\n /**\r\n * Removes the field with the specified field internal name from the collection.\r\n *\r\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\r\n */\r\n ViewFields.prototype.remove = function (fieldInternalName) {\r\n return this.clone(ViewFields_1, \"removeviewfield('\" + fieldInternalName + \"')\").postCore();\r\n };\r\n var ViewFields_1;\r\n ViewFields = ViewFields_1 = __decorate([\r\n defaultPath(\"viewfields\")\r\n ], ViewFields);\r\n return ViewFields;\r\n}(SharePointQueryableCollection));\n\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar Fields = /** @class */ (function (_super) {\r\n __extends(Fields, _super);\r\n function Fields() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a list from the collection by guid id\r\n *\r\n * @param title The Id of the list\r\n */\r\n _this.getById = _this._getById(Field);\r\n return _this;\r\n }\r\n Fields_1 = Fields;\r\n /**\r\n * Gets a field from the collection by title\r\n *\r\n * @param title The case-sensitive title of the field\r\n */\r\n Fields.prototype.getByTitle = function (title) {\r\n return new Field(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Gets a field from the collection by using internal name or title\r\n *\r\n * @param name The case-sensitive internal name or title of the field\r\n */\r\n Fields.prototype.getByInternalNameOrTitle = function (name) {\r\n return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\r\n };\r\n /**\r\n * Creates a field based on the specified schema\r\n */\r\n Fields.prototype.createFieldAsXml = function (xml) {\r\n var _this = this;\r\n var info;\r\n if (typeof xml === \"string\") {\r\n info = { SchemaXml: xml };\r\n }\r\n else {\r\n info = xml;\r\n }\r\n var postBody = jsS({\r\n \"parameters\": extend(metadata(\"SP.XmlSchemaFieldCreationInformation\"), info),\r\n });\r\n return this.clone(Fields_1, \"createfieldasxml\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new field to the collection\r\n *\r\n * @param title The new field's title\r\n * @param fieldType The new field's type (ex: SP.FieldText)\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.add = function (title, fieldType, properties) {\r\n var _this = this;\r\n var postBody = jsS(Object.assign(metadata(fieldType), {\r\n \"Title\": title,\r\n }, properties));\r\n return this.clone(Fields_1, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new SP.FieldText to the collection\r\n *\r\n * @param title The field title\r\n * @param maxLength The maximum number of characters allowed in the value of the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addText = function (title, maxLength, properties) {\r\n if (maxLength === void 0) { maxLength = 255; }\r\n var props = {\r\n FieldTypeKind: 2,\r\n MaxLength: maxLength,\r\n };\r\n return this.add(title, \"SP.FieldText\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldCalculated to the collection\r\n *\r\n * @param title The field title.\r\n * @param formula The formula for the field.\r\n * @param dateFormat The date and time format that is displayed in the field.\r\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {\r\n if (outputType === void 0) { outputType = FieldTypes.Text; }\r\n var props = {\r\n DateFormat: dateFormat,\r\n FieldTypeKind: 17,\r\n Formula: formula,\r\n OutputType: outputType,\r\n };\r\n return this.add(title, \"SP.FieldCalculated\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldDateTime to the collection\r\n *\r\n * @param title The field title\r\n * @param displayFormat The format of the date and time that is displayed in the field.\r\n * @param calendarType Specifies the calendar type of the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {\r\n if (displayFormat === void 0) { displayFormat = DateTimeFieldFormatType.DateOnly; }\r\n if (calendarType === void 0) { calendarType = CalendarType.Gregorian; }\r\n if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = 0; }\r\n var props = {\r\n DateTimeCalendarType: calendarType,\r\n DisplayFormat: displayFormat,\r\n FieldTypeKind: 4,\r\n FriendlyDisplayFormat: friendlyDisplayFormat,\r\n };\r\n return this.add(title, \"SP.FieldDateTime\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldNumber to the collection\r\n *\r\n * @param title The field title\r\n * @param minValue The field's minimum value\r\n * @param maxValue The field's maximum value\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {\r\n var props = { FieldTypeKind: 9 };\r\n if (minValue !== undefined) {\r\n props = extend({ MinimumValue: minValue }, props);\r\n }\r\n if (maxValue !== undefined) {\r\n props = extend({ MaximumValue: maxValue }, props);\r\n }\r\n return this.add(title, \"SP.FieldNumber\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldCurrency to the collection\r\n *\r\n * @param title The field title\r\n * @param minValue The field's minimum value\r\n * @param maxValue The field's maximum value\r\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {\r\n if (currencyLocalId === void 0) { currencyLocalId = 1033; }\r\n var props = {\r\n CurrencyLocaleId: currencyLocalId,\r\n FieldTypeKind: 10,\r\n };\r\n if (minValue !== undefined) {\r\n props = extend({ MinimumValue: minValue }, props);\r\n }\r\n if (maxValue !== undefined) {\r\n props = extend({ MaximumValue: maxValue }, props);\r\n }\r\n return this.add(title, \"SP.FieldCurrency\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldMultiLineText to the collection\r\n *\r\n * @param title The field title\r\n * @param numberOfLines Specifies the number of lines of text to display for the field.\r\n * @param richText Specifies whether the field supports rich formatting.\r\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\r\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\r\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n *\r\n */\r\n Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {\r\n if (numberOfLines === void 0) { numberOfLines = 6; }\r\n if (richText === void 0) { richText = true; }\r\n if (restrictedMode === void 0) { restrictedMode = false; }\r\n if (appendOnly === void 0) { appendOnly = false; }\r\n if (allowHyperlink === void 0) { allowHyperlink = true; }\r\n var props = {\r\n AllowHyperlink: allowHyperlink,\r\n AppendOnly: appendOnly,\r\n FieldTypeKind: 3,\r\n NumberOfLines: numberOfLines,\r\n RestrictedMode: restrictedMode,\r\n RichText: richText,\r\n };\r\n return this.add(title, \"SP.FieldMultiLineText\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldUrl to the collection\r\n *\r\n * @param title The field title\r\n */\r\n Fields.prototype.addUrl = function (title, displayFormat, properties) {\r\n if (displayFormat === void 0) { displayFormat = UrlFieldFormatType.Hyperlink; }\r\n var props = {\r\n DisplayFormat: displayFormat,\r\n FieldTypeKind: 11,\r\n };\r\n return this.add(title, \"SP.FieldUrl\", extend(props, properties));\r\n };\r\n /** Adds a user field to the colleciton\r\n *\r\n * @param title The new field's title\r\n * @param selectionMode The selection mode of the field\r\n * @param selectionGroup Value that specifies the identifier of the SharePoint group whose members can be selected as values of the field\r\n * @param properties\r\n */\r\n Fields.prototype.addUser = function (title, selectionMode, properties) {\r\n var props = {\r\n FieldTypeKind: 20,\r\n SelectionMode: selectionMode,\r\n };\r\n return this.add(title, \"SP.FieldUser\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a SP.FieldLookup to the collection\r\n *\r\n * @param title The new field's title\r\n * @param lookupListId The guid id of the list where the source of the lookup is found\r\n * @param lookupFieldName The internal name of the field in the source list\r\n * @param properties Set of additional properties to set on the new field\r\n */\r\n Fields.prototype.addLookup = function (title, lookupListId, lookupFieldName, properties) {\r\n var _this = this;\r\n var postBody = jsS(Object.assign(metadata(\"SP.FieldCreationInformation\"), {\r\n parameters: extend({\r\n FieldTypeKind: 7,\r\n LookupFieldName: lookupFieldName,\r\n LookupListId: lookupListId,\r\n Title: title,\r\n }, properties),\r\n }));\r\n return this.clone(Fields_1, \"addfield\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new SP.FieldChoice to the collection\r\n *\r\n * @param title The field title.\r\n * @param choices The choices for the field.\r\n * @param format The display format of the available options for the field.\r\n * @param fillIn Specifies whether the field allows fill-in values.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addChoice = function (title, choices, format, fillIn, properties) {\r\n if (format === void 0) { format = ChoiceFieldFormatType.Dropdown; }\r\n var props = {\r\n Choices: {\r\n results: choices,\r\n },\r\n EditFormat: format,\r\n FieldTypeKind: 6,\r\n FillInChoice: fillIn,\r\n };\r\n return this.add(title, \"SP.FieldChoice\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldMultiChoice to the collection\r\n *\r\n * @param title The field title.\r\n * @param choices The choices for the field.\r\n * @param fillIn Specifies whether the field allows fill-in values.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addMultiChoice = function (title, choices, fillIn, properties) {\r\n var props = {\r\n Choices: {\r\n results: choices,\r\n },\r\n FieldTypeKind: 15,\r\n FillInChoice: fillIn,\r\n };\r\n return this.add(title, \"SP.FieldMultiChoice\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldBoolean to the collection\r\n *\r\n * @param title The field title.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addBoolean = function (title, properties) {\r\n var props = {\r\n FieldTypeKind: 8,\r\n };\r\n return this.add(title, \"SP.Field\", extend(props, properties));\r\n };\r\n var Fields_1;\r\n Fields = Fields_1 = __decorate([\r\n defaultPath(\"fields\")\r\n ], Fields);\r\n return Fields;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single of Field instance\r\n *\r\n */\r\nvar Field = /** @class */ (function (_super) {\r\n __extends(Field, _super);\r\n function Field() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this fields\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n /**\r\n * Updates this field intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param fieldType The type value, required to update child field type properties\r\n */\r\n Field.prototype.update = function (properties, fieldType) {\r\n var _this = this;\r\n if (fieldType === void 0) { fieldType = \"SP.Field\"; }\r\n var postBody = jsS(extend(metadata(fieldType), properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Sets the value of the ShowInDisplayForm property for this field.\r\n */\r\n Field.prototype.setShowInDisplayForm = function (show) {\r\n return this.clone(Field, \"setshowindisplayform(\" + show + \")\").postCore();\r\n };\r\n /**\r\n * Sets the value of the ShowInEditForm property for this field.\r\n */\r\n Field.prototype.setShowInEditForm = function (show) {\r\n return this.clone(Field, \"setshowineditform(\" + show + \")\").postCore();\r\n };\r\n /**\r\n * Sets the value of the ShowInNewForm property for this field.\r\n */\r\n Field.prototype.setShowInNewForm = function (show) {\r\n return this.clone(Field, \"setshowinnewform(\" + show + \")\").postCore();\r\n };\r\n return Field;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar Forms = /** @class */ (function (_super) {\r\n __extends(Forms, _super);\r\n function Forms() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(Form);\r\n return _this;\r\n }\r\n Forms = __decorate([\r\n defaultPath(\"forms\")\r\n ], Forms);\r\n return Forms;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single of Form instance\r\n *\r\n */\r\nvar Form = /** @class */ (function (_super) {\r\n __extends(Form, _super);\r\n function Form() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Form;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of webhook subscriptions\r\n *\r\n */\r\nvar Subscriptions = /** @class */ (function (_super) {\r\n __extends(Subscriptions, _super);\r\n function Subscriptions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Returns all the webhook subscriptions or the specified webhook subscription\r\n *\r\n * @param id The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\r\n */\r\n _this.getById = _this._getById(Subscription);\r\n return _this;\r\n }\r\n /**\r\n * Creates a new webhook subscription\r\n *\r\n * @param notificationUrl The url to receive the notifications\r\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\r\n * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted)\r\n */\r\n Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) {\r\n var _this = this;\r\n var postBody = jsS({\r\n \"clientState\": clientState || \"pnp-js-core-subscription\",\r\n \"expirationDateTime\": expirationDate,\r\n \"notificationUrl\": notificationUrl,\r\n \"resource\": this.toUrl(),\r\n });\r\n return this.postCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\r\n return { data: result, subscription: _this.getById(result.id) };\r\n });\r\n };\r\n Subscriptions = __decorate([\r\n defaultPath(\"subscriptions\")\r\n ], Subscriptions);\r\n return Subscriptions;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single webhook subscription instance\r\n *\r\n */\r\nvar Subscription = /** @class */ (function (_super) {\r\n __extends(Subscription, _super);\r\n function Subscription() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Renews this webhook subscription\r\n *\r\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\r\n */\r\n Subscription.prototype.update = function (expirationDate) {\r\n var _this = this;\r\n var postBody = jsS({\r\n \"expirationDateTime\": expirationDate,\r\n });\r\n return this.patchCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\r\n return { data: data, subscription: _this };\r\n });\r\n };\r\n /**\r\n * Removes this webhook subscription\r\n *\r\n */\r\n Subscription.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n return Subscription;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of user custom actions\r\n *\r\n */\r\nvar UserCustomActions = /** @class */ (function (_super) {\r\n __extends(UserCustomActions, _super);\r\n function UserCustomActions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Returns the user custom action with the specified id\r\n *\r\n * @param id The GUID id of the user custom action to retrieve\r\n */\r\n _this.getById = _this._getById(UserCustomAction);\r\n return _this;\r\n }\r\n UserCustomActions_1 = UserCustomActions;\r\n /**\r\n * Creates a user custom action\r\n *\r\n * @param properties The information object of property names and values which define the new user custom action\r\n *\r\n */\r\n UserCustomActions.prototype.add = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n action: _this.getById(data.Id),\r\n data: data,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes all user custom actions in the collection\r\n *\r\n */\r\n UserCustomActions.prototype.clear = function () {\r\n return this.clone(UserCustomActions_1, \"clear\").postCore();\r\n };\r\n var UserCustomActions_1;\r\n UserCustomActions = UserCustomActions_1 = __decorate([\r\n defaultPath(\"usercustomactions\")\r\n ], UserCustomActions);\r\n return UserCustomActions;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single user custom action\r\n *\r\n */\r\nvar UserCustomAction = /** @class */ (function (_super) {\r\n __extends(UserCustomAction, _super);\r\n function UserCustomAction() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this user custom action with the supplied properties\r\n *\r\n * @param properties An information object of property names and values to update for this user custom action\r\n */\r\n _this.update = _this._update(\"SP.UserCustomAction\", function (data) { return ({ data: data, action: _this }); });\r\n return _this;\r\n }\r\n /**\r\n * Removes this user custom action\r\n *\r\n */\r\n UserCustomAction.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n return UserCustomAction;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of List objects\r\n *\r\n */\r\nvar Lists = /** @class */ (function (_super) {\r\n __extends(Lists, _super);\r\n function Lists() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a list from the collection by guid id\r\n *\r\n * @param id The Id of the list (GUID)\r\n */\r\n _this.getById = _this._getById(List);\r\n return _this;\r\n }\r\n Lists_1 = Lists;\r\n /**\r\n * Gets a list from the collection by title\r\n *\r\n * @param title The title of the list\r\n */\r\n Lists.prototype.getByTitle = function (title) {\r\n return new List(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Adds a new list to the collection\r\n *\r\n * @param title The new list's title\r\n * @param description The new list's description\r\n * @param template The list template value\r\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\r\n * @param additionalSettings Will be passed as part of the list creation body\r\n */\r\n Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = 100; }\r\n if (enableContentTypes === void 0) { enableContentTypes = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var addSettings = extend({\r\n \"AllowContentTypes\": enableContentTypes,\r\n \"BaseTemplate\": template,\r\n \"ContentTypesEnabled\": enableContentTypes,\r\n \"Description\": description,\r\n \"Title\": title,\r\n \"__metadata\": { \"type\": \"SP.List\" },\r\n }, additionalSettings);\r\n return this.postCore({ body: jsS(addSettings) }).then(function (data) {\r\n return { data: data, list: _this.getByTitle(addSettings.Title) };\r\n });\r\n };\r\n /**\r\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\r\n *\r\n * @param title The new list's title\r\n * @param description The new list's description\r\n * @param template The list template value\r\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\r\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\r\n */\r\n Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = 100; }\r\n if (enableContentTypes === void 0) { enableContentTypes = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n if (this.hasBatch) {\r\n throw new Error(\"The ensure list method is not supported for use in a batch.\");\r\n }\r\n return new Promise(function (resolve, reject) {\r\n var addOrUpdateSettings = extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\r\n var list = _this.getByTitle(addOrUpdateSettings.Title);\r\n list.get().then(function (_) {\r\n list.update(addOrUpdateSettings).then(function (d) {\r\n resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) });\r\n }).catch(function (e) { return reject(e); });\r\n }).catch(function (_) {\r\n _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) {\r\n resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) });\r\n }).catch(function (e) { return reject(e); });\r\n });\r\n });\r\n };\r\n /**\r\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\r\n */\r\n Lists.prototype.ensureSiteAssetsLibrary = function () {\r\n return this.clone(Lists_1, \"ensuresiteassetslibrary\").postCore().then(function (json) {\r\n return new List(odataUrlFrom(json));\r\n });\r\n };\r\n /**\r\n * Gets a list that is the default location for wiki pages.\r\n */\r\n Lists.prototype.ensureSitePagesLibrary = function () {\r\n return this.clone(Lists_1, \"ensuresitepageslibrary\").postCore().then(function (json) {\r\n return new List(odataUrlFrom(json));\r\n });\r\n };\r\n var Lists_1;\r\n Lists = Lists_1 = __decorate([\r\n defaultPath(\"lists\")\r\n ], Lists);\r\n return Lists;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single List instance\r\n *\r\n */\r\nvar List = /** @class */ (function (_super) {\r\n __extends(List, _super);\r\n function List() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(List.prototype, \"contentTypes\", {\r\n /**\r\n * Gets the content types in this list\r\n *\r\n */\r\n get: function () {\r\n return new ContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"items\", {\r\n /**\r\n * Gets the items in this list\r\n *\r\n */\r\n get: function () {\r\n return new Items(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"views\", {\r\n /**\r\n * Gets the views in this list\r\n *\r\n */\r\n get: function () {\r\n return new Views(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"fields\", {\r\n /**\r\n * Gets the fields in this list\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"forms\", {\r\n /**\r\n * Gets the forms in this list\r\n *\r\n */\r\n get: function () {\r\n return new Forms(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"defaultView\", {\r\n /**\r\n * Gets the default view of this list\r\n *\r\n */\r\n get: function () {\r\n return new View(this, \"DefaultView\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"userCustomActions\", {\r\n /**\r\n * Get all custom actions on a site collection\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"effectiveBasePermissions\", {\r\n /**\r\n * Gets the effective base permissions of this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"eventReceivers\", {\r\n /**\r\n * Gets the event receivers attached to this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"EventReceivers\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"relatedFields\", {\r\n /**\r\n * Gets the related fields of this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"getRelatedFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"informationRightsManagementSettings\", {\r\n /**\r\n * Gets the IRM settings for this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"InformationRightsManagementSettings\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"subscriptions\", {\r\n /**\r\n * Gets the webhook subscriptions of this list\r\n *\r\n */\r\n get: function () {\r\n return new Subscriptions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"rootFolder\", {\r\n /**\r\n * The root folder of the list\r\n */\r\n get: function () {\r\n return new Folder(this, \"rootFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a view by view guid id\r\n *\r\n */\r\n List.prototype.getView = function (viewId) {\r\n return new View(this, \"getView('\" + viewId + \"')\");\r\n };\r\n /**\r\n * Updates this list intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n /* tslint:disable no-string-literal */\r\n List.prototype.update = function (properties, eTag) {\r\n var _this = this;\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n var postBody = jsS(extend({\r\n \"__metadata\": { \"type\": \"SP.List\" },\r\n }, properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n var retList = _this;\r\n if (hOP(properties, \"Title\")) {\r\n retList = _this.getParent(List, _this.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\r\n }\r\n return {\r\n data: data,\r\n list: retList,\r\n };\r\n });\r\n };\r\n /* tslint:enable */\r\n /**\r\n * Delete this list\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n List.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\r\n */\r\n List.prototype.getChanges = function (query) {\r\n return this.clone(List, \"getchanges\").postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) }),\r\n });\r\n };\r\n /**\r\n * Returns a collection of items from the list based on the specified query.\r\n *\r\n * @param CamlQuery The Query schema of Collaborative Application Markup\r\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\r\n * to define queries against list data.\r\n * see:\r\n *\r\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\r\n *\r\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\r\n * the Entry or Collection of Entries identified by the Resource Path\r\n * section of the URI must be represented inline (i.e. eagerly loaded).\r\n * see:\r\n *\r\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\r\n *\r\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\r\n */\r\n List.prototype.getItemsByCAMLQuery = function (query) {\r\n var expands = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n expands[_i - 1] = arguments[_i];\r\n }\r\n var q = this.clone(List, \"getitems\");\r\n return q.expand.apply(q, expands).postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\r\n });\r\n };\r\n /**\r\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\r\n */\r\n List.prototype.getListItemChangesSinceToken = function (query) {\r\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\r\n }, { parse: function (r) { return r.text(); } });\r\n };\r\n /**\r\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n List.prototype.recycle = function () {\r\n return this.clone(List, \"recycle\").postCore().then(function (data) {\r\n if (hOP(data, \"Recycle\")) {\r\n return data.Recycle;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Renders list data based on the view xml provided\r\n */\r\n List.prototype.renderListData = function (viewXml) {\r\n var q = this.clone(List, \"renderlistdata(@viewXml)\");\r\n q.query.set(\"@viewXml\", \"'\" + viewXml + \"'\");\r\n return q.postCore().then(function (data) {\r\n // data will be a string, so we parse it again\r\n data = JSON.parse(data);\r\n if (hOP(data, \"RenderListData\")) {\r\n return data.RenderListData;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Returns the data for the specified query view\r\n *\r\n * @param parameters The parameters to be used to render list data as JSON string.\r\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\r\n */\r\n List.prototype.renderListDataAsStream = function (parameters, overrideParameters) {\r\n if (overrideParameters === void 0) { overrideParameters = null; }\r\n var postBody = {\r\n overrideParameters: extend(metadata(\"SP.RenderListDataOverrideParameters\"), overrideParameters),\r\n parameters: extend(metadata(\"SP.RenderListDataParameters\"), parameters),\r\n };\r\n return this.clone(List, \"RenderListDataAsStream\", true).postCore({\r\n body: jsS(postBody),\r\n });\r\n };\r\n /**\r\n * Gets the field values and field schema attributes for a list item.\r\n */\r\n List.prototype.renderListFormData = function (itemId, formId, mode) {\r\n return this.clone(List, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode='\" + mode + \"')\").postCore().then(function (data) {\r\n // data will be a string, so we parse it again\r\n data = JSON.parse(data);\r\n if (hOP(data, \"ListData\")) {\r\n return data.ListData;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Reserves a list item ID for idempotent list item creation.\r\n */\r\n List.prototype.reserveListItemId = function () {\r\n return this.clone(List, \"reservelistitemid\").postCore().then(function (data) {\r\n if (hOP(data, \"ReserveListItemId\")) {\r\n return data.ReserveListItemId;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\r\n *\r\n */\r\n List.prototype.getListItemEntityTypeFullName = function () {\r\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").get().then(function (o) { return o.ListItemEntityTypeFullName; });\r\n };\r\n /**\r\n * Creates an item using path (in a folder), validates and sets its field values.\r\n *\r\n * @param formValues The fields to change and their new values.\r\n * @param decodedUrl Path decoded url; folder's server relative path.\r\n * @param bNewDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\r\n * @param checkInComment Optional check in comment.\r\n */\r\n List.prototype.addValidateUpdateItemUsingPath = function (formValues, decodedUrl, bNewDocumentUpdate, checkInComment) {\r\n if (bNewDocumentUpdate === void 0) { bNewDocumentUpdate = false; }\r\n return this.clone(List, \"AddValidateUpdateItemUsingPath()\").postCore({\r\n body: jsS({\r\n bNewDocumentUpdate: bNewDocumentUpdate,\r\n checkInComment: checkInComment,\r\n formValues: formValues,\r\n listItemCreateInfo: {\r\n FolderPath: {\r\n DecodedUrl: decodedUrl,\r\n __metadata: { type: \"SP.ResourcePath\" },\r\n },\r\n __metadata: { type: \"SP.ListItemCreationInformationUsingPath\" },\r\n },\r\n }),\r\n }).then(function (res) {\r\n if (typeof res.AddValidateUpdateItemUsingPath !== \"undefined\") {\r\n return res.AddValidateUpdateItemUsingPath.results;\r\n }\r\n return res;\r\n });\r\n };\r\n return List;\r\n}(SharePointQueryableSecurable));\n\n/**\r\n * Represents a Collection of comments\r\n */\r\nvar Comments = /** @class */ (function (_super) {\r\n __extends(Comments, _super);\r\n function Comments() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(Comment);\r\n return _this;\r\n }\r\n Comments_1 = Comments;\r\n /**\r\n * Adds a new comment to this collection\r\n *\r\n * @param info Comment information to add\r\n */\r\n Comments.prototype.add = function (info) {\r\n var _this = this;\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n var postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Comments_1, null).postCore({ body: postBody }).then(function (d) {\r\n return extend(_this.getById(d.id), d);\r\n });\r\n };\r\n /**\r\n * Deletes all the comments in this collection\r\n */\r\n Comments.prototype.clear = function () {\r\n return this.clone(Comments_1, \"DeleteAll\").postCore();\r\n };\r\n var Comments_1;\r\n Comments = Comments_1 = __decorate([\r\n defaultPath(\"comments\")\r\n ], Comments);\r\n return Comments;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Represents a comment\r\n */\r\nvar Comment = /** @class */ (function (_super) {\r\n __extends(Comment, _super);\r\n function Comment() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Comment.prototype, \"replies\", {\r\n get: function () {\r\n return new Replies(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Likes the comment as the current user\r\n */\r\n Comment.prototype.like = function () {\r\n return this.clone(Comment, \"Like\").postCore();\r\n };\r\n /**\r\n * Unlikes the comment as the current user\r\n */\r\n Comment.prototype.unlike = function () {\r\n return this.clone(Comment, \"Unlike\").postCore();\r\n };\r\n /**\r\n * Deletes this comment\r\n */\r\n Comment.prototype.delete = function () {\r\n return this.clone(Comment, \"DeleteComment\").postCore();\r\n };\r\n return Comment;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Represents a Collection of comments\r\n */\r\nvar Replies = /** @class */ (function (_super) {\r\n __extends(Replies, _super);\r\n function Replies() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Replies_1 = Replies;\r\n /**\r\n * Adds a new reply to this collection\r\n *\r\n * @param info Comment information to add\r\n */\r\n Replies.prototype.add = function (info) {\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n var postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Replies_1, null).postCore({ body: postBody }).then(function (d) {\r\n return extend(new Comment(odataUrlFrom(d)), d);\r\n });\r\n };\r\n var Replies_1;\r\n Replies = Replies_1 = __decorate([\r\n defaultPath(\"replies\")\r\n ], Replies);\r\n return Replies;\r\n}(SharePointQueryableCollection));\n\n/**\r\n * Describes a collection of Item objects\r\n *\r\n */\r\nvar Items = /** @class */ (function (_super) {\r\n __extends(Items, _super);\r\n function Items() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(Item);\r\n return _this;\r\n }\r\n Items_1 = Items;\r\n /**\r\n * Gets BCS Item by string id\r\n *\r\n * @param stringId The string id of the BCS item to retrieve\r\n */\r\n Items.prototype.getItemByStringId = function (stringId) {\r\n // creates an item with the parent list path and append out method call\r\n return new Item(this.parentUrl, \"getItemByStringId('\" + stringId + \"')\");\r\n };\r\n /**\r\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\r\n *\r\n * @param skip The starting id where the page should start, use with top to specify pages\r\n * @param reverse It true the PagedPrev=true parameter is added allowing backwards navigation in the collection\r\n */\r\n Items.prototype.skip = function (skip, reverse) {\r\n if (reverse === void 0) { reverse = false; }\r\n if (reverse) {\r\n this.query.set(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&PagedPrev=TRUE&p_ID=\" + skip));\r\n }\r\n else {\r\n this.query.set(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + skip));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Gets a collection designed to aid in paging through data\r\n *\r\n */\r\n Items.prototype.getPaged = function () {\r\n return this.get(new PagedItemCollectionParser(this));\r\n };\r\n /**\r\n * Gets all the items in a list, regardless of count. Does not support batching or caching\r\n *\r\n * @param requestSize Number of items to return in each request (Default: 2000)\r\n * @param acceptHeader Allows for setting the value of the Accept header for SP 2013 support\r\n */\r\n Items.prototype.getAll = function (requestSize, acceptHeader) {\r\n if (requestSize === void 0) { requestSize = 2000; }\r\n if (acceptHeader === void 0) { acceptHeader = \"application/json;odata=nometadata\"; }\r\n Logger.write(\"Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.\", 2 /* Warning */);\r\n // this will be used for the actual query\r\n // and we set no metadata here to try and reduce traffic\r\n var items = new Items_1(this, \"\").top(requestSize).configure({\r\n headers: {\r\n \"Accept\": acceptHeader,\r\n },\r\n });\r\n // let's copy over the odata query params that can be applied\r\n // $top - allow setting the page size this way (override what we did above)\r\n // $select - allow picking the return fields (good behavior)\r\n // $filter - allow setting a filter, though this may fail due for large lists\r\n this.query.forEach(function (v, k) {\r\n if (/^\\$select|filter|top|expand$/i.test(k)) {\r\n items.query.set(k, v);\r\n }\r\n });\r\n // give back the promise\r\n return new Promise(function (resolve, reject) {\r\n // this will eventually hold the items we return\r\n var itemsCollector = [];\r\n // action that will gather up our results recursively\r\n var gatherer = function (last) {\r\n // collect that set of results\r\n [].push.apply(itemsCollector, last.results);\r\n // if we have more, repeat - otherwise resolve with the collected items\r\n if (last.hasNext) {\r\n last.getNext().then(gatherer).catch(reject);\r\n }\r\n else {\r\n resolve(itemsCollector);\r\n }\r\n };\r\n // start the cycle\r\n items.getPaged().then(gatherer).catch(reject);\r\n });\r\n };\r\n /**\r\n * Adds a new item to the collection\r\n *\r\n * @param properties The new items's properties\r\n * @param listItemEntityTypeFullName The type name of the list's entities\r\n */\r\n Items.prototype.add = function (properties, listItemEntityTypeFullName) {\r\n var _this = this;\r\n if (properties === void 0) { properties = {}; }\r\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\r\n var removeDependency = this.addBatchDependency();\r\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\r\n var postBody = jsS(extend(metadata(listItemEntityType), properties));\r\n var promise = _this.clone(Items_1, \"\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n item: _this.getById(data.Id),\r\n };\r\n });\r\n removeDependency();\r\n return promise;\r\n });\r\n };\r\n /**\r\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\r\n *\r\n * @param candidatelistItemEntityTypeFullName The potential type name\r\n */\r\n Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\r\n return candidatelistItemEntityTypeFullName ?\r\n Promise.resolve(candidatelistItemEntityTypeFullName) :\r\n this.getParent(List).getListItemEntityTypeFullName();\r\n };\r\n var Items_1;\r\n Items = Items_1 = __decorate([\r\n defaultPath(\"items\")\r\n ], Items);\r\n return Items;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Descrines a single Item instance\r\n *\r\n */\r\nvar Item = /** @class */ (function (_super) {\r\n __extends(Item, _super);\r\n function Item() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this item\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n Object.defineProperty(Item.prototype, \"attachmentFiles\", {\r\n /**\r\n * Gets the set of attachments for this item\r\n *\r\n */\r\n get: function () {\r\n return new AttachmentFiles(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"contentType\", {\r\n /**\r\n * Gets the content type for this item\r\n *\r\n */\r\n get: function () {\r\n return new ContentType(this, \"ContentType\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"comments\", {\r\n /**\r\n * Gets the collection of comments associated with this list item\r\n */\r\n get: function () {\r\n return new Comments(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"effectiveBasePermissions\", {\r\n /**\r\n * Gets the effective base permissions for the item\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"effectiveBasePermissionsForUI\", {\r\n /**\r\n * Gets the effective base permissions for the item in a UI context\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesAsHTML\", {\r\n /**\r\n * Gets the field values for this list item in their HTML representation\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesAsText\", {\r\n /**\r\n * Gets the field values for this list item in their text representation\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesAsText\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesForEdit\", {\r\n /**\r\n * Gets the field values for this list item for use in editing controls\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesForEdit\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"folder\", {\r\n /**\r\n * Gets the folder associated with this list item (if this item represents a folder)\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"folder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"file\", {\r\n /**\r\n * Gets the folder associated with this list item (if this item represents a folder)\r\n *\r\n */\r\n get: function () {\r\n return new File(this, \"file\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"versions\", {\r\n /**\r\n * Gets the collection of versions associated with this item\r\n */\r\n get: function () {\r\n return new ItemVersions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates this list intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n * @param listItemEntityTypeFullName The type name of the list's entities\r\n */\r\n Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) {\r\n var _this = this;\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\r\n return new Promise(function (resolve, reject) {\r\n var removeDependency = _this.addBatchDependency();\r\n return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\r\n var postBody = jsS(extend(metadata(listItemEntityType), properties));\r\n removeDependency();\r\n return _this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }, new ItemUpdatedParser()).then(function (data) {\r\n resolve({\r\n data: data,\r\n item: _this,\r\n });\r\n });\r\n }).catch(function (e) { return reject(e); });\r\n });\r\n };\r\n /**\r\n * Gets the collection of people who have liked this item\r\n */\r\n Item.prototype.getLikedBy = function () {\r\n return this.clone(Item, \"likedBy\").postCore();\r\n };\r\n /**\r\n * Likes this item as the current user\r\n */\r\n Item.prototype.like = function () {\r\n return this.clone(Item, \"like\").postCore();\r\n };\r\n /**\r\n * Unlikes this item as the current user\r\n */\r\n Item.prototype.unlike = function () {\r\n return this.clone(Item, \"unlike\").postCore();\r\n };\r\n /**\r\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n Item.prototype.recycle = function () {\r\n return this.clone(Item, \"recycle\").postCore();\r\n };\r\n /**\r\n * Gets a string representation of the full URL to the WOPI frame.\r\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\r\n *\r\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\r\n */\r\n Item.prototype.getWopiFrameUrl = function (action) {\r\n if (action === void 0) { action = 0; }\r\n var i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\r\n i.query.set(\"@action\", action);\r\n return i.postCore().then(function (data) {\r\n // handle verbose mode\r\n if (hOP(data, \"GetWOPIFrameUrl\")) {\r\n return data.GetWOPIFrameUrl;\r\n }\r\n return data;\r\n });\r\n };\r\n /**\r\n * Validates and sets the values of the specified collection of fields for the list item.\r\n *\r\n * @param formValues The fields to change and their new values.\r\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\r\n */\r\n Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) {\r\n if (newDocumentUpdate === void 0) { newDocumentUpdate = false; }\r\n return this.clone(Item, \"validateupdatelistitem\").postCore({\r\n body: jsS({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\r\n });\r\n };\r\n /**\r\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\r\n *\r\n * @param candidatelistItemEntityTypeFullName The potential type name\r\n */\r\n Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\r\n return candidatelistItemEntityTypeFullName ?\r\n Promise.resolve(candidatelistItemEntityTypeFullName) :\r\n this.getParent(List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\"))).getListItemEntityTypeFullName();\r\n };\r\n return Item;\r\n}(SharePointQueryableShareableItem));\r\n/**\r\n * Describes a collection of Version objects\r\n *\r\n */\r\nvar ItemVersions = /** @class */ (function (_super) {\r\n __extends(ItemVersions, _super);\r\n function ItemVersions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(ItemVersion);\r\n return _this;\r\n }\r\n ItemVersions = __decorate([\r\n defaultPath(\"versions\")\r\n ], ItemVersions);\r\n return ItemVersions;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single Version instance\r\n *\r\n */\r\nvar ItemVersion = /** @class */ (function (_super) {\r\n __extends(ItemVersion, _super);\r\n function ItemVersion() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete a specific version of a file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n return ItemVersion;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Provides paging functionality for list items\r\n */\r\nvar PagedItemCollection = /** @class */ (function () {\r\n function PagedItemCollection(parent, nextUrl, results) {\r\n this.parent = parent;\r\n this.nextUrl = nextUrl;\r\n this.results = results;\r\n }\r\n Object.defineProperty(PagedItemCollection.prototype, \"hasNext\", {\r\n /**\r\n * If true there are more results available in the set, otherwise there are not\r\n */\r\n get: function () {\r\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the next set of results, or resolves to null if no results are available\r\n */\r\n PagedItemCollection.prototype.getNext = function () {\r\n if (this.hasNext) {\r\n var items = new Items(this.nextUrl, null).configureFrom(this.parent);\r\n return items.getPaged();\r\n }\r\n return new Promise(function (r) { return r(null); });\r\n };\r\n return PagedItemCollection;\r\n}());\r\nvar PagedItemCollectionParser = /** @class */ (function (_super) {\r\n __extends(PagedItemCollectionParser, _super);\r\n function PagedItemCollectionParser(_parent) {\r\n var _this = _super.call(this) || this;\r\n _this._parent = _parent;\r\n return _this;\r\n }\r\n PagedItemCollectionParser.prototype.parse = function (r) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (_this.handleError(r, reject)) {\r\n r.json().then(function (json) {\r\n var nextUrl = hOP(json, \"d\") && hOP(json.d, \"__next\") ? json.d.__next : json[\"odata.nextLink\"];\r\n resolve(new PagedItemCollection(_this._parent, nextUrl, _this.parseODataJSON(json)));\r\n });\r\n }\r\n });\r\n };\r\n return PagedItemCollectionParser;\r\n}(ODataParserBase));\r\nvar ItemUpdatedParser = /** @class */ (function (_super) {\r\n __extends(ItemUpdatedParser, _super);\r\n function ItemUpdatedParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ItemUpdatedParser.prototype.parse = function (r) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (_this.handleError(r, reject)) {\r\n resolve({\r\n \"odata.etag\": r.headers.get(\"etag\"),\r\n });\r\n }\r\n });\r\n };\r\n return ItemUpdatedParser;\r\n}(ODataParserBase));\n\n/**\r\n * Describes a collection of File objects\r\n *\r\n */\r\nvar Files = /** @class */ (function (_super) {\r\n __extends(Files, _super);\r\n function Files() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Files_1 = Files;\r\n /**\r\n * Gets a File by filename\r\n *\r\n * @param name The name of the file, including extension.\r\n */\r\n Files.prototype.getByName = function (name) {\r\n var f = new File(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Uploads a file. Not supported for batching\r\n *\r\n * @param url The folder-relative url of the file.\r\n * @param content The file contents blob.\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\r\n * @returns The new File and the raw response.\r\n */\r\n Files.prototype.add = function (url, content, shouldOverWrite) {\r\n var _this = this;\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n return new Files_1(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\")\r\n .postCore({\r\n body: content,\r\n }).then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(url),\r\n };\r\n });\r\n };\r\n /**\r\n * Uploads a file. Not supported for batching\r\n *\r\n * @param url The folder-relative url of the file.\r\n * @param content The Blob file content to add\r\n * @param progress A callback function which can be used to track the progress of the upload\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\r\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\r\n * @returns The new File and the raw response.\r\n */\r\n Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) {\r\n var _this = this;\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n if (chunkSize === void 0) { chunkSize = 10485760; }\r\n var adder = this.clone(Files_1, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\", false);\r\n return adder.postCore()\r\n .then(function () { return _this.getByName(url); })\r\n .then(function (file) { return file.setContentChunked(content, progress, chunkSize); });\r\n };\r\n /**\r\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\r\n *\r\n * @param fileUrl The server-relative url where you want to save the file.\r\n * @param templateFileType The type of use to create the file.\r\n * @returns The template file that was added and the raw response.\r\n */\r\n Files.prototype.addTemplateFile = function (fileUrl, templateFileType) {\r\n var _this = this;\r\n return this.clone(Files_1, \"addTemplateFile(urloffile='\" + fileUrl + \"',templatefiletype=\" + templateFileType + \")\", false)\r\n .postCore().then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(fileUrl),\r\n };\r\n });\r\n };\r\n var Files_1;\r\n Files = Files_1 = __decorate([\r\n defaultPath(\"files\")\r\n ], Files);\r\n return Files;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single File instance\r\n *\r\n */\r\nvar File = /** @class */ (function (_super) {\r\n __extends(File, _super);\r\n function File() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(File.prototype, \"listItemAllFields\", {\r\n /**\r\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(File.prototype, \"versions\", {\r\n /**\r\n * Gets a collection of versions\r\n *\r\n */\r\n get: function () {\r\n return new Versions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Approves the file submitted for content approval with the specified comment.\r\n * Only documents in lists that are enabled for content approval can be approved.\r\n *\r\n * @param comment The comment for the approval.\r\n */\r\n File.prototype.approve = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n return this.clone(File, \"approve(comment='\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\r\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\r\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n */\r\n File.prototype.cancelUpload = function (uploadId) {\r\n return this.clone(File, \"cancelUpload(uploadId=guid'\" + uploadId + \"')\", false).postCore();\r\n };\r\n /**\r\n * Checks the file in to a document library based on the check-in type.\r\n *\r\n * @param comment A comment for the check-in. Its length must be <= 1023.\r\n * @param checkinType The check-in type for the file.\r\n */\r\n File.prototype.checkin = function (comment, checkinType) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (checkinType === void 0) { checkinType = CheckinType.Major; }\r\n if (comment.length > 1023) {\r\n throw new Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"checkin(comment='\" + comment + \"',checkintype=\" + checkinType + \")\").postCore();\r\n };\r\n /**\r\n * Checks out the file from a document library.\r\n */\r\n File.prototype.checkout = function () {\r\n return this.clone(File, \"checkout\").postCore();\r\n };\r\n /**\r\n * Copies the file to the destination url.\r\n *\r\n * @param url The absolute url or server relative url of the destination file path to copy to.\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\r\n */\r\n File.prototype.copyTo = function (url, shouldOverWrite) {\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n return this.clone(File, \"copyTo(strnewurl='\" + url + \"',boverwrite=\" + shouldOverWrite + \")\").postCore();\r\n };\r\n /**\r\n * Delete this file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n File.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.clone(File, null).postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Denies approval for a file that was submitted for content approval.\r\n * Only documents in lists that are enabled for content approval can be denied.\r\n *\r\n * @param comment The comment for the denial.\r\n */\r\n File.prototype.deny = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw new Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"deny(comment='\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\r\n * An exception is thrown if the file is not an ASPX page.\r\n *\r\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\r\n */\r\n File.prototype.getLimitedWebPartManager = function (scope) {\r\n if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; }\r\n return new LimitedWebPartManager(this, \"getLimitedWebPartManager(scope=\" + scope + \")\");\r\n };\r\n /**\r\n * Moves the file to the specified destination url.\r\n *\r\n * @param url The absolute url or server relative url of the destination file path to move to.\r\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\r\n */\r\n File.prototype.moveTo = function (url, moveOperations) {\r\n if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; }\r\n return this.clone(File, \"moveTo(newurl='\" + url + \"',flags=\" + moveOperations + \")\").postCore();\r\n };\r\n /**\r\n * Submits the file for content approval with the specified comment.\r\n *\r\n * @param comment The comment for the published file. Its length must be <= 1023.\r\n */\r\n File.prototype.publish = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw new Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"publish(comment='\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n *\r\n * @returns The GUID of the recycled file.\r\n */\r\n File.prototype.recycle = function () {\r\n return this.clone(File, \"recycle\").postCore();\r\n };\r\n /**\r\n * Reverts an existing checkout for the file.\r\n *\r\n */\r\n File.prototype.undoCheckout = function () {\r\n return this.clone(File, \"undoCheckout\").postCore();\r\n };\r\n /**\r\n * Removes the file from content approval or unpublish a major version.\r\n *\r\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\r\n */\r\n File.prototype.unpublish = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw new Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"unpublish(comment='\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Gets the contents of the file as text. Not supported in batching.\r\n *\r\n */\r\n File.prototype.getText = function () {\r\n return this.clone(File, \"$value\", false).get(new TextParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\r\n *\r\n */\r\n File.prototype.getBlob = function () {\r\n return this.clone(File, \"$value\", false).get(new BlobParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\r\n */\r\n File.prototype.getBuffer = function () {\r\n return this.clone(File, \"$value\", false).get(new BufferParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\r\n */\r\n File.prototype.getJSON = function () {\r\n return this.clone(File, \"$value\", false).get(new JSONParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\r\n *\r\n * @param content The file content\r\n *\r\n */\r\n File.prototype.setContent = function (content) {\r\n var _this = this;\r\n return this.clone(File, \"$value\", false).postCore({\r\n body: content,\r\n headers: {\r\n \"X-HTTP-Method\": \"PUT\",\r\n },\r\n }).then(function (_) { return new File(_this); });\r\n };\r\n /**\r\n * Gets the associated list item for this folder, loading the default properties\r\n */\r\n File.prototype.getItem = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n var q = this.listItemAllFields;\r\n return q.select.apply(q, selects).get().then(function (d) {\r\n return extend(new Item(odataUrlFrom(d)), d);\r\n });\r\n };\r\n /**\r\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\r\n *\r\n * @param file The file to upload\r\n * @param progress A callback function which can be used to track the progress of the upload\r\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\r\n */\r\n File.prototype.setContentChunked = function (file, progress, chunkSize) {\r\n var _this = this;\r\n if (chunkSize === void 0) { chunkSize = 10485760; }\r\n if (progress === undefined) {\r\n progress = function () { return null; };\r\n }\r\n var fileSize = file.size;\r\n var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\r\n var uploadId = getGUID();\r\n // start the chain with the first fragment\r\n progress({ uploadId: uploadId, blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\r\n var chain = this.startUpload(uploadId, file.slice(0, chunkSize));\r\n var _loop_1 = function (i) {\r\n chain = chain.then(function (pointer) {\r\n progress({ uploadId: uploadId, blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\r\n return _this.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\r\n });\r\n };\r\n // skip the first and last blocks\r\n for (var i = 2; i < blockCount; i++) {\r\n _loop_1(i);\r\n }\r\n return chain.then(function (pointer) {\r\n progress({ uploadId: uploadId, blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\r\n return _this.finishUpload(uploadId, pointer, file.slice(pointer));\r\n });\r\n };\r\n /**\r\n * Starts a new chunk upload session and uploads the first fragment.\r\n * The current file content is not changed when this method completes.\r\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\r\n * The upload session ends either when you use the CancelUpload method or when you successfully\r\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\r\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\r\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fragment The file contents.\r\n * @returns The size of the total uploaded data in bytes.\r\n */\r\n File.prototype.startUpload = function (uploadId, fragment) {\r\n return this.clone(File, \"startUpload(uploadId=guid'\" + uploadId + \"')\", false)\r\n .postCore({ body: fragment })\r\n .then(function (n) {\r\n // When OData=verbose the payload has the following shape:\r\n // { StartUpload: \"10485760\" }\r\n if (typeof n === \"object\") {\r\n n = n.StartUpload;\r\n }\r\n return parseFloat(n);\r\n });\r\n };\r\n /**\r\n * Continues the chunk upload session with an additional fragment.\r\n * The current file content is not changed.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fileOffset The size of the offset into the file where the fragment starts.\r\n * @param fragment The file contents.\r\n * @returns The size of the total uploaded data in bytes.\r\n */\r\n File.prototype.continueUpload = function (uploadId, fileOffset, fragment) {\r\n return this.clone(File, \"continueUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false)\r\n .postCore({ body: fragment })\r\n .then(function (n) {\r\n // When OData=verbose the payload has the following shape:\r\n // { ContinueUpload: \"20971520\" }\r\n if (typeof n === \"object\") {\r\n n = n.ContinueUpload;\r\n }\r\n return parseFloat(n);\r\n });\r\n };\r\n /**\r\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fileOffset The size of the offset into the file where the fragment starts.\r\n * @param fragment The file contents.\r\n * @returns The newly uploaded file.\r\n */\r\n File.prototype.finishUpload = function (uploadId, fileOffset, fragment) {\r\n return this.clone(File, \"finishUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false)\r\n .postCore({ body: fragment })\r\n .then(function (response) {\r\n return {\r\n data: response,\r\n file: new File(odataUrlFrom(response)),\r\n };\r\n });\r\n };\r\n return File;\r\n}(SharePointQueryableShareableFile));\r\n/**\r\n * Describes a collection of Version objects\r\n *\r\n */\r\nvar Versions = /** @class */ (function (_super) {\r\n __extends(Versions, _super);\r\n function Versions() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(Version);\r\n return _this;\r\n }\r\n Versions_1 = Versions;\r\n /**\r\n * Deletes all the file version objects in the collection.\r\n *\r\n */\r\n Versions.prototype.deleteAll = function () {\r\n return new Versions_1(this, \"deleteAll\").postCore();\r\n };\r\n /**\r\n * Deletes the specified version of the file.\r\n *\r\n * @param versionId The ID of the file version to delete.\r\n */\r\n Versions.prototype.deleteById = function (versionId) {\r\n return this.clone(Versions_1, \"deleteById(vid=\" + versionId + \")\").postCore();\r\n };\r\n /**\r\n * Recycles the specified version of the file.\r\n *\r\n * @param versionId The ID of the file version to delete.\r\n */\r\n Versions.prototype.recycleByID = function (versionId) {\r\n return this.clone(Versions_1, \"recycleByID(vid=\" + versionId + \")\").postCore();\r\n };\r\n /**\r\n * Deletes the file version object with the specified version label.\r\n *\r\n * @param label The version label of the file version to delete, for example: 1.2\r\n */\r\n Versions.prototype.deleteByLabel = function (label) {\r\n return this.clone(Versions_1, \"deleteByLabel(versionlabel='\" + label + \"')\").postCore();\r\n };\r\n /**\r\n * Recycles the file version object with the specified version label.\r\n *\r\n * @param label The version label of the file version to delete, for example: 1.2\r\n */\r\n Versions.prototype.recycleByLabel = function (label) {\r\n return this.clone(Versions_1, \"recycleByLabel(versionlabel='\" + label + \"')\").postCore();\r\n };\r\n /**\r\n * Creates a new file version from the file specified by the version label.\r\n *\r\n * @param label The version label of the file version to restore, for example: 1.2\r\n */\r\n Versions.prototype.restoreByLabel = function (label) {\r\n return this.clone(Versions_1, \"restoreByLabel(versionlabel='\" + label + \"')\").postCore();\r\n };\r\n var Versions_1;\r\n Versions = Versions_1 = __decorate([\r\n defaultPath(\"versions\")\r\n ], Versions);\r\n return Versions;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a single Version instance\r\n *\r\n */\r\nvar Version = /** @class */ (function (_super) {\r\n __extends(Version, _super);\r\n function Version() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete a specific version of a file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n // /**\r\n // * Delete a specific version of a file.\r\n // *\r\n // * @param eTag Value used in the IF-Match header, by default \"*\"\r\n // */\r\n // public delete(eTag = \"*\"): Promise {\r\n // return this.postCore({\r\n // headers: {\r\n // \"IF-Match\": eTag,\r\n // \"X-HTTP-Method\": \"DELETE\",\r\n // },\r\n // });\r\n // }\r\n }\r\n return Version;\r\n}(SharePointQueryableInstance));\r\nvar CheckinType;\r\n(function (CheckinType) {\r\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\r\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\r\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\r\n})(CheckinType || (CheckinType = {}));\r\nvar WebPartsPersonalizationScope;\r\n(function (WebPartsPersonalizationScope) {\r\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\r\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\r\n})(WebPartsPersonalizationScope || (WebPartsPersonalizationScope = {}));\r\nvar MoveOperations;\r\n(function (MoveOperations) {\r\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\r\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\r\n})(MoveOperations || (MoveOperations = {}));\r\nvar TemplateFileType;\r\n(function (TemplateFileType) {\r\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\r\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\r\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\r\n TemplateFileType[TemplateFileType[\"ClientSidePage\"] = 3] = \"ClientSidePage\";\r\n})(TemplateFileType || (TemplateFileType = {}));\n\n/**\r\n * Represents an app catalog\r\n */\r\nvar AppCatalog = /** @class */ (function (_super) {\r\n __extends(AppCatalog, _super);\r\n function AppCatalog(baseUrl, path) {\r\n if (path === void 0) { path = \"_api/web/tenantappcatalog/AvailableApps\"; }\r\n return _super.call(this, extractWebUrl(typeof baseUrl === \"string\" ? baseUrl : baseUrl.toUrl()), path) || this;\r\n }\r\n /**\r\n * Get details of specific app from the app catalog\r\n * @param id - Specify the guid of the app\r\n */\r\n AppCatalog.prototype.getAppById = function (id) {\r\n return new App(this, \"getById('\" + id + \"')\");\r\n };\r\n /**\r\n * Uploads an app package. Not supported for batching\r\n *\r\n * @param filename Filename to create.\r\n * @param content app package data (eg: the .app or .sppkg file).\r\n * @param shouldOverWrite Should an app with the same name in the same location be overwritten? (default: true)\r\n * @returns Promise\r\n */\r\n AppCatalog.prototype.add = function (filename, content, shouldOverWrite) {\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n // you don't add to the availableapps collection\r\n var adder = new AppCatalog(extractWebUrl(this.toUrl()), \"_api/web/tenantappcatalog/add(overwrite=\" + shouldOverWrite + \",url='\" + filename + \"')\");\r\n return adder.postCore({\r\n body: content,\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n file: new File(odataUrlFrom(r)),\r\n };\r\n });\r\n };\r\n return AppCatalog;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Represents the actions you can preform on a given app within the catalog\r\n */\r\nvar App = /** @class */ (function (_super) {\r\n __extends(App, _super);\r\n function App() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * This method deploys an app on the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n */\r\n App.prototype.deploy = function () {\r\n return this.clone(App, \"Deploy\").postCore();\r\n };\r\n /**\r\n * This method retracts a deployed app on the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n */\r\n App.prototype.retract = function () {\r\n return this.clone(App, \"Retract\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already deployed to be installed on a web\r\n */\r\n App.prototype.install = function () {\r\n return this.clone(App, \"Install\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already insatlled to be uninstalled on a web\r\n */\r\n App.prototype.uninstall = function () {\r\n return this.clone(App, \"Uninstall\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already insatlled to be upgraded on a web\r\n */\r\n App.prototype.upgrade = function () {\r\n return this.clone(App, \"Upgrade\").postCore();\r\n };\r\n /**\r\n * This method removes an app from the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n */\r\n App.prototype.remove = function () {\r\n return this.clone(App, \"Remove\").postCore();\r\n };\r\n return App;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Manages a batch of OData operations\r\n */\r\nvar SPBatch = /** @class */ (function (_super) {\r\n __extends(SPBatch, _super);\r\n function SPBatch(baseUrl) {\r\n var _this = _super.call(this) || this;\r\n _this.baseUrl = baseUrl;\r\n return _this;\r\n }\r\n /**\r\n * Parses the response from a batch request into an array of Response instances\r\n *\r\n * @param body Text body of the response from the batch request\r\n */\r\n SPBatch.ParseResponse = function (body) {\r\n return new Promise(function (resolve, reject) {\r\n var responses = [];\r\n var header = \"--batchresponse_\";\r\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\r\n var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\r\n var lines = body.split(\"\\n\");\r\n var state = \"batch\";\r\n var status;\r\n var statusText;\r\n for (var i = 0; i < lines.length; ++i) {\r\n var line = lines[i];\r\n switch (state) {\r\n case \"batch\":\r\n if (line.substr(0, header.length) === header) {\r\n state = \"batchHeaders\";\r\n }\r\n else {\r\n if (line.trim() !== \"\") {\r\n throw new Error(\"Invalid response, line \" + i);\r\n }\r\n }\r\n break;\r\n case \"batchHeaders\":\r\n if (line.trim() === \"\") {\r\n state = \"status\";\r\n }\r\n break;\r\n case \"status\":\r\n var parts = statusRegExp.exec(line);\r\n if (parts.length !== 3) {\r\n throw new Error(\"Invalid status, line \" + i);\r\n }\r\n status = parseInt(parts[1], 10);\r\n statusText = parts[2];\r\n state = \"statusHeaders\";\r\n break;\r\n case \"statusHeaders\":\r\n if (line.trim() === \"\") {\r\n state = \"body\";\r\n }\r\n break;\r\n case \"body\":\r\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\r\n state = \"batch\";\r\n break;\r\n }\r\n }\r\n if (state !== \"status\") {\r\n reject(new Error(\"Unexpected end of input\"));\r\n }\r\n resolve(responses);\r\n });\r\n };\r\n SPBatch.prototype.executeImpl = function () {\r\n var _this = this;\r\n Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this.requests.length + \" requests.\", 1 /* Info */);\r\n // if we don't have any requests, don't bother sending anything\r\n // this could be due to caching further upstream, or just an empty batch\r\n if (this.requests.length < 1) {\r\n Logger.write(\"Resolving empty batch.\", 1 /* Info */);\r\n return Promise.resolve();\r\n }\r\n // creating the client here allows the url to be populated for nodejs client as well as potentially\r\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\r\n // below to be correct\r\n var client = new SPHttpClient();\r\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\r\n // and for sending the entire batch\r\n return toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\r\n // build all the requests, send them, pipe results in order to parsers\r\n var batchBody = [];\r\n var currentChangeSetId = \"\";\r\n for (var i = 0; i < _this.requests.length; i++) {\r\n var reqInfo = _this.requests[i];\r\n if (reqInfo.method === \"GET\") {\r\n if (currentChangeSetId.length > 0) {\r\n // end an existing change set\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\r\n currentChangeSetId = \"\";\r\n }\r\n batchBody.push(\"--batch_\" + _this.batchId + \"\\n\");\r\n }\r\n else {\r\n if (currentChangeSetId.length < 1) {\r\n // start new change set\r\n currentChangeSetId = getGUID();\r\n batchBody.push(\"--batch_\" + _this.batchId + \"\\n\");\r\n batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\r\n }\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\r\n }\r\n // common batch part prefix\r\n batchBody.push(\"Content-Type: application/http\\n\");\r\n batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\r\n var headers = new Headers();\r\n // this is the url of the individual request within the batch\r\n var url = isUrlAbsolute(reqInfo.url) ? reqInfo.url : combine(absoluteRequestUrl, reqInfo.url);\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", 0 /* Verbose */);\r\n if (reqInfo.method !== \"GET\") {\r\n var method = reqInfo.method;\r\n var castHeaders = reqInfo.options.headers;\r\n if (hOP(reqInfo, \"options\") && hOP(reqInfo.options, \"headers\") && castHeaders[\"X-HTTP-Method\"] !== undefined) {\r\n method = castHeaders[\"X-HTTP-Method\"];\r\n delete castHeaders[\"X-HTTP-Method\"];\r\n }\r\n batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\r\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n else {\r\n batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\r\n }\r\n // merge global config headers\r\n mergeHeaders(headers, SPRuntimeConfig.headers);\r\n // merge per-request headers\r\n if (reqInfo.options) {\r\n mergeHeaders(headers, reqInfo.options.headers);\r\n }\r\n // lastly we apply any default headers we need that may not exist\r\n if (!headers.has(\"Accept\")) {\r\n headers.append(\"Accept\", \"application/json\");\r\n }\r\n if (!headers.has(\"Content-Type\")) {\r\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n if (!headers.has(\"X-ClientService-ClientTag\")) {\r\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-1.2.0\");\r\n }\r\n // write headers into batch body\r\n headers.forEach(function (value, name) {\r\n batchBody.push(name + \": \" + value + \"\\n\");\r\n });\r\n batchBody.push(\"\\n\");\r\n if (reqInfo.options.body) {\r\n batchBody.push(reqInfo.options.body + \"\\n\\n\");\r\n }\r\n }\r\n if (currentChangeSetId.length > 0) {\r\n // Close the changeset\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\r\n currentChangeSetId = \"\";\r\n }\r\n batchBody.push(\"--batch_\" + _this.batchId + \"--\\n\");\r\n var batchOptions = {\r\n \"body\": batchBody.join(\"\"),\r\n \"headers\": {\r\n \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this.batchId,\r\n },\r\n \"method\": \"POST\",\r\n };\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", 1 /* Info */);\r\n return client.fetch(combine(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\r\n .then(function (r) { return r.text(); })\r\n .then(SPBatch.ParseResponse)\r\n .then(function (responses) {\r\n if (responses.length !== _this.requests.length) {\r\n throw new Error(\"Could not properly parse responses to match requests in batch.\");\r\n }\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", 1 /* Info */);\r\n return responses.reduce(function (chain, response, index) {\r\n var request = _this.requests[index];\r\n Logger.write(\"[\" + request.id + \"] (\" + (new Date()).getTime() + \") Resolving request in batch \" + _this.batchId + \".\", 1 /* Info */);\r\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\r\n }, Promise.resolve());\r\n });\r\n });\r\n };\r\n return SPBatch;\r\n}(ODataBatch));\n\n/**\r\n * Page promotion state\r\n */\r\nvar PromotedState;\r\n(function (PromotedState) {\r\n /**\r\n * Regular client side page\r\n */\r\n PromotedState[PromotedState[\"NotPromoted\"] = 0] = \"NotPromoted\";\r\n /**\r\n * Page that will be promoted as news article after publishing\r\n */\r\n PromotedState[PromotedState[\"PromoteOnPublish\"] = 1] = \"PromoteOnPublish\";\r\n /**\r\n * Page that is promoted as news article\r\n */\r\n PromotedState[PromotedState[\"Promoted\"] = 2] = \"Promoted\";\r\n})(PromotedState || (PromotedState = {}));\r\n/**\r\n * Gets the next order value 1 based for the provided collection\r\n *\r\n * @param collection Collection of orderable things\r\n */\r\nfunction getNextOrder(collection) {\r\n if (collection.length < 1) {\r\n return 1;\r\n }\r\n return Math.max.apply(null, collection.map(function (i) { return i.order; })) + 1;\r\n}\r\n/**\r\n * After https://stackoverflow.com/questions/273789/is-there-a-version-of-javascripts-string-indexof-that-allows-for-regular-expr/274094#274094\r\n *\r\n * @param this Types the called context this to a string in which the search will be conducted\r\n * @param regex A regex or string to match\r\n * @param startpos A starting position from which the search will begin\r\n */\r\nfunction regexIndexOf(regex, startpos) {\r\n if (startpos === void 0) { startpos = 0; }\r\n var indexOf = this.substring(startpos).search(regex);\r\n return (indexOf >= 0) ? (indexOf + (startpos)) : indexOf;\r\n}\r\n/**\r\n * Finds bounded blocks of markup bounded by divs, ensuring to match the ending div even with nested divs in the interstitial markup\r\n *\r\n * @param html HTML to search\r\n * @param boundaryStartPattern The starting pattern to find, typically a div with attribute\r\n * @param collector A func to take the found block and provide a way to form it into a useful return that is added into the return array\r\n */\r\nfunction getBoundedDivMarkup(html, boundaryStartPattern, collector) {\r\n var blocks = [];\r\n if (html === undefined || html === null) {\r\n return blocks;\r\n }\r\n // remove some extra whitespace if present\r\n var cleanedHtml = html.replace(/[\\t\\r\\n]/g, \"\");\r\n // find the first div\r\n var startIndex = regexIndexOf.call(cleanedHtml, boundaryStartPattern);\r\n if (startIndex < 0) {\r\n // we found no blocks in the supplied html\r\n return blocks;\r\n }\r\n // this loop finds each of the blocks\r\n while (startIndex > -1) {\r\n // we have one open div counting from the one found above using boundaryStartPattern so we need to ensure we find it's close\r\n var openCounter = 1;\r\n var searchIndex = startIndex + 1;\r\n var nextDivOpen = -1;\r\n var nextCloseDiv = -1;\r\n // this loop finds the tag that matches the opening of the control\r\n while (true) {\r\n // find both the next opening and closing div tags from our current searching index\r\n nextDivOpen = regexIndexOf.call(cleanedHtml, /]*>/i, searchIndex);\r\n nextCloseDiv = regexIndexOf.call(cleanedHtml, /<\\/div>/i, searchIndex);\r\n if (nextDivOpen < 0) {\r\n // we have no more opening divs, just set this to simplify checks below\r\n nextDivOpen = cleanedHtml.length + 1;\r\n }\r\n // determine which we found first, then increment or decrement our counter\r\n // and set the location to begin searching again\r\n if (nextDivOpen < nextCloseDiv) {\r\n openCounter++;\r\n searchIndex = nextDivOpen + 1;\r\n }\r\n else if (nextCloseDiv < nextDivOpen) {\r\n openCounter--;\r\n searchIndex = nextCloseDiv + 1;\r\n }\r\n // once we have no open divs back to the level of the opening control div\r\n // meaning we have all of the markup we intended to find\r\n if (openCounter === 0) {\r\n // get the bounded markup, +6 is the size of the ending tag\r\n var markup = cleanedHtml.substring(startIndex, nextCloseDiv + 6).trim();\r\n // save the control data we found to the array\r\n blocks.push(collector(markup));\r\n // get out of our while loop\r\n break;\r\n }\r\n if (openCounter > 1000 || openCounter < 0) {\r\n // this is an arbitrary cut-off but likely we will not have 1000 nested divs\r\n // something has gone wrong above and we are probably stuck in our while loop\r\n // let's get out of our while loop and not hang everything\r\n throw new Error(\"getBoundedDivMarkup exceeded depth parameters.\");\r\n }\r\n }\r\n // get the start of the next control\r\n startIndex = regexIndexOf.call(cleanedHtml, boundaryStartPattern, nextCloseDiv);\r\n }\r\n return blocks;\r\n}\r\n/**\r\n * Normalizes the order value for all the sections, columns, and controls to be 1 based and stepped (1, 2, 3...)\r\n *\r\n * @param collection The collection to normalize\r\n */\r\nfunction reindex(collection) {\r\n for (var i = 0; i < collection.length; i++) {\r\n collection[i].order = i + 1;\r\n if (hOP(collection[i], \"columns\")) {\r\n reindex(collection[i].columns);\r\n }\r\n else if (hOP(collection[i], \"controls\")) {\r\n reindex(collection[i].controls);\r\n }\r\n }\r\n}\r\n/**\r\n * Represents the data and methods associated with client side \"modern\" pages\r\n */\r\nvar ClientSidePage = /** @class */ (function (_super) {\r\n __extends(ClientSidePage, _super);\r\n /**\r\n * Creates a new instance of the ClientSidePage class\r\n *\r\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection\r\n * @param commentsDisabled Indicates if comments are disabled, not valid until load is called\r\n */\r\n function ClientSidePage(file, sections, commentsDisabled) {\r\n if (sections === void 0) { sections = []; }\r\n if (commentsDisabled === void 0) { commentsDisabled = false; }\r\n var _this = _super.call(this, file) || this;\r\n _this.sections = sections;\r\n _this.commentsDisabled = commentsDisabled;\r\n return _this;\r\n }\r\n /**\r\n * Creates a new blank page within the supplied library\r\n *\r\n * @param library The library in which to create the page\r\n * @param pageName Filename of the page, such as \"page.aspx\"\r\n * @param title The display title of the page\r\n * @param pageLayoutType Layout type of the page to use\r\n */\r\n ClientSidePage.create = function (library, pageName, title, pageLayoutType) {\r\n if (pageLayoutType === void 0) { pageLayoutType = \"Article\"; }\r\n // see if file exists, if not create it\r\n return library.rootFolder.files.select(\"Name\").filter(\"Name eq '\" + pageName + \"'\").get().then(function (fs) {\r\n if (fs.length > 0) {\r\n throw new Error(\"A file with the name '\" + pageName + \"' already exists in the library '\" + library.toUrl() + \"'.\");\r\n }\r\n // get our server relative path\r\n return library.rootFolder.select(\"ServerRelativePath\").get().then(function (path) {\r\n var pageServerRelPath = combine(\"/\", path.ServerRelativePath.DecodedUrl, pageName);\r\n // add the template file\r\n return library.rootFolder.files.addTemplateFile(pageServerRelPath, TemplateFileType.ClientSidePage).then(function (far) {\r\n // get the item associated with the file\r\n return far.file.getItem().then(function (i) {\r\n // update the item to have the correct values to create the client side page\r\n return i.update({\r\n BannerImageUrl: {\r\n Url: \"/_layouts/15/images/sitepagethumbnail.png\",\r\n },\r\n CanvasContent1: \"\",\r\n ClientSideApplicationId: \"b6917cb1-93a0-4b97-a84d-7cf49975d4ec\",\r\n ContentTypeId: \"0x0101009D1CB255DA76424F860D91F20E6C4118\",\r\n PageLayoutType: pageLayoutType,\r\n PromotedState: 0 /* NotPromoted */,\r\n Title: title,\r\n }).then(function (iar) { return new ClientSidePage(iar.item.file, iar.item.CommentsDisabled); });\r\n });\r\n });\r\n });\r\n });\r\n };\r\n /**\r\n * Creates a new ClientSidePage instance from the provided html content string\r\n *\r\n * @param html HTML markup representing the page\r\n */\r\n ClientSidePage.fromFile = function (file) {\r\n var page = new ClientSidePage(file);\r\n return page.load().then(function (_) { return page; });\r\n };\r\n /**\r\n * Converts a json object to an escaped string appropriate for use in attributes when storing client-side controls\r\n *\r\n * @param json The json object to encode into a string\r\n */\r\n ClientSidePage.jsonToEscapedString = function (json) {\r\n return jsS(json)\r\n .replace(/\"/g, \""\")\r\n .replace(/:/g, \":\")\r\n .replace(/{/g, \"{\")\r\n .replace(/}/g, \"}\")\r\n .replace(/\\[/g, \"\\[\")\r\n .replace(/\\]/g, \"\\]\")\r\n .replace(/\\./g, \"\\.\");\r\n };\r\n /**\r\n * Converts an escaped string from a client-side control attribute to a json object\r\n *\r\n * @param escapedString\r\n */\r\n ClientSidePage.escapedStringToJson = function (escapedString) {\r\n var unespace = function (escaped) {\r\n var mapDict = [\r\n [/"/g, \"\\\"\"], [/:/g, \":\"], [/{/g, \"{\"], [/}/g, \"}\"],\r\n [/\\\\\\\\/g, \"\\\\\"], [/\\\\\\?/g, \"?\"], [/\\\\\\./g, \".\"], [/\\\\\\[/g, \"[\"], [/\\\\\\]/g, \"]\"],\r\n [/\\\\\\(/g, \"(\"], [/\\\\\\)/g, \")\"], [/\\\\\\|/g, \"|\"], [/\\\\\\+/g, \"+\"],\r\n ];\r\n return mapDict.reduce(function (r, m) { return r.replace(m[0], m[1]); }, escaped);\r\n };\r\n return JSON.parse(unespace(escapedString));\r\n };\r\n /**\r\n * Add a section to this page\r\n */\r\n ClientSidePage.prototype.addSection = function () {\r\n var section = new CanvasSection(this, getNextOrder(this.sections));\r\n this.sections.push(section);\r\n return section;\r\n };\r\n /**\r\n * Converts this page's content to html markup\r\n */\r\n ClientSidePage.prototype.toHtml = function () {\r\n // trigger reindex of the entire tree\r\n reindex(this.sections);\r\n var html = [];\r\n html.push(\"
\");\r\n for (var i = 0; i < this.sections.length; i++) {\r\n html.push(this.sections[i].toHtml());\r\n }\r\n html.push(\"
\");\r\n return html.join(\"\");\r\n };\r\n /**\r\n * Loads this page instance's content from the supplied html\r\n *\r\n * @param html html string representing the page's content\r\n */\r\n ClientSidePage.prototype.fromHtml = function (html) {\r\n var _this = this;\r\n // reset sections\r\n this.sections = [];\r\n // gather our controls from the supplied html\r\n getBoundedDivMarkup(html, /]*data-sp-canvascontrol[^>]*?>/i, function (markup) {\r\n // get the control type\r\n var ct = /controlType":(\\d*?),/i.exec(markup);\r\n // if no control type is present this is a column which we give type 0 to let us process it\r\n var controlType = ct == null || ct.length < 2 ? 0 : parseInt(ct[1], 10);\r\n var control = null;\r\n switch (controlType) {\r\n case 0:\r\n // empty canvas column\r\n control = new CanvasColumn(null, 0);\r\n control.fromHtml(markup);\r\n _this.mergeColumnToTree(control);\r\n break;\r\n case 3:\r\n // client side webpart\r\n control = new ClientSideWebpart(\"\");\r\n control.fromHtml(markup);\r\n _this.mergePartToTree(control);\r\n break;\r\n case 4:\r\n // client side text\r\n control = new ClientSideText();\r\n control.fromHtml(markup);\r\n _this.mergePartToTree(control);\r\n break;\r\n }\r\n });\r\n // refresh all the orders within the tree\r\n reindex(this.sections);\r\n return this;\r\n };\r\n /**\r\n * Loads this page's content from the server\r\n */\r\n ClientSidePage.prototype.load = function () {\r\n var _this = this;\r\n return this.getItem(\"CanvasContent1\", \"CommentsDisabled\").then(function (item) {\r\n _this.fromHtml(item.CanvasContent1);\r\n _this.commentsDisabled = item.CommentsDisabled;\r\n });\r\n };\r\n /**\r\n * Persists the content changes (sections, columns, and controls)\r\n */\r\n ClientSidePage.prototype.save = function () {\r\n return this.updateProperties({ CanvasContent1: this.toHtml() });\r\n };\r\n /**\r\n * Enables comments on this page\r\n */\r\n ClientSidePage.prototype.enableComments = function () {\r\n var _this = this;\r\n return this.setCommentsOn(true).then(function (r) {\r\n _this.commentsDisabled = false;\r\n return r;\r\n });\r\n };\r\n /**\r\n * Disables comments on this page\r\n */\r\n ClientSidePage.prototype.disableComments = function () {\r\n var _this = this;\r\n return this.setCommentsOn(false).then(function (r) {\r\n _this.commentsDisabled = true;\r\n return r;\r\n });\r\n };\r\n /**\r\n * Finds a control by the specified instance id\r\n *\r\n * @param id Instance id of the control to find\r\n */\r\n ClientSidePage.prototype.findControlById = function (id) {\r\n return this.findControl(function (c) { return c.id === id; });\r\n };\r\n /**\r\n * Finds a control within this page's control tree using the supplied predicate\r\n *\r\n * @param predicate Takes a control and returns true or false, if true that control is returned by findControl\r\n */\r\n ClientSidePage.prototype.findControl = function (predicate) {\r\n // check all sections\r\n for (var i = 0; i < this.sections.length; i++) {\r\n // check all columns\r\n for (var j = 0; j < this.sections[i].columns.length; j++) {\r\n // check all controls\r\n for (var k = 0; k < this.sections[i].columns[j].controls.length; k++) {\r\n // check to see if the predicate likes this control\r\n if (predicate(this.sections[i].columns[j].controls[k])) {\r\n return this.sections[i].columns[j].controls[k];\r\n }\r\n }\r\n }\r\n }\r\n // we found nothing so give nothing back\r\n return null;\r\n };\r\n /**\r\n * Sets the comments flag for a page\r\n *\r\n * @param on If true comments are enabled, false they are disabled\r\n */\r\n ClientSidePage.prototype.setCommentsOn = function (on) {\r\n return this.getItem().then(function (i) {\r\n var updater = new Item(i, \"SetCommentsDisabled(\" + !on + \")\");\r\n return updater.update({});\r\n });\r\n };\r\n /**\r\n * Merges the control into the tree of sections and columns for this page\r\n *\r\n * @param control The control to merge\r\n */\r\n ClientSidePage.prototype.mergePartToTree = function (control) {\r\n var section = null;\r\n var column = null;\r\n var sections = this.sections.filter(function (s) { return s.order === control.controlData.position.zoneIndex; });\r\n if (sections.length < 1) {\r\n section = new CanvasSection(this, control.controlData.position.zoneIndex);\r\n this.sections.push(section);\r\n }\r\n else {\r\n section = sections[0];\r\n }\r\n var columns = section.columns.filter(function (c) { return c.order === control.controlData.position.sectionIndex; });\r\n if (columns.length < 1) {\r\n column = new CanvasColumn(section, control.controlData.position.sectionIndex, control.controlData.position.sectionFactor);\r\n section.columns.push(column);\r\n }\r\n else {\r\n column = columns[0];\r\n }\r\n control.column = column;\r\n column.addControl(control);\r\n };\r\n /**\r\n * Merges the supplied column into the tree\r\n *\r\n * @param column Column to merge\r\n * @param position The position data for the column\r\n */\r\n ClientSidePage.prototype.mergeColumnToTree = function (column) {\r\n var section = null;\r\n var sections = this.sections.filter(function (s) { return s.order === column.controlData.position.zoneIndex; });\r\n if (sections.length < 1) {\r\n section = new CanvasSection(this, column.controlData.position.zoneIndex);\r\n this.sections.push(section);\r\n }\r\n else {\r\n section = sections[0];\r\n }\r\n column.section = section;\r\n section.columns.push(column);\r\n };\r\n /**\r\n * Updates the properties of the underlying ListItem associated with this ClientSidePage\r\n *\r\n * @param properties Set of properties to update\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n ClientSidePage.prototype.updateProperties = function (properties, eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.getItem().then(function (i) { return i.update(properties, eTag); });\r\n };\r\n return ClientSidePage;\r\n}(File));\r\nvar CanvasSection = /** @class */ (function () {\r\n function CanvasSection(page, order, columns) {\r\n if (columns === void 0) { columns = []; }\r\n this.page = page;\r\n this.order = order;\r\n this.columns = columns;\r\n this._memId = getGUID();\r\n }\r\n Object.defineProperty(CanvasSection.prototype, \"defaultColumn\", {\r\n /**\r\n * Default column (this.columns[0]) for this section\r\n */\r\n get: function () {\r\n if (this.columns.length < 1) {\r\n this.addColumn(12);\r\n }\r\n return this.columns[0];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds a new column to this section\r\n */\r\n CanvasSection.prototype.addColumn = function (factor) {\r\n var column = new CanvasColumn(this, getNextOrder(this.columns), factor);\r\n this.columns.push(column);\r\n return column;\r\n };\r\n /**\r\n * Adds a control to the default column for this section\r\n *\r\n * @param control Control to add to the default column\r\n */\r\n CanvasSection.prototype.addControl = function (control) {\r\n this.defaultColumn.addControl(control);\r\n return this;\r\n };\r\n CanvasSection.prototype.toHtml = function () {\r\n var html = [];\r\n for (var i = 0; i < this.columns.length; i++) {\r\n html.push(this.columns[i].toHtml());\r\n }\r\n return html.join(\"\");\r\n };\r\n /**\r\n * Removes this section and all contained columns and controls from the collection\r\n */\r\n CanvasSection.prototype.remove = function () {\r\n var _this = this;\r\n this.page.sections = this.page.sections.filter(function (section) { return section._memId !== _this._memId; });\r\n reindex(this.page.sections);\r\n };\r\n return CanvasSection;\r\n}());\r\nvar CanvasControl = /** @class */ (function () {\r\n function CanvasControl(controlType, dataVersion, column, order, id, controlData) {\r\n if (column === void 0) { column = null; }\r\n if (order === void 0) { order = 1; }\r\n if (id === void 0) { id = getGUID(); }\r\n if (controlData === void 0) { controlData = null; }\r\n this.controlType = controlType;\r\n this.dataVersion = dataVersion;\r\n this.column = column;\r\n this.order = order;\r\n this.id = id;\r\n this.controlData = controlData;\r\n }\r\n Object.defineProperty(CanvasControl.prototype, \"jsonData\", {\r\n /**\r\n * Value of the control's \"data-sp-controldata\" attribute\r\n */\r\n get: function () {\r\n return ClientSidePage.jsonToEscapedString(this.getControlData());\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CanvasControl.prototype.fromHtml = function (html) {\r\n this.controlData = ClientSidePage.escapedStringToJson(getAttrValueFromString(html, \"data-sp-controldata\"));\r\n this.dataVersion = getAttrValueFromString(html, \"data-sp-canvasdataversion\");\r\n this.controlType = this.controlData.controlType;\r\n this.id = this.controlData.id;\r\n };\r\n return CanvasControl;\r\n}());\r\nvar CanvasColumn = /** @class */ (function (_super) {\r\n __extends(CanvasColumn, _super);\r\n function CanvasColumn(section, order, factor, controls, dataVersion) {\r\n if (factor === void 0) { factor = 12; }\r\n if (controls === void 0) { controls = []; }\r\n if (dataVersion === void 0) { dataVersion = \"1.0\"; }\r\n var _this = _super.call(this, 0, dataVersion) || this;\r\n _this.section = section;\r\n _this.order = order;\r\n _this.factor = factor;\r\n _this.controls = controls;\r\n return _this;\r\n }\r\n CanvasColumn.prototype.addControl = function (control) {\r\n control.column = this;\r\n this.controls.push(control);\r\n return this;\r\n };\r\n CanvasColumn.prototype.getControl = function (index) {\r\n return this.controls[index];\r\n };\r\n CanvasColumn.prototype.toHtml = function () {\r\n var html = [];\r\n if (this.controls.length < 1) {\r\n html.push(\"
\");\r\n }\r\n else {\r\n for (var i = 0; i < this.controls.length; i++) {\r\n html.push(this.controls[i].toHtml(i + 1));\r\n }\r\n }\r\n return html.join(\"\");\r\n };\r\n CanvasColumn.prototype.fromHtml = function (html) {\r\n _super.prototype.fromHtml.call(this, html);\r\n this.controlData = ClientSidePage.escapedStringToJson(getAttrValueFromString(html, \"data-sp-controldata\"));\r\n this.factor = this.controlData.position.sectionFactor;\r\n this.order = this.controlData.position.sectionIndex;\r\n };\r\n CanvasColumn.prototype.getControlData = function () {\r\n return {\r\n displayMode: 2,\r\n position: {\r\n sectionFactor: this.factor,\r\n sectionIndex: this.order,\r\n zoneIndex: this.section.order,\r\n },\r\n };\r\n };\r\n /**\r\n * Removes this column and all contained controls from the collection\r\n */\r\n CanvasColumn.prototype.remove = function () {\r\n var _this = this;\r\n this.section.columns = this.section.columns.filter(function (column) { return column.id !== _this.id; });\r\n reindex(this.column.controls);\r\n };\r\n return CanvasColumn;\r\n}(CanvasControl));\r\n/**\r\n * Abstract class with shared functionality for parts\r\n */\r\nvar ClientSidePart = /** @class */ (function (_super) {\r\n __extends(ClientSidePart, _super);\r\n function ClientSidePart() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Removes this column and all contained controls from the collection\r\n */\r\n ClientSidePart.prototype.remove = function () {\r\n var _this = this;\r\n this.column.controls = this.column.controls.filter(function (control) { return control.id !== _this.id; });\r\n reindex(this.column.controls);\r\n };\r\n return ClientSidePart;\r\n}(CanvasControl));\r\nvar ClientSideText = /** @class */ (function (_super) {\r\n __extends(ClientSideText, _super);\r\n function ClientSideText(text) {\r\n if (text === void 0) { text = \"\"; }\r\n var _this = _super.call(this, 4, \"1.0\") || this;\r\n _this.text = text;\r\n return _this;\r\n }\r\n Object.defineProperty(ClientSideText.prototype, \"text\", {\r\n /**\r\n * The text markup of this control\r\n */\r\n get: function () {\r\n return this._text;\r\n },\r\n set: function (text) {\r\n if (!text.startsWith(\"

\")) {\r\n text = \"

\" + text + \"

\";\r\n }\r\n this._text = text;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ClientSideText.prototype.getControlData = function () {\r\n return {\r\n controlType: this.controlType,\r\n editorType: \"CKEditor\",\r\n id: this.id,\r\n position: {\r\n controlIndex: this.order,\r\n sectionFactor: this.column.factor,\r\n sectionIndex: this.column.order,\r\n zoneIndex: this.column.section.order,\r\n },\r\n };\r\n };\r\n ClientSideText.prototype.toHtml = function (index) {\r\n // set our order to the value passed in\r\n this.order = index;\r\n var html = [];\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n html.push(\"\" + this.text);\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n return html.join(\"\");\r\n };\r\n ClientSideText.prototype.fromHtml = function (html) {\r\n var _this = this;\r\n _super.prototype.fromHtml.call(this, html);\r\n this.text = \"\";\r\n getBoundedDivMarkup(html, /]*data-sp-rte[^>]*>/i, function (s) {\r\n // now we need to grab the inner text between the divs\r\n var match = /]*data-sp-rte[^>]*>(.*?)<\\/div>$/i.exec(s);\r\n _this.text = match.length > 1 ? match[1] : \"\";\r\n });\r\n };\r\n return ClientSideText;\r\n}(ClientSidePart));\r\nvar ClientSideWebpart = /** @class */ (function (_super) {\r\n __extends(ClientSideWebpart, _super);\r\n function ClientSideWebpart(title, description, propertieJson, webPartId, htmlProperties, serverProcessedContent, canvasDataVersion) {\r\n if (description === void 0) { description = \"\"; }\r\n if (propertieJson === void 0) { propertieJson = {}; }\r\n if (webPartId === void 0) { webPartId = \"\"; }\r\n if (htmlProperties === void 0) { htmlProperties = \"\"; }\r\n if (serverProcessedContent === void 0) { serverProcessedContent = null; }\r\n if (canvasDataVersion === void 0) { canvasDataVersion = \"1.0\"; }\r\n var _this = _super.call(this, 3, \"1.0\") || this;\r\n _this.title = title;\r\n _this.description = description;\r\n _this.propertieJson = propertieJson;\r\n _this.webPartId = webPartId;\r\n _this.htmlProperties = htmlProperties;\r\n _this.serverProcessedContent = serverProcessedContent;\r\n _this.canvasDataVersion = canvasDataVersion;\r\n return _this;\r\n }\r\n ClientSideWebpart.fromComponentDef = function (definition) {\r\n var part = new ClientSideWebpart(\"\");\r\n part.import(definition);\r\n return part;\r\n };\r\n ClientSideWebpart.prototype.import = function (component) {\r\n this.webPartId = component.Id.replace(/^\\{|\\}$/g, \"\").toLowerCase();\r\n var manifest = JSON.parse(component.Manifest);\r\n this.title = manifest.preconfiguredEntries[0].title.default;\r\n this.description = manifest.preconfiguredEntries[0].description.default;\r\n this.dataVersion = \"\";\r\n this.propertieJson = this.parseJsonProperties(manifest.preconfiguredEntries[0].properties);\r\n };\r\n ClientSideWebpart.prototype.setProperties = function (properties) {\r\n this.propertieJson = extend(this.propertieJson, properties);\r\n return this;\r\n };\r\n ClientSideWebpart.prototype.getProperties = function () {\r\n return this.propertieJson;\r\n };\r\n ClientSideWebpart.prototype.toHtml = function (index) {\r\n // set our order to the value passed in\r\n this.order = index;\r\n // will form the value of the data-sp-webpartdata attribute\r\n var data = {\r\n dataVersion: this.dataVersion,\r\n description: this.description,\r\n id: this.webPartId,\r\n instanceId: this.id,\r\n properties: this.propertieJson,\r\n serverProcessedContent: this.serverProcessedContent,\r\n title: this.title,\r\n };\r\n var html = [];\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n html.push(this.webPartId);\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n html.push(this.renderHtmlProperties());\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n html.push(\"
\");\r\n return html.join(\"\");\r\n };\r\n ClientSideWebpart.prototype.fromHtml = function (html) {\r\n _super.prototype.fromHtml.call(this, html);\r\n var webPartData = ClientSidePage.escapedStringToJson(getAttrValueFromString(html, \"data-sp-webpartdata\"));\r\n this.title = webPartData.title;\r\n this.description = webPartData.description;\r\n this.webPartId = webPartData.id;\r\n this.canvasDataVersion = getAttrValueFromString(html, \"data-sp-canvasdataversion\").replace(/\\\\\\./, \".\");\r\n this.dataVersion = getAttrValueFromString(html, \"data-sp-webpartdataversion\").replace(/\\\\\\./, \".\");\r\n this.setProperties(webPartData.properties);\r\n if (webPartData.serverProcessedContent !== undefined) {\r\n this.serverProcessedContent = webPartData.serverProcessedContent;\r\n }\r\n // get our html properties\r\n var htmlProps = getBoundedDivMarkup(html, /]*data-sp-htmlproperties[^>]*?>/i, function (markup) {\r\n return markup.replace(/^]*data-sp-htmlproperties[^>]*?>/i, \"\").replace(/<\\/div>$/i, \"\");\r\n });\r\n this.htmlProperties = htmlProps.length > 0 ? htmlProps[0] : \"\";\r\n };\r\n ClientSideWebpart.prototype.getControlData = function () {\r\n return {\r\n controlType: this.controlType,\r\n id: this.id,\r\n position: {\r\n controlIndex: this.order,\r\n sectionFactor: this.column.factor,\r\n sectionIndex: this.column.order,\r\n zoneIndex: this.column.section.order,\r\n },\r\n webPartId: this.webPartId,\r\n };\r\n };\r\n ClientSideWebpart.prototype.renderHtmlProperties = function () {\r\n var html = [];\r\n if (this.serverProcessedContent === undefined || this.serverProcessedContent === null) {\r\n html.push(this.htmlProperties);\r\n }\r\n else if (this.serverProcessedContent !== undefined) {\r\n if (this.serverProcessedContent.searchablePlainTexts !== undefined) {\r\n var keys = Object.keys(this.serverProcessedContent.searchablePlainTexts);\r\n for (var i = 0; i < keys.length; i++) {\r\n html.push(\"
\");\r\n html.push(this.serverProcessedContent.searchablePlainTexts[keys[i]]);\r\n html.push(\"
\");\r\n }\r\n }\r\n if (this.serverProcessedContent.imageSources !== undefined) {\r\n var keys = Object.keys(this.serverProcessedContent.imageSources);\r\n for (var i = 0; i < keys.length; i++) {\r\n html.push(\"\");\r\n }\r\n }\r\n if (this.serverProcessedContent.links !== undefined) {\r\n var keys = Object.keys(this.serverProcessedContent.links);\r\n for (var i = 0; i < keys.length; i++) {\r\n html.push(\"\");\r\n }\r\n }\r\n }\r\n return html.join(\"\");\r\n };\r\n ClientSideWebpart.prototype.parseJsonProperties = function (props) {\r\n // If the web part has the serverProcessedContent property then keep this one as it might be needed as input to render the web part HTML later on\r\n if (props.webPartData !== undefined && props.webPartData.serverProcessedContent !== undefined) {\r\n this.serverProcessedContent = props.webPartData.serverProcessedContent;\r\n }\r\n else if (props.serverProcessedContent !== undefined) {\r\n this.serverProcessedContent = props.serverProcessedContent;\r\n }\r\n else {\r\n this.serverProcessedContent = null;\r\n }\r\n if (props.webPartData !== undefined && props.webPartData.properties !== undefined) {\r\n return props.webPartData.properties;\r\n }\r\n else if (props.properties !== undefined) {\r\n return props.properties;\r\n }\r\n else {\r\n return props;\r\n }\r\n };\r\n return ClientSideWebpart;\r\n}(ClientSidePart));\n\n/**\r\n * Represents a collection of navigation nodes\r\n *\r\n */\r\nvar NavigationNodes = /** @class */ (function (_super) {\r\n __extends(NavigationNodes, _super);\r\n function NavigationNodes() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.getById = _this._getById(NavigationNode);\r\n return _this;\r\n }\r\n /**\r\n * Adds a new node to the collection\r\n *\r\n * @param title Display name of the node\r\n * @param url The url of the node\r\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\r\n */\r\n NavigationNodes.prototype.add = function (title, url, visible) {\r\n var _this = this;\r\n if (visible === void 0) { visible = true; }\r\n var postBody = jsS(extend(metadata(\"SP.NavigationNode\"), {\r\n IsVisible: visible,\r\n Title: title,\r\n Url: url,\r\n }));\r\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n node: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Moves a node to be after another node in the navigation\r\n *\r\n * @param nodeId Id of the node to move\r\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\r\n */\r\n NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) {\r\n var postBody = jsS({\r\n nodeId: nodeId,\r\n previousNodeId: previousNodeId,\r\n });\r\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\r\n };\r\n return NavigationNodes;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Represents an instance of a navigation node\r\n *\r\n */\r\nvar NavigationNode = /** @class */ (function (_super) {\r\n __extends(NavigationNode, _super);\r\n function NavigationNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(NavigationNode.prototype, \"children\", {\r\n /**\r\n * Represents the child nodes of this node\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"Children\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this node and any child nodes\r\n */\r\n NavigationNode.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n return NavigationNode;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Exposes the navigation components\r\n *\r\n */\r\nvar Navigation = /** @class */ (function (_super) {\r\n __extends(Navigation, _super);\r\n function Navigation() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Navigation.prototype, \"quicklaunch\", {\r\n /**\r\n * Gets the quicklaunch navigation nodes for the current context\r\n *\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"quicklaunch\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Navigation.prototype, \"topNavigationBar\", {\r\n /**\r\n * Gets the top bar navigation nodes for the current context\r\n *\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"topnavigationbar\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Navigation = __decorate([\r\n defaultPath(\"navigation\")\r\n ], Navigation);\r\n return Navigation;\r\n}(SharePointQueryable));\r\n/**\r\n * Represents the top level navigation service\r\n */\r\nvar NavigationService = /** @class */ (function (_super) {\r\n __extends(NavigationService, _super);\r\n function NavigationService(path) {\r\n if (path === void 0) { path = null; }\r\n return _super.call(this, \"_api/navigation\", path) || this;\r\n }\r\n /**\r\n * The MenuState service operation returns a Menu-State (dump) of a SiteMapProvider on a site.\r\n *\r\n * @param menuNodeKey MenuNode.Key of the start node within the SiteMapProvider If no key is provided the SiteMapProvider.RootNode will be the root of the menu state.\r\n * @param depth Depth of the dump. If no value is provided a dump with the depth of 10 is returned\r\n * @param mapProviderName The name identifying the SiteMapProvider to be used\r\n * @param customProperties comma seperated list of custom properties to be returned.\r\n */\r\n NavigationService.prototype.getMenuState = function (menuNodeKey, depth, mapProviderName, customProperties) {\r\n if (menuNodeKey === void 0) { menuNodeKey = null; }\r\n if (depth === void 0) { depth = 10; }\r\n if (mapProviderName === void 0) { mapProviderName = null; }\r\n if (customProperties === void 0) { customProperties = null; }\r\n return (new NavigationService(\"MenuState\")).postCore({\r\n body: jsS({\r\n customProperties: customProperties,\r\n depth: depth,\r\n mapProviderName: mapProviderName,\r\n menuNodeKey: menuNodeKey,\r\n }),\r\n });\r\n };\r\n /**\r\n * Tries to get a SiteMapNode.Key for a given URL within a site collection.\r\n *\r\n * @param currentUrl A url representing the SiteMapNode\r\n * @param mapProviderName The name identifying the SiteMapProvider to be used\r\n */\r\n NavigationService.prototype.getMenuNodeKey = function (currentUrl, mapProviderName) {\r\n if (mapProviderName === void 0) { mapProviderName = null; }\r\n return (new NavigationService(\"MenuNodeKey\")).postCore({\r\n body: jsS({\r\n currentUrl: currentUrl,\r\n mapProviderName: mapProviderName,\r\n }),\r\n });\r\n };\r\n return NavigationService;\r\n}(SharePointQueryable));\n\n/**\r\n * Describes regional settings ODada object\r\n */\r\nvar RegionalSettings = /** @class */ (function (_super) {\r\n __extends(RegionalSettings, _super);\r\n function RegionalSettings() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(RegionalSettings.prototype, \"installedLanguages\", {\r\n /**\r\n * Gets the collection of languages used in a server farm.\r\n */\r\n get: function () {\r\n return new InstalledLanguages(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"globalInstalledLanguages\", {\r\n /**\r\n * Gets the collection of language packs that are installed on the server.\r\n */\r\n get: function () {\r\n return new InstalledLanguages(this, \"globalinstalledlanguages\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"timeZone\", {\r\n /**\r\n * Gets time zone\r\n */\r\n get: function () {\r\n return new TimeZone(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"timeZones\", {\r\n /**\r\n * Gets time zones\r\n */\r\n get: function () {\r\n return new TimeZones(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RegionalSettings = __decorate([\r\n defaultPath(\"regionalsettings\")\r\n ], RegionalSettings);\r\n return RegionalSettings;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Describes installed languages ODada queriable collection\r\n */\r\nvar InstalledLanguages = /** @class */ (function (_super) {\r\n __extends(InstalledLanguages, _super);\r\n function InstalledLanguages() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n InstalledLanguages = __decorate([\r\n defaultPath(\"installedlanguages\")\r\n ], InstalledLanguages);\r\n return InstalledLanguages;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes TimeZone ODada object\r\n */\r\nvar TimeZone = /** @class */ (function (_super) {\r\n __extends(TimeZone, _super);\r\n function TimeZone() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeZone_1 = TimeZone;\r\n /**\r\n * Gets an Local Time by UTC Time\r\n *\r\n * @param utcTime UTC Time as Date or ISO String\r\n */\r\n TimeZone.prototype.utcToLocalTime = function (utcTime) {\r\n var dateIsoString;\r\n if (typeof utcTime === \"string\") {\r\n dateIsoString = utcTime;\r\n }\r\n else {\r\n dateIsoString = utcTime.toISOString();\r\n }\r\n return this.clone(TimeZone_1, \"utctolocaltime('\" + dateIsoString + \"')\")\r\n .postCore()\r\n .then(function (res) { return hOP(res, \"UTCToLocalTime\") ? res.UTCToLocalTime : res; });\r\n };\r\n /**\r\n * Gets an UTC Time by Local Time\r\n *\r\n * @param localTime Local Time as Date or ISO String\r\n */\r\n TimeZone.prototype.localTimeToUTC = function (localTime) {\r\n var dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIsoString = dateAdd(localTime, \"minute\", localTime.getTimezoneOffset() * -1).toISOString();\r\n }\r\n return this.clone(TimeZone_1, \"localtimetoutc('\" + dateIsoString + \"')\")\r\n .postCore()\r\n .then(function (res) { return hOP(res, \"LocalTimeToUTC\") ? res.LocalTimeToUTC : res; });\r\n };\r\n var TimeZone_1;\r\n TimeZone = TimeZone_1 = __decorate([\r\n defaultPath(\"timezone\")\r\n ], TimeZone);\r\n return TimeZone;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Describes time zones queriable collection\r\n */\r\nvar TimeZones = /** @class */ (function (_super) {\r\n __extends(TimeZones, _super);\r\n function TimeZones() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeZones_1 = TimeZones;\r\n // https://msdn.microsoft.com/en-us/library/office/jj247008.aspx - timezones ids\r\n /**\r\n * Gets an TimeZone by id\r\n *\r\n * @param id The integer id of the timezone to retrieve\r\n */\r\n TimeZones.prototype.getById = function (id) {\r\n // do the post and merge the result into a TimeZone instance so the data and methods are available\r\n return this.clone(TimeZones_1, \"GetById(\" + id + \")\").postCore({}, spODataEntity(TimeZone));\r\n };\r\n var TimeZones_1;\r\n TimeZones = TimeZones_1 = __decorate([\r\n defaultPath(\"timezones\")\r\n ], TimeZones);\r\n return TimeZones;\r\n}(SharePointQueryableCollection));\n\nvar funcs = new Map([\r\n [\"text\", \"Querytext\"],\r\n [\"template\", \"QueryTemplate\"],\r\n [\"sourceId\", \"SourceId\"],\r\n [\"trimDuplicatesIncludeId\", \"\"],\r\n [\"startRow\", \"\"],\r\n [\"rowLimit\", \"\"],\r\n [\"rankingModelId\", \"\"],\r\n [\"rowsPerPage\", \"\"],\r\n [\"selectProperties\", \"\"],\r\n [\"culture\", \"\"],\r\n [\"timeZoneId\", \"\"],\r\n [\"refinementFilters\", \"\"],\r\n [\"refiners\", \"\"],\r\n [\"hiddenConstraints\", \"\"],\r\n [\"sortList\", \"\"],\r\n [\"timeout\", \"\"],\r\n [\"hithighlightedProperties\", \"\"],\r\n [\"clientType\", \"\"],\r\n [\"personalizationData\", \"\"],\r\n [\"resultsURL\", \"\"],\r\n [\"queryTag\", \"\"],\r\n [\"properties\", \"\"],\r\n [\"queryTemplatePropertiesUrl\", \"\"],\r\n [\"reorderingRules\", \"\"],\r\n [\"hitHighlightedMultivaluePropertyLimit\", \"\"],\r\n [\"collapseSpecification\", \"\"],\r\n [\"uiLanguage\", \"\"],\r\n [\"desiredSnippetLength\", \"\"],\r\n [\"maxSnippetLength\", \"\"],\r\n [\"summaryLength\", \"\"],\r\n]);\r\nvar props = new Map([]);\r\nfunction toPropCase(str) {\r\n return str.replace(/^(.)/, function ($1) { return $1.toUpperCase(); });\r\n}\r\n/**\r\n * Creates a new instance of the SearchQueryBuilder\r\n *\r\n * @param queryText Initial query text\r\n * @param _query Any initial query configuration\r\n */\r\nfunction SearchQueryBuilder(queryText, _query) {\r\n if (queryText === void 0) { queryText = \"\"; }\r\n if (_query === void 0) { _query = {}; }\r\n return new Proxy({\r\n query: Object.assign({\r\n Querytext: queryText,\r\n }, _query),\r\n }, {\r\n get: function (self, propertyKey, proxy) {\r\n var pk = propertyKey.toString();\r\n if (pk === \"toSearchQuery\") {\r\n return function () { return self.query; };\r\n }\r\n if (funcs.has(pk)) {\r\n return function () {\r\n var value = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n value[_i] = arguments[_i];\r\n }\r\n var mappedPk = funcs.get(pk);\r\n self.query[mappedPk.length > 0 ? mappedPk : toPropCase(pk)] = value.length > 1 ? value : value[0];\r\n return proxy;\r\n };\r\n }\r\n var propKey = props.has(pk) ? props.get(pk) : toPropCase(pk);\r\n self.query[propKey] = true;\r\n return proxy;\r\n },\r\n });\r\n}\r\n/**\r\n * Describes the search API\r\n *\r\n */\r\nvar Search = /** @class */ (function (_super) {\r\n __extends(Search, _super);\r\n function Search() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * @returns Promise\r\n */\r\n Search.prototype.execute = function (queryInit) {\r\n var _this = this;\r\n var query = this.parseQuery(queryInit);\r\n var formattedBody;\r\n formattedBody = query;\r\n if (formattedBody.SelectProperties) {\r\n formattedBody.SelectProperties = this.fixupProp(query.SelectProperties);\r\n }\r\n if (formattedBody.RefinementFilters) {\r\n formattedBody.RefinementFilters = this.fixupProp(query.RefinementFilters);\r\n }\r\n if (formattedBody.SortList) {\r\n formattedBody.SortList = this.fixupProp(query.SortList);\r\n }\r\n if (formattedBody.HithighlightedProperties) {\r\n formattedBody.HithighlightedProperties = this.fixupProp(query.HitHighlightedProperties);\r\n }\r\n if (formattedBody.ReorderingRules) {\r\n formattedBody.ReorderingRules = this.fixupProp(query.ReorderingRules);\r\n }\r\n if (formattedBody.Properties) {\r\n formattedBody.Properties = this.fixupProp(query.Properties);\r\n }\r\n var postBody = jsS({\r\n request: extend(metadata(\"Microsoft.Office.Server.Search.REST.SearchRequest\"), formattedBody),\r\n });\r\n // if we are using caching with this search request, then we need to handle some work upfront to enable that\r\n if (this._useCaching) {\r\n // force use of the cache for this request if .usingCaching was called\r\n this._forceCaching = true;\r\n // because all the requests use the same url they would collide in the cache we use a special key\r\n var cacheKey = \"PnPjs.SearchWithCaching(\" + getHashCode(postBody) + \")\";\r\n if (objectDefinedNotNull(this._cachingOptions)) {\r\n // if our key ends in the postquery url we overwrite it\r\n if (/\\/_api\\/search\\/postquery$/i.test(this._cachingOptions.key)) {\r\n this._cachingOptions.key = cacheKey;\r\n }\r\n }\r\n else {\r\n this._cachingOptions = new CachingOptions(cacheKey);\r\n }\r\n }\r\n return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); });\r\n };\r\n /**\r\n * Fixes up properties that expect to consist of a \"results\" collection when needed\r\n *\r\n * @param prop property to fixup for container struct\r\n */\r\n Search.prototype.fixupProp = function (prop) {\r\n return hOP(prop, \"results\") ? prop : { results: prop };\r\n };\r\n /**\r\n * Translates one of the query initializers into a SearchQuery instance\r\n *\r\n * @param query\r\n */\r\n Search.prototype.parseQuery = function (query) {\r\n var finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { Querytext: query };\r\n }\r\n else if (query.toSearchQuery) {\r\n finalQuery = query.toSearchQuery();\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return finalQuery;\r\n };\r\n Search = __decorate([\r\n defaultPath(\"_api/search/postquery\")\r\n ], Search);\r\n return Search;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\r\n */\r\nvar SearchResults = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the SearchResult class\r\n *\r\n */\r\n function SearchResults(rawResponse, _url, _query, _raw, _primary) {\r\n if (_raw === void 0) { _raw = null; }\r\n if (_primary === void 0) { _primary = null; }\r\n this._url = _url;\r\n this._query = _query;\r\n this._raw = _raw;\r\n this._primary = _primary;\r\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\r\n }\r\n Object.defineProperty(SearchResults.prototype, \"ElapsedTime\", {\r\n get: function () {\r\n return this.RawSearchResults.ElapsedTime;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"RowCount\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"TotalRows\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"TotalRowsIncludingDuplicates\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"RawSearchResults\", {\r\n get: function () {\r\n return this._raw;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"PrimarySearchResults\", {\r\n get: function () {\r\n if (this._primary === null) {\r\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\r\n }\r\n return this._primary;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a page of results\r\n *\r\n * @param pageNumber Index of the page to return. Used to determine StartRow\r\n * @param pageSize Optional, items per page (default = 10)\r\n */\r\n SearchResults.prototype.getPage = function (pageNumber, pageSize) {\r\n // if we got all the available rows we don't have another page\r\n if (this.TotalRows < this.RowCount) {\r\n return Promise.resolve(null);\r\n }\r\n // if pageSize is supplied, then we use that regardless of any previous values\r\n // otherwise get the previous RowLimit or default to 10\r\n var rows = pageSize !== undefined ? pageSize : hOP(this._query, \"RowLimit\") ? this._query.RowLimit : 10;\r\n var query = extend(this._query, {\r\n RowLimit: rows,\r\n StartRow: rows * (pageNumber - 1),\r\n });\r\n // we have reached the end\r\n if (query.StartRow > this.TotalRows) {\r\n return Promise.resolve(null);\r\n }\r\n var search = new Search(this._url, null);\r\n return search.execute(query);\r\n };\r\n /**\r\n * Formats a search results array\r\n *\r\n * @param rawResults The array to process\r\n */\r\n SearchResults.prototype.formatSearchResults = function (rawResults) {\r\n var results = new Array();\r\n var tempResults = rawResults.results ? rawResults.results : rawResults;\r\n for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) {\r\n var tempResult = tempResults_1[_i];\r\n var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\r\n results.push(cells.reduce(function (res, cell) {\r\n Object.defineProperty(res, cell.Key, {\r\n configurable: false,\r\n enumerable: true,\r\n value: cell.Value,\r\n writable: false,\r\n });\r\n return res;\r\n }, {}));\r\n }\r\n return results;\r\n };\r\n return SearchResults;\r\n}());\r\n/**\r\n * defines the SortDirection enum\r\n */\r\nvar SortDirection;\r\n(function (SortDirection) {\r\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\r\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\r\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\r\n})(SortDirection || (SortDirection = {}));\r\n/**\r\n * defines the ReorderingRuleMatchType enum\r\n */\r\nvar ReorderingRuleMatchType;\r\n(function (ReorderingRuleMatchType) {\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\r\n})(ReorderingRuleMatchType || (ReorderingRuleMatchType = {}));\r\n/**\r\n * Specifies the type value for the property\r\n */\r\nvar QueryPropertyValueType;\r\n(function (QueryPropertyValueType) {\r\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"Int32Type\"] = 2] = \"Int32Type\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\r\n})(QueryPropertyValueType || (QueryPropertyValueType = {}));\r\nvar SearchBuiltInSourceId = /** @class */ (function () {\r\n function SearchBuiltInSourceId() {\r\n }\r\n SearchBuiltInSourceId.Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\r\n SearchBuiltInSourceId.ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\r\n SearchBuiltInSourceId.ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\r\n SearchBuiltInSourceId.ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\r\n SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\r\n SearchBuiltInSourceId.LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\r\n SearchBuiltInSourceId.LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\r\n SearchBuiltInSourceId.LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\r\n SearchBuiltInSourceId.LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\r\n SearchBuiltInSourceId.Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\r\n SearchBuiltInSourceId.Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\r\n SearchBuiltInSourceId.Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\r\n SearchBuiltInSourceId.RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\r\n SearchBuiltInSourceId.RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\r\n SearchBuiltInSourceId.Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\r\n return SearchBuiltInSourceId;\r\n}());\n\nvar SearchSuggest = /** @class */ (function (_super) {\r\n __extends(SearchSuggest, _super);\r\n function SearchSuggest() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SearchSuggest.prototype.execute = function (query) {\r\n this.mapQueryToQueryString(query);\r\n return this.get().then(function (response) {\r\n var mapper = hOP(response, \"suggest\") ? function (s) { return response.suggest[s].results; } : function (s) { return response[s]; };\r\n return {\r\n PeopleNames: mapper(\"PeopleNames\"),\r\n PersonalResults: mapper(\"PersonalResults\"),\r\n Queries: mapper(\"Queries\"),\r\n };\r\n });\r\n };\r\n SearchSuggest.prototype.mapQueryToQueryString = function (query) {\r\n var _this = this;\r\n var setProp = function (q) { return function (checkProp) { return function (sp) {\r\n if (hOP(q, checkProp)) {\r\n _this.query.set(sp, q[checkProp].toString());\r\n }\r\n }; }; };\r\n this.query.set(\"querytext\", \"'\" + query.querytext + \"'\");\r\n var querySetter = setProp(query);\r\n querySetter(\"count\")(\"inumberofquerysuggestions\");\r\n querySetter(\"personalCount\")(\"inumberofresultsuggestions\");\r\n querySetter(\"preQuery\")(\"fprequerysuggestions\");\r\n querySetter(\"hitHighlighting\")(\"fhithighlighting\");\r\n querySetter(\"capitalize\")(\"fcapitalizefirstletters\");\r\n querySetter(\"culture\")(\"culture\");\r\n querySetter(\"stemming\")(\"enablestemming\");\r\n querySetter(\"includePeople\")(\"showpeoplenamesuggestions\");\r\n querySetter(\"queryRules\")(\"enablequeryrules\");\r\n querySetter(\"prefixMatch\")(\"fprefixmatchallterms\");\r\n };\r\n SearchSuggest = __decorate([\r\n defaultPath(\"_api/search/suggest\")\r\n ], SearchSuggest);\r\n return SearchSuggest;\r\n}(SharePointQueryableInstance));\n\n/**\r\n * Describes a collection of List objects\r\n *\r\n */\r\nvar Features = /** @class */ (function (_super) {\r\n __extends(Features, _super);\r\n function Features() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Gets a list from the collection by guid id\r\n *\r\n * @param id The Id of the feature (GUID)\r\n */\r\n _this.getById = _this._getById(Feature);\r\n return _this;\r\n }\r\n Features_1 = Features;\r\n /**\r\n * Adds a new list to the collection\r\n *\r\n * @param id The Id of the feature (GUID)\r\n * @param force If true the feature activation will be forced\r\n */\r\n Features.prototype.add = function (id, force) {\r\n var _this = this;\r\n if (force === void 0) { force = false; }\r\n return this.clone(Features_1, \"add\").postCore({\r\n body: jsS({\r\n featdefScope: 0,\r\n featureId: id,\r\n force: force,\r\n }),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n feature: _this.getById(id),\r\n };\r\n });\r\n };\r\n /**\r\n * Removes (deactivates) a feature from the collection\r\n *\r\n * @param id The Id of the feature (GUID)\r\n * @param force If true the feature deactivation will be forced\r\n */\r\n Features.prototype.remove = function (id, force) {\r\n if (force === void 0) { force = false; }\r\n return this.clone(Features_1, \"remove\").postCore({\r\n body: jsS({\r\n featureId: id,\r\n force: force,\r\n }),\r\n });\r\n };\r\n var Features_1;\r\n Features = Features_1 = __decorate([\r\n defaultPath(\"features\")\r\n ], Features);\r\n return Features;\r\n}(SharePointQueryableCollection));\r\nvar Feature = /** @class */ (function (_super) {\r\n __extends(Feature, _super);\r\n function Feature() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Removes (deactivates) a feature from the collection\r\n *\r\n * @param force If true the feature deactivation will be forced\r\n */\r\n Feature.prototype.deactivate = function (force) {\r\n var _this = this;\r\n if (force === void 0) { force = false; }\r\n var removeDependency = this.addBatchDependency();\r\n var idGet = new Feature(this).select(\"DefinitionId\");\r\n return idGet.get().then(function (feature) {\r\n var promise = _this.getParent(Features, _this.parentUrl, \"\", _this.batch).remove(feature.DefinitionId, force);\r\n removeDependency();\r\n return promise;\r\n });\r\n };\r\n return Feature;\r\n}(SharePointQueryableInstance));\n\nvar RelatedItemManagerImpl = /** @class */ (function (_super) {\r\n __extends(RelatedItemManagerImpl, _super);\r\n function RelatedItemManagerImpl() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RelatedItemManagerImpl_1 = RelatedItemManagerImpl;\r\n RelatedItemManagerImpl.FromUrl = function (url) {\r\n if (url === null) {\r\n return new RelatedItemManagerImpl_1(\"\");\r\n }\r\n var index = url.indexOf(\"_api/\");\r\n if (index > -1) {\r\n return new RelatedItemManagerImpl_1(url.substr(0, index));\r\n }\r\n return new RelatedItemManagerImpl_1(url);\r\n };\r\n RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) {\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".GetRelatedItems\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) {\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".GetPageOneRelatedItems\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLink\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n SourceWebUrl: sourceWebUrl,\r\n TargetItemID: targetItemID,\r\n TargetListName: targetListName,\r\n TargetWebUrl: targetWebUrl,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n /**\r\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\r\n *\r\n * @param sourceListName The source list name or list id\r\n * @param sourceItemId The source item id\r\n * @param targetItemUrl The target item url\r\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\r\n */\r\n RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLinkToUrl\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n TargetItemUrl: targetItemUrl,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n /**\r\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\r\n *\r\n * @param sourceItemUrl The source item url\r\n * @param targetListName The target list name or list id\r\n * @param targetItemId The target item id\r\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\r\n */\r\n RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLinkFromUrl\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemUrl: sourceItemUrl,\r\n TargetItemID: targetItemId,\r\n TargetListName: targetListName,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) {\r\n if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".DeleteSingleLink\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n SourceWebUrl: sourceWebUrl,\r\n TargetItemID: targetItemId,\r\n TargetListName: targetListName,\r\n TargetWebUrl: targetWebUrl,\r\n TryDeleteReverseLink: tryDeleteReverseLink,\r\n }),\r\n });\r\n };\r\n var RelatedItemManagerImpl_1;\r\n RelatedItemManagerImpl = RelatedItemManagerImpl_1 = __decorate([\r\n defaultPath(\"_api/SP.RelatedItemManager\")\r\n ], RelatedItemManagerImpl);\r\n return RelatedItemManagerImpl;\r\n}(SharePointQueryable));\n\n/**\r\n * Describes a collection of webs\r\n *\r\n */\r\nvar Webs = /** @class */ (function (_super) {\r\n __extends(Webs, _super);\r\n function Webs() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Webs_1 = Webs;\r\n /**\r\n * Adds a new web to the collection\r\n *\r\n * @param title The new web's title\r\n * @param url The new web's relative url\r\n * @param description The new web's description\r\n * @param template The new web's template internal name (default = STS)\r\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\r\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\r\n */\r\n Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) {\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = \"STS\"; }\r\n if (language === void 0) { language = 1033; }\r\n if (inheritPermissions === void 0) { inheritPermissions = true; }\r\n var props = {\r\n Description: description,\r\n Language: language,\r\n Title: title,\r\n Url: url,\r\n UseSamePermissionsAsParentSite: inheritPermissions,\r\n WebTemplate: template,\r\n };\r\n var postBody = jsS({\r\n \"parameters\": extend({\r\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\r\n }, props),\r\n });\r\n return this.clone(Webs_1, \"add\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n web: new Web(odataUrlFrom(data).replace(/_api\\/web\\/?/i, \"\")),\r\n };\r\n });\r\n };\r\n var Webs_1;\r\n Webs = Webs_1 = __decorate([\r\n defaultPath(\"webs\")\r\n ], Webs);\r\n return Webs;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a collection of web infos\r\n *\r\n */\r\nvar WebInfos = /** @class */ (function (_super) {\r\n __extends(WebInfos, _super);\r\n function WebInfos() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n WebInfos = __decorate([\r\n defaultPath(\"webinfos\")\r\n ], WebInfos);\r\n return WebInfos;\r\n}(SharePointQueryableCollection));\r\n/**\r\n * Describes a web\r\n *\r\n */\r\nvar Web = /** @class */ (function (_super) {\r\n __extends(Web, _super);\r\n function Web() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Web_1 = Web;\r\n /**\r\n * Creates a new web instance from the given url by indexing the location of the /_api/\r\n * segment. If this is not found the method creates a new web with the entire string as\r\n * supplied.\r\n *\r\n * @param url\r\n */\r\n Web.fromUrl = function (url, path) {\r\n return new Web_1(extractWebUrl(url), path);\r\n };\r\n Object.defineProperty(Web.prototype, \"webs\", {\r\n /**\r\n * Gets this web's subwebs\r\n *\r\n */\r\n get: function () {\r\n return new Webs(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets this web's parent web and data\r\n *\r\n */\r\n Web.prototype.getParentWeb = function () {\r\n var _this = this;\r\n return this.select(\"ParentWeb/Id\").expand(\"ParentWeb\").get()\r\n .then(function (_a) {\r\n var ParentWeb = _a.ParentWeb;\r\n return new Site(_this.toUrlAndQuery().split(\"/_api\")[0]).openWebById(ParentWeb.Id);\r\n });\r\n };\r\n /**\r\n * Returns a collection of objects that contain metadata about subsites of the current site in which the current user is a member.\r\n *\r\n * @param nWebTemplateFilter Specifies the site definition (default = -1)\r\n * @param nConfigurationFilter A 16-bit integer that specifies the identifier of a configuration (default = -1)\r\n */\r\n Web.prototype.getSubwebsFilteredForCurrentUser = function (nWebTemplateFilter, nConfigurationFilter) {\r\n if (nWebTemplateFilter === void 0) { nWebTemplateFilter = -1; }\r\n if (nConfigurationFilter === void 0) { nConfigurationFilter = -1; }\r\n return this.clone(Webs, \"getSubwebsFilteredForCurrentUser(nWebTemplateFilter=\" + nWebTemplateFilter + \",nConfigurationFilter=\" + nConfigurationFilter + \")\");\r\n };\r\n Object.defineProperty(Web.prototype, \"allProperties\", {\r\n /**\r\n * Allows access to the web's all properties collection\r\n */\r\n get: function () {\r\n return this.clone(SharePointQueryableCollection, \"allproperties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"webinfos\", {\r\n /**\r\n * Gets a collection of WebInfos for this web's subwebs\r\n *\r\n */\r\n get: function () {\r\n return new WebInfos(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"contentTypes\", {\r\n /**\r\n * Gets the content types available in this web\r\n *\r\n */\r\n get: function () {\r\n return new ContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"lists\", {\r\n /**\r\n * Gets the lists in this web\r\n *\r\n */\r\n get: function () {\r\n return new Lists(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"fields\", {\r\n /**\r\n * Gets the fields in this web\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"features\", {\r\n /**\r\n * Gets the active features for this web\r\n *\r\n */\r\n get: function () {\r\n return new Features(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"availablefields\", {\r\n /**\r\n * Gets the available fields in this web\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this, \"availablefields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"navigation\", {\r\n /**\r\n * Gets the navigation options in this web\r\n *\r\n */\r\n get: function () {\r\n return new Navigation(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteUsers\", {\r\n /**\r\n * Gets the site users\r\n *\r\n */\r\n get: function () {\r\n return new SiteUsers(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteGroups\", {\r\n /**\r\n * Gets the site groups\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteUserInfoList\", {\r\n /**\r\n * Gets site user info list\r\n *\r\n */\r\n get: function () {\r\n return new List(this, \"siteuserinfolist\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"regionalSettings\", {\r\n /**\r\n * Gets regional settings\r\n *\r\n */\r\n get: function () {\r\n return new RegionalSettings(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"currentUser\", {\r\n /**\r\n * Gets the current user\r\n */\r\n get: function () {\r\n return new CurrentUser(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"folders\", {\r\n /**\r\n * Gets the top-level folders in this web\r\n *\r\n */\r\n get: function () {\r\n return new Folders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"userCustomActions\", {\r\n /**\r\n * Gets all user custom actions for this web\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"roleDefinitions\", {\r\n /**\r\n * Gets the collection of RoleDefinition resources\r\n *\r\n */\r\n get: function () {\r\n return new RoleDefinitions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"relatedItems\", {\r\n /**\r\n * Provides an interface to manage related items\r\n *\r\n */\r\n get: function () {\r\n return RelatedItemManagerImpl.FromUrl(this.toUrl());\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a new batch for requests within the context of this web\r\n *\r\n */\r\n Web.prototype.createBatch = function () {\r\n return new SPBatch(this.parentUrl);\r\n };\r\n Object.defineProperty(Web.prototype, \"rootFolder\", {\r\n /**\r\n * Gets the root folder of this web\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"rootFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedOwnerGroup\", {\r\n /**\r\n * Gets the associated owner group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedownergroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedMemberGroup\", {\r\n /**\r\n * Gets the associated member group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedmembergroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedVisitorGroup\", {\r\n /**\r\n * Gets the associated visitor group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedvisitorgroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a folder by server relative url\r\n *\r\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) {\r\n return new Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a folder by server relative relative path if your folder name contains # and % characters\r\n * you need to first encode the file name using encodeURIComponent() and then pass the url\r\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123\");\r\n * This works only in SharePoint online.\r\n *\r\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFolderByServerRelativePath = function (folderRelativeUrl) {\r\n return new Folder(this, \"getFolderByServerRelativePath(decodedUrl='\" + folderRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a file by server relative url\r\n *\r\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) {\r\n return new File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a file by server relative url if your file name contains # and % characters\r\n * you need to first encode the file name using encodeURIComponent() and then pass the url\r\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123.docx\");\r\n *\r\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFileByServerRelativePath = function (fileRelativeUrl) {\r\n return new File(this, \"getFileByServerRelativePath(decodedUrl='\" + fileRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a list by server relative url (list's root folder)\r\n *\r\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getList = function (listRelativeUrl) {\r\n return new List(this, \"getList('\" + listRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Updates this web instance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the web\r\n */\r\n Web.prototype.update = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend({\r\n \"__metadata\": { \"type\": \"SP.Web\" },\r\n }, properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n web: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes this web\r\n *\r\n */\r\n Web.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n /**\r\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\r\n *\r\n * @param colorPaletteUrl The server-relative URL of the color palette file\r\n * @param fontSchemeUrl The server-relative URL of the font scheme\r\n * @param backgroundImageUrl The server-relative URL of the background image\r\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\r\n */\r\n Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\r\n var postBody = jsS({\r\n backgroundImageUrl: backgroundImageUrl,\r\n colorPaletteUrl: colorPaletteUrl,\r\n fontSchemeUrl: fontSchemeUrl,\r\n shareGenerated: shareGenerated,\r\n });\r\n return this.clone(Web_1, \"applytheme\").postCore({ body: postBody });\r\n };\r\n /**\r\n * Applies the specified site definition or site template to the Web site that has no template applied to it\r\n *\r\n * @param template Name of the site definition or the name of the site template\r\n */\r\n Web.prototype.applyWebTemplate = function (template) {\r\n var q = this.clone(Web_1, \"applywebtemplate\");\r\n q.concat(\"(@t)\");\r\n q.query.set(\"@t\", template);\r\n return q.postCore();\r\n };\r\n /**\r\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\r\n *\r\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\r\n */\r\n Web.prototype.ensureUser = function (loginName) {\r\n var postBody = jsS({\r\n logonName: loginName,\r\n });\r\n return this.clone(Web_1, \"ensureuser\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n user: new SiteUser(odataUrlFrom(data)),\r\n };\r\n });\r\n };\r\n /**\r\n * Returns a collection of site templates available for the site\r\n *\r\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\r\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\r\n */\r\n Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) {\r\n if (language === void 0) { language = 1033; }\r\n if (includeCrossLanugage === void 0) { includeCrossLanugage = true; }\r\n return new SharePointQueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\r\n };\r\n /**\r\n * Returns the list gallery on the site\r\n *\r\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\r\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\r\n */\r\n Web.prototype.getCatalog = function (type) {\r\n return this.clone(Web_1, \"getcatalog(\" + type + \")\").select(\"Id\").get().then(function (data) {\r\n return new List(odataUrlFrom(data));\r\n });\r\n };\r\n /**\r\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query\r\n *\r\n * @param query The change query\r\n */\r\n Web.prototype.getChanges = function (query) {\r\n var postBody = jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\r\n return this.clone(Web_1, \"getchanges\").postCore({ body: postBody });\r\n };\r\n Object.defineProperty(Web.prototype, \"customListTemplate\", {\r\n /**\r\n * Gets the custom list templates for the site\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"getcustomlisttemplates\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the user corresponding to the specified member identifier for the current site\r\n *\r\n * @param id The id of the user\r\n */\r\n Web.prototype.getUserById = function (id) {\r\n return new SiteUser(this, \"getUserById(\" + id + \")\");\r\n };\r\n /**\r\n * Returns the name of the image file for the icon that is used to represent the specified file\r\n *\r\n * @param filename The file name. If this parameter is empty, the server returns an empty string\r\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\r\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\r\n */\r\n Web.prototype.mapToIcon = function (filename, size, progId) {\r\n if (size === void 0) { size = 0; }\r\n if (progId === void 0) { progId = \"\"; }\r\n return this.clone(Web_1, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\").get();\r\n };\r\n /**\r\n * Returns the tenant property corresponding to the specified key in the app catalog site\r\n *\r\n * @param key Id of storage entity to be set\r\n */\r\n Web.prototype.getStorageEntity = function (key) {\r\n return this.clone(Web_1, \"getStorageEntity('\" + key + \"')\").get();\r\n };\r\n /**\r\n * This will set the storage entity identified by the given key (MUST be called in the context of the app catalog)\r\n *\r\n * @param key Id of storage entity to be set\r\n * @param value Value of storage entity to be set\r\n * @param description Description of storage entity to be set\r\n * @param comments Comments of storage entity to be set\r\n */\r\n Web.prototype.setStorageEntity = function (key, value, description, comments) {\r\n if (description === void 0) { description = \"\"; }\r\n if (comments === void 0) { comments = \"\"; }\r\n return this.clone(Web_1, \"setStorageEntity\").postCore({\r\n body: jsS({\r\n comments: comments,\r\n description: description,\r\n key: key,\r\n value: value,\r\n }),\r\n });\r\n };\r\n /**\r\n * This will remove the storage entity identified by the given key\r\n *\r\n * @param key Id of storage entity to be removed\r\n */\r\n Web.prototype.removeStorageEntity = function (key) {\r\n return this.clone(Web_1, \"removeStorageEntity('\" + key + \"')\").postCore();\r\n };\r\n /**\r\n * Gets the app catalog for this web\r\n *\r\n * @param url Optional url or web containing the app catalog (default: current web)\r\n */\r\n Web.prototype.getAppCatalog = function (url) {\r\n return new AppCatalog(url || this);\r\n };\r\n /**\r\n * Gets the collection of available client side web parts for this web instance\r\n */\r\n Web.prototype.getClientSideWebParts = function () {\r\n return this.clone(SharePointQueryableCollection, \"GetClientSideWebParts\").get();\r\n };\r\n /**\r\n * Creates a new client side page\r\n *\r\n * @param pageName Name of the new page\r\n * @param title Display title of the new page\r\n * @param libraryTitle Title of the library in which to create the new page. Default: \"Site Pages\"\r\n */\r\n Web.prototype.addClientSidePage = function (pageName, title, libraryTitle) {\r\n if (title === void 0) { title = pageName.replace(/\\.[^/.]+$/, \"\"); }\r\n if (libraryTitle === void 0) { libraryTitle = \"Site Pages\"; }\r\n return ClientSidePage.create(this.lists.getByTitle(libraryTitle), pageName, title);\r\n };\r\n /**\r\n * Creates a new client side page using the library path\r\n *\r\n * @param pageName Name of the new page\r\n * @param listRelativePath The server relative path to the list's root folder (including /sites/ if applicable)\r\n * @param title Display title of the new page\r\n */\r\n Web.prototype.addClientSidePageByPath = function (pageName, listRelativePath, title) {\r\n if (title === void 0) { title = pageName.replace(/\\.[^/.]+$/, \"\"); }\r\n return ClientSidePage.create(this.getList(listRelativePath), pageName, title);\r\n };\r\n var Web_1;\r\n Web = Web_1 = __decorate([\r\n defaultPath(\"_api/web\")\r\n ], Web);\r\n return Web;\r\n}(SharePointQueryableShareableWeb));\n\n/**\r\n * Describes a site collection\r\n *\r\n */\r\nvar Site = /** @class */ (function (_super) {\r\n __extends(Site, _super);\r\n function Site() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Site_1 = Site;\r\n Object.defineProperty(Site.prototype, \"rootWeb\", {\r\n /**\r\n * Gets the root web of the site collection\r\n *\r\n */\r\n get: function () {\r\n return new Web(this, \"rootweb\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Site.prototype, \"features\", {\r\n /**\r\n * Gets the active features for this site collection\r\n *\r\n */\r\n get: function () {\r\n return new Features(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Site.prototype, \"userCustomActions\", {\r\n /**\r\n * Gets all custom actions for this site collection\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a Web instance representing the root web of the site collection\r\n * correctly setup for chaining within the library\r\n */\r\n Site.prototype.getRootWeb = function () {\r\n return this.rootWeb.select(\"Url\").get().then(function (web) { return new Web(web.Url); });\r\n };\r\n /**\r\n * Gets the context information for this site collection\r\n */\r\n Site.prototype.getContextInfo = function () {\r\n var q = new Site_1(this.parentUrl, \"_api/contextinfo\");\r\n return q.postCore().then(function (data) {\r\n if (hOP(data, \"GetContextWebInformation\")) {\r\n var info = data.GetContextWebInformation;\r\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\r\n return info;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\r\n *\r\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\r\n */\r\n Site.prototype.getDocumentLibraries = function (absoluteWebUrl) {\r\n var q = new SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\r\n q.query.set(\"@v\", \"'\" + absoluteWebUrl + \"'\");\r\n return q.get().then(function (data) {\r\n if (hOP(data, \"GetDocumentLibraries\")) {\r\n return data.GetDocumentLibraries;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Gets the site url from a page url\r\n *\r\n * @param absolutePageUrl The absolute url of the page\r\n */\r\n Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) {\r\n var q = new SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\r\n q.query.set(\"@v\", \"'\" + absolutePageUrl + \"'\");\r\n return q.get().then(function (data) {\r\n if (hOP(data, \"GetWebUrlFromPageUrl\")) {\r\n return data.GetWebUrlFromPageUrl;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Creates a new batch for requests within the context of this site collection\r\n *\r\n */\r\n Site.prototype.createBatch = function () {\r\n return new SPBatch(this.parentUrl);\r\n };\r\n /**\r\n * Opens a web by id (using POST)\r\n *\r\n * @param webId The GUID id of the web to open\r\n */\r\n Site.prototype.openWebById = function (webId) {\r\n return this.clone(Site_1, \"openWebById('\" + webId + \"')\").postCore().then(function (d) { return ({\r\n data: d,\r\n web: Web.fromUrl(d[\"odata.id\"] || d.__metadata.uri),\r\n }); });\r\n };\r\n var Site_1;\r\n Site = Site_1 = __decorate([\r\n defaultPath(\"_api/site\")\r\n ], Site);\r\n return Site;\r\n}(SharePointQueryableInstance));\n\nvar UserProfileQuery = /** @class */ (function (_super) {\r\n __extends(UserProfileQuery, _super);\r\n /**\r\n * Creates a new instance of the UserProfileQuery class\r\n *\r\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\r\n */\r\n function UserProfileQuery(baseUrl, path) {\r\n if (path === void 0) { path = \"_api/sp.userprofiles.peoplemanager\"; }\r\n var _this = _super.call(this, baseUrl, path) || this;\r\n _this.clientPeoplePickerQuery = (new ClientPeoplePickerQuery(baseUrl)).configureFrom(_this);\r\n _this.profileLoader = (new ProfileLoader(baseUrl)).configureFrom(_this);\r\n return _this;\r\n }\r\n Object.defineProperty(UserProfileQuery.prototype, \"editProfileLink\", {\r\n /**\r\n * The url of the edit profile page for the current user\r\n */\r\n get: function () {\r\n return this.clone(UserProfileQuery, \"EditProfileLink\").get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"isMyPeopleListPublic\", {\r\n /**\r\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\r\n */\r\n get: function () {\r\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * A boolean value that indicates whether the current user is being followed by the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.amIFollowedBy = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * A boolean value that indicates whether the current user is following the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.amIFollowing = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Gets tags that the current user is following\r\n *\r\n * @param maxCount The maximum number of tags to retrieve (default is 20)\r\n */\r\n UserProfileQuery.prototype.getFollowedTags = function (maxCount) {\r\n if (maxCount === void 0) { maxCount = 20; }\r\n return this.clone(UserProfileQuery, \"getfollowedtags(\" + maxCount + \")\").get();\r\n };\r\n /**\r\n * Gets the people who are following the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.getFollowersFor = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"myFollowers\", {\r\n /**\r\n * Gets the people who are following the current user\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"getmyfollowers\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"myProperties\", {\r\n /**\r\n * Gets user properties for the current user\r\n *\r\n */\r\n get: function () {\r\n return new UserProfileQuery(this, \"getmyproperties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the people who the specified user is following\r\n *\r\n * @param loginName The account name of the user.\r\n */\r\n UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Gets user properties for the specified user.\r\n *\r\n * @param loginName The account name of the user.\r\n */\r\n UserProfileQuery.prototype.getPropertiesFor = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"trendingTags\", {\r\n /**\r\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\r\n *\r\n */\r\n get: function () {\r\n var q = this.clone(UserProfileQuery, null);\r\n q.concat(\".gettrendingtags\");\r\n return q.get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the specified user profile property for the specified user\r\n *\r\n * @param loginName The account name of the user\r\n * @param propertyName The case-sensitive name of the property to get\r\n */\r\n UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) {\r\n var q = this.clone(UserProfileQuery, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Removes the specified user from the user's list of suggested people to follow\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.hideSuggestion = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.postCore();\r\n };\r\n /**\r\n * A boolean values that indicates whether the first user is following the second user\r\n *\r\n * @param follower The account name of the user who might be following the followee\r\n * @param followee The account name of the user who might be followed by the follower\r\n */\r\n UserProfileQuery.prototype.isFollowing = function (follower, followee) {\r\n var q = this.clone(UserProfileQuery, null);\r\n q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\r\n q.query.set(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\r\n *\r\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\r\n */\r\n UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n var buffer = null;\r\n var reader = new FileReader();\r\n reader.onload = function (e) { return buffer = e.target.result; };\r\n reader.readAsArrayBuffer(profilePicSource);\r\n var request = new UserProfileQuery(_this, \"setmyprofilepicture\");\r\n request.postCore({\r\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\r\n }).then(function (_) { return resolve(); }).catch(function (e) { return reject(e); });\r\n });\r\n };\r\n /**\r\n * Sets single value User Profile property\r\n *\r\n * @param accountName The account name of the user\r\n * @param propertyName Property name\r\n * @param propertyValue Property value\r\n */\r\n UserProfileQuery.prototype.setSingleValueProfileProperty = function (accountName, propertyName, propertyValue) {\r\n var postBody = jsS({\r\n accountName: accountName,\r\n propertyName: propertyName,\r\n propertyValue: propertyValue,\r\n });\r\n return this.clone(UserProfileQuery, \"SetSingleValueProfileProperty\")\r\n .postCore({ body: postBody });\r\n };\r\n /**\r\n * Sets multi valued User Profile property\r\n *\r\n * @param accountName The account name of the user\r\n * @param propertyName Property name\r\n * @param propertyValues Property values\r\n */\r\n UserProfileQuery.prototype.setMultiValuedProfileProperty = function (accountName, propertyName, propertyValues) {\r\n var postBody = jsS({\r\n accountName: accountName,\r\n propertyName: propertyName,\r\n propertyValues: propertyValues,\r\n });\r\n return this.clone(UserProfileQuery, \"SetMultiValuedProfileProperty\")\r\n .postCore({ body: postBody });\r\n };\r\n /**\r\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\r\n *\r\n * @param emails The email addresses of the users to provision sites for\r\n */\r\n UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () {\r\n var emails = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n emails[_i] = arguments[_i];\r\n }\r\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"ownerUserProfile\", {\r\n /**\r\n * Gets the user profile of the site owner\r\n *\r\n */\r\n get: function () {\r\n return this.profileLoader.ownerUserProfile;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"userProfile\", {\r\n /**\r\n * Gets the user profile for the current user\r\n */\r\n get: function () {\r\n return this.profileLoader.userProfile;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\r\n *\r\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\r\n */\r\n UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) {\r\n if (interactiveRequest === void 0) { interactiveRequest = false; }\r\n return this.profileLoader.createPersonalSite(interactiveRequest);\r\n };\r\n /**\r\n * Sets the privacy settings for this profile\r\n *\r\n * @param share true to make all social data public; false to make all social data private\r\n */\r\n UserProfileQuery.prototype.shareAllSocialData = function (share) {\r\n return this.profileLoader.shareAllSocialData(share);\r\n };\r\n /**\r\n * Resolves user or group using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform resolve\r\n */\r\n UserProfileQuery.prototype.clientPeoplePickerResolveUser = function (queryParams) {\r\n return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(queryParams);\r\n };\r\n /**\r\n * Searches for users or groups using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform search\r\n */\r\n UserProfileQuery.prototype.clientPeoplePickerSearchUser = function (queryParams) {\r\n return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(queryParams);\r\n };\r\n return UserProfileQuery;\r\n}(SharePointQueryableInstance));\r\nvar ProfileLoader = /** @class */ (function (_super) {\r\n __extends(ProfileLoader, _super);\r\n function ProfileLoader() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ProfileLoader_1 = ProfileLoader;\r\n /**\r\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\r\n *\r\n * @param emails The email addresses of the users to provision sites for\r\n */\r\n ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) {\r\n return this.clone(ProfileLoader_1, \"createpersonalsiteenqueuebulk\", false).postCore({\r\n body: jsS({ \"emailIDs\": emails }),\r\n });\r\n };\r\n Object.defineProperty(ProfileLoader.prototype, \"ownerUserProfile\", {\r\n /**\r\n * Gets the user profile of the site owner.\r\n *\r\n */\r\n get: function () {\r\n var q = this.getParent(ProfileLoader_1, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\r\n if (this.hasBatch) {\r\n q = q.inBatch(this.batch);\r\n }\r\n return q.postCore();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ProfileLoader.prototype, \"userProfile\", {\r\n /**\r\n * Gets the user profile of the current user.\r\n *\r\n */\r\n get: function () {\r\n return this.clone(ProfileLoader_1, \"getuserprofile\").postCore();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\r\n *\r\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\r\n */\r\n ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) {\r\n if (interactiveRequest === void 0) { interactiveRequest = false; }\r\n return this.clone(ProfileLoader_1, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\").postCore();\r\n };\r\n /**\r\n * Sets the privacy settings for this profile\r\n *\r\n * @param share true to make all social data public; false to make all social data private.\r\n */\r\n ProfileLoader.prototype.shareAllSocialData = function (share) {\r\n return this.clone(ProfileLoader_1, \"getuserprofile/shareallsocialdata(\" + share + \")\").postCore();\r\n };\r\n var ProfileLoader_1;\r\n ProfileLoader = ProfileLoader_1 = __decorate([\r\n defaultPath(\"_api/sp.userprofiles.profileloader.getprofileloader\")\r\n ], ProfileLoader);\r\n return ProfileLoader;\r\n}(SharePointQueryable));\r\nvar ClientPeoplePickerQuery = /** @class */ (function (_super) {\r\n __extends(ClientPeoplePickerQuery, _super);\r\n function ClientPeoplePickerQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ClientPeoplePickerQuery_1 = ClientPeoplePickerQuery;\r\n /**\r\n * Resolves user or group using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform resolve\r\n */\r\n ClientPeoplePickerQuery.prototype.clientPeoplePickerResolveUser = function (queryParams) {\r\n var q = this.clone(ClientPeoplePickerQuery_1, null);\r\n q.concat(\".clientpeoplepickerresolveuser\");\r\n return q.postCore({\r\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\r\n })\r\n .then(function (res) {\r\n if (typeof res === \"object\") {\r\n return res.ClientPeoplePickerResolveUser;\r\n }\r\n return res;\r\n })\r\n .then(JSON.parse);\r\n };\r\n /**\r\n * Searches for users or groups using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform search\r\n */\r\n ClientPeoplePickerQuery.prototype.clientPeoplePickerSearchUser = function (queryParams) {\r\n var q = this.clone(ClientPeoplePickerQuery_1, null);\r\n q.concat(\".clientpeoplepickersearchuser\");\r\n return q.postCore({\r\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\r\n })\r\n .then(function (res) {\r\n if (typeof res === \"object\") {\r\n return res.ClientPeoplePickerSearchUser;\r\n }\r\n return res;\r\n })\r\n .then(JSON.parse);\r\n };\r\n /**\r\n * Creates ClientPeoplePickerQueryParameters request body\r\n *\r\n * @param queryParams The query parameters to create request body\r\n */\r\n ClientPeoplePickerQuery.prototype.createClientPeoplePickerQueryParametersRequestBody = function (queryParams) {\r\n return jsS({\r\n \"queryParams\": extend(metadata(\"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters\"), queryParams),\r\n });\r\n };\r\n var ClientPeoplePickerQuery_1;\r\n ClientPeoplePickerQuery = ClientPeoplePickerQuery_1 = __decorate([\r\n defaultPath(\"_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface\")\r\n ], ClientPeoplePickerQuery);\r\n return ClientPeoplePickerQuery;\r\n}(SharePointQueryable));\n\n/**\r\n * Exposes social following methods\r\n */\r\nvar SocialQuery = /** @class */ (function (_super) {\r\n __extends(SocialQuery, _super);\r\n function SocialQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SocialQuery_1 = SocialQuery;\r\n Object.defineProperty(SocialQuery.prototype, \"my\", {\r\n get: function () {\r\n return new MySocialQuery(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a URI to a site that lists the current user's followed sites.\r\n */\r\n SocialQuery.prototype.getFollowedSitesUri = function () {\r\n return this.clone(SocialQuery_1, \"FollowedSitesUri\").get().then(function (r) {\r\n return r.FollowedSitesUri || r;\r\n });\r\n };\r\n /**\r\n * Gets a URI to a site that lists the current user's followed documents.\r\n */\r\n SocialQuery.prototype.getFollowedDocumentsUri = function () {\r\n return this.clone(SocialQuery_1, \"FollowedDocumentsUri\").get().then(function (r) {\r\n return r.FollowedDocumentsUri || r;\r\n });\r\n };\r\n /**\r\n * Makes the current user start following a user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to start following\r\n */\r\n SocialQuery.prototype.follow = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"follow\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Indicates whether the current user is following a specified user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to find the following status for\r\n */\r\n SocialQuery.prototype.isFollowed = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"isfollowed\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Makes the current user stop following a user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to stop following\r\n */\r\n SocialQuery.prototype.stopFollowing = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"stopfollowing\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Creates SocialActorInfo request body\r\n *\r\n * @param actorInfo The actor to create request body\r\n */\r\n SocialQuery.prototype.createSocialActorInfoRequestBody = function (actorInfo) {\r\n return jsS({\r\n \"actor\": Object.assign(metadata(\"SP.Social.SocialActorInfo\"), {\r\n Id: null,\r\n }, actorInfo),\r\n });\r\n };\r\n var SocialQuery_1;\r\n SocialQuery = SocialQuery_1 = __decorate([\r\n defaultPath(\"_api/social.following\")\r\n ], SocialQuery);\r\n return SocialQuery;\r\n}(SharePointQueryableInstance));\r\nvar MySocialQuery = /** @class */ (function (_super) {\r\n __extends(MySocialQuery, _super);\r\n function MySocialQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MySocialQuery_1 = MySocialQuery;\r\n /**\r\n * Gets users, documents, sites, and tags that the current user is following.\r\n *\r\n * @param types Bitwise set of SocialActorTypes to retrieve\r\n */\r\n MySocialQuery.prototype.followed = function (types) {\r\n return this.clone(MySocialQuery_1, \"followed(types=\" + types + \")\").get().then(function (r) {\r\n return hOP(r, \"Followed\") ? r.Followed.results : r;\r\n });\r\n };\r\n /**\r\n * Gets the count of users, documents, sites, and tags that the current user is following.\r\n *\r\n * @param types Bitwise set of SocialActorTypes to retrieve\r\n */\r\n MySocialQuery.prototype.followedCount = function (types) {\r\n return this.clone(MySocialQuery_1, \"followedcount(types=\" + types + \")\").get().then(function (r) {\r\n return r.FollowedCount || r;\r\n });\r\n };\r\n /**\r\n * Gets the users who are following the current user.\r\n */\r\n MySocialQuery.prototype.followers = function () {\r\n return this.clone(MySocialQuery_1, \"followers\").get().then(function (r) {\r\n return hOP(r, \"Followers\") ? r.Followers.results : r;\r\n });\r\n };\r\n /**\r\n * Gets users who the current user might want to follow.\r\n */\r\n MySocialQuery.prototype.suggestions = function () {\r\n return this.clone(MySocialQuery_1, \"suggestions\").get().then(function (r) {\r\n return hOP(r, \"Suggestions\") ? r.Suggestions.results : r;\r\n });\r\n };\r\n var MySocialQuery_1;\r\n MySocialQuery = MySocialQuery_1 = __decorate([\r\n defaultPath(\"my\")\r\n ], MySocialQuery);\r\n return MySocialQuery;\r\n}(SharePointQueryableInstance));\r\n/**\r\n * Social actor type\r\n *\r\n */\r\nvar SocialActorType;\r\n(function (SocialActorType) {\r\n SocialActorType[SocialActorType[\"User\"] = 0] = \"User\";\r\n SocialActorType[SocialActorType[\"Document\"] = 1] = \"Document\";\r\n SocialActorType[SocialActorType[\"Site\"] = 2] = \"Site\";\r\n SocialActorType[SocialActorType[\"Tag\"] = 3] = \"Tag\";\r\n})(SocialActorType || (SocialActorType = {}));\r\n/**\r\n * Social actor type\r\n *\r\n */\r\n/* tslint:disable:no-bitwise */\r\nvar SocialActorTypes;\r\n(function (SocialActorTypes) {\r\n SocialActorTypes[SocialActorTypes[\"None\"] = 0] = \"None\";\r\n SocialActorTypes[SocialActorTypes[\"User\"] = 1] = \"User\";\r\n SocialActorTypes[SocialActorTypes[\"Document\"] = 2] = \"Document\";\r\n SocialActorTypes[SocialActorTypes[\"Site\"] = 4] = \"Site\";\r\n SocialActorTypes[SocialActorTypes[\"Tag\"] = 8] = \"Tag\";\r\n /**\r\n * The set excludes documents and sites that do not have feeds.\r\n */\r\n SocialActorTypes[SocialActorTypes[\"ExcludeContentWithoutFeeds\"] = 268435456] = \"ExcludeContentWithoutFeeds\";\r\n /**\r\n * The set includes group sites\r\n */\r\n SocialActorTypes[SocialActorTypes[\"IncludeGroupsSites\"] = 536870912] = \"IncludeGroupsSites\";\r\n /**\r\n * The set includes only items created within the last 24 hours\r\n */\r\n SocialActorTypes[SocialActorTypes[\"WithinLast24Hours\"] = 1073741824] = \"WithinLast24Hours\";\r\n})(SocialActorTypes || (SocialActorTypes = {}));\r\n/* tslint:enable */\r\n/**\r\n * Result from following\r\n *\r\n */\r\nvar SocialFollowResult;\r\n(function (SocialFollowResult) {\r\n SocialFollowResult[SocialFollowResult[\"Ok\"] = 0] = \"Ok\";\r\n SocialFollowResult[SocialFollowResult[\"AlreadyFollowing\"] = 1] = \"AlreadyFollowing\";\r\n SocialFollowResult[SocialFollowResult[\"LimitReached\"] = 2] = \"LimitReached\";\r\n SocialFollowResult[SocialFollowResult[\"InternalError\"] = 3] = \"InternalError\";\r\n})(SocialFollowResult || (SocialFollowResult = {}));\r\n/**\r\n * Specifies an exception or status code.\r\n */\r\nvar SocialStatusCode;\r\n(function (SocialStatusCode) {\r\n /**\r\n * The operation completed successfully\r\n */\r\n SocialStatusCode[SocialStatusCode[\"OK\"] = 0] = \"OK\";\r\n /**\r\n * The request is invalid.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InvalidRequest\"] = 1] = \"InvalidRequest\";\r\n /**\r\n * The current user is not authorized to perform the operation.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"AccessDenied\"] = 2] = \"AccessDenied\";\r\n /**\r\n * The target of the operation was not found.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"ItemNotFound\"] = 3] = \"ItemNotFound\";\r\n /**\r\n * The operation is invalid for the target's current state.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InvalidOperation\"] = 4] = \"InvalidOperation\";\r\n /**\r\n * The operation completed without modifying the target.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"ItemNotModified\"] = 5] = \"ItemNotModified\";\r\n /**\r\n * The operation failed because an internal error occurred.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InternalError\"] = 6] = \"InternalError\";\r\n /**\r\n * The operation failed because the server could not access the distributed cache.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CacheReadError\"] = 7] = \"CacheReadError\";\r\n /**\r\n * The operation succeeded but the server could not update the distributed cache.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CacheUpdateError\"] = 8] = \"CacheUpdateError\";\r\n /**\r\n * No personal site exists for the current user, and no further information is available.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"PersonalSiteNotFound\"] = 9] = \"PersonalSiteNotFound\";\r\n /**\r\n * No personal site exists for the current user, and a previous attempt to create one failed.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"FailedToCreatePersonalSite\"] = 10] = \"FailedToCreatePersonalSite\";\r\n /**\r\n * No personal site exists for the current user, and a previous attempt to create one was not authorized.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"NotAuthorizedToCreatePersonalSite\"] = 11] = \"NotAuthorizedToCreatePersonalSite\";\r\n /**\r\n * No personal site exists for the current user, and no attempt should be made to create one.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CannotCreatePersonalSite\"] = 12] = \"CannotCreatePersonalSite\";\r\n /**\r\n * The operation was rejected because an internal limit had been reached.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"LimitReached\"] = 13] = \"LimitReached\";\r\n /**\r\n * The operation failed because an error occurred during the processing of the specified attachment.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"AttachmentError\"] = 14] = \"AttachmentError\";\r\n /**\r\n * The operation succeeded with recoverable errors; the returned data is incomplete.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"PartialData\"] = 15] = \"PartialData\";\r\n /**\r\n * A required SharePoint feature is not enabled.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"FeatureDisabled\"] = 16] = \"FeatureDisabled\";\r\n /**\r\n * The site's storage quota has been exceeded.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"StorageQuotaExceeded\"] = 17] = \"StorageQuotaExceeded\";\r\n /**\r\n * The operation failed because the server could not access the database.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"DatabaseError\"] = 18] = \"DatabaseError\";\r\n})(SocialStatusCode || (SocialStatusCode = {}));\n\n/**\r\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\r\n */\r\nvar UtilityMethod = /** @class */ (function (_super) {\r\n __extends(UtilityMethod, _super);\r\n /**\r\n * Creates a new instance of the Utility method class\r\n *\r\n * @param baseUrl The parent url provider\r\n * @param methodName The static method name to call on the utility class\r\n */\r\n function UtilityMethod(baseUrl, methodName) {\r\n return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), \"_api/SP.Utilities.Utility.\" + methodName) || this;\r\n }\r\n UtilityMethod.getBaseUrl = function (candidate) {\r\n if (typeof candidate === \"string\") {\r\n return candidate;\r\n }\r\n var c = candidate;\r\n var url = c.toUrl();\r\n var index = url.indexOf(\"_api/\");\r\n if (index < 0) {\r\n return url;\r\n }\r\n return url.substr(0, index);\r\n };\r\n UtilityMethod.prototype.excute = function (props) {\r\n return this.postCore({\r\n body: jsS(props),\r\n });\r\n };\r\n /**\r\n * Sends an email based on the supplied properties\r\n *\r\n * @param props The properties of the email to send\r\n */\r\n UtilityMethod.prototype.sendEmail = function (props) {\r\n var params = {\r\n properties: extend(metadata(\"SP.Utilities.EmailProperties\"), {\r\n Body: props.Body,\r\n From: props.From,\r\n Subject: props.Subject,\r\n }),\r\n };\r\n if (props.To && props.To.length > 0) {\r\n params.properties = extend(params.properties, {\r\n To: { results: props.To },\r\n });\r\n }\r\n if (props.CC && props.CC.length > 0) {\r\n params.properties = extend(params.properties, {\r\n CC: { results: props.CC },\r\n });\r\n }\r\n if (props.BCC && props.BCC.length > 0) {\r\n params.properties = extend(params.properties, {\r\n BCC: { results: props.BCC },\r\n });\r\n }\r\n if (props.AdditionalHeaders) {\r\n params.properties = extend(params.properties, {\r\n AdditionalHeaders: props.AdditionalHeaders,\r\n });\r\n }\r\n return this.clone(UtilityMethod, \"SendEmail\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.getCurrentUserEmailAddresses = function () {\r\n return this.clone(UtilityMethod, \"GetCurrentUserEmailAddresses\", true).excute({});\r\n };\r\n UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) {\r\n if (matchUserInfoList === void 0) { matchUserInfoList = false; }\r\n var params = {\r\n addToUserInfoList: addToUserInfoList,\r\n input: input,\r\n inputIsEmailOnly: inputIsEmailOnly,\r\n matchUserInfoList: matchUserInfoList,\r\n scopes: scopes,\r\n sources: sources,\r\n };\r\n return this.clone(UtilityMethod, \"ResolvePrincipalInCurrentContext\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) {\r\n var params = {\r\n groupName: groupName,\r\n input: input,\r\n maxCount: maxCount,\r\n scopes: scopes,\r\n sources: sources,\r\n };\r\n return this.clone(UtilityMethod, \"SearchPrincipalsUsingContextWeb\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) {\r\n var params = {\r\n pageAddress: pageAddress,\r\n };\r\n return this.clone(UtilityMethod, \"CreateEmailBodyForInvitation\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) {\r\n if (maxCount === void 0) { maxCount = 30; }\r\n var params = {\r\n inputs: inputs,\r\n maxCount: maxCount,\r\n };\r\n return this.clone(UtilityMethod, \"ExpandGroupsToPrincipals\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.createWikiPage = function (info) {\r\n return this.clone(UtilityMethod, \"CreateWikiPageInContextWeb\", true).excute({\r\n parameters: info,\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n file: new File(odataUrlFrom(r)),\r\n };\r\n });\r\n };\r\n return UtilityMethod;\r\n}(SharePointQueryable));\n\n/**\r\n * Root of the SharePoint REST module\r\n */\r\nvar SPRest = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the SPRest class\r\n *\r\n * @param options Additional options\r\n * @param baseUrl A string that should form the base part of the url\r\n */\r\n function SPRest(_options, _baseUrl) {\r\n if (_options === void 0) { _options = {}; }\r\n if (_baseUrl === void 0) { _baseUrl = \"\"; }\r\n this._options = _options;\r\n this._baseUrl = _baseUrl;\r\n }\r\n /**\r\n * Configures instance with additional options and baseUrl.\r\n * Provided configuration used by other objects in a chain\r\n *\r\n * @param options Additional options\r\n * @param baseUrl A string that should form the base part of the url\r\n */\r\n SPRest.prototype.configure = function (options, baseUrl) {\r\n if (baseUrl === void 0) { baseUrl = \"\"; }\r\n return new SPRest(options, baseUrl);\r\n };\r\n /**\r\n * Global SharePoint configuration options\r\n *\r\n * @param config The SharePoint configuration to apply\r\n */\r\n SPRest.prototype.setup = function (config) {\r\n setup(config);\r\n };\r\n /**\r\n * Executes a search against this web context\r\n *\r\n * @param query The SearchQuery definition\r\n */\r\n SPRest.prototype.searchSuggest = function (query) {\r\n var finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { querytext: query };\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return this.create(SearchSuggest).execute(finalQuery);\r\n };\r\n /**\r\n * Executes a search against this web context\r\n *\r\n * @param query The SearchQuery definition\r\n */\r\n SPRest.prototype.search = function (query) {\r\n return this.create(Search).execute(query);\r\n };\r\n /**\r\n * Executes the provided search query, caching the results\r\n *\r\n * @param query The SearchQuery definition\r\n * @param options The set of caching options used to store the results\r\n */\r\n SPRest.prototype.searchWithCaching = function (query, options) {\r\n return this.create(Search).usingCaching(options).execute(query);\r\n };\r\n Object.defineProperty(SPRest.prototype, \"site\", {\r\n /**\r\n * Begins a site collection scoped REST request\r\n *\r\n */\r\n get: function () {\r\n return this.create(Site);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"web\", {\r\n /**\r\n * Begins a web scoped REST request\r\n *\r\n */\r\n get: function () {\r\n return this.create(Web);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"profiles\", {\r\n /**\r\n * Access to user profile methods\r\n *\r\n */\r\n get: function () {\r\n return this.create(UserProfileQuery);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"social\", {\r\n /**\r\n * Access to social methods\r\n */\r\n get: function () {\r\n return this.create(SocialQuery);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"navigation\", {\r\n /**\r\n * Access to the site collection level navigation service\r\n */\r\n get: function () {\r\n return new NavigationService();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\r\n *\r\n */\r\n SPRest.prototype.createBatch = function () {\r\n return this.web.createBatch();\r\n };\r\n Object.defineProperty(SPRest.prototype, \"utility\", {\r\n /**\r\n * Static utilities methods from SP.Utilities.Utility\r\n */\r\n get: function () {\r\n return this.create(UtilityMethod, \"\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles creating and configuring the objects returned from this class\r\n *\r\n * @param fm The factory method used to create the instance\r\n * @param path Optional additional path information to pass to the factory method\r\n */\r\n SPRest.prototype.create = function (fm, path) {\r\n return new fm(this._baseUrl, path).configure(this._options);\r\n };\r\n return SPRest;\r\n}());\r\nvar sp = new SPRest();\n\nexport { odataUrlFrom, spODataEntity, spODataEntityArray, SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, SharePointQueryableSecurable, FileFolderShared, SharePointQueryableShareable, SharePointQueryableShareableFile, SharePointQueryableShareableFolder, SharePointQueryableShareableItem, SharePointQueryableShareableWeb, AppCatalog, App, SPBatch, ContentType, ContentTypes, FieldLink, FieldLinks, Field, Fields, CheckinType, WebPartsPersonalizationScope, MoveOperations, TemplateFileType, File, Files, Folder, Folders, SPHttpClient, Item, Items, ItemVersion, ItemVersions, PagedItemCollection, NavigationNodes, NavigationNode, NavigationService, List, Lists, RegionalSettings, InstalledLanguages, TimeZone, TimeZones, sp, SPRest, RoleDefinitionBindings, Search, SearchQueryBuilder, SearchResults, SortDirection, ReorderingRuleMatchType, QueryPropertyValueType, SearchBuiltInSourceId, SearchSuggest, Site, UserProfileQuery, toAbsoluteUrl, extractWebUrl, UtilityMethod, View, Views, ViewFields, WebPartDefinitions, WebPartDefinition, WebPart, Web, PromotedState, ClientSidePage, CanvasSection, CanvasControl, CanvasColumn, ClientSidePart, ClientSideText, ClientSideWebpart, Comments, Comment, Replies, SocialQuery, MySocialQuery, SocialActorType, SocialActorTypes, SocialFollowResult, SocialStatusCode, ControlMode, FieldTypes, DateTimeFieldFormatType, AddFieldOptions, CalendarType, UrlFieldFormatType, PermissionKind, PrincipalType$1 as PrincipalType, PrincipalSource, RoleType, PageType, SharingLinkKind, SharingRole, SharingOperationStatusCode, SPSharedObjectType, SharingDomainRestrictionMode, RenderListDataOptions, FieldUserSelectionMode, ChoiceFieldFormatType, UrlZone };\n//# sourceMappingURL=sp.es5.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/packages/sp/dist/sp.es5.js\n// module id = 15\n// module chunks = 0"],"sourceRoot":""}