{"version":3,"file":"app/vendors-node_modules_webex_internal-plugin-calendar_dist_index_js-node_modules_webex_internal-c5edae.cb1c595d.js","mappings":";;;;;;;;;AAAa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,cAAc;AACd,kBAAkB;AAClB,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB,GAAG,wBAAwB,GAAG,oBAAoB,GAAG,cAAc;AACrF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,gBAAgB,mBAAO,CAAC,4EAAa;AACrC;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC,wBAAwB;AAC1D,IAAI,yBAAyB,IAAI,8BAA8B;AAC/D;AACA;AACA,WAAW,iCAAiC;AAC5C,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA,sEAAsE,aAAa;AACnF;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,aAAa,cAAc;;AAE3B;AACA,WAAW,UAAU;AACrB;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,MAAM;AACnB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW,SAAS;AACpB;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA,yEAAyE,eAAe;AACxF;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,MAAM;AACnB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW,SAAS;AACpB;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,MAAM;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,cAAc;AACzB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;;AAEA;AACA,WAAW,MAAM;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,iBAAiB,kBAAkB;;AAEnC;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,mBAAmB,oBAAoB;;AAEvC;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,uBAAuB,wBAAwB;AAC/C;;;;;;;;;;;;ACvVa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY,mBAAO,CAAC,uEAAQ;AAC5B;;;;;;;;;;;;AC3Ca;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,gBAAgB,mBAAO,CAAC,2EAAkB;AAC1C,YAAY,mBAAO,CAAC,8CAAM;AAC1B;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AC1Ca;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;AACpB,8BAA8B;AAC9B,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,2CAA2C,mBAAO,CAAC,6FAAiB;AACpE,6CAA6C,mBAAO,CAAC,yFAAmB;AACxE;AACA;AACA;;AAEA,sCAAsC,iBAAiB;AACvD;;AAEA,eAAe,mBAAO,CAAC,4DAAa;AACpC;AACA,gBAAgB,mBAAO,CAAC,sEAAqB;AAC7C;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;;AC5Ga;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,cAAc;AACd;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;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;;;;;;;;;;;;AC5Da;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,uEAAU;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACrIa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,wCAAwC,mBAAO,CAAC,gHAA0C;AAC1F,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY;AAC3T;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACzZa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,qEAAe;AACrC,gDAAgD,mBAAO,CAAC,8FAAuB;AAC/E,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1Ka;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B,GAAG,eAAe,GAAG,gCAAgC;AAC/E,uDAAuD,mBAAO,CAAC,oKAAoE;AACnI,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,yCAAyC,mBAAO,CAAC,wGAA4B;AAC7E,uCAAuC,mBAAO,CAAC,4EAAW;AAC1D,aAAa,mBAAO,CAAC,kFAAiB;AACtC,4CAA4C,mBAAO,CAAC,oFAAkB;AACtE,0CAA0C,mBAAO,CAAC,sFAAmB;AACrE,wCAAwC,mBAAO,CAAC,4EAAc;AAC9D,qCAAqC,mBAAO,CAAC,4EAAc;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,iCAAiC;AACjC;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,SAAS;AACtB;AACA,yBAAyB,0BAA0B;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,cAAc,eAAe;AAC7B;;;;;;;;;;;;ACvIa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,qDAAqD,mBAAO,CAAC,wIAAsD;AACnH,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wCAAwC,mBAAO,CAAC,6EAAe;AAC/D,0CAA0C,mBAAO,CAAC,uFAAoB;AACtE,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,kBAAe;AAC3C;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACrFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,gBAAgB,mBAAO,CAAC,wDAAW;AACnC;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,aAAa;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,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;;AC3Da;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAe;AACjC;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAW;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACzHA;AACA;AACA;;AAEA,uEAAuE;AACvE;;AAEA;;AAEA;AACA;AACA;;AAEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,aAAa,mBAAO,CAAC,0DAAe;AACpC,iBAAiB,mBAAO,CAAC,4DAAa;AACtC,mBAAmB,mBAAO,CAAC,wEAAe;AAC1C,YAAY,mBAAO,CAAC,oDAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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,eAAe,kBAAe;AAC9B;;;;;;;;;;;;AC/Oa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACzCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,uCAAuC,mBAAO,CAAC,mFAAW;AAC1D,aAAa,mBAAO,CAAC,0EAAS;AAC9B;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AC7Ca;;AAEb,kBAAkB,mBAAO,CAAC,kHAA2C;AACrE,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,uBAAuB,mBAAO,CAAC,4HAAgD;AAC/E,qBAAqB,mBAAO,CAAC,0HAA+C;AAC5E,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,iCAAiC,mBAAO,CAAC,8CAAI;AAC7C,kCAAkC,mBAAO,CAAC,uEAAY;AACtD,qCAAqC,mBAAO,CAAC,6EAAe;AAC5D,yDAAyD,mFAAmF,WAAW,yHAAyH,gBAAgB,WAAW,yBAAyB,SAAS,wBAAwB,4BAA4B,cAAc,SAAS,+BAA+B,sBAAsB,WAAW,YAAY,gKAAgK,kDAAkD,SAAS,kBAAkB,kBAAkB,oBAAoB,sBAAsB,8BAA8B,cAAc,uBAAuB,eAAe,YAAY,oBAAoB,MAAM,2DAA2D,UAAU;AAC18B,kDAAkD,gBAAgB,gEAAgE,wDAAwD,6DAA6D,uDAAuD;AAC9S,uCAAuC,uDAAuD,uCAAuC,SAAS,uBAAuB,eAAe;AACpL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChUa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,iBAAiB;AACjB,2BAA2B;AAC3B,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;;AC1Fa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA,wGAAwG;AACxG;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACvEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,sCAAsC,mBAAO,CAAC,0HAA+C;AAC7F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACtFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,qEAAe;AACrC,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,yCAAyC,mBAAO,CAAC,2FAAc;AAC/D,iBAAiB,mBAAO,CAAC,yFAAa;AACtC,8CAA8C,mBAAO,CAAC,qHAA2B;AACjF,8CAA8C,mBAAO,CAAC,qHAA2B;AACjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;AClfa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,mCAAmC,mBAAO,CAAC,+EAAQ;AACnD,iBAAiB,mBAAO,CAAC,yFAAa;AACtC;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa,QAAQ;AACrB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,IAAI;AACjB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACnGa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,wBAAwB,GAAG,6BAA6B,GAAG,2BAA2B,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,gBAAgB;AAC7J,0BAA0B,2BAA2B;AACrD,4BAA4B,6BAA6B;AACzD,uBAAuB,wBAAwB;AAC/C,sBAAsB,uBAAuB;AAC7C,sBAAsB,uBAAuB;AAC7C,eAAe,gBAAgB;AAC/B;;;;;;;;;;;;ACba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mBAAO,CAAC,qGAA+B;AACvC,mBAAO,CAAC,6GAAmC;AAC3C,mBAAO,CAAC,iHAAqC;AAC7C,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,uCAAuC,mBAAO,CAAC,uFAAY;AAC3D,qCAAqC,mBAAO,CAAC,mFAAU;AACvD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;;;;;ACtIa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK;AAC/b;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,WAAW;AACpD;AACA,KAAK;AACL;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACpCa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,qCAAqC,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,eAAe,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,mBAAmB,GAAG,6BAA6B,GAAG,uBAAuB,GAAG,6BAA6B,GAAG,0BAA0B,GAAG,+BAA+B,GAAG,2BAA2B,GAAG,0BAA0B,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,sBAAsB;AACljB,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK;AAC/b,YAAY,aAAa;AACzB,YAAY,aAAa;AACzB,UAAU,WAAW;AACrB,cAAc,eAAe;AAC7B,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;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,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA,cAAc,eAAe;AAC7B;AACA;AACA,oCAAoC,qCAAqC;AACzE;AACA;AACA,GAAG;AACH;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,uBAAuB,wBAAwB;AAC/C,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,6BAA6B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,6BAA6B;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA,0BAA0B,2BAA2B;AACrD,+CAA+C,eAAe;AAC9D;AACA,GAAG;AACH;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA,8DAA8D,qBAAqB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;ACxKa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,gBAAgB,GAAG,2BAA2B,GAAG,+BAA+B,GAAG,oBAAoB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,8BAA8B,GAAG,iCAAiC,GAAG,yBAAyB,GAAG,uCAAuC,GAAG,sBAAsB,GAAG,+BAA+B,GAAG,uBAAuB;AAC7W,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,6CAA6C,mBAAO,CAAC,wHAA8C;AACnG,mCAAmC,mBAAO,CAAC,kHAA2C;AACtF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,kBAAkB,mBAAO,CAAC,+FAAc;AACxC,sCAAsC,uCAAuC;AAC7E,mBAAmB,oBAAoB;AACvC,wBAAwB,yBAAyB;AACjD,8BAA8B,+BAA+B;;AAE7D;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,aAAa;AACb;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA,gCAAgC,iCAAiC;AACjE;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAqI;AACrI;AACA;AACA,qIAAqI;AACrI;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Qa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,wDAAwD;AACxD;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,6BAA6B,GAAG,2BAA2B,GAAG,mCAAmC;AACjG,4BAA4B,6BAA6B;AACzD,0BAA0B,2BAA2B;AACrD,kCAAkC,mCAAmC;AACrE;;;;;;;;;;;;ACVa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,kBAAkB,mBAAO,CAAC,kHAA2C;AACrE,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,uBAAuB,mBAAO,CAAC,4HAAgD;AAC/E,sBAAsB,mBAAO,CAAC,0HAA+C;AAC7E,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,sCAAsC,mBAAO,CAAC,0HAA+C;AAC7F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,6CAA6C,mBAAO,CAAC,wHAA8C;AACnG,iDAAiD,mBAAO,CAAC,gIAAkD;AAC3G,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,mDAAmD,mBAAO,CAAC,oIAAoD;AAC/G,kDAAkD,mBAAO,CAAC,kIAAmD;AAC7G,0CAA0C,mBAAO,CAAC,gEAAa;AAC/D,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,0EAAuB;AACrE,qCAAqC,mBAAO,CAAC,kEAAmB;AAChE,cAAc,mBAAO,CAAC,qEAAe;AACrC,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,mBAAmB,mBAAO,CAAC,iFAAqB;AAChD,mCAAmC,mBAAO,CAAC,+FAAM;AACjD,4BAA4B,mBAAO,CAAC,qHAAyB;AAC7D,4BAA4B,mBAAO,CAAC,qHAAyB;AAC7D,kBAAkB,mBAAO,CAAC,iGAAe;AACzC,4CAA4C,mBAAO,CAAC,uGAAkB;AACtE,8BAA8B,mBAAO,CAAC,2HAA4B;AAClE,kBAAkB,mBAAO,CAAC,+FAAc;AACxC,iBAAiB,mBAAO,CAAC,6FAAa;AACtC,yDAAyD,mFAAmF,WAAW,0HAA0H,gBAAgB,WAAW,yBAAyB,SAAS,wBAAwB,4BAA4B,cAAc,SAAS,+BAA+B,sBAAsB,WAAW,YAAY,gKAAgK,kDAAkD,SAAS,kBAAkB,kBAAkB,oBAAoB,sBAAsB,8BAA8B,cAAc,uBAAuB,eAAe,YAAY,oBAAoB,MAAM,2DAA2D,UAAU;AAC38B,kDAAkD,gBAAgB,gEAAgE,wDAAwD,6DAA6D,uDAAuD;AAC9S,uCAAuC,uDAAuD,uCAAuC,SAAS,uBAAuB;AACrK,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;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,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB;AACA,eAAe,QAAQ;AACvB;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,oBAAoB;AACjC,aAAa,aAAa;AAC1B,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,iBAAiB;AAC9B,eAAe;AACf;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,0EAA0E,aAAa;AACvF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,aAAa;AAC1B;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA,aAAa,QAAQ;AACrB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA,eAAe;AACf;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,cAAc;AAC3B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ,aAAa;AAClC,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,cAAc;AAC3B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,aAAa,cAAc,WAAW;AACtC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,YAAY;AACnE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,cAAc;AAC3B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe,yCAAyC;AACrE;AACA,aAAa,QAAQ;AACrB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,yCAAyC;AACzC;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,2BAA2B;AACxC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe;AACf;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,6BAA6B;AAC1C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAqC;AACrD,iGAAiG;AACjG;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,aAAa,SAAS;AACtB,aAAa,KAAK;AAClB;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oDAAoD,wEAAwE;AAC5H;AACA,KAAK;AACL,qDAAqD,kBAAkB;AACvE;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,kBAAkB;AAC9E;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,kBAAkB;AAC7E;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,gBAAgB,UAAU;AAC1B,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,cAAc;AACd;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6TAA6T;AAC7T;AACA;AACA;AACA,+GAA+G,8DAA8D;AAC7K,kNAAkN;AAClN;AACA;AACA,0CAA0C;AAC1C,iOAAiO;AACjO;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6MAA6M;AAC7M;AACA;AACA;AACA,iPAAiP;AACjP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ;AACvJ,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,uGAAuG;AACvG,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0TAA0T;AAC1T;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gCAAgC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B;AACA;AACA,wJAAwJ;AACxJ;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA,mDAAmD,gCAAgC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,IAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA,gBAAgB,KAAK,EAAE,EAGV;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA,eAAe,QAAQ;AACvB,gBAAgB;AAChB;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,cAAc;AAC3B,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA,8EAA8E,mBAAmB;AACjG;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,mBAAmB;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,mBAAmB;AACtF;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACvjFa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,2BAA2B,GAAG,yBAAyB;AACvD,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,qEAAe;AACrC,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;AC3Ca;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,sCAAsC,mBAAO,CAAC,0HAA+C;AAC7F,wCAAwC,mBAAO,CAAC,gIAAkD;AAClG,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,2FAAY;AAC1D;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,eAAe;AAC9B;AACA;AACA;AACA,oBAAoB;AACpB,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,KAAK;AACL;AACA,gDAAgD;;AAEhD;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gCAAgC;AAC/C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kBAAkB;AACjC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;;AAEA,gCAAgC;AAChC,KAAK;AACL;AACA,+CAA+C;;AAE/C;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,KAAK;AACL;AACA,+CAA+C;;AAE/C;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,eAAe;AAC9B;AACA;AACA;AACA,wBAAwB;AACxB,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,eAAe;AAC9B;AACA;AACA;AACA,0BAA0B;AAC1B,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;ACnca;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,qCAAqC,mBAAO,CAAC,0GAAuC;AACpF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,2FAAY;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;;AAED;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8HAA8H;AAC9H;AACA;AACA,mHAAmH;AACnH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;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,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;;;;;AC1Qa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,mBAAO,CAAC,6GAAmC;AAC3C,mBAAO,CAAC,iGAA6B;AACrC,cAAc,mBAAO,CAAC,qEAAe;AACrC,kBAAkB,mBAAO,CAAC,+EAAoB;AAC9C,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,2CAA2C,mBAAO,CAAC,mGAAgB;AACnE,qCAAqC,mBAAO,CAAC,uFAAU;AACvD,4CAA4C,mBAAO,CAAC,uGAAkB;AACtE,kBAAkB,mBAAO,CAAC,iGAAe;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F;AAC3F;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACjSa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,kBAAkB,mBAAO,CAAC,kHAA2C;AACrE,eAAe,mBAAO,CAAC,0GAAuC;AAC9D,uBAAuB,mBAAO,CAAC,4HAAgD;AAC/E,qBAAqB,mBAAO,CAAC,0HAA+C;AAC5E,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe,GAAG,mBAAmB,GAAG,sBAAsB;AAC9D,6CAA6C,mBAAO,CAAC,wHAA8C;AACnG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,qCAAqC,mBAAO,CAAC,0GAAuC;AACpF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,0DAAU;AACxD,cAAc,mBAAO,CAAC,qEAAe;AACrC,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,mBAAmB,mBAAO,CAAC,iFAAqB;AAChD,kCAAkC,mBAAO,CAAC,gEAAkB;AAC5D,yDAAyD,oFAAoF,WAAW,yHAAyH,gBAAgB,WAAW,yBAAyB,SAAS,wBAAwB,4BAA4B,cAAc,SAAS,+BAA+B,sBAAsB,WAAW,YAAY,gKAAgK,kDAAkD,SAAS,kBAAkB,kBAAkB,oBAAoB,sBAAsB,8BAA8B,cAAc,uBAAuB,eAAe,YAAY,oBAAoB,MAAM,2DAA2D,UAAU;AAC38B,kDAAkD,gBAAgB,gEAAgE,wDAAwD,6DAA6D,uDAAuD;AAC9S,uCAAuC,uDAAuD,uCAAuC,SAAS,uBAAuB;AACrK,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;AAC3c;AACA;AACA,qBAAqB,sBAAsB;AAC3C,kBAAkB,mBAAmB;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;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,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,MAAM;AACnB,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,aAAa,OAAO;AACpB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC,WAAW,YAAY;AACvB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,gBAAgB,kBAAe;AAC/B;;;;;;;;;;;;AC3aa;;AAEb,oBAAoB,mBAAO,CAAC,oHAA4C;AACxE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,yBAAyB,0BAA0B,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACzP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;AAC3c;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;;;;;;;;;;AC3CA,SAAS,mBAAO,CAAC,4FAAM;AACvB,SAAS,mBAAO,CAAC,4FAAM;;AAEvB;AACA;AACA;;AAEA;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACjCA,UAAU,mBAAO,CAAC,8GAAW;AAC7B,kBAAkB,mBAAO,CAAC,sHAAmB;;AAE7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,OAAO;AACzB;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC5GA,UAAU,mBAAO,CAAC,8GAAW;AAC7B,kBAAkB,mBAAO,CAAC,sHAAmB;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;AC5Ba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf,cAAc,mBAAO,CAAC,qEAAe;AACrC,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,sBAAsB,OAAO,sBAAsB,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,wCAAwC;AAChD,QAAQ,wCAAwC;AAChD;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,+BAA+B;AACvC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;;;;;;;;;;;ACxEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,qBAAqB,GAAG,+BAA+B,GAAG,gCAAgC,GAAG,sCAAsC,GAAG,oCAAoC,GAAG,yCAAyC,GAAG,qBAAqB,GAAG,wBAAwB;AACzQ;AACA,mCAAmC,oCAAoC;AACvE,qCAAqC,sCAAsC;AAC3E,8BAA8B,+BAA+B;AAC7D,uBAAuB,wBAAwB;AAC/C,+BAA+B,gCAAgC;AAC/D,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,yCAAyC;AACjF,oBAAoB,qBAAqB;AACzC;;;;;;;;;;;;ACtBa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,wCAAwC,mBAAO,CAAC,kKAAmE;AACnH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,kCAAkC,mBAAO,CAAC,8GAAyC;AACnF,uDAAuD,mBAAO,CAAC,kKAAmE;AAClI,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wDAAwD,mBAAO,CAAC,8IAAyD;AACzH,cAAc,mBAAO,CAAC,qEAAe;AACrC,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,oBAAoB,mBAAO,CAAC,mFAAsB;AAClD,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,mFAAW;AACzD,iBAAiB,mBAAO,CAAC,uFAAa;AACtC,4CAA4C,mBAAO,CAAC,mHAA2B;AAC/E,gDAAgD,mBAAO,CAAC,uGAAqB;AAC7E,aAAa,mBAAO,CAAC,+EAAS;AAC9B,mDAAmD;AACnD,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,4DAA4D,0BAA0B;AACzP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,wEAAwE,KAAK;AAChc;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,gEAAgE;;AAE/G;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,gEAAgE,oEAAoE,mDAAmD;AACvL;AACA,QAAQ,IAAI;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,yCAAyC,4DAA4D,2CAA2C;AAChJ,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gDAAgD,kEAAkE,iDAAiD;;AAEnK;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;;AAEA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACt0Ba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,kDAAkD,mBAAO,CAAC,6FAAsB;AAChF,2CAA2C,mBAAO,CAAC,wGAAiB;AACpE;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACpCa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,iBAAiB,mBAAO,CAAC,wFAAc;AACvC,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;AAC3c;AACA,gCAAgC,0BAA0B;AAC1D;AACA,aAAa,QAAQ;AACrB,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,gBAAgB,QAAQ;AACxB,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,cAAc,wBAAwB;AACtC,eAAe,QAAQ;AACvB;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;AClMa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE,iBAAiB,mBAAO,CAAC,wFAAc;AACvC,gDAAgD,mBAAO,CAAC,kHAAsB;AAC9E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;AClGa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gDAAgD,mBAAO,CAAC,kHAAsB;AAC9E,2CAA2C,mBAAO,CAAC,wGAAiB;AACpE,4CAA4C,mBAAO,CAAC,0GAAkB;AACtE;;;;;;;;;;;;AC5Ba;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAO,CAAC,uGAAgC;AACxC,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C,qCAAqC,mBAAO,CAAC,iFAAU;AACvD,aAAa,mBAAO,CAAC,iGAAkB;AACvC,wCAAwC,mBAAO,CAAC,mHAA2B;AAC3E,wCAAwC,mBAAO,CAAC,uFAAa;AAC7D,iBAAiB;AACjB,qCAAqC,mBAAO,CAAC,iFAAU;AACvD,aAAa,mBAAO,CAAC,+EAAS;AAC9B,uCAAuC,gDAAgD,4CAA4C,0EAA0E,mBAAmB;AAChO,yCAAyC,uCAAuC,6EAA6E,cAAc,qCAAqC,oCAAoC,UAAU,iBAAiB,kEAAkE,sFAAsF,2DAA2D,yEAAyE;AAC3iB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;ACzFa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,gBAAgB,mBAAO,CAAC,2EAAkB;AAC1C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,iBAAiB,mBAAO,CAAC,wFAAc;AACvC,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wDAAwD;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;AC5Fa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,iBAAiB,mBAAO,CAAC,6EAAmB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;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,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACtOa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;;;;;;;;;;;;ACZa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,sBAAsB;AACtB,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA,CAAC,GAAG;AACJ;;;;;;;;;;;;ACda;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,oBAAoB,GAAG,wBAAwB,GAAG,0BAA0B,GAAG,6BAA6B,GAAG,yBAAyB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,gCAAgC,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,gCAAgC;AACzW,qBAAqB,sBAAsB;AAC3C,uBAAuB,wBAAwB;AAC/C,+BAA+B,gCAAgC;AAC/D,+BAA+B,gCAAgC;AAC/D,wBAAwB,yBAAyB;AACjD,iBAAiB,kBAAkB;AACnC,uBAAuB,wBAAwB;AAC/C,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C,wBAAwB,yBAAyB;AACjD,4BAA4B,6BAA6B;AACzD,yBAAyB,0BAA0B;AACnD,uBAAuB,wBAAwB;AAC/C;;;;;;;;;;;;AC1Ba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,gBAAgB;AAC7B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACzIa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,uBAAuB;AACvB,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,6GAAe;AACrC,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY;AAC3T;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;AChDa;;AAEb,oBAAoB,mBAAO,CAAC,oHAA4C;AACxE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,iDAAiD,mBAAO,CAAC,gIAAkD;AAC3G,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,mCAAmC,mBAAO,CAAC,sFAAM;AACjD,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,mBAAO,CAAC,+IAAgC;AACxC,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,oBAAoB,mBAAO,CAAC,2HAAsB;AAClD,iBAAiB,mBAAO,CAAC,oFAAa;AACtC,yCAAyC,mBAAO,CAAC,wFAAe;AAChE,iBAAiB,mBAAO,CAAC,sFAAc;AACvC,yBAAyB,0BAA0B,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACzP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;AAC3c;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,MAAM;AACnB,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,eAAe,SAAS;AACxB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB,aAAa,SAAS;AACtB,eAAe,SAAS;AACxB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB,eAAe,SAAS;AACxB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,cAAc;AAC3B,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACzYa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,kCAAkC,mBAAO,CAAC,wEAAO;AACjD,qCAAqC,mBAAO,CAAC,8EAAU;AACvD;AACA;AACA,CAAC;AACD;;;;;;;;;;;;ACnBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,aAAa;AACb,uBAAuB;AACvB,sBAAsB;AACtB,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACzIa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,cAAc;AACd,kBAAe;AACf,cAAc;AACd,qBAAqB;AACrB,mBAAmB;AACnB,gBAAgB;AAChB,0CAA0C,mBAAO,CAAC,kEAAgB;AAClE,kBAAkB,mBAAO,CAAC,4DAAa;AACvC,uCAAuC,mBAAO,CAAC,6GAAY;AAC3D;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3Ea;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,wBAAwB,GAAG,kBAAe;AAC1C,qCAAqC,mBAAO,CAAC,gDAAQ;AACrD,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,qCAAqC,mBAAO,CAAC,0DAAe;AAC5D,iBAAiB,mBAAO,CAAC,+GAAa;AACtC,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oFAAsB;AACjC,GAAG;AACH;AACA,WAAW,mFAAqB;AAChC,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA,CAAC;AACD;;;;;;;;;;;;AC7Ea;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;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,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACzBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAkB,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,4CAA4C,GAAG,gCAAgC;AACxK,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA,+BAA+B,gCAAgC;AAC/D,2CAA2C,4CAA4C;AACvF;;;;;;;;;;;;ACtFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AClCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sBAAsB,mBAAO,CAAC,iFAAiB;AAC/C;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,MAAqC,GAAG,CAAc;AAC/E,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACvBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,2BAA2B;AAC3B,6BAA6B;AAC7B,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,iBAAiB,mBAAO,CAAC,+GAAa;AACtC;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;;AC1Ea;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,mBAAmB;AACnB,sBAAsB;AACtB,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,OAAO;AAClB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,aAAa;AACzF;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;;AAEA;AACA;AACA,WAAW,cAAc;AACzB,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6FAA6F,eAAe;AAC5G;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,+CAA+C,mBAAO,CAAC,4HAAgD;AACvG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY;AAC3T;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAe;AAC/B;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;;;;;;;;;;;;ACtEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;;ACXa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mCAAmC,mBAAO,CAAC,mHAAQ;AACnD;;;;;;;;;;;;ACda;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mCAAmC,mBAAO,CAAC,yGAAU;AACrD,uCAAuC,mBAAO,CAAC,6GAAY;AAC3D,6CAA6C,mBAAO,CAAC,2HAAmB;AACxE,4CAA4C,mBAAO,CAAC,yHAAkB;AACtE,oCAAoC,mBAAO,CAAC,uGAAS;AACrD,gDAAgD,mBAAO,CAAC,mIAAuB;AAC/E,gDAAgD,mBAAO,CAAC,iIAAsB;AAC9E,wCAAwC,mBAAO,CAAC,iHAAc;AAC9D,uCAAuC,mBAAO,CAAC,6GAAY;AAC3D,cAAc,mBAAO,CAAC,yGAAU;AAChC,qBAAqB,mBAAO,CAAC,yHAAkB;AAC/C,0CAA0C,mBAAO,CAAC,qHAAgB;AAClE,oCAAoC,mBAAO,CAAC,uGAAS;AACrD,kCAAkC,mBAAO,CAAC,mGAAO;AACjD,4CAA4C,mBAAO,CAAC,2HAAmB;AACvE,wCAAwC,mBAAO,CAAC,+GAAa;AAC7D,yCAAyC,mBAAO,CAAC,iHAAc;AAC/D,wCAAwC,mBAAO,CAAC,uHAAc;AAC9D,iBAAiB,mBAAO,CAAC,+GAAa;AACtC,gDAAgD,mBAAO,CAAC,+HAAqB;AAC7E,iBAAiB,mBAAO,CAAC,iHAAc;AACvC,uCAAuC,gDAAgD,4CAA4C,0EAA0E,mBAAmB;AAChO,yCAAyC,uCAAuC,6EAA6E,cAAc,qCAAqC,oCAAoC,UAAU,iBAAiB,kEAAkE,sFAAsF,2DAA2D,yEAAyE;AAC3iB;;;;;;;;;;;;AC/Pa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;;;;;;;;;;;;ACjBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5Fa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,sCAAsC,mBAAO,CAAC,8GAAyC;AACvF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,gDAAgD,mBAAO,CAAC,iIAAsB;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Fa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA,kCAAkC,yCAAyC;AAC3E;AACA,YAAY;AACZ;AACA,2BAA2B,wBAAwB,6BAA6B,IAAI,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,gCAAgC,GAAG;AAC3J;AACA;AACA;AACA,kCAAkC,yCAAyC;AAC3E;AACA,YAAY;AACZ;AACA,mCAAmC,wBAAwB,6BAA6B,IAAI,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,gCAAgC,GAAG;AACnK;AACA;AACA,YAAY;AACZ;AACA,kBAAkB,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,GAAG;AAClD;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,qBAAqB,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,GAAG;AACrD;AACA;;;;;;;;;;;;ACxDa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF;AACA;AACA;;AAEA;AACA;AACA,WAAW,KAAK;AAChB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,sCAAsC,mBAAO,CAAC,oDAAS;AACvD,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK,YAAY;AAC3c;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9Ha;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;;ACrCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,yCAAyC,mBAAO,CAAC,gHAA0C;AAC3F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,sCAAsC,mBAAO,CAAC,8GAAyC;AACvF,mCAAmC,mBAAO,CAAC,6CAAM;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA,4EAA4E,aAAa;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,cAAc;AAC/B,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA,mGAAmG,eAAe;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,cAAc;AAC/B,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,eAAe;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,cAAc;AAC/B,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,cAAc;AAC/B,iBAAiB,OAAO;AACxB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA,+EAA+E,eAAe;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA,2CAA2C;AAC3C;AACA,SAAS,OAAO;AAChB;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,cAAc;AACzB;AACA,aAAa;AACb;AACA;AACA,6FAA6F,eAAe;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5Oa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,8BAA8B;AAC9B,2BAA2B;AAC3B,uBAAuB;AACvB,0BAA0B;AAC1B,wBAAwB;AACxB,wBAAwB;AACxB,0BAA0B;AAC1B,6BAA6B;AAC7B,qBAAqB;AACrB,wBAAwB;AACxB,YAAY,mBAAO,CAAC,yGAAU;AAC9B,iBAAiB,mBAAO,CAAC,+GAAa;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,MAAM;AACpB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5La;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,kCAAkC,mBAAO,CAAC,mGAAO;AACjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;;;;;;;;;;;;AC3Ca;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,wCAAwC,mBAAO,CAAC,gHAA0C;AAC1F,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY;AAC3T;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACzZa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,6GAAe;AACrC,gDAAgD,mBAAO,CAAC,sIAAuB;AAC/E,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1Ka;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B,GAAG,eAAe,GAAG,gCAAgC;AAC/E,uDAAuD,mBAAO,CAAC,oKAAoE;AACnI,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,yCAAyC,mBAAO,CAAC,gJAA4B;AAC7E,uCAAuC,mBAAO,CAAC,oHAAW;AAC1D,aAAa,mBAAO,CAAC,0HAAiB;AACtC,4CAA4C,mBAAO,CAAC,4HAAkB;AACtE,0CAA0C,mBAAO,CAAC,8HAAmB;AACrE,wCAAwC,mBAAO,CAAC,oHAAc;AAC9D,qCAAqC,mBAAO,CAAC,oHAAc;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,iCAAiC;AACjC;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,SAAS;AACtB;AACA,yBAAyB,0BAA0B;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,cAAc,eAAe;AAC7B;;;;;;;;;;;;ACvIa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,qDAAqD,mBAAO,CAAC,wIAAsD;AACnH,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,wCAAwC,mBAAO,CAAC,qHAAe;AAC/D,0CAA0C,mBAAO,CAAC,+HAAoB;AACtE,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,kBAAe;AAC3C;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACrFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,gBAAgB,mBAAO,CAAC,wDAAW;AACnC;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,aAAa;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,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;;AC3Da;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAe;AACjC;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAW;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;;ACzHA;AACA;AACA;;AAEA,uEAAuE;AACvE;;AAEA;;AAEA;AACA;AACA;;AAEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,aAAa,mBAAO,CAAC,0DAAe;AACpC,iBAAiB,mBAAO,CAAC,4DAAa;AACtC,mBAAmB,mBAAO,CAAC,wEAAe;AAC1C,YAAY,mBAAO,CAAC,oDAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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,eAAe,kBAAe;AAC9B;;;;;;;;;;;;AC/Oa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACzCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,uCAAuC,mBAAO,CAAC,2HAAW;AAC1D,aAAa,mBAAO,CAAC,kHAAS;AAC9B;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AC7Ca;;AAEb,kBAAkB,mBAAO,CAAC,kHAA2C;AACrE,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,uBAAuB,mBAAO,CAAC,4HAAgD;AAC/E,qBAAqB,mBAAO,CAAC,0HAA+C;AAC5E,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,iCAAiC,mBAAO,CAAC,8CAAI;AAC7C,kCAAkC,mBAAO,CAAC,+GAAY;AACtD,qCAAqC,mBAAO,CAAC,qHAAe;AAC5D,yDAAyD,mFAAmF,WAAW,yHAAyH,gBAAgB,WAAW,yBAAyB,SAAS,wBAAwB,4BAA4B,cAAc,SAAS,+BAA+B,sBAAsB,WAAW,YAAY,gKAAgK,kDAAkD,SAAS,kBAAkB,kBAAkB,oBAAoB,sBAAsB,8BAA8B,cAAc,uBAAuB,eAAe,YAAY,oBAAoB,MAAM,2DAA2D,UAAU;AAC18B,kDAAkD,gBAAgB,gEAAgE,wDAAwD,6DAA6D,uDAAuD;AAC9S,uCAAuC,uDAAuD,uCAAuC,SAAS,uBAAuB,eAAe;AACpL;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChUa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,iBAAiB;AACjB,2BAA2B;AAC3B,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;;;;;;;;;;AC1FA,SAAS,mBAAO,CAAC,mFAAM;AACvB,SAAS,mBAAO,CAAC,mFAAM;;AAEvB;AACA;AACA;;AAEA;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACzBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;ACjCA,UAAU,mBAAO,CAAC,qGAAW;AAC7B,kBAAkB,mBAAO,CAAC,6GAAmB;;AAE7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,OAAO;AACzB;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC5GA,UAAU,mBAAO,CAAC,qGAAW;AAC7B,kBAAkB,mBAAO,CAAC,6GAAmB;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA","sources":["webpack://@agentx/agentx/../../node_modules/@webex/helper-html/dist/html-base.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-html/dist/html.shim.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-html/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-image/dist/detect-filetype.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-image/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-image/dist/orient.js","webpack://@agentx/agentx/../../node_modules/@webex/helper-image/dist/process-image.browser.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/http-error-subtypes.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/http-error.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/interceptors/http-status.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/lib/detect.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/lib/interceptor.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/lib/xhr.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/progress-event.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/request/index.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/request/request.shim.js","webpack://@agentx/agentx/../../node_modules/@webex/http-core/dist/request/utils.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/calendar.decrypt.helper.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/calendar.encrypt.helper.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/calendar.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/collection.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-calendar/dist/util.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/activities.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/activity-thread-ordering.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/conversation.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/convo-error.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/decryption-transforms.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/encryption-transforms.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/share-activity.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/dist/to-array.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/node_modules/uuid/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/node_modules/uuid/lib/bytesToUuid.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/node_modules/uuid/lib/rng-browser.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/node_modules/uuid/v1.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-conversation/node_modules/uuid/v4.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/device.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/features/feature-collection.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/features/feature-model.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/features/features-model.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/features/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/interceptors/device-url.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/ipNetworkDetector.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-device/dist/types.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/dss-batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/dss-errors.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/dss.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common-timers/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/base64.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/browser-detection.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/capped-debounce.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/check-required.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/defer.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/deprecated.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/event-envelope.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/events.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/exception.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/in-browser/browser.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/in-browser/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/isBuffer.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/make-state-datatype.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/one-flight.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/patterns.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/resolve-with.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/retry.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/tap.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/template-container.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/uuid-utils.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/common/dist/while-in-flight.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/http-error-subtypes.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/http-error.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/interceptors/http-status.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/lib/detect.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/lib/interceptor.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/lib/xhr.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/progress-event.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/request/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/request/request.shim.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/http-core/dist/request/utils.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/uuid/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/uuid/lib/bytesToUuid.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/uuid/lib/rng-browser.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/uuid/v1.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/uuid/v4.js"],"sourcesContent":["\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.escape = escape;\nexports.escapeSync = escapeSync;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar escapeMe = /(<|>|&)/g;\n\n// escape and escapeSync probably don't both need to exist, but it seemed like a\n// good idea in case we ever want to for the future.\n\n/**\n * Escapes HTML\n * @param {[type]} html\n * @returns {[type]}\n */\nfunction escape(html) {\n return new _promise.default(function (resolve) {\n return resolve(escapeSync(html));\n });\n}\n\n/**\n * Synchronously escape HTML\n * @param {[type]} html\n * @returns {[type]}\n */\nfunction escapeSync(html) {\n return html.replace(escapeMe, entityReplacer);\n}\n\n/**\n * @param {string} char\n * @private\n * @returns {string}\n */\nfunction entityReplacer(char) {\n switch (char) {\n case '<':\n return '<';\n case '>':\n return '>';\n case '&':\n return '&';\n default:\n return char;\n }\n}\n//# sourceMappingURL=html-base.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"escape\", {\n enumerable: true,\n get: function get() {\n return _htmlBase.escape;\n }\n});\n_Object$defineProperty(exports, \"escapeSync\", {\n enumerable: true,\n get: function get() {\n return _htmlBase.escapeSync;\n }\n});\nexports.filterSync = exports.filterEscapeSync = exports.filterEscape = exports.filter = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _lodash = require(\"lodash\");\nvar _htmlBase = require(\"./html-base\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-env browser */\n\n/**\n * Some browsers don't implement {@link Element#remove()} or\n * {@link NodeList#remove()} or {@link HTMLCollection#remove()}. This wrapper\n * calls the appropriate `#remove()` method if available, or falls back to a\n * non-global-polluting polyfill.\n * @param {Element|NodeList|HTMLCollection} node\n * @returns {undefined}\n */\nfunction removeNode(node) {\n if (node.remove) {\n node.remove();\n return;\n }\n if (node.parentElement) {\n node.parentElement.removeChild(node);\n return;\n }\n if ('length' in node) {\n for (var i = node.length - 1; i >= 0; i -= 1) {\n removeNode(node[i]);\n }\n return;\n }\n throw new Error('Could not find a way to remove node');\n}\n\n/**\n * @param {Object} allowedTags\n * @param {Array} allowedStyles\n * @param {string} html\n * @private\n * @returns {string}\n */\nfunction _filter() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return new _promise.default(function (resolve) {\n resolve(_filterSync.apply(void 0, args));\n });\n}\n\n/**\n * Curried async HTML filter.\n * @param {Object} allowedTags Map of tagName -> array of allowed attributes\n * @param {Array} allowedStyles Array of allowed styles\n * @param {string} html html to filter\n * @returns {string}\n */\nvar filter = exports.filter = (0, _lodash.curry)(_filter, 4);\n\n/**\n * @param {function} processCallback callback function to do additional\n * processing on node. of the form process(node)\n * @param {Object} allowedTags\n * @param {Array} allowedStyles\n * @param {string} html\n * @private\n * @returns {string}\n */\nfunction _filterSync(processCallback, allowedTags, allowedStyles, html) {\n if (!html || !allowedStyles || !allowedTags) {\n if (html.length === 0) {\n return html;\n }\n throw new Error('`allowedTags`, `allowedStyles`, and `html` must be provided');\n }\n var doc = new DOMParser().parseFromString(html, 'text/html');\n depthFirstForEach(doc.body.childNodes, filterNode);\n processCallback(doc.body);\n if (html.indexOf('body') === 1) {\n return \"\".concat(doc.body.innerHTML, \"\");\n }\n return doc.body.innerHTML;\n\n /**\n * @param {Node} node\n * @private\n * @returns {undefined}\n */\n function filterNode(node) {\n if (!isElement(node)) {\n return;\n }\n var nodeName = node.nodeName.toLowerCase();\n var allowedTagNames = (0, _keys.default)(allowedTags);\n depthFirstForEach(node.childNodes, filterNode);\n if ((0, _lodash.includes)(allowedTagNames, nodeName)) {\n var allowedAttributes = allowedTags[nodeName];\n (0, _lodash.forEach)(listAttributeNames(node.attributes), function (attrName) {\n if (!(0, _lodash.includes)(allowedAttributes, attrName)) {\n node.removeAttribute(attrName);\n } else if (attrName === 'href' || attrName === 'src') {\n var attrValue = node.attributes.getNamedItem(attrName).value.trim().toLowerCase();\n\n // We're doing at runtime what the no-script-url rule does at compile\n // time\n // eslint-disable-next-line no-script-url\n if (attrValue.indexOf('javascript:') === 0 || attrValue.indexOf('vbscript:') === 0) {\n reparent(node);\n }\n } else if (attrName === 'style') {\n var styles = node.attributes.getNamedItem('style').value.split(';').map(function (style) {\n var styleName = trim(style.split(':')[0]);\n if ((0, _lodash.includes)(allowedStyles, styleName)) {\n return style;\n }\n return null;\n }).filter(function (style) {\n return Boolean(style);\n }).join(';');\n node.setAttribute('style', styles);\n }\n });\n } else {\n reparent(node);\n }\n }\n}\n\n/**\n * Same as _filter, but escapes rather than removes disallowed values\n * @param {Function} processCallback\n * @param {Object} allowedTags\n * @param {Array} allowedStyles\n * @param {string} html\n * @returns {Promise}\n */\nfunction _filterEscape() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return new _promise.default(function (resolve) {\n resolve(_filterEscapeSync.apply(void 0, args));\n });\n}\n\n/**\n * Same as _filterSync, but escapes rather than removes disallowed values\n * @param {Function} processCallback\n * @param {Object} allowedTags\n * @param {Array} allowedStyles\n * @param {string} html\n * @returns {string}\n */\nfunction _filterEscapeSync(processCallback, allowedTags, allowedStyles, html) {\n if (!html || !allowedStyles || !allowedTags) {\n if (html.length === 0) {\n return html;\n }\n throw new Error('`allowedTags`, `allowedStyles`, and `html` must be provided');\n }\n var doc = new DOMParser().parseFromString(html, 'text/html');\n depthFirstForEach(doc.body.childNodes, filterNode);\n processCallback(doc.body);\n if (html.indexOf('body') === 1) {\n return \"\".concat(doc.body.innerHTML, \"\");\n }\n return doc.body.innerHTML;\n\n /**\n * @param {Node} node\n * @private\n * @returns {undefined}\n */\n function filterNode(node) {\n if (!isElement(node)) {\n return;\n }\n depthFirstForEach(node.childNodes, filterNode);\n var nodeName = node.nodeName.toLowerCase();\n var allowedTagNames = (0, _keys.default)(allowedTags);\n if ((0, _lodash.includes)(allowedTagNames, nodeName)) {\n var allowedAttributes = allowedTags[nodeName];\n (0, _lodash.forEach)(listAttributeNames(node.attributes), function (attrName) {\n if (!(0, _lodash.includes)(allowedAttributes, attrName)) {\n node.removeAttribute(attrName);\n } else if (attrName === 'href' || attrName === 'src') {\n var attrValue = node.attributes.getNamedItem(attrName).value.toLowerCase();\n\n // We're doing at runtime what the no-script-url rule does at compile\n // time\n // eslint-disable-next-line no-script-url\n if (attrValue.indexOf('javascript:') === 0 || attrValue.indexOf('vbscript:') === 0) {\n reparent(node);\n }\n } else if (attrName === 'style') {\n var styles = node.attributes.getNamedItem('style').value.split(';').map(function (style) {\n var styleName = trim(style.split(':')[0]);\n if ((0, _lodash.includes)(allowedStyles, styleName)) {\n return style;\n }\n return null;\n }).filter(function (style) {\n return Boolean(style);\n }).join(';');\n node.setAttribute('style', styles);\n }\n });\n } else {\n escapeNode(node);\n }\n }\n}\n\n/**\n * Escapes a given html node\n * @param {Node} node\n * @returns {undefined}\n */\nfunction escapeNode(node) {\n var before = document.createTextNode(\"<\".concat(node.nodeName.toLowerCase(), \">\"));\n var after = document.createTextNode(\"\"));\n node.parentNode.insertBefore(before, node);\n while (node.childNodes.length > 0) {\n node.parentNode.insertBefore(node.childNodes[0], node);\n }\n node.parentNode.insertBefore(after, node);\n removeNode(node);\n}\nvar trimPattern = /^\\s|\\s$/g;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nfunction trim(str) {\n return str.replace(trimPattern, '');\n}\n\n/**\n * @param {Node} node\n * @private\n * @returns {undefined}\n */\nfunction reparent(node) {\n while (node.childNodes.length > 0) {\n node.parentNode.insertBefore(node.childNodes[0], node);\n }\n removeNode(node);\n}\n\n/**\n * @param {NamedNodeMap} attributes\n * @private\n * @returns {Array}\n */\nfunction listAttributeNames(attributes) {\n return (0, _lodash.reduce)(attributes, function (attrNames, attr) {\n attrNames.push(attr.name);\n return attrNames;\n }, []);\n}\n\n/**\n * @param {Array} list\n * @param {Function} fn\n * @private\n * @returns {undefined}\n */\nfunction depthFirstForEach(list, fn) {\n for (var i = list.length; i >= 0; i -= 1) {\n fn(list[i]);\n }\n}\n\n/**\n * @param {Node} o\n * @private\n * @returns {Boolean}\n */\nfunction isElement(o) {\n if (!o) {\n return false;\n }\n if (o.ownerDocument === undefined) {\n return false;\n }\n if (o.nodeType !== 1) {\n return false;\n }\n if (typeof o.nodeName !== 'string') {\n return false;\n }\n return true;\n}\n\n/**\n * Curried HTML filter.\n * @param {Object} allowedTags Map of tagName -> array of allowed attributes\n * @param {Array} allowedStyles Array of allowed styles\n * @param {string} html html to filter\n * @returns {string}\n */\nvar filterSync = exports.filterSync = (0, _lodash.curry)(_filterSync, 4);\n\n/**\n * Curried HTML filter that escapes rather than removes disallowed tags\n * @param {Object} allowedTags Map of tagName -> array of allowed attributes\n * @param {Array} allowedStyles Array of allowed styles\n * @param {string} html html to filter\n * @returns {Promise}\n */\nvar filterEscape = exports.filterEscape = (0, _lodash.curry)(_filterEscape, 4);\n\n/**\n * Curried HTML filter that escapes rather than removes disallowed tags\n * @param {Object} allowedTags Map of tagName -> array of allowed attributes\n * @param {Array} allowedStyles Array of allowed styles\n * @param {string} html html to filter\n * @returns {string}\n */\nvar filterEscapeSync = exports.filterEscapeSync = (0, _lodash.curry)(_filterEscapeSync, 4);\n//# sourceMappingURL=html.shim.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"escape\", {\n enumerable: true,\n get: function get() {\n return _html.escape;\n }\n});\n_Object$defineProperty(exports, \"escapeSync\", {\n enumerable: true,\n get: function get() {\n return _html.escapeSync;\n }\n});\n_Object$defineProperty(exports, \"filter\", {\n enumerable: true,\n get: function get() {\n return _html.filter;\n }\n});\n_Object$defineProperty(exports, \"filterEscape\", {\n enumerable: true,\n get: function get() {\n return _html.filterEscape;\n }\n});\n_Object$defineProperty(exports, \"filterEscapeSync\", {\n enumerable: true,\n get: function get() {\n return _html.filterEscapeSync;\n }\n});\n_Object$defineProperty(exports, \"filterSync\", {\n enumerable: true,\n get: function get() {\n return _html.filterSync;\n }\n});\nvar _html = require(\"./html\");\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = detectFileType;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _httpCore = require(\"@webex/http-core\");\nvar _mime = require(\"mime\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Determines the file type of the specified file\n * @param {FileLike} file\n * @param {Object} logger\n * @returns {Promise}\n */\nfunction detectFileType(file, logger) {\n if (file.type) {\n logger.info(\"file already has type \".concat(file.type, \". using existing file.type.\"));\n return _promise.default.resolve(file.type);\n }\n if (file.mimeType) {\n logger.info(\"file already has mimeType \".concat(file.type, \". using existing file.mimeType.\"));\n return _promise.default.resolve(file.mimeType);\n }\n\n // This kinda belongs in http core, but since we have no guarantee that\n // buffers are expected to have names there, it'll stay here for now.\n return (0, _httpCore.detect)(file).then(function (type) {\n if (type === 'application/x-msi' || type === 'application/octet-stream') {\n logger.info(\"detected filetype to be \".concat(type, \". Falling back to mime.lookup\"));\n return (0, _mime.getType)(file.name);\n }\n logger.info(\"detected filetype to be \".concat(type, \". returning it\"));\n return type;\n });\n}\n//# sourceMappingURL=detect-filetype.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"detectFileType\", {\n enumerable: true,\n get: function get() {\n return _detectFiletype.default;\n }\n});\n_Object$defineProperty(exports, \"processImage\", {\n enumerable: true,\n get: function get() {\n return _processImage.default;\n }\n});\nexports.readExifData = readExifData;\nexports.updateImageOrientation = updateImageOrientation;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _processImage = _interopRequireDefault(require(\"./process-image\"));\nvar _detectFiletype = _interopRequireDefault(require(\"./detect-filetype\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint no-unused-vars: [\"error\", { \"vars\": \"local\" }] */\n// eslint-disable-next-line no-redeclare\n\nvar _require = require('safe-buffer'),\n Buffer = _require.Buffer;\nvar _require2 = require('exifr/dist/lite.umd'),\n parse = _require2.parse;\n\n/**\n * Updates the image file with exif information, required to correctly rotate the image activity\n * @param {Object} file\n * @param {Object} options\n * @param {boolean} options.shouldNotAddExifData\n * @returns {Promise}\n */\nfunction updateImageOrientation(file) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new _promise.default(function (resolve) {\n var reader = new FileReader();\n reader.readAsArrayBuffer(file);\n reader.onload = function onload() {\n var arrayBuffer = reader.result;\n var buf = Buffer.from(arrayBuffer);\n resolve(buf);\n };\n }).then(function (buf) {\n if (options.shouldNotAddExifData) {\n return buf;\n }\n return readExifData(file, buf);\n });\n}\n\n/**\n * Adds exif orientation information on the image file\n * @param {Object} file\n * @param {Object} buf\n * @returns {Promise}\n */\nfunction readExifData(_x, _x2) {\n return _readExifData.apply(this, arguments);\n}\n/* eslint-enable complexity */\nfunction _readExifData() {\n _readExifData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(file, buf) {\n var exifData, Orientation, ExifImageHeight, ExifImageWidth;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(file && (file.type === 'image/jpeg' || file.mimeType === 'image/jpeg'))) {\n _context.next = 5;\n break;\n }\n _context.next = 3;\n return parse(buf, {\n translateValues: false\n });\n case 3:\n exifData = _context.sent;\n if (exifData) {\n Orientation = exifData.Orientation, ExifImageHeight = exifData.ExifImageHeight, ExifImageWidth = exifData.ExifImageWidth;\n file.orientation = Orientation;\n file.exifHeight = ExifImageHeight;\n file.exifWidth = ExifImageWidth;\n if (file.image) {\n file.image.orientation = Orientation;\n }\n }\n case 5:\n return _context.abrupt(\"return\", buf);\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _readExifData.apply(this, arguments);\n}\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.orient = orient;\n/* eslint-disable complexity */\n/**\n * Rotates/flips the image on the canvas as per exif information\n * @param {Object} options(orientation: image exif orientation range from 1-8, img: Image object, x: start x-axis, y: start y-axis, width: width of the thumbnail, height: height of the thumbnail, ctx: canvas context)\n * @param {Object} file\n * @returns {Object}\n */\nfunction orient(options, file) {\n var width = options.width,\n height = options.height,\n ctx = options.ctx,\n img = options.img,\n orientation = options.orientation,\n x = options.x,\n y = options.y;\n if (file && file.orientation && file.orientation !== 1) {\n // explanation of orientation:\n // https://stackoverflow.com/questions/20600800/js-client-side-exif-orientation-rotate-and-mirror-jpeg-images\n switch (orientation) {\n case 2:\n // flip\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n // rotateImage180\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n // rotate180AndFlipImage\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n // rotate90AndFlipImage\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n // rotateImage90\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n // rotateNeg90AndFlipImage\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n // rotateNeg90\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n }\n ctx.drawImage(img, x, y, width, height);\n}\n//# sourceMappingURL=orient.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = processImage;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _orient = require(\"./orient\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-env browser */\n/**\n * Determins the dimensions of an image\n * @param {Object} constraints\n * @param {Number} constraints.width\n * @param {Number} constraints.height\n * @param {Number} maxWidth\n * @param {Number} maxHeight\n * @returns {Object}\n */\nfunction computeDimensions(_ref, maxWidth, maxHeight) {\n var width = _ref.width,\n height = _ref.height;\n if (height > width) {\n if (height > maxHeight) {\n width = width * maxHeight / height;\n height = maxHeight;\n }\n if (width > maxWidth) {\n height = height * maxWidth / width;\n width = maxWidth;\n }\n } else {\n if (width > maxWidth) {\n height = height * maxWidth / width;\n width = maxWidth;\n }\n if (height > maxHeight) {\n width = width * maxHeight / height;\n height = maxHeight;\n }\n }\n return {\n height: height,\n width: width\n };\n}\n\n/**\n * Measures an image file and produces a thumbnail for it\n * @param {Object} options\n * @param {Blob|ArrayBuffer} options.file\n * @param {Number} options.thumbnailMaxWidth\n * @param {Number} options.thumbnailMaxHeight\n * @param {Boolean} options.enableThumbnails\n * @param {Object} options.logger\n * @param {Boolean} options.isAvatar\n * @returns {Promise} Buffer, Dimensions, thumbnailDimensions\n */\nfunction processImage(_ref2) {\n var file = _ref2.file,\n type = _ref2.type,\n thumbnailMaxWidth = _ref2.thumbnailMaxWidth,\n thumbnailMaxHeight = _ref2.thumbnailMaxHeight,\n enableThumbnails = _ref2.enableThumbnails,\n logger = _ref2.logger,\n isAvatar = _ref2.isAvatar;\n if (!type || !type.startsWith('image')) {\n return _promise.default.resolve();\n }\n file = file instanceof Blob ? file : new Blob([file]);\n return new _promise.default(function (resolve, reject) {\n var img = new Image();\n img.onload = function onload() {\n resolve(img);\n };\n img.onerror = reject;\n img.src = URL.createObjectURL(file);\n }).then(function (img) {\n var fileDimensions = (0, _lodash.pick)(img, 'height', 'width');\n if (isAvatar) {\n // only if image is a profile avatar\n logger.info('dimensions will be set for avatar image');\n var size = fileDimensions.height > fileDimensions.width ? fileDimensions.height : fileDimensions.width;\n fileDimensions.height = size;\n fileDimensions.width = size;\n }\n if (!enableThumbnails) {\n logger.info('thumbnails not enabled');\n return [null, fileDimensions, null];\n }\n var thumbnailDimensions = computeDimensions(fileDimensions, thumbnailMaxWidth, thumbnailMaxHeight);\n var canvas = document.createElement('canvas');\n var ctx = canvas.getContext('2d');\n var width = thumbnailDimensions.width,\n height = thumbnailDimensions.height;\n\n // explanation of orientation:\n // https://stackoverflow.com/questions/20600800/js-client-side-exif-orientation-rotate-and-mirror-jpeg-images\n if (file.orientation && file.orientation > 4) {\n canvas.width = height;\n canvas.height = width;\n thumbnailDimensions.width = height;\n thumbnailDimensions.height = width;\n } else {\n canvas.width = thumbnailDimensions.width;\n canvas.height = thumbnailDimensions.height;\n }\n (0, _orient.orient)({\n orientation: file && file.orientation ? file.orientation : '',\n img: img,\n x: 0,\n y: 0,\n width: width,\n height: height,\n ctx: ctx\n }, file);\n var parts = canvas.toDataURL('image/png').split(',');\n // Thumbnail uploads were failing with common/base64 decoding\n var byteString = atob(parts[1]);\n var buffer = new ArrayBuffer(byteString.length);\n var view = new DataView(buffer);\n for (var i = 0; i < byteString.length; i += 1) {\n view.setUint8(i, byteString.charCodeAt(i));\n }\n return [buffer, fileDimensions, thumbnailDimensions];\n });\n}\n//# sourceMappingURL=process-image.browser.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = makeSubTypes;\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _parseInt2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/parse-int\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @param {Error} Base\n * @returns {undefined}\n */\nfunction makeSubTypes(Base) {\n /**\n * NetworkOrCORSError\n */\n var NetworkOrCORSError = /*#__PURE__*/function (_Base) {\n (0, _inherits2.default)(NetworkOrCORSError, _Base);\n var _super = _createSuper(NetworkOrCORSError);\n function NetworkOrCORSError() {\n (0, _classCallCheck2.default)(this, NetworkOrCORSError);\n return _super.apply(this, arguments);\n }\n return (0, _createClass2.default)(NetworkOrCORSError);\n }(Base);\n /**\n * BadRequest\n */\n var BadRequest = /*#__PURE__*/function (_Base2) {\n (0, _inherits2.default)(BadRequest, _Base2);\n var _super2 = _createSuper(BadRequest);\n function BadRequest() {\n (0, _classCallCheck2.default)(this, BadRequest);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(BadRequest);\n }(Base);\n /**\n * Unauthorized\n */\n var Unauthorized = /*#__PURE__*/function (_BadRequest) {\n (0, _inherits2.default)(Unauthorized, _BadRequest);\n var _super3 = _createSuper(Unauthorized);\n function Unauthorized() {\n (0, _classCallCheck2.default)(this, Unauthorized);\n return _super3.apply(this, arguments);\n }\n return (0, _createClass2.default)(Unauthorized);\n }(BadRequest);\n /**\n * PaymentRequired\n */\n var PaymentRequired = /*#__PURE__*/function (_BadRequest2) {\n (0, _inherits2.default)(PaymentRequired, _BadRequest2);\n var _super4 = _createSuper(PaymentRequired);\n function PaymentRequired() {\n (0, _classCallCheck2.default)(this, PaymentRequired);\n return _super4.apply(this, arguments);\n }\n return (0, _createClass2.default)(PaymentRequired);\n }(BadRequest);\n /**\n * Forbidden\n */\n var Forbidden = /*#__PURE__*/function (_BadRequest3) {\n (0, _inherits2.default)(Forbidden, _BadRequest3);\n var _super5 = _createSuper(Forbidden);\n function Forbidden() {\n (0, _classCallCheck2.default)(this, Forbidden);\n return _super5.apply(this, arguments);\n }\n return (0, _createClass2.default)(Forbidden);\n }(BadRequest);\n /**\n * NotFound\n */\n var NotFound = /*#__PURE__*/function (_BadRequest4) {\n (0, _inherits2.default)(NotFound, _BadRequest4);\n var _super6 = _createSuper(NotFound);\n function NotFound() {\n (0, _classCallCheck2.default)(this, NotFound);\n return _super6.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotFound);\n }(BadRequest);\n /**\n * MethodNotAllowed\n */\n var MethodNotAllowed = /*#__PURE__*/function (_BadRequest5) {\n (0, _inherits2.default)(MethodNotAllowed, _BadRequest5);\n var _super7 = _createSuper(MethodNotAllowed);\n function MethodNotAllowed() {\n (0, _classCallCheck2.default)(this, MethodNotAllowed);\n return _super7.apply(this, arguments);\n }\n return (0, _createClass2.default)(MethodNotAllowed);\n }(BadRequest);\n /**\n * NotAcceptable\n */\n var NotAcceptable = /*#__PURE__*/function (_BadRequest6) {\n (0, _inherits2.default)(NotAcceptable, _BadRequest6);\n var _super8 = _createSuper(NotAcceptable);\n function NotAcceptable() {\n (0, _classCallCheck2.default)(this, NotAcceptable);\n return _super8.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotAcceptable);\n }(BadRequest);\n /**\n * ProxyAuthenticationRequired\n */\n var ProxyAuthenticationRequired = /*#__PURE__*/function (_BadRequest7) {\n (0, _inherits2.default)(ProxyAuthenticationRequired, _BadRequest7);\n var _super9 = _createSuper(ProxyAuthenticationRequired);\n function ProxyAuthenticationRequired() {\n (0, _classCallCheck2.default)(this, ProxyAuthenticationRequired);\n return _super9.apply(this, arguments);\n }\n return (0, _createClass2.default)(ProxyAuthenticationRequired);\n }(BadRequest);\n /**\n * RequestTimeout\n */\n var RequestTimeout = /*#__PURE__*/function (_BadRequest8) {\n (0, _inherits2.default)(RequestTimeout, _BadRequest8);\n var _super10 = _createSuper(RequestTimeout);\n function RequestTimeout() {\n (0, _classCallCheck2.default)(this, RequestTimeout);\n return _super10.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestTimeout);\n }(BadRequest);\n /**\n * Conflict\n */\n var Conflict = /*#__PURE__*/function (_BadRequest9) {\n (0, _inherits2.default)(Conflict, _BadRequest9);\n var _super11 = _createSuper(Conflict);\n function Conflict() {\n (0, _classCallCheck2.default)(this, Conflict);\n return _super11.apply(this, arguments);\n }\n return (0, _createClass2.default)(Conflict);\n }(BadRequest);\n /**\n * Gone\n */\n var Gone = /*#__PURE__*/function (_BadRequest10) {\n (0, _inherits2.default)(Gone, _BadRequest10);\n var _super12 = _createSuper(Gone);\n function Gone() {\n (0, _classCallCheck2.default)(this, Gone);\n return _super12.apply(this, arguments);\n }\n return (0, _createClass2.default)(Gone);\n }(BadRequest);\n /**\n * LengthRequired\n */\n var LengthRequired = /*#__PURE__*/function (_BadRequest11) {\n (0, _inherits2.default)(LengthRequired, _BadRequest11);\n var _super13 = _createSuper(LengthRequired);\n function LengthRequired() {\n (0, _classCallCheck2.default)(this, LengthRequired);\n return _super13.apply(this, arguments);\n }\n return (0, _createClass2.default)(LengthRequired);\n }(BadRequest);\n /**\n * PreconditionFailed\n */\n var PreconditionFailed = /*#__PURE__*/function (_BadRequest12) {\n (0, _inherits2.default)(PreconditionFailed, _BadRequest12);\n var _super14 = _createSuper(PreconditionFailed);\n function PreconditionFailed() {\n (0, _classCallCheck2.default)(this, PreconditionFailed);\n return _super14.apply(this, arguments);\n }\n return (0, _createClass2.default)(PreconditionFailed);\n }(BadRequest);\n /**\n * RequestEntityTooLarge\n */\n var RequestEntityTooLarge = /*#__PURE__*/function (_BadRequest13) {\n (0, _inherits2.default)(RequestEntityTooLarge, _BadRequest13);\n var _super15 = _createSuper(RequestEntityTooLarge);\n function RequestEntityTooLarge() {\n (0, _classCallCheck2.default)(this, RequestEntityTooLarge);\n return _super15.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestEntityTooLarge);\n }(BadRequest);\n /**\n * RequestUriTooLong\n */\n var RequestUriTooLong = /*#__PURE__*/function (_BadRequest14) {\n (0, _inherits2.default)(RequestUriTooLong, _BadRequest14);\n var _super16 = _createSuper(RequestUriTooLong);\n function RequestUriTooLong() {\n (0, _classCallCheck2.default)(this, RequestUriTooLong);\n return _super16.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestUriTooLong);\n }(BadRequest);\n /**\n * UnsupportedMediaType\n */\n var UnsupportedMediaType = /*#__PURE__*/function (_BadRequest15) {\n (0, _inherits2.default)(UnsupportedMediaType, _BadRequest15);\n var _super17 = _createSuper(UnsupportedMediaType);\n function UnsupportedMediaType() {\n (0, _classCallCheck2.default)(this, UnsupportedMediaType);\n return _super17.apply(this, arguments);\n }\n return (0, _createClass2.default)(UnsupportedMediaType);\n }(BadRequest);\n /**\n * RequestRangeNotSatisfiable\n */\n var RequestRangeNotSatisfiable = /*#__PURE__*/function (_BadRequest16) {\n (0, _inherits2.default)(RequestRangeNotSatisfiable, _BadRequest16);\n var _super18 = _createSuper(RequestRangeNotSatisfiable);\n function RequestRangeNotSatisfiable() {\n (0, _classCallCheck2.default)(this, RequestRangeNotSatisfiable);\n return _super18.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestRangeNotSatisfiable);\n }(BadRequest);\n /**\n * ExpectationFailed\n */\n var ExpectationFailed = /*#__PURE__*/function (_BadRequest17) {\n (0, _inherits2.default)(ExpectationFailed, _BadRequest17);\n var _super19 = _createSuper(ExpectationFailed);\n function ExpectationFailed() {\n (0, _classCallCheck2.default)(this, ExpectationFailed);\n return _super19.apply(this, arguments);\n }\n return (0, _createClass2.default)(ExpectationFailed);\n }(BadRequest);\n /**\n * TooManyRequests\n */\n var TooManyRequests = /*#__PURE__*/function (_BadRequest18) {\n (0, _inherits2.default)(TooManyRequests, _BadRequest18);\n var _super20 = _createSuper(TooManyRequests);\n function TooManyRequests() {\n (0, _classCallCheck2.default)(this, TooManyRequests);\n return _super20.apply(this, arguments);\n }\n return (0, _createClass2.default)(TooManyRequests);\n }(BadRequest);\n /**\n * InternalServerError\n */\n var InternalServerError = /*#__PURE__*/function (_Base3) {\n (0, _inherits2.default)(InternalServerError, _Base3);\n var _super21 = _createSuper(InternalServerError);\n function InternalServerError() {\n (0, _classCallCheck2.default)(this, InternalServerError);\n return _super21.apply(this, arguments);\n }\n return (0, _createClass2.default)(InternalServerError);\n }(Base);\n /**\n * NotImplemented\n */\n var NotImplemented = /*#__PURE__*/function (_InternalServerError) {\n (0, _inherits2.default)(NotImplemented, _InternalServerError);\n var _super22 = _createSuper(NotImplemented);\n function NotImplemented() {\n (0, _classCallCheck2.default)(this, NotImplemented);\n return _super22.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotImplemented);\n }(InternalServerError);\n /**\n * BadGateway\n */\n var BadGateway = /*#__PURE__*/function (_InternalServerError2) {\n (0, _inherits2.default)(BadGateway, _InternalServerError2);\n var _super23 = _createSuper(BadGateway);\n function BadGateway() {\n (0, _classCallCheck2.default)(this, BadGateway);\n return _super23.apply(this, arguments);\n }\n return (0, _createClass2.default)(BadGateway);\n }(InternalServerError);\n /**\n * ServiceUnavailable\n */\n var ServiceUnavailable = /*#__PURE__*/function (_InternalServerError3) {\n (0, _inherits2.default)(ServiceUnavailable, _InternalServerError3);\n var _super24 = _createSuper(ServiceUnavailable);\n function ServiceUnavailable() {\n (0, _classCallCheck2.default)(this, ServiceUnavailable);\n return _super24.apply(this, arguments);\n }\n return (0, _createClass2.default)(ServiceUnavailable);\n }(InternalServerError);\n /**\n * GatewayTimeout\n */\n var GatewayTimeout = /*#__PURE__*/function (_InternalServerError4) {\n (0, _inherits2.default)(GatewayTimeout, _InternalServerError4);\n var _super25 = _createSuper(GatewayTimeout);\n function GatewayTimeout() {\n (0, _classCallCheck2.default)(this, GatewayTimeout);\n return _super25.apply(this, arguments);\n }\n return (0, _createClass2.default)(GatewayTimeout);\n }(InternalServerError);\n /**\n * HttpVersionNotSupported\n */\n var HttpVersionNotSupported = /*#__PURE__*/function (_InternalServerError5) {\n (0, _inherits2.default)(HttpVersionNotSupported, _InternalServerError5);\n var _super26 = _createSuper(HttpVersionNotSupported);\n function HttpVersionNotSupported() {\n (0, _classCallCheck2.default)(this, HttpVersionNotSupported);\n return _super26.apply(this, arguments);\n }\n return (0, _createClass2.default)(HttpVersionNotSupported);\n }(InternalServerError);\n (0, _assign.default)(Base, {\n 0: NetworkOrCORSError,\n NetworkOrCORSError: NetworkOrCORSError,\n 400: BadRequest,\n BadRequest: BadRequest,\n 401: Unauthorized,\n Unauthorized: Unauthorized,\n 402: PaymentRequired,\n PaymentRequired: PaymentRequired,\n 403: Forbidden,\n Forbidden: Forbidden,\n 404: NotFound,\n NotFound: NotFound,\n 405: MethodNotAllowed,\n MethodNotAllowed: MethodNotAllowed,\n 406: NotAcceptable,\n NotAcceptable: NotAcceptable,\n 407: ProxyAuthenticationRequired,\n ProxyAuthenticationRequired: ProxyAuthenticationRequired,\n 408: RequestTimeout,\n RequestTimeout: RequestTimeout,\n 409: Conflict,\n Conflict: Conflict,\n 410: Gone,\n Gone: Gone,\n 411: LengthRequired,\n LengthRequired: LengthRequired,\n 412: PreconditionFailed,\n PreconditionFailed: PreconditionFailed,\n 413: RequestEntityTooLarge,\n RequestEntityTooLarge: RequestEntityTooLarge,\n 414: RequestUriTooLong,\n RequestUriTooLong: RequestUriTooLong,\n 415: UnsupportedMediaType,\n UnsupportedMediaType: UnsupportedMediaType,\n 416: RequestRangeNotSatisfiable,\n RequestRangeNotSatisfiable: RequestRangeNotSatisfiable,\n 417: ExpectationFailed,\n ExpectationFailed: ExpectationFailed,\n 429: TooManyRequests,\n TooManyRequests: TooManyRequests,\n 500: InternalServerError,\n InternalServerError: InternalServerError,\n 501: NotImplemented,\n NotImplemented: NotImplemented,\n 502: BadGateway,\n BadGateway: BadGateway,\n 503: ServiceUnavailable,\n ServiceUnavailable: ServiceUnavailable,\n 504: GatewayTimeout,\n GatewayTimeout: GatewayTimeout,\n 505: HttpVersionNotSupported,\n HttpVersionNotSupported: HttpVersionNotSupported,\n select: function select(statusCode) {\n if (typeof statusCode === 'undefined' || statusCode === null) {\n return Base;\n }\n statusCode = statusCode.statusCode || statusCode;\n var E = Base[statusCode];\n if (E) {\n return E;\n }\n\n // Fallback to the default for the category (e.g. BadRequest for 429)\n statusCode = \"\".concat(statusCode.toString().split('').shift(), \"00\");\n statusCode = (0, _parseInt2.default)(statusCode, 10);\n return Base[statusCode] || Base;\n }\n });\n}\n//# sourceMappingURL=http-error-subtypes.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _values = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/values\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _httpErrorSubtypes = _interopRequireDefault(require(\"./http-error-subtypes\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Base HttpError class. Unlikely to be thrown directly, but handy for general\n * type comparison.\n */\nvar HttpError = exports.default = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(HttpError, _Exception);\n var _super = _createSuper(HttpError);\n function HttpError() {\n (0, _classCallCheck2.default)(this, HttpError);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(HttpError, [{\n key: \"parse\",\n value:\n /**\n * Parses HttpResponse objects for useful information (status, headers, etc)\n * as well as attempting to extract a useful error message.\n * @param {HttpResponse} res\n * @returns {string}\n */\n function parse(res) {\n // complexity is high here because of all the default values below.\n /* eslint complexity: [0] */\n var body = res.body;\n var message;\n switch ((0, _typeof2.default)(body)) {\n case 'string':\n try {\n body = JSON.parse(body);\n message = this.parseObject(body);\n } catch (err) {\n message = body;\n }\n break;\n case 'object':\n message = this.parseObject(body);\n break;\n default:\n }\n if (!message) {\n message = this.defaultMessage;\n }\n (0, _defineProperties.default)(this, {\n body: {\n enumerable: false,\n value: body\n },\n httpVersion: {\n enumerable: false,\n value: res.httpVersion\n },\n headers: {\n enumerable: false,\n value: res.headers || {}\n },\n rawHeaders: {\n enumerable: false,\n value: res.rawHeaders || []\n },\n trailers: {\n enumerable: false,\n value: res.trailers || {}\n },\n rawTrailers: {\n enumerable: false,\n value: res.rawTrailers || []\n },\n method: {\n enumerable: false,\n value: res.method\n },\n url: {\n enumerable: false,\n value: res.url\n },\n statusCode: {\n enumerable: false,\n value: res.statusCode\n },\n statusMessage: {\n enumerable: false,\n value: res.statusMessage\n },\n socket: {\n enumerable: false,\n value: res.socket\n },\n _res: {\n enumerable: false,\n value: res\n }\n });\n return message;\n }\n\n /**\n * Recursively parses an error body looking for a likely error candidate\n * @param {object} body\n * @returns {string}\n */\n }, {\n key: \"parseObject\",\n value: function parseObject(body) {\n // Search body for common names of error strings\n var messages = (0, _values.default)((0, _lodash.pick)(body, HttpError.errorKeys));\n\n // If no error candidate was found, stringify the entire body\n if (messages.length === 0) {\n return (0, _stringify.default)(body, null, 2);\n }\n\n // Assume the first key found was the error explanation\n var message = messages[0];\n\n // If the explanation is an object, recurse and try again\n if ((0, _typeof2.default)(message) === 'object') {\n return this.parseObject(message);\n }\n\n // Return the first key\n return message;\n }\n }]);\n return HttpError;\n}(_common.Exception);\n/**\n * @example Extend via\n * MyError extends HttpError {\n * static errorKeys = HttpError.errorKeys.concat([\n * `key1`,\n * `key2`\n * ])\n * }\n *\n * @type {Array}\n */\n(0, _defineProperty2.default)(HttpError, \"errorKeys\", ['error', 'errorString', 'response', 'errorResponse', 'message', 'msg']);\n/**\n * Default error string if no error can be extracted from the http response\n * @type {string}\n */\n(0, _defineProperty2.default)(HttpError, \"defaultMessage\", 'An error was received while trying to fulfill the request');\n(0, _httpErrorSubtypes.default)(HttpError);\nHttpError.makeSubTypes = _httpErrorSubtypes.default;\n//# sourceMappingURL=http-error.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"HttpError\", {\n enumerable: true,\n get: function get() {\n return _httpError.default;\n }\n});\n_Object$defineProperty(exports, \"HttpStatusInterceptor\", {\n enumerable: true,\n get: function get() {\n return _httpStatus.default;\n }\n});\n_Object$defineProperty(exports, \"Interceptor\", {\n enumerable: true,\n get: function get() {\n return _interceptor.default;\n }\n});\n_Object$defineProperty(exports, \"ProgressEvent\", {\n enumerable: true,\n get: function get() {\n return _progressEvent.default;\n }\n});\nexports.defaults = void 0;\n_Object$defineProperty(exports, \"detect\", {\n enumerable: true,\n get: function get() {\n return _detect.default;\n }\n});\nexports.setTimingsAndFetch = exports.request = exports.protoprepareFetchOptions = void 0;\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/get-own-property-descriptor\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _lodash = require(\"lodash\");\nvar _httpStatus = _interopRequireDefault(require(\"./interceptors/http-status\"));\nvar _request2 = _interopRequireDefault(require(\"./request\"));\nvar _utils = require(\"./request/utils\");\nvar _progressEvent = _interopRequireDefault(require(\"./progress-event\"));\nvar _interceptor = _interopRequireDefault(require(\"./lib/interceptor\"));\nvar _httpError = _interopRequireDefault(require(\"./http-error\"));\nvar _detect = _interopRequireDefault(require(\"./lib/detect\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Curry protorequest so we generate a function with default options built in.\nvar protorequest = (0, _lodash.curry)(function protorequest(defaultOptions, options) {\n // allow for options to be a string (and therefore expect options in the third\n // position) to match request's api.\n if ((0, _lodash.isString)(options)) {\n var uri = options;\n\n /* eslint prefer-rest-params: [0] */\n options = arguments[2] || {};\n options.uri = uri;\n }\n\n // Hide useless elements from logs\n ['download', 'interceptors', 'logger', 'upload'].forEach(function (prop) {\n var descriptor = (0, _getOwnPropertyDescriptor.default)(options, prop);\n descriptor = (0, _lodash.assign)({}, descriptor, {\n enumerable: false,\n writable: true\n });\n (0, _defineProperty.default)(options, prop, descriptor);\n });\n (0, _lodash.defaults)(options, defaultOptions);\n if (!options.json && options.json !== false) {\n (0, _deleteProperty.default)(options, 'json');\n }\n options.logger = options.logger || this.logger || console;\n return (0, _request2.default)(options);\n});\nvar protoprepareFetchOptions = exports.protoprepareFetchOptions = (0, _lodash.curry)(function protoprepareFetchOptions(defaultOptions, options) {\n // Hide useless elements from logs\n ['download', 'interceptors', 'logger', 'upload'].forEach(function (prop) {\n var descriptor = (0, _getOwnPropertyDescriptor.default)(options, prop);\n descriptor = (0, _lodash.assign)({}, descriptor, {\n enumerable: false,\n writable: true\n });\n (0, _defineProperty.default)(options, prop, descriptor);\n });\n (0, _lodash.defaults)(options, defaultOptions);\n options.logger = options.logger || this.logger || console;\n return (0, _utils.prepareFetchOptions)(options);\n});\n\n/**\n * Sets the $timings value(s) before the request/fetch.\n * This function is only useful if you are about to send a request\n * using prepared fetch options; normally it is done in webex.request();\n *\n * @param {any} options\n * @returns {any} the updated options object\n */\nvar setRequestTimings = function setRequestTimings(options) {\n var now = new Date().getTime();\n options.$timings = options.$timings || {};\n options.$timings.requestStart = now;\n options.$timings.networkStart = now;\n return options;\n};\n\n/**\n * Submits a metric from pre-built request options via the fetch API. Updates\n * the \"$timings\" values to Date.now() since the existing times were set when\n * the options were built (not submitted).\n *\n * @param {any} options - the pre-built request options for submitting a metric\n * @returns {Promise} promise that resolves to a response object\n */\nvar setTimingsAndFetch = exports.setTimingsAndFetch = function setTimingsAndFetch(options) {\n var opts = setRequestTimings(options);\n\n // call the fetch API\n return fetch(opts.uri, opts);\n};\nvar defaultOptions = {\n json: true,\n interceptors: [\n // Reminder: this is supposed to be an instantiated interceptor.\n _httpStatus.default.create()]\n};\nvar defaults = exports.defaults = protorequest;\nvar request = exports.request = protorequest(defaultOptions);\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpError = _interopRequireDefault(require(\"../http-error\"));\nvar _interceptor = _interopRequireDefault(require(\"../lib/interceptor\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar LOCUS_REDIRECT_ERROR = 2000002;\n\n/**\n * @class\n */\nvar HttpStatusInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(HttpStatusInterceptor, _Interceptor);\n var _super = _createSuper(HttpStatusInterceptor);\n /**\n * @param {Object} webex\n * @param {Object} options\n * @returns {HttpStatusInterceptor}\n */\n function HttpStatusInterceptor(webex, options) {\n var _this;\n (0, _classCallCheck2.default)(this, HttpStatusInterceptor);\n _this = _super.call(this, webex);\n var ErrorConstructor = options && (options.error || options.ErrorConstructor) || _httpError.default;\n (0, _defineProperties.default)((0, _assertThisInitialized2.default)(_this), {\n ErrorConstructor: {\n value: ErrorConstructor\n }\n });\n return _this;\n }\n\n /**\n * @param {Object} options\n * @returns {HttpStatusInterceptor}\n */\n (0, _createClass2.default)(HttpStatusInterceptor, [{\n key: \"onResponse\",\n value:\n /**\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise}\n */\n function onResponse(options, response) {\n if (response.statusCode) {\n if (response.statusCode < 400) {\n return _promise.default.resolve(response);\n }\n // to handle locus redirects\n if (response.statusCode === 404 && response.body && response.body.errorCode === LOCUS_REDIRECT_ERROR) {\n return _promise.default.resolve(response);\n }\n }\n\n // Note: the extra parenthesis below are required to make sure `new` is\n // applied to the correct method (i.e., the result of `select()`, not\n // `select()` itself).\n return _promise.default.reject(new (this.ErrorConstructor.select(response.statusCode))(response));\n }\n }], [{\n key: \"create\",\n value: function create(options) {\n return new HttpStatusInterceptor(this, options);\n }\n }]);\n return HttpStatusInterceptor;\n}(_interceptor.default);\n//# sourceMappingURL=http-status.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = detect;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _fileType = require(\"file-type\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Determine mimeType for the specified buffer;\n * @param {Buffer|Uint8Array|ArrayBuffer} buffer\n * @returns {Promise}\n */\nfunction detect(_x) {\n return _detect.apply(this, arguments);\n}\nfunction _detect() {\n _detect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(buffer) {\n var fileType;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(!(buffer instanceof Blob) && !(buffer instanceof ArrayBuffer) && !(buffer instanceof Uint8Array))) {\n _context.next = 2;\n break;\n }\n throw new Error('`detect` requires a buffer of type Blob, ArrayBuffer, or Uint8Array');\n case 2:\n if (!(buffer instanceof Blob)) {\n _context.next = 4;\n break;\n }\n return _context.abrupt(\"return\", buffer.type);\n case 4:\n _context.next = 6;\n return (0, _fileType.fromBuffer)(buffer);\n case 6:\n fileType = _context.sent;\n if (fileType) {\n _context.next = 9;\n break;\n }\n return _context.abrupt(\"return\", 'application/octet-stream');\n case 9:\n return _context.abrupt(\"return\", fileType.mime);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _detect.apply(this, arguments);\n}\n//# sourceMappingURL=detect.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar Interceptor = exports.default = /*#__PURE__*/function () {\n /**\n * @constructor\n * @param {Object} attrs\n * @returns {UrlInterceptor}\n */\n function Interceptor(attrs) {\n var _this = this;\n (0, _classCallCheck2.default)(this, Interceptor);\n if (attrs) {\n (0, _keys.default)(attrs).forEach(function (key) {\n var value = attrs[key];\n (0, _defineProperty.default)(_this, key, {\n enumerable: true,\n value: value\n });\n });\n }\n }\n\n /**\n * Logs the options of a request. This should be utilized\n * during the intercepting process, but can be used at any\n * time otherwise.\n * @param {object} options\n * @returns {void}\n */\n (0, _createClass2.default)(Interceptor, [{\n key: \"logOptions\",\n value: function logOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n if (!process.env.ENABLE_VERBOSE_NETWORK_LOGGING || !logger) {\n return;\n }\n\n // prepend a header for the interceptor\n logger.info('/***** Interceptor ****************************************************\\\\');\n logger.info(\"\".concat(this.constructor.name, \" - \").concat((0, _stringify.default)(options, null, 2)));\n }\n\n /**\n * @abstract\n * @returns {Interceptor}\n */\n }, {\n key: \"onRequest\",\n value:\n /**\n * Transform request options before sending them\n * @param {Object} options\n * @returns {Promise}\n */\n function onRequest(options) {\n return _promise.default.resolve(options);\n }\n\n /**\n * Handle request failures\n * @param {Object} options\n * @param {Error} reason\n * @returns {RejectedPromise}\n */\n }, {\n key: \"onRequestError\",\n value: function onRequestError(options, reason) {\n return _promise.default.reject(reason);\n }\n\n /**\n * Transform response before returning it\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n return _promise.default.resolve(response);\n }\n\n /**\n * Handle response errors\n * @param {Object} options\n * @param {WebexHttpError} reason\n * @returns {Promise}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value: function create() {\n throw new Error('`Interceptor.create()` must be defined');\n }\n }]);\n return Interceptor;\n}();\n//# sourceMappingURL=interceptor.js.map\n","/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Need to fork xhr to support environments with full object freezing; namely,\n// SalesForce's Aura and Locker environment.\n\n// See https://github.com/naugtur/xhr for license information\n\n// Maintain the original code style of https://github.com/naugtur/xhr since\n// we're trying to diverge as little as possible.\n/* eslint-disable */\n\n'use strict';\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar window = require('global/window');\nvar isFunction = require('is-function');\nvar parseHeaders = require('parse-headers');\nvar xtend = require('xtend');\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = 'withCredentials' in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray(['get', 'put', 'post', 'patch', 'head', 'delete'], function (method) {\n createXHR[method === 'delete' ? 'del' : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i += 1) {\n iterator(array[i]);\n }\n}\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n return true;\n}\nfunction initParams(uri, options, callback) {\n var params = uri;\n if (isFunction(options)) {\n callback = options;\n if (typeof uri === 'string') {\n params = {\n uri: uri\n };\n }\n } else {\n params = xtend(options, {\n uri: uri\n });\n }\n params.callback = callback;\n return params;\n}\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\nfunction _createXHR(options) {\n if (typeof options.callback === 'undefined') {\n throw new Error('callback argument missing');\n }\n var called = false;\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n return body;\n }\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n if (!(evt instanceof Error)) {\n if (evt instanceof ProgressEvent) {\n var _evt$target;\n evt = new Error(\"XMLHttpRequest Error: ProgressEvent: loaded=\".concat(evt.loaded, \", total=\").concat(evt.total, \", lengthComputable=\").concat(evt.lengthComputable, \", target.readyState=\").concat((_evt$target = evt.target) === null || _evt$target === void 0 ? void 0 : _evt$target.readyState));\n } else {\n evt = new Error('' + (evt || 'Unknown XMLHttpRequest Error'));\n }\n }\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n var response = failureResponse;\n var err = null;\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error('Internal XMLHttpRequest Error');\n }\n return callback(err, response, response.body);\n }\n var xhr = options.xhr || null;\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n var key;\n var aborted;\n var uri = options.uri || options.url;\n var method = options.method || 'GET';\n var body = options.body || options.data;\n var headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n if ('json' in options && options.json !== false) {\n isJson = true;\n headers['accept'] || headers['Accept'] || (headers['Accept'] = 'application/json'); //Don't override existing accept header declared by user\n if (method !== 'GET' && method !== 'HEAD') {\n headers['content-type'] || headers['Content-Type'] || (headers['Content-Type'] = 'application/json'); //Don't override existing accept header declared by user\n body = (0, _stringify.default)(options.json === true ? body : options.json);\n }\n }\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc;\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n };\n xhr.onabort = function () {\n aborted = true;\n };\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password);\n //has to be after open\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n xhr.abort('timeout');\n var e = new Error('XMLHttpRequest timeout');\n e.code = 'ETIMEDOUT';\n errorFunc(e);\n }, options.timeout);\n }\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error('Headers cannot be set on an XDomainRequest object');\n }\n if ('responseType' in options) {\n xhr.responseType = options.responseType;\n }\n if ('beforeSend' in options && typeof options.beforeSend === 'function') {\n options.beforeSend(xhr);\n }\n\n // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n xhr.send(body || null);\n return xhr;\n}\nfunction getXml(xhr) {\n if (xhr.responseType === 'document') {\n return xhr.responseXML;\n }\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === 'parsererror';\n if (xhr.responseType === '' && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n return null;\n}\nfunction noop() {}\nvar _default = exports.default = createXHR;\n//# sourceMappingURL=xhr.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ProgressEvent;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _isNan = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/number/is-nan\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Object of the same shape as web browser ProgressEvents\n * @class ProgressEvent\n * @param {integer} loaded\n * @param {integer} total\n * @returns {ProgressEvent}\n */\nfunction ProgressEvent(loaded, total) {\n (0, _defineProperties.default)(this, {\n loaded: {\n enumerable: true,\n value: loaded,\n writable: false\n },\n total: {\n enumerable: true,\n value: total,\n writable: false\n },\n lengthComputable: {\n enumerable: true,\n value: (0, _lodash.isNumber)(loaded) && !(0, _isNan.default)(loaded) && (0, _lodash.isNumber)(total) && !(0, _isNan.default)(total) && total > 0,\n writable: false\n }\n });\n}\n//# sourceMappingURL=progress-event.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = request;\nvar _events = require(\"events\");\nvar _request2 = _interopRequireDefault(require(\"./request\"));\nvar _utils = require(\"./utils\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @param {Object} options\n * @returns {Promise}\n */\nfunction request(options) {\n if (options.url) {\n options.uri = options.url;\n options.url = null;\n }\n options.headers = options.headers || {};\n options.download = new _events.EventEmitter();\n options.upload = new _events.EventEmitter();\n return (0, _utils.intercept)(options, options.interceptors, 'Request').then(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // if provided own request function, use that instead\n // there are use cases where developer may want to provide whatever request promise they wish\n // for example, may even use window.postMessages for parent iframe uses cases\n if (options.request) {\n return options.request.apply(options, [options].concat(args));\n }\n return _request2.default.apply(void 0, [options].concat(args));\n }).then(function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _utils.intercept.apply(void 0, [options, options.interceptors.slice().reverse(), 'Response'].concat(args));\n });\n}\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Array$from = require(\"@babel/runtime-corejs2/core-js/array/from\");\nvar _Symbol = require(\"@babel/runtime-corejs2/core-js/symbol\");\nvar _Symbol$iterator = require(\"@babel/runtime-corejs2/core-js/symbol/iterator\");\nvar _Array$isArray = require(\"@babel/runtime-corejs2/core-js/array/is-array\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _request;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _lodash = require(\"lodash\");\nvar _qs = _interopRequireDefault(require(\"qs\"));\nvar _xhr = _interopRequireDefault(require(\"../lib/xhr\"));\nvar _detect = _interopRequireDefault(require(\"../lib/detect\"));\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== \"undefined\" && o[_Symbol$iterator] || o[\"@@iterator\"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _Array$from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable no-underscore-dangle */ /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */ /* eslint-env browser */ // Note: several code paths are ignored in this file. As far as I can tell, any\n// error conditions that would provoke those paths are otherwise prevented and\n// reported.\n/**\n * @name request\n * @param {Object} options\n * @returns {Promise}\n */\nfunction _request(options) {\n return new _promise.default(function (resolve) {\n var params = (0, _lodash.pick)(options, 'method', 'uri', 'withCredentials', 'headers', 'timeout', 'responseType');\n\n // Set `response` to `true` to approximate an `HttpResponse` object\n params.response = true;\n setXhr(params);\n bindProgressEvents(params, options);\n setAuth(params, options);\n setCookies(params, options);\n setDefaults(params, options);\n setResponseType(params, options);\n setContentType(params, options);\n setPayload(params, options);\n setQs(params, options);\n options.logger.debug(\"start http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri));\n var x = (0, _xhr.default)(params, function (error, response) {\n /* istanbul ignore next */\n if (error) {\n options.logger.warn(\"XHR error for \".concat(options.method || 'request', \" to \").concat(options.uri, \" :\"), error);\n }\n\n /* istanbul ignore else */\n if (response) {\n if (response.statusCode >= 400) {\n options.logger.warn(\"http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri, \" result: \").concat(response.statusCode));\n } else {\n options.logger.debug(\"http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri, \" result: \").concat(response.statusCode));\n }\n response.options = options;\n processResponseJson(response, params);\n resolve(response);\n } else {\n resolve({\n statusCode: 0,\n options: options,\n headers: options.headers,\n method: options.method,\n url: options.uri,\n body: error\n });\n }\n });\n x.onprogress = options.download.emit.bind(options.download, 'progress');\n }).catch(function (error) {\n options.logger.warn(error);\n\n /* eslint arrow-body-style: [0] */\n /* istanbul ignore next */\n return {\n statusCode: 0,\n options: options,\n headers: options.headers,\n method: options.method,\n url: options.uri,\n body: error\n };\n });\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function bindProgressEvents(params, o) {\n if (params.method && ['PATCH', 'POST', 'PUT'].includes(params.method.toUpperCase())) {\n if (!params.xhr) {\n params.xhr = new XMLHttpRequest();\n }\n params.xhr.upload.onprogress = o.upload.emit.bind(o.upload, 'progress');\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setXhr(params) {\n params.xhr = new XMLHttpRequest();\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setAuth(params, o) {\n if (o.auth) {\n if (o.auth.bearer) {\n params.headers.authorization = \"Bearer \".concat(o.auth.bearer);\n } else {\n var user = o.auth.user || o.auth.username;\n var pass = o.auth.pass || o.auth.password;\n var token = btoa(\"\".concat(user, \":\").concat(pass));\n params.headers.Authorization = \"Basic \".concat(token);\n }\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setCookies(params, o) {\n if (o.jar) {\n params.withCredentials = true;\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setDefaults(params, o) {\n var defs = {\n cors: true,\n // raynos/xhr defaults withCredentials to true if cors is true, so we need\n // to make it explicitly false by default\n withCredentials: false,\n timeout: 0\n };\n (0, _lodash.defaults)(params, (0, _lodash.pick)(o, (0, _keys.default)(defs)), defs);\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setResponseType(params, o) {\n if (o.responseType === 'buffer') {\n params.responseType = 'arraybuffer';\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setContentType(_x, _x2) {\n return _setContentType.apply(this, arguments);\n }\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function _setContentType() {\n _setContentType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params, o) {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(o.body instanceof Blob || o.body instanceof ArrayBuffer)) {\n _context.next = 8;\n break;\n }\n o.json = params.json = false;\n _context.t0 = params.headers['content-type'];\n if (_context.t0) {\n _context.next = 7;\n break;\n }\n _context.next = 6;\n return (0, _detect.default)(o.body);\n case 6:\n _context.t0 = _context.sent;\n case 7:\n params.headers['content-type'] = _context.t0;\n case 8:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _setContentType.apply(this, arguments);\n }\n function setQs(params, o) {\n if (o.qs) {\n params.uri += \"?\".concat(_qs.default.stringify(o.qs));\n }\n }\n\n /**\n * Converts arraybuffers to blobs before uploading them\n * @param {mixed} file\n * @private\n * @returns {mixed}\n */\n function ensureBlob(file) {\n if (file instanceof ArrayBuffer) {\n var ret = file.type ? new Blob([file], {\n type: file.type\n }) : new Blob([file]);\n ret.filename = file.filename || file.name || 'untitled';\n return ret;\n }\n return file;\n }\n\n /**\n * Appends an item to a form\n * @param {FormData} form\n * @param {string} key\n * @param {mixed} value\n * @returns {undefined}\n */\n function append(form, key, value) {\n if ((0, _lodash.isArray)(value)) {\n var _iterator = _createForOfIteratorHelper(value),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var v = _step.value;\n append(form, key, v);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return;\n }\n value = ensureBlob(value);\n if (value.name) {\n value.filename = value.name;\n form.append(key, value, value.name);\n } else {\n form.append(key, value);\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setPayload(params, o) {\n if ((!('json' in o) || o.json === true) && o.body) {\n params.json = o.body;\n } else if (o.form) {\n params.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n params.body = _qs.default.stringify(o.form);\n (0, _deleteProperty.default)(params, 'json');\n } else if (o.formData) {\n params.body = (0, _keys.default)(o.formData).reduce(function (fd, key) {\n var value = o.formData[key];\n append(fd, key, value);\n return fd;\n }, new FormData());\n } else {\n params.body = o.body;\n (0, _deleteProperty.default)(params, 'json');\n }\n }\n\n /**\n * @param {Object} response\n * @param {Object} params\n * @private\n * @returns {undefined}\n */\n function processResponseJson(response, params) {\n // If params.json is not defined, xhr won't deserialize the response\n // so we should give it a shot just in case.\n if (!params.json && (0, _typeof2.default)(response.body) !== 'object') {\n try {\n response.body = JSON.parse(response.body);\n } catch (e) {\n /* eslint no-empty: [0] */\n }\n }\n }\n}\n//# sourceMappingURL=request.shim.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.intercept = intercept;\nexports.prepareFetchOptions = prepareFetchOptions;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _events = require(\"events\");\n/* eslint-disable import/prefer-default-export */\n\n/**\n * @param {Object} options\n * @param {Array} interceptors\n * @param {string} key\n * @param {Object | undefined} res\n * @private\n * @returns {Promise}\n */\nfunction intercept(options, interceptors, key) {\n var res = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;\n var successKey = \"on\".concat(key);\n var errorKey = \"on\".concat(key, \"Error\");\n return interceptors.reduce(function (promise, interceptor) {\n return promise.then(function (result) {\n interceptor.logOptions(options);\n if (interceptor[successKey]) {\n return interceptor[successKey](options, result);\n }\n return _promise.default.resolve(result);\n }, function (reason) {\n interceptor.logOptions(options);\n if (interceptor[errorKey]) {\n return interceptor[errorKey](options, reason);\n }\n return _promise.default.reject(reason);\n });\n }, _promise.default.resolve(res));\n}\n\n/**\n * Prepare options for a fetch.\n * @param {object} options\n * @returns {Promise}\n */\nfunction prepareFetchOptions(_x) {\n return _prepareFetchOptions.apply(this, arguments);\n}\nfunction _prepareFetchOptions() {\n _prepareFetchOptions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (options.url) {\n options.uri = options.url;\n options.url = null;\n }\n options.headers = options.headers || {};\n if (options.json) {\n // don't override existing accept header declared by user\n options.headers.accept = options.headers.accept || options.headers.Accept || 'application/json';\n\n // don't override existing content-type header declared by user\n if (options.method !== 'GET' && options.method !== 'HEAD') {\n options.headers['content-type'] = options.headers['content-type'] || options.headers['Content-Type'] || 'application/json';\n options.body = (0, _stringify.default)(options.json === true ? options.body : options.json);\n }\n } else if (options.json !== undefined) {\n (0, _deleteProperty.default)(options, 'json');\n }\n options.download = new _events.EventEmitter();\n options.upload = new _events.EventEmitter();\n options.keepalive = true;\n return _context.abrupt(\"return\", intercept(options, options.interceptors, 'Request').then(function () {\n return options;\n }));\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _prepareFetchOptions.apply(this, arguments);\n}\n//# sourceMappingURL=utils.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _values = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/values\"));\nvar _decryptTextProp = function _decryptTextProp(ctx, name, key, object) {\n if (!object[name]) {\n return _promise.default.resolve();\n }\n return ctx.webex.internal.encryption.decryptText(key.uri || key, object[name]).then(function (plaintext) {\n object[name] = plaintext;\n });\n};\nvar DecryptHelper = {\n /**\n * Decrypt scheduler data response\n * @param {object} [ctx] context\n * @param {object} [data] scheduler data response\n * @returns {Promise} Resolves with decrypted response\n * */\n decryptSchedulerDataResponse: function decryptSchedulerDataResponse(ctx, data) {\n if (!data) {\n return _promise.default.resolve();\n }\n if (!data.encryptionKeyUrl) {\n return _promise.default.resolve();\n }\n\n // Decrypt participant properties if meeting object contains participants\n var decryptedParticipants = data.encryptedParticipants ? data.encryptedParticipants.map(function (participant) {\n return _promise.default.all([_decryptTextProp(ctx, 'encryptedEmailAddress', data.encryptionKeyUrl, participant), _decryptTextProp(ctx, 'encryptedName', data.encryptionKeyUrl, participant)]);\n }) : [];\n\n // Decrypt encryptedScheduleFor properties if meeting object contains SOB\n var decryptedScheduleFor = _promise.default.all((0, _values.default)(data.encryptedScheduleFor || {}).flatMap(function (item) {\n return [_decryptTextProp(ctx, 'encryptedEmail', data.encryptionKeyUrl, item), _decryptTextProp(ctx, 'encryptedDisplayName', data.encryptionKeyUrl, item)];\n }));\n\n // Decrypt meetingJoinInfo properties if meeting object contains meetingJoinInfo\n var decryptedMeetingJoinInfo = data.meetingJoinInfo ? _promise.default.all([_decryptTextProp(ctx, 'meetingJoinURI', data.encryptionKeyUrl, data.meetingJoinInfo), _decryptTextProp(ctx, 'meetingJoinURL', data.encryptionKeyUrl, data.meetingJoinInfo)]) : [];\n var decryptedOrganizer = data.encryptedOrganizer ? _promise.default.all([_decryptTextProp(ctx, 'encryptedEmailAddress', data.encryptionKeyUrl, data.encryptedOrganizer), _decryptTextProp(ctx, 'encryptedName', data.encryptionKeyUrl, data.encryptedOrganizer)]) : [];\n return _promise.default.all([_decryptTextProp(ctx, 'encryptedSubject', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'encryptedLocation', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'encryptedNotes', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'webexURI', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'webexURL', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'spaceMeetURL', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'spaceURI', data.encryptionKeyUrl, data), _decryptTextProp(ctx, 'spaceURL', data.encryptionKeyUrl, data)].concat(decryptedOrganizer, decryptedParticipants, decryptedScheduleFor, decryptedMeetingJoinInfo));\n },\n /**\n * Decrypt free-busy response\n * @param {object} [ctx] context\n * @param {object} [data] free-busy response\n * @returns {Promise} Resolves with decrypted response\n * */\n decryptFreeBusyResponse: function decryptFreeBusyResponse(ctx, data) {\n if (!data) {\n return _promise.default.resolve();\n }\n if (!data.calendarFreeBusyScheduleResponse) {\n return _promise.default.resolve();\n }\n if (!data.calendarFreeBusyScheduleResponse.encryptionKeyUrl) {\n return _promise.default.resolve();\n }\n var calendarFreeBusyItems = data.calendarFreeBusyScheduleResponse.calendarFreeBusyItems ? data.calendarFreeBusyScheduleResponse.calendarFreeBusyItems.map(function (calendarFreeBusyItem) {\n return _promise.default.all([_decryptTextProp(ctx, 'email', data.calendarFreeBusyScheduleResponse.encryptionKeyUrl, calendarFreeBusyItem)]);\n }) : [];\n return _promise.default.all([].concat(calendarFreeBusyItems));\n }\n};\nvar _default = exports.default = DecryptHelper;\n//# sourceMappingURL=calendar.decrypt.helper.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _lodash = require(\"lodash\");\nvar _encryptTextProp = function _encryptTextProp(ctx, name, key, object) {\n if (!object[name]) {\n return _promise.default.resolve();\n }\n return ctx.webex.internal.encryption.encryptText(key.uri || key, object[name]).then(function (ciphertext) {\n object[name] = ciphertext;\n });\n};\nvar _encryptCalendarEventPayload = function _encryptCalendarEventPayload(data, ctx) {\n (0, _assign.default)(data, {\n encryptionKeyUrl: ctx.encryptionKeyUrl\n });\n var encryptedAttendees = data.attendees ? data.attendees.map(function (attendee) {\n return _promise.default.all([_encryptTextProp(ctx, 'displayName', data.encryptionKeyUrl, attendee), _encryptTextProp(ctx, 'email', data.encryptionKeyUrl, attendee)]);\n }) : [];\n return _promise.default.all([_encryptTextProp(ctx, 'subject', data.encryptionKeyUrl, data), _encryptTextProp(ctx, 'notes', data.encryptionKeyUrl, data), _encryptTextProp(ctx, 'webexOptions', data.encryptionKeyUrl, data)].concat([encryptedAttendees]));\n};\nvar _encryptFreeBusyPayload = function _encryptFreeBusyPayload(data, ctx) {\n (0, _assign.default)(data, {\n encryptionKeyUrl: ctx.encryptionKeyUrl\n });\n var promises = [];\n if (data.emails && (0, _isArray.default)(data.emails)) {\n data.emails.map(function (item, index) {\n return promises.push(ctx.webex.internal.encryption.encryptText(data.encryptionKeyUrl, item).then(function (encryptText) {\n data.emails[index] = encryptText;\n }));\n });\n }\n return _promise.default.all(promises);\n};\nvar EncryptHelper = {\n /**\n * Encrypt create / update calendar event request payload\n * @param {object} [ctx] context\n * @param {object} [data] meeting payload data\n * @returns {Promise} Resolves with encrypted request payload\n * */\n encryptCalendarEventRequest: function encryptCalendarEventRequest(ctx, data) {\n if (ctx.encryptionKeyUrl) {\n return _encryptCalendarEventPayload(data, ctx);\n }\n return ctx.webex.internal.encryption.kms.createUnboundKeys({\n count: 1\n }).then(function (keys) {\n var key = (0, _lodash.isArray)(keys) ? keys[0] : keys;\n ctx.encryptionKeyUrl = key.uri;\n return _encryptCalendarEventPayload(data, ctx);\n });\n },\n /**\n * Encrypt free-busy request payload, if request payload only includes the sensitive data, like email, need to encrypt these reqeust parameters, and playload includes encrypt url.\n * Otherwise, don't encrypt playload and without encrypt url,Due to calendar serivce will vaild both encrypt url and sensitive that are both present. if not, will return 400 bad reqeust to caller.\n * @param {object} [ctx] context\n * @param {object} [data] free busy payload data\n * @returns {Promise} Resolves with encrypted request payload\n * */\n encryptFreeBusyRequest: function encryptFreeBusyRequest(ctx, data) {\n if (!data.emails || !(0, _isArray.default)(data.emails)) {\n return _promise.default.resolve();\n }\n if (ctx.encryptionKeyUrl) {\n return _encryptFreeBusyPayload(data, ctx);\n }\n return ctx.webex.internal.encryption.kms.createUnboundKeys({\n count: 1\n }).then(function (keys) {\n var key = (0, _lodash.isArray)(keys) ? keys[0] : keys;\n ctx.encryptionKeyUrl = key.uri;\n return _encryptFreeBusyPayload(data, ctx);\n });\n }\n};\nvar _default = exports.default = EncryptHelper;\n//# sourceMappingURL=calendar.encrypt.helper.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _collection = _interopRequireDefault(require(\"./collection\"));\nvar _constants = require(\"./constants\");\nvar _calendarEncrypt = _interopRequireDefault(require(\"./calendar.encrypt.helper\"));\nvar _calendarDecrypt = _interopRequireDefault(require(\"./calendar.decrypt.helper\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Calendar Item Create Event\n * Emitted when a calendar item has been added\n * @event calendar:meeting:create\n * @instance\n * @memberof Calendar\n */\n\n/**\n * Calendar Item Update Event\n * Emitted when a calendar item has been updated\n * @event calendar:meeting:update\n * @instance\n * @memberof Calendar\n */\n\n/**\n * Calendar Item Update Event\n * Emitted when a calendar item has been deleted\n * @event calendar:meeting:delete\n * @instance\n * @memberof Calendar\n */\n\n/**\n * Calendar Registered Event\n * Emitted when the calendar instance has been registered and listening\n * @event calendar:registered\n * @instance\n * @memberof Calendar\n */\n\n/**\n * Calendar Registered Event\n * Emitted when the calendar instance has been registered and listening\n * @event calendar:unregistered\n * @instance\n * @memberof Calendar\n */\n\nvar Calendar = _webexCore.WebexPlugin.extend({\n namespace: 'Calendar',\n /**\n * registered value indicating events registration is successful\n * @instance\n * @type {Boolean}\n * @memberof Calendar\n */\n registered: false,\n /**\n * Cache all rpc event request locally\n * */\n rpcEventRequests: [],\n /**\n * Cache KMS encryptionKeyUrl\n * */\n encryptionKeyUrl: null,\n /**\n * Pre-fetch a KMS encryption key url to improve performance.\n * Waits for the user to be authorized and skips if an unverified guest.\n * @private\n * @returns {void}\n */\n prefetchEncryptionKey: function prefetchEncryptionKey() {\n var _this = this;\n if (!this.webex.canAuthorize) {\n this.listenToOnce(this.webex, 'change:canAuthorize', function () {\n _this.prefetchEncryptionKey();\n });\n return;\n }\n if (this.webex.credentials.isUnverifiedGuest) {\n return;\n }\n this.webex.internal.encryption.kms.createUnboundKeys({\n count: 1\n }).then(function (keys) {\n var key = (0, _lodash.isArray)(keys) ? keys[0] : keys;\n _this.encryptionKeyUrl = key ? key.uri : null;\n _this.logger.info('calendar->bind a KMS encryption key url');\n _this.webex.internal.encryption.getKey(_this.encryptionKeyUrl, {\n onBehalfOf: null\n }).then(function (retrievedKey) {\n _this.encryptionKeyUrl = retrievedKey ? retrievedKey.uri : null;\n _this.logger.info('calendar->retrieve the KMS encryption key url and cache it');\n });\n });\n },\n /**\n * WebexPlugin initialize method. This triggers once Webex has completed its\n * initialization workflow.\n *\n * If the plugin is meant to perform startup actions, place them in this\n * `initialize()` method instead of the `constructor()` method.\n * @private\n * @returns {void}\n */\n initialize: function initialize() {\n var _this2 = this;\n // Used to perform actions after webex is fully qualified and ready for\n // operation.\n this.listenToOnce(this.webex, 'ready', function () {\n _this2.prefetchEncryptionKey();\n });\n },\n /**\n * Explicitly sets up the calendar plugin by registering\n * the device, connecting to mercury, and listening for calendar events.\n * @returns {Promise}\n * @public\n * @memberof Calendar\n */\n register: function register() {\n var _this3 = this;\n if (!this.webex.canAuthorize) {\n this.logger.error('calendar->register#ERROR, Unable to register, SDK cannot authorize');\n return _promise.default.reject(new Error('SDK cannot authorize'));\n }\n if (this.registered) {\n this.logger.info('calendar->register#INFO, Calendar plugin already registered');\n return _promise.default.resolve();\n }\n return this.webex.internal.device.register().then(function () {\n return _this3.webex.internal.mercury.connect();\n }).then(function () {\n _this3.listenForEvents();\n _this3.trigger(_constants.CALENDAR_REGISTERED);\n _this3.registered = true;\n }).catch(function (error) {\n _this3.logger.error(\"calendar->register#ERROR, Unable to register, \".concat(error.message));\n return _promise.default.reject(error);\n });\n },\n /**\n * Explicitly tears down the calendar plugin by deregistering\n * the device, disconnecting from mercury, and stops listening to calendar events\n *\n * @returns {Promise}\n * @public\n * @memberof Calendar\n */\n unregister: function unregister() {\n var _this4 = this;\n if (!this.registered) {\n this.logger.info('calendar->unregister#INFO, Calendar plugin already unregistered');\n return _promise.default.resolve();\n }\n this.stopListeningForEvents();\n return this.webex.internal.mercury.disconnect().then(function () {\n return _this4.webex.internal.device.unregister();\n }).then(function () {\n _this4.trigger(_constants.CALENDAR_UNREGISTERED);\n _this4.registered = false;\n });\n },\n /**\n * registers for calendar events through mercury\n * @returns {undefined}\n * @private\n */\n listenForEvents: function listenForEvents() {\n var _this5 = this;\n // Calendar mercury events listener\n this.webex.internal.mercury.on('event:calendar.meeting.create', function (envelope) {\n _this5._handleCreate(envelope.data);\n });\n this.webex.internal.mercury.on('event:calendar.meeting.update', function (envelope) {\n _this5._handleUpdate(envelope.data);\n });\n this.webex.internal.mercury.on('event:calendar.meeting.create.minimal', function (envelope) {\n _this5._handleCreate(envelope.data);\n });\n this.webex.internal.mercury.on('event:calendar.meeting.update.minimal', function (envelope) {\n _this5._handleUpdate(envelope.data);\n });\n this.webex.internal.mercury.on('event:calendar.meeting.delete', function (envelope) {\n _this5._handleDelete(envelope.data);\n });\n this.webex.internal.mercury.on('event:calendar.free_busy', function (envelope) {\n _this5._handleFreeBusy(envelope.data);\n });\n },\n /**\n * unregisteres all the calendar events from mercury\n * @returns {undefined}\n * @private\n */\n stopListeningForEvents: function stopListeningForEvents() {\n this.webex.internal.mercury.off('event:calendar.meeting.create');\n this.webex.internal.mercury.off('event:calendar.meeting.create.minimal');\n this.webex.internal.mercury.off('event:calendar.meeting.update');\n this.webex.internal.mercury.off('event:calendar.meeting.update.minimal');\n this.webex.internal.mercury.off('event:calendar.meeting.delete');\n this.webex.internal.mercury.off('event:calendar.free_busy');\n },\n /**\n * handles update events, triggers after collection updates\n * @param {Object} data\n * @returns {undefined}\n * @private\n */\n _handleUpdate: function _handleUpdate(data) {\n var id = _collection.default.set(data.calendarMeetingExternal);\n this.trigger(_constants.CALENDAR_UPDATED, _collection.default.get(id));\n },\n /**\n * handles create events, triggers after collection updates\n * @param {Object} data\n * @returns {undefined}\n * @private\n */\n _handleCreate: function _handleCreate(data) {\n var id = _collection.default.set(data.calendarMeetingExternal);\n this.trigger(_constants.CALENDAR_CREATE, _collection.default.get(id));\n },\n /**\n * handles delete events, triggers after collection updates\n * @param {Object} data\n * @returns {undefined}\n * @private\n */\n _handleDelete: function _handleDelete(data) {\n var item = _collection.default.remove(data.calendarMeetingExternal.id);\n this.trigger(_constants.CALENDAR_DELETE, item);\n },\n /**\n * handles free_busy events\n * @param {Object} data\n * @returns {undefined}\n * @private\n */\n _handleFreeBusy: function _handleFreeBusy(data) {\n var _this6 = this;\n _calendarDecrypt.default.decryptFreeBusyResponse(this, data).then(function () {\n var response = {};\n if (data && data.calendarFreeBusyScheduleResponse) {\n response = data.calendarFreeBusyScheduleResponse;\n }\n if (response && response.requestId && response.requestId in _this6.rpcEventRequests) {\n _this6.logger.log(\"webex.internal.calendar - receive requests, requestId: \".concat(response.requestId));\n delete response.encryptionKeyUrl;\n var resolve = _this6.rpcEventRequests[response.requestId].resolve;\n resolve(response);\n delete _this6.rpcEventRequests[response.requestId];\n } else {\n _this6.logger.log('webex.internal.calendar - receive other requests.');\n }\n });\n },\n /**\n * Retrieves a collection of calendars based on the request parameters\n * Defaults to 1 day before and 7 days ahead\n * @param {Object} options\n * @param {Date} options.fromDate the start of the time range\n * @param {Date} options.toDate the end of the time range\n * @returns {Promise} Resolves with an array of calendars\n */\n syncCalendar: function syncCalendar() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n fromDate: this.config.fromDate,\n toDate: this.config.toDate\n };\n return this.list({\n fromDate: options.fromDate,\n toDate: options.toDate\n }).then(function (res) {\n _collection.default.setAll(res);\n return _collection.default.getAll();\n });\n },\n /**\n * get the calendar item that has a matching value\n * @param {String} key meeting property\n * @param {Any} value the meeting property to match\n * @returns {Object}\n */\n getByType: function getByType(key, value) {\n if (['spaceURI', 'spaceMeetURL', 'conversationId'].includes(key)) {\n return _collection.default.getBy(key, value);\n }\n throw new Error('key must be one of, spaceURI, spaceMeetURL, or conversationId');\n },\n /**\n * gets all the calendar items that have been populated\n * @returns {Object}\n */\n getAll: function getAll() {\n return _collection.default.getAll();\n },\n /**\n * Decrypts an encrypted incoming calendar event\n * @param {Object} event\n * @returns {Promise} Resolves with a decrypted calendar event\n */\n processMeetingEvent: function processMeetingEvent(event) {\n return this.webex.transform('inbound', event).then(function () {\n return event;\n });\n },\n /**\n * Retrieves an array of meeting participants for the meeting participantsUrl\n * @param {String} participantsUrl\n * @returns {Promise} Resolves with an object of meeting participants\n */\n getParticipants: function getParticipants(participantsUrl) {\n return this.request({\n method: 'GET',\n uri: participantsUrl\n });\n },\n /**\n * get meeting notes using notesUrl from meeting object.\n * @param {String} notesUrl\n * @returns {Promise} Resolves with an object of meeting notes\n */\n getNotesByUrl: function getNotesByUrl(notesUrl) {\n return this.request({\n method: 'GET',\n uri: notesUrl\n });\n },\n /**\n * Retrieves a collection of meetings based on the request parameters\n * @param {String} id\n * @returns {Promise} Resolves with an object of meeting notes\n */\n getNotes: function getNotes(id) {\n return this.request({\n method: 'GET',\n service: 'calendar',\n resource: \"calendarEvents/\".concat(_common.base64.encode(id), \"/notes\")\n });\n },\n /**\n * Retrieves a collection of meetings based on the request parameters\n * @param {Object} options\n * @param {Date} options.fromDate the start of the time range\n * @param {Date} options.toDate the end of the time range\n * @returns {Promise} Resolves with an array of meetings\n */\n list: function list(options) {\n var _this7 = this;\n options = options || {};\n return this.webex.request({\n method: 'GET',\n service: 'calendar',\n resource: 'calendarEvents',\n qs: options\n }).then(function (res) {\n var meetingObjects = res.body.items;\n var promises = [];\n meetingObjects.forEach(function (meeting) {\n if (!meeting.encryptedParticipants) {\n promises.push(_this7.getParticipants(meeting.participantsUrl).then(function (notesResponse) {\n meeting.encryptedParticipants = notesResponse.body.encryptedParticipants;\n }));\n }\n });\n return _promise.default.all(promises).then(function () {\n return meetingObjects;\n });\n });\n },\n /**\n * Create calendar event\n * @param {object} [data] meeting payload data\n * @param {object} [query] the query parameters for specific usage\n * @returns {Promise} Resolves with creating calendar event response\n * */\n createCalendarEvent: function createCalendarEvent(data, query) {\n var _this8 = this;\n return _calendarEncrypt.default.encryptCalendarEventRequest(this, data).then(function () {\n return _this8.request({\n method: 'POST',\n service: 'calendar',\n body: data,\n resource: 'calendarEvents/sync',\n qs: query || {}\n });\n });\n },\n /**\n * Update calendar event\n * @param {string} [id] calendar event id\n * @param {object} [data] meeting payload data\n * @param {object} [query] the query parameters for specific usage\n * @returns {Promise} Resolves with updating calendar event response\n * */\n updateCalendarEvent: function updateCalendarEvent(id, data, query) {\n var _this9 = this;\n return _calendarEncrypt.default.encryptCalendarEventRequest(this, data).then(function () {\n return _this9.request({\n method: 'PATCH',\n service: 'calendar',\n body: data,\n resource: \"calendarEvents/\".concat(_common.base64.encode(id), \"/sync\"),\n qs: query || {}\n });\n });\n },\n /**\n * Delete calendar event\n * @param {string} [id] calendar event id\n * @param {object} [query] the query parameters for specific usage\n * @returns {Promise} Resolves with deleting calendar event response\n * */\n deleteCalendarEvent: function deleteCalendarEvent(id, query) {\n return this.request({\n method: 'DELETE',\n service: 'calendar',\n resource: \"calendarEvents/\".concat(_common.base64.encode(id), \"/sync\"),\n qs: query || {}\n });\n },\n /**\n * @typedef QuerySchedulerDataOptions\n * @param {string} [siteName] it is site full url, must have. Example: ccctest.dmz.webex.com\n * @param {string} [id] it is seriesOrOccurrenceId. If present, the series/occurrence meeting ID to fetch data for.\n * Example: 040000008200E00074C5B7101A82E008000000004A99F11A0841D9010000000000000000100000009EE499D4A71C1A46B51494C70EC7BFE5\n * @param {string} [clientMeetingId] If present, the client meeting UUID to fetch data for.\n * Example: 7f318aa9-887c-6e94-802a-8dc8e6eb1a0a\n * @param {string} [scheduleTemplateId] it template id.\n * @param {string} [sessionTypeId] it session type id.\n * @param {string} [organizerCIUserId] required in schedule-on-behalf case. It is the organizer's CI UUID.\n * @param {boolean} [usmPreference]\n * @param {string} [webexMeetingId] webex side meeting UUID\n * @param {string} [eventId] event ID.\n * @param {string} [icalUid] icalendar UUID.\n * @param {string} [thirdPartyType] third part type, such as: Microsoft\n */\n /**\n * Get scheduler data from calendar service\n * @param {QuerySchedulerDataOptions} [query] the command parameters for fetching scheduler data.\n * @returns {Promise} Resolves with a decrypted scheduler data\n * */\n getSchedulerData: function getSchedulerData(query) {\n var _this10 = this;\n return this.request({\n method: 'GET',\n service: 'calendar',\n resource: 'schedulerData',\n qs: query || {}\n }).then(function (response) {\n return _calendarDecrypt.default.decryptSchedulerDataResponse(_this10, response.body).then(function () {\n return response;\n });\n });\n },\n /**\n * Get free busy status from calendar service\n * @param {Object} [data] the command parameters for fetching free busy status.\n * @param {object} [query] the query parameters for specific usage\n * @returns {Promise} Resolves with a decrypted response\n * */\n getFreeBusy: function getFreeBusy(data, query) {\n var _this11 = this;\n return _calendarEncrypt.default.encryptFreeBusyRequest(this, data).then(function () {\n return _this11.request({\n method: 'POST',\n service: 'calendar',\n body: data,\n resource: 'freebusy',\n qs: query || {}\n });\n }).then(function () {\n return new _promise.default(function (resolve, reject) {\n _this11.rpcEventRequests[data.requestId] = {\n resolve: resolve,\n reject: reject\n };\n });\n }).catch(function (error) {\n throw error;\n });\n },\n version: \"3.7.0-web-workers-keepalive.1\"\n});\nvar _default = exports.default = Calendar;\n//# sourceMappingURL=calendar.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _values = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/values\"));\nvar _lodash = require(\"lodash\");\nvar _util = _interopRequireDefault(require(\"./util\"));\nvar _constants = require(\"./constants\");\n/**\n * @class CalendarCollection\n */\nvar CalendarCollection = {\n namespace: _constants.CALENDAR,\n items: {},\n /**\n * @param {String} id calendar ID\n * @returns {Any} Calendar Item specifc to that id\n * @private\n * @memberof CalendarCollection\n */\n get: function get(id) {\n return this.items[id];\n },\n /**\n * @param {String} key any key and the corresponding calendar Item\n * @param {String} value any values corresponding to calendar item\n * @returns {Any} returns whatever is being stuffed into the collection\n * @private\n * @memberof CalendarCollection\n */\n getBy: function getBy(key, value) {\n if (key && value) {\n return (0, _lodash.find)(this.items, function (item) {\n return item[key] === value;\n });\n }\n return null;\n },\n /**\n * @param {Object} item CalendarObject passed to the collection\n * @returns {Any} returns calender id whats get set\n * @private\n * @memberof CalendarCollection\n */\n set: function set(item) {\n var itemId = item.id;\n var meeting = _util.default.calculateEndTime(item);\n this.items[itemId] = meeting;\n return itemId;\n },\n /**\n * resets all the values in the calendarcollection\n * @returns {undefined}\n * @private\n * @memberof CalendarCollection\n */\n reset: function reset() {\n this.items = {};\n },\n /**\n * @param {Id} id is the id for the calendar item to be removed\n * @returns {Any} calendar item which got removed\n * @private\n * @memberof CalendarCollection\n */\n remove: function remove(id) {\n var meeting = this.get(id);\n delete this.items[id];\n return meeting;\n },\n /**\n * sets all the item passed to the collection\n * @param {Array} items array of calendar items\n * @private\n * @returns {undefined}\n * @memberof CalendarCollection\n */\n setAll: function setAll(items) {\n var _this = this;\n items.forEach(function (item) {\n _this.set(item);\n });\n },\n /**\n * gets all the calendar stored in the collection\n * @param {Array} items array of calendar items\n * @private\n * @returns {Array} returns an array of calendar items\n * @memberof CalendarCollection\n */\n getAll: function getAll() {\n return (0, _values.default)(this.items);\n }\n};\nvar _default = exports.default = CalendarCollection;\n//# sourceMappingURL=collection.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = {\n calendar: {\n fromDate: new Date(new Date().setDate(new Date().getDate() - 1)),\n toDate: new Date(new Date().setDate(new Date().getDate() + 7))\n }\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CALENDAR_UPDATED = exports.CALENDAR_UNREGISTERED = exports.CALENDAR_REGISTERED = exports.CALENDAR_DELETE = exports.CALENDAR_CREATE = exports.CALENDAR = void 0;\nvar CALENDAR_REGISTERED = exports.CALENDAR_REGISTERED = 'calendar:registered';\nvar CALENDAR_UNREGISTERED = exports.CALENDAR_UNREGISTERED = 'calendar:unregistered';\nvar CALENDAR_UPDATED = exports.CALENDAR_UPDATED = 'calendar:update';\nvar CALENDAR_DELETE = exports.CALENDAR_DELETE = 'calendar:delete';\nvar CALENDAR_CREATE = exports.CALENDAR_CREATE = 'calendar:create';\nvar CALENDAR = exports.CALENDAR = 'CALENDAR';\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _calendar.default;\n }\n});\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nrequire(\"@webex/internal-plugin-device\");\nrequire(\"@webex/internal-plugin-encryption\");\nrequire(\"@webex/internal-plugin-conversation\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _lodash = require(\"lodash\");\nvar _calendar = _interopRequireDefault(require(\"./calendar\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('calendar', _calendar.default, {\n config: _config.default,\n payloadTransformer: {\n predicates: [{\n name: 'transformMeetingNotes',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'body.encryptedNotes') && !(response.options && response.options.service === 'calendar' && response.options.method === 'GET' && response.options.resource === 'schedulerData'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.body);\n }\n }, {\n name: 'transformMeetingParticipants',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'body.encryptedParticipants') && !(response.options && response.options.service === 'calendar' && response.options.method === 'GET' && response.options.resource === 'schedulerData'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.body);\n }\n }, {\n name: 'transformMeetingArray',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'body.items[0].seriesId'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.body.items);\n }\n }, {\n name: 'transformMeeting',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'body.seriesId') && !(response.options && response.options.service === 'calendar' && response.options.method === 'GET' && response.options.resource === 'schedulerData'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.body);\n }\n }, {\n name: 'transformMeeting',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'calendarMeetingExternal'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.calendarMeetingExternal);\n }\n }],\n transforms: [{\n name: 'transformMeetingArray',\n fn: function fn(ctx, array) {\n return _promise.default.all(array.map(function (item) {\n return ctx.transform('transformMeeting', item);\n }));\n }\n }, {\n name: 'transformMeeting',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.encryptionKeyUrl) {\n return _promise.default.resolve();\n }\n\n // Decrypt participant properties if meeting object contains participants\n var decryptedParticipants = object.encryptedParticipants ? object.encryptedParticipants.map(function (participant) {\n return _promise.default.all([ctx.transform('decryptTextProp', 'encryptedEmailAddress', object.encryptionKeyUrl, participant), ctx.transform('decryptTextProp', 'encryptedName', object.encryptionKeyUrl, participant)]);\n }) : [];\n\n // Decrypt meetingJoinInfo properties if meeting object contains meetingJoinInfo\n var decryptedMeetingJoinInfo = object.meetingJoinInfo ? _promise.default.all([ctx.transform('decryptTextProp', 'meetingJoinURI', object.encryptionKeyUrl, object.meetingJoinInfo), ctx.transform('decryptTextProp', 'meetingJoinURL', object.encryptionKeyUrl, object.meetingJoinInfo)]) : [];\n var decryptedOrganizer = object.encryptedOrganizer ? _promise.default.all([ctx.transform('decryptTextProp', 'encryptedEmailAddress', object.encryptionKeyUrl, object.encryptedOrganizer), ctx.transform('decryptTextProp', 'encryptedName', object.encryptionKeyUrl, object.encryptedOrganizer)]) : [];\n return _promise.default.all([ctx.transform('decryptTextProp', 'encryptedSubject', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'encryptedLocation', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'encryptedNotes', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'webexURI', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'webexURL', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'spaceMeetURL', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'spaceURI', object.encryptionKeyUrl, object), ctx.transform('decryptTextProp', 'spaceURL', object.encryptionKeyUrl, object)].concat(decryptedOrganizer, decryptedParticipants, decryptedMeetingJoinInfo));\n }\n }, {\n name: 'transformMeetingNotes',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.encryptionKeyUrl) {\n return _promise.default.resolve();\n }\n return _promise.default.all([ctx.transform('decryptTextProp', 'encryptedNotes', object.encryptionKeyUrl, object)]);\n }\n }, {\n name: 'transformMeetingParticipants',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.encryptionKeyUrl || !object.encryptedParticipants) {\n return _promise.default.resolve();\n }\n\n // Decrypt participant properties\n var decryptedParticipants = object.encryptedParticipants.map(function (participant) {\n return _promise.default.all([ctx.transform('decryptTextProp', 'encryptedEmailAddress', object.encryptionKeyUrl, participant), ctx.transform('decryptTextProp', 'encryptedName', object.encryptionKeyUrl, participant)]);\n });\n return _promise.default.all(decryptedParticipants);\n }\n }]\n }\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar CalendarUtil = {\n // calculate the end time for the meeting based on the duration so it's stored on\n // the scheduled meeting item, that way client can display start and end without\n // calculation on their side\n // gets the start time from server, and the duration, and reformats\n /**\n * calculates the end time for meeting\n * @param {Object} item the locus.host property\n * @param {Object} item.start start time of the meeting\n * @param {Object} item.duration duration of the meeting\n * @returns {Object} end time of the meeting\n * @memberof CalendarUtil\n */\n calculateEndTime: function calculateEndTime(item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n endTime: new Date(new Date(item.start).getTime() + item.durationMinutes * 60000)\n });\n }\n};\nvar _default = exports.default = CalendarUtil;\n//# sourceMappingURL=util.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sortActivitiesByPublishedDate = exports.sanitizeActivity = exports.isRootActivity = exports.isReplyActivity = exports.isNewer = exports.isEditActivity = exports.isDeleteActivity = exports.isCreateActivity = exports.getPublishedDate = exports.getParentId = exports.getIsActivityOrphaned = exports.getActivityType = exports.determineActivityType = exports.createRootActivity = exports.createReplyEditActivity = exports.createReplyActivity = exports.createEditActivity = exports.OLDER = exports.NEWER = exports.MID = exports.INITIAL = exports.ACTIVITY_TYPES = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _lodash = require(\"lodash\");\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar OLDER = exports.OLDER = 'older';\nvar NEWER = exports.NEWER = 'newer';\nvar MID = exports.MID = 'mid';\nvar INITIAL = exports.INITIAL = 'initial';\nvar ACTIVITY_TYPES = exports.ACTIVITY_TYPES = {\n REPLY: 'REPLY',\n EDIT: 'EDIT',\n REACTION: 'REACTION',\n REACTION_SELF: 'REACTION_SELF',\n ROOT: 'ROOT',\n CREATE: 'CREATE',\n TOMBSTONE: 'TOMBSTONE',\n DELETE: 'DELETE',\n REPLY_EDIT: 'REPLY_EDIT'\n};\nvar REPLY = 'reply';\nvar EDIT = 'edit';\nvar REACTION_SUMMARY = 'reactionSummary';\nvar REACTION_SELF_SUMMARY = 'reactionSelfSummary';\nvar CREATE = 'create';\nvar TOMBSTONE = 'tombstone';\nvar DELETE = 'delete';\nvar ADD = 'add';\nvar getActivityType = exports.getActivityType = function getActivityType(activity) {\n var _activity$parent, _activity$parent2;\n if (((_activity$parent = activity.parent) === null || _activity$parent === void 0 ? void 0 : _activity$parent.type) === REPLY) {\n return ACTIVITY_TYPES.REPLY;\n }\n if (((_activity$parent2 = activity.parent) === null || _activity$parent2 === void 0 ? void 0 : _activity$parent2.type) === EDIT) {\n return ACTIVITY_TYPES.EDIT;\n }\n if (activity.verb === ADD || activity.type === REACTION_SUMMARY) {\n return ACTIVITY_TYPES.REACTION;\n }\n if (activity.type === REACTION_SELF_SUMMARY) {\n return ACTIVITY_TYPES.REACTION_SELF;\n }\n if (activity.verb === CREATE) {\n return ACTIVITY_TYPES.CREATE;\n }\n if (activity.verb === TOMBSTONE) {\n return ACTIVITY_TYPES.TOMBSTONE;\n }\n if (activity.verb === DELETE) {\n return ACTIVITY_TYPES.DELETE;\n }\n return ACTIVITY_TYPES.ROOT;\n};\nvar getPublishedDate = exports.getPublishedDate = function getPublishedDate() {\n var activity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return new Date(activity.published).getTime();\n};\n\n/**\n * @param {Object} activity1\n * @param {Object} activity2\n * @returns {boolean} true if first activity is newer than second\n */\nvar isNewer = exports.isNewer = function isNewer(activity1, activity2) {\n return getPublishedDate(activity1) > getPublishedDate(activity2);\n};\nvar sortActivitiesByPublishedDate = exports.sortActivitiesByPublishedDate = function sortActivitiesByPublishedDate(activities) {\n return (0, _lodash.sortBy)(activities, function (activity) {\n return getPublishedDate(activity);\n });\n};\nvar getParentId = exports.getParentId = function getParentId(activity) {\n var _activity$parent3;\n return activity === null || activity === void 0 ? void 0 : (_activity$parent3 = activity.parent) === null || _activity$parent3 === void 0 ? void 0 : _activity$parent3.id;\n};\nvar isRootActivity = exports.isRootActivity = function isRootActivity(act) {\n return getActivityType(act) === ACTIVITY_TYPES.ROOT;\n};\nvar isReplyActivity = exports.isReplyActivity = function isReplyActivity(act) {\n return getActivityType(act) === ACTIVITY_TYPES.REPLY;\n};\nvar isEditActivity = exports.isEditActivity = function isEditActivity(act) {\n return getActivityType(act) === ACTIVITY_TYPES.EDIT;\n};\nvar isCreateActivity = exports.isCreateActivity = function isCreateActivity(act) {\n return getActivityType(act) === ACTIVITY_TYPES.CREATE;\n};\nvar isDeleteActivity = exports.isDeleteActivity = function isDeleteActivity(act) {\n return getActivityType(act) === ACTIVITY_TYPES.DELETE;\n};\nvar sanitizeActivity = exports.sanitizeActivity = function sanitizeActivity(activity) {\n var final = _objectSpread({}, activity);\n final.reaction = activity.reaction || {};\n final.reactionSelf = activity.reactionSelf || {};\n\n // replies will be spread in order beneath parent, no need to include on final objects\n delete final.replies;\n return final;\n};\nvar getIsActivityOrphaned = exports.getIsActivityOrphaned = function getIsActivityOrphaned(activity, activities) {\n return activity.parent && activity.parent.id && !activities[activity.parent.id];\n};\nvar getIsReplyEditActivity = function getIsReplyEditActivity(activity, activities) {\n var parentId = activity.parent.id;\n var parentActivity = activities[parentId];\n return parentActivity && isReplyActivity(parentActivity);\n};\nvar determineActivityType = exports.determineActivityType = function determineActivityType(activity, activities) {\n var initialType = getActivityType(activity);\n\n // edits to a reply, while they are replies themselves, appear in every way as edits\n // the only way to dermine their status as an edited reply is to find the original reply\n if (initialType === ACTIVITY_TYPES.EDIT) {\n var isReplyEditActivity = getIsReplyEditActivity(activity, activities);\n return isReplyEditActivity ? ACTIVITY_TYPES.REPLY_EDIT : initialType;\n }\n return initialType;\n};\nvar createRootActivity = exports.createRootActivity = function createRootActivity(activity) {\n return activity;\n};\nvar createReplyActivity = exports.createReplyActivity = function createReplyActivity(activity) {\n var replyAct = _objectSpread(_objectSpread({}, activity), {}, {\n replyParent: activity.parent\n });\n return replyAct;\n};\nvar createEditActivity = exports.createEditActivity = function createEditActivity(editActivity, activities) {\n var editActParentObj = editActivity.parent;\n var parentId = editActParentObj.id;\n var parentAct = activities[parentId];\n var joinedEditAct = _objectSpread(_objectSpread({}, parentAct), {}, {\n id: editActivity.id,\n parent: editActParentObj,\n editParent: editActParentObj,\n object: editActivity.object,\n published: editActivity.published\n });\n return joinedEditAct;\n};\n\n// takes an edit activity whose parent is a reply activity\nvar createReplyEditActivity = exports.createReplyEditActivity = function createReplyEditActivity(editActivity, activities) {\n var editActParentObj = editActivity.parent;\n var parentId = editActParentObj.id;\n var parentReplyAct = activities[parentId];\n var joinedReplyEditActivity = _objectSpread(_objectSpread({}, parentReplyAct), {}, {\n id: editActivity.id,\n parent: editActParentObj,\n editParent: editActParentObj,\n replyParent: parentReplyAct.parent,\n object: editActivity.object,\n published: editActivity.published\n });\n return joinedReplyEditActivity;\n};\n//# sourceMappingURL=activities.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.setValue = exports.rootActivityManager = exports.noMoreActivitiesManager = exports.minBatchSize = exports.getValue = exports.getQuery = exports.getLoopCounterFailsafe = exports.getActivityObjectsFromMap = exports.fetchLoopCountMax = exports.defaultMinDisplayableActivities = exports.bookendManager = exports.batchSizeIncrementCount = exports.activityManager = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _from = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/from\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _lodash = require(\"lodash\");\nvar _activities = require(\"./activities\");\nvar defaultMinDisplayableActivities = exports.defaultMinDisplayableActivities = 20;\nvar minBatchSize = exports.minBatchSize = 10;\nvar fetchLoopCountMax = exports.fetchLoopCountMax = 100;\nvar batchSizeIncrementCount = exports.batchSizeIncrementCount = 10;\n\n// use accessors for ease of refactoring underlying implementation\n/**\n * @param {Map} destination destination map object for data. Currently a Map, but could be refactored to use any type.\n * @param {string} key\n * @param {any} value\n * @returns {Map}\n */\nvar setValue = exports.setValue = function setValue(destination, key, value) {\n return destination.set(key, value);\n};\n/**\n * @param {Map} source source map object to access. Currently expects a Map, but could be refactored to use any type\n * @param {string} key\n * @returns {Map}\n */\nvar getValue = exports.getValue = function getValue(source, key) {\n return source.get(key);\n};\nvar getActivityObjectsFromMap = exports.getActivityObjectsFromMap = function getActivityObjectsFromMap(hashMap) {\n return (0, _from.default)(hashMap).map(function (_ref) {\n var _ref2 = (0, _slicedToArray2.default)(_ref, 2),\n activity = _ref2[1];\n return activity;\n });\n};\n/**\n * creates maps for various activity types and defines handlers for working with stored activities\n * utilizes revealing module pattern to close over state and only expose certain necessary functions for altering state\n * @function\n * @returns {object}\n * getActivityHandlerByKey(activityType) - accepts a key to map to a defined activity handler\n * getActivityByTypeAndParentId(activityType, parentId) accepts a key and a parent ID to return an activity of that type whose parent is the parentId\n */\nvar activityManager = exports.activityManager = function activityManager() {\n var replyActivityHash = new _map.default();\n var editActivityHash = new _map.default();\n var reactionActivityHash = new _map.default();\n var reactionSelfActivityHash = new _map.default();\n var handleNewReply = function handleNewReply(replyAct) {\n var replyParentId = (0, _activities.getParentId)(replyAct);\n var existingReplyHash = getValue(replyActivityHash, replyParentId);\n if (existingReplyHash) {\n setValue(existingReplyHash, replyAct.id, replyAct);\n } else {\n var replyHash = new _map.default();\n setValue(replyHash, replyAct.id, replyAct);\n setValue(replyActivityHash, replyParentId, replyHash);\n }\n };\n var handleNewEdit = function handleNewEdit(editAct) {\n var isTombstone = editAct.verb === _activities.ACTIVITY_TYPES.TOMBSTONE;\n\n // we can ignore tombstone edits in favor of the newer one\n if (isTombstone) {\n return;\n }\n var editParentId = (0, _activities.getParentId)(editAct);\n var existingEdit = getValue(editActivityHash, editParentId);\n\n // edited activity must be newer than what we already have\n if (!existingEdit || (0, _activities.isNewer)(editAct, existingEdit)) {\n setValue(editActivityHash, editParentId, editAct);\n }\n };\n\n // logic is identical between reactions and reaction selfs, so handler simply passes the activity and the correct hash\n var reactionHelper = function reactionHelper(reactionAct, hash) {\n var reactionParentId = (0, _activities.getParentId)(reactionAct);\n var existingReaction = getValue(hash, reactionParentId);\n\n // reaction activity must be newer than what we already have\n if (!existingReaction || (0, _activities.isNewer)(reactionAct, existingReaction)) {\n setValue(hash, reactionParentId, reactionAct);\n }\n };\n var handleNewReaction = function handleNewReaction(reactionAct) {\n reactionHelper(reactionAct, reactionActivityHash);\n };\n var handleNewReactionSelf = function handleNewReactionSelf(reactionSelfAct) {\n reactionHelper(reactionSelfAct, reactionSelfActivityHash);\n };\n var getActivityHandlerByKey = function getActivityHandlerByKey(key) {\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _activities.ACTIVITY_TYPES.REACTION, handleNewReaction), _activities.ACTIVITY_TYPES.REACTION_SELF, handleNewReactionSelf), _activities.ACTIVITY_TYPES.EDIT, handleNewEdit), _activities.ACTIVITY_TYPES.REPLY, handleNewReply)[key];\n };\n var getActivityByTypeAndParentId = function getActivityByTypeAndParentId(type, id) {\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _activities.ACTIVITY_TYPES.EDIT, getValue(editActivityHash, id)), _activities.ACTIVITY_TYPES.REPLY, getValue(replyActivityHash, id)), _activities.ACTIVITY_TYPES.REACTION, getValue(reactionActivityHash, id)), _activities.ACTIVITY_TYPES.REACTION_SELF, getValue(reactionSelfActivityHash, id))[type];\n };\n return {\n getActivityHandlerByKey: getActivityHandlerByKey,\n getActivityByTypeAndParentId: getActivityByTypeAndParentId\n };\n};\n\n/**\n * encapsulates state and logic for managing oldest and newest activities\n * @returns {object} setters and getters for activity state management\n */\nvar bookendManager = exports.bookendManager = function bookendManager() {\n // keep track of generator state, like what our current oldest & newest activities are\n var oldestAct;\n var newestAct;\n var getOldestAct = function getOldestAct() {\n return oldestAct;\n };\n var getNewestAct = function getNewestAct() {\n return newestAct;\n };\n var setOldestAct = function setOldestAct(act) {\n if (!oldestAct) {\n oldestAct = act;\n } else if ((0, _activities.isNewer)(oldestAct, act)) {\n oldestAct = act;\n }\n };\n var setNewestAct = function setNewestAct(act) {\n if (!newestAct) {\n newestAct = act;\n } else if ((0, _activities.isNewer)(act, newestAct)) {\n newestAct = act;\n }\n };\n var setBookends = function setBookends(activities) {\n var oldestActsFirst = (0, _activities.sortActivitiesByPublishedDate)(activities);\n var newestInBatch = (0, _lodash.last)(oldestActsFirst);\n var oldestInBatch = oldestActsFirst[0];\n setOldestAct(oldestInBatch);\n setNewestAct(newestInBatch);\n };\n return {\n setBookends: setBookends,\n getNewestAct: getNewestAct,\n getOldestAct: getOldestAct\n };\n};\n\n/**\n * encapsulates state and logic for when there are no more fetchable activities from convo\n * @returns {object} setters and getters for no more activities logic\n */\nvar noMoreActivitiesManager = exports.noMoreActivitiesManager = function noMoreActivitiesManager() {\n // used to determine if we should continue to fetch older activities\n // must be set per iteration, as querying newer activities is still valid when all end of convo has been reached\n var noMoreActs = false;\n var noOlderActs = false;\n var noNewerActs = false;\n var getNoMoreActs = function getNoMoreActs() {\n return noMoreActs;\n };\n var checkAndSetNoOlderActs = function checkAndSetNoOlderActs(act) {\n if (!noOlderActs && (0, _activities.getActivityType)(act) === _activities.ACTIVITY_TYPES.CREATE) {\n noOlderActs = true;\n }\n };\n var checkAndSetNoNewerActs = function checkAndSetNoNewerActs(activities) {\n if (!activities || !activities.length) {\n noNewerActs = true;\n }\n };\n var checkAndSetNoMoreActs = function checkAndSetNoMoreActs(queryType, visibleActs, currentBatchSize) {\n if (queryType === _activities.NEWER && noNewerActs || (queryType === _activities.OLDER || queryType === _activities.INITIAL) && noOlderActs || queryType === _activities.MID && visibleActs < currentBatchSize && noOlderActs) {\n noMoreActs = true;\n }\n };\n return {\n getNoMoreActs: getNoMoreActs,\n checkAndSetNoMoreActs: checkAndSetNoMoreActs,\n checkAndSetNoNewerActs: checkAndSetNoNewerActs,\n checkAndSetNoOlderActs: checkAndSetNoOlderActs\n };\n};\n\n/**\n * encapsulates state and logic for managing root activities\n * @returns {object} setters and getters for activity state management\n */\nvar rootActivityManager = exports.rootActivityManager = function rootActivityManager() {\n var rootActivityHash = new _map.default();\n var addNewRoot = function addNewRoot(rootAct) {\n setValue(rootActivityHash, rootAct.id, rootAct);\n };\n var getRootActivityHash = function getRootActivityHash() {\n return rootActivityHash;\n };\n return {\n addNewRoot: addNewRoot,\n getRootActivityHash: getRootActivityHash\n };\n};\nvar getLoopCounterFailsafe = exports.getLoopCounterFailsafe = function getLoopCounterFailsafe() {\n var fetchLoopCount = 0;\n return function () {\n fetchLoopCount += 1;\n if (fetchLoopCount > fetchLoopCountMax) {\n throw new Error('max fetches reached');\n }\n };\n};\n\n/**\n * creates activity query object\n * @param {string} type type of query to create\n * @param {object} queryOptions options to define query\n * @param {string} [queryOptions.newestPublishedDate] the date of the newest fetched activity\n * @param {string} [queryOptions.oldestPublishedDate] the date of the oldest fetched activity\n * @param {number} [queryOptions.batchSize] the number of activities to query\n * @param {object} [queryOptions.activityToSearch] a server activity to use to build middate query\n * @returns {object}\n */\nvar getQuery = exports.getQuery = function getQuery(type, queryOptions) {\n var newestPublishedDate = queryOptions.newestPublishedDate,\n oldestPublishedDate = queryOptions.oldestPublishedDate,\n batchSize = queryOptions.batchSize,\n _queryOptions$activit = queryOptions.activityToSearch,\n activityToSearch = _queryOptions$activit === void 0 ? {} : _queryOptions$activit;\n switch (type) {\n case _activities.NEWER:\n {\n var sinceDate = newestPublishedDate + 1;\n var lastActivityFirst = false;\n return {\n sinceDate: sinceDate,\n lastActivityFirst: lastActivityFirst\n };\n }\n case _activities.MID:\n {\n var searchType = (0, _activities.getActivityType)(activityToSearch);\n var midDate;\n if (searchType === _activities.ACTIVITY_TYPES.REPLY || searchType === _activities.ACTIVITY_TYPES.EDIT) {\n midDate = activityToSearch.parent.published;\n } else {\n midDate = activityToSearch.published;\n }\n return {\n midDate: midDate,\n limit: batchSize\n };\n }\n case _activities.OLDER:\n {\n var maxDate = oldestPublishedDate - 1;\n return {\n maxDate: maxDate\n };\n }\n case _activities.INITIAL:\n default:\n {\n return {};\n }\n }\n};\n//# sourceMappingURL=activity-thread-ordering.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = {\n conversation: {\n allowedInboundTags: {\n 'webex-mention': ['data-object-type', 'data-object-id', 'data-object-url']\n },\n allowedOutboundTags: {\n 'webex-mention': ['data-object-type', 'data-object-id', 'data-object-url']\n },\n // eslint-disable-next-line no-empty-function\n inboundProcessFunc: function inboundProcessFunc() {},\n // eslint-disable-next-line no-empty-function\n outboundProcessFunc: function outboundProcessFunc() {},\n allowedInboundStyles: [],\n allowedOutboundStyles: [],\n /**\n * Max height for thumbnails generated when sharing an image\n * @type {number}\n */\n thumbnailMaxHeight: 960,\n /**\n * Max width for thumbnails generated when sharing an image\n * @type {number}\n */\n thumbnailMaxWidth: 640,\n /**\n * Primarily for testing. When true, decrypting an activity will create a\n * sister property with the original encrypted string\n * @type {Boolean}\n */\n keepEncryptedProperties: false,\n decryptionFailureMessage: 'This message cannot be decrypted',\n /**\n * config value to perform decryption on inbound conversations and activities\n */\n includeDecryptionTransforms: true,\n /**\n * config value to perform decryption on outbound conversations and activities\n */\n includeEncryptionTransforms: true\n }\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.KEY_ROTATION_REQUIRED = exports.KEY_ALREADY_ROTATED = exports.ENCRYPTION_KEY_URL_MISMATCH = void 0;\nvar KEY_ROTATION_REQUIRED = exports.KEY_ROTATION_REQUIRED = 1400087;\nvar KEY_ALREADY_ROTATED = exports.KEY_ALREADY_ROTATED = 1409004;\nvar ENCRYPTION_KEY_URL_MISMATCH = exports.ENCRYPTION_KEY_URL_MISMATCH = 1400049;\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Array$from = require(\"@babel/runtime-corejs2/core-js/array/from\");\nvar _Symbol = require(\"@babel/runtime-corejs2/core-js/symbol\");\nvar _Symbol$iterator = require(\"@babel/runtime-corejs2/core-js/symbol/iterator\");\nvar _Array$isArray2 = require(\"@babel/runtime-corejs2/core-js/array/is-array\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _awaitAsyncGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/awaitAsyncGenerator\"));\nvar _wrapAsyncGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/wrapAsyncGenerator\"));\nvar _querystring = _interopRequireDefault(require(\"querystring\"));\nvar _events = require(\"events\");\nvar _hmacSha = _interopRequireDefault(require(\"crypto-js/hmac-sha256\"));\nvar _encHex = _interopRequireDefault(require(\"crypto-js/enc-hex\"));\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _lodash = require(\"lodash\");\nvar _helperImage = require(\"@webex/helper-image\");\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar _encryptionTransforms = require(\"./encryption-transforms\");\nvar _decryptionTransforms = require(\"./decryption-transforms\");\nvar _convoError = require(\"./convo-error\");\nvar _shareActivity = _interopRequireDefault(require(\"./share-activity\"));\nvar _activityThreadOrdering = require(\"./activity-thread-ordering\");\nvar _activities = require(\"./activities\");\nvar _constants = require(\"./constants\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== \"undefined\" && o[_Symbol$iterator] || o[\"@@iterator\"]; if (!it) { if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _Array$from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar idToUrl = new _map.default();\nvar getConvoLimit = function getConvoLimit() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var limit;\n if (options.conversationsLimit) {\n var value = Math.max(options.conversationsLimit, 0);\n limit = {\n value: value,\n name: 'conversationsLimit'\n };\n }\n return limit;\n};\nvar Conversation = _webexCore.WebexPlugin.extend({\n namespace: 'Conversation',\n initialize: function initialize() {\n var _this2 = this;\n this.listenToOnce(this.webex, 'ready', function () {\n var _this2$webex$config$p;\n if ((0, _isArray.default)((_this2$webex$config$p = _this2.webex.config.payloadTransformer) === null || _this2$webex$config$p === void 0 ? void 0 : _this2$webex$config$p.transforms)) {\n _this2.webex.config.payloadTransformer.transforms = _this2.webex.config.payloadTransformer.transforms.concat(_this2.config.includeDecryptionTransforms ? _decryptionTransforms.transforms : []).concat(_this2.config.includeEncryptionTransforms ? _encryptionTransforms.transforms : []);\n }\n });\n },\n /**\n * @param {String} cluster the cluster containing the id\n * @param {UUID} [id] the id of the conversation.\n * If empty, just return the base URL.\n * @returns {String} url of the conversation\n */\n getUrlFromClusterId: function getUrlFromClusterId() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$cluster = _ref.cluster,\n cluster = _ref$cluster === void 0 ? 'us' : _ref$cluster,\n id = _ref.id;\n var url = this.webex.internal.services.getServiceUrlFromClusterId({\n cluster: cluster\n }, this.webex);\n return id ? \"\".concat(url, \"/conversations/\").concat(id) : url;\n },\n /**\n * @param {Object} conversation\n * @param {Object} object\n * @param {Object} activity\n * @returns {Promise}\n */\n acknowledge: function acknowledge(conversation, object, activity) {\n var _this3 = this;\n var url = this.getConvoUrl(conversation);\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: url\n });\n if (!(0, _lodash.isObject)(object)) {\n return _promise.default.reject(new Error('`object` must be an object'));\n }\n return this.prepare(activity, {\n verb: 'acknowledge',\n target: this.prepareConversation(convoWithUrl),\n object: {\n objectType: 'activity',\n id: object.id,\n url: object.url\n }\n }).then(function (a) {\n return _this3.submit(a);\n });\n },\n /**\n * Adds a participant to a conversation\n * @param {Object} conversation\n * @param {Object|string} participant\n * @param {Object} activity Reference to the activity that will eventually be\n * posted. Use this to (a) pass in e.g. clientTempId and (b) render a\n * provisional activity\n * @returns {Promise}\n */\n add: function add(conversation, participant, activity) {\n var _this4 = this;\n var url = this.getConvoUrl(conversation);\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: url\n });\n return this.webex.internal.user.asUUID(participant, {\n create: true\n }).then(function (id) {\n return _this4.prepare(activity, {\n verb: 'add',\n target: _this4.prepareConversation(convoWithUrl),\n object: {\n id: id,\n objectType: 'person'\n },\n kmsMessage: {\n method: 'create',\n uri: '/authorizations',\n resourceUri: '',\n userIds: [id]\n }\n }).then(function (a) {\n return _this4.submit(a);\n });\n });\n },\n /**\n * Creates a conversation\n * @param {Object} params\n * @param {Array} params.participants\n * @param {Array} params.files\n * @param {string} params.comment\n * @param {string} params.html\n * @param {Object} params.displayName\n * @param {string} params.classificationId\n * @param {string} params.effectiveDate\n * @param {Boolean} params.isDefaultClassification\n * @param {Array} params.tags\n * @param {Boolean} params.favorite\n * @param {Object} options\n * @param {Boolean} options.allowPartialCreation\n * @param {Boolean} options.forceGrouped\n * @param {Boolean} options.skipOneOnOneFetch skips checking 1:1 exists before creating conversation\n * @returns {Promise}\n */\n create: function create(params) {\n var _this5 = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!params.participants || params.participants.length === 0) {\n return _promise.default.reject(new Error('`params.participants` is required'));\n }\n return _promise.default.all(params.participants.map(function (participant) {\n return _this5.webex.internal.user.asUUID(participant, {\n create: true\n })\n // eslint-disable-next-line arrow-body-style\n .catch(function (err) {\n return options.allowPartialCreation ? undefined : _promise.default.reject(err);\n });\n })).then(function (participants) {\n participants.unshift(_this5.webex.internal.device.userId);\n participants = (0, _lodash.uniq)(participants);\n var validParticipants = participants.filter(function (participant) {\n return participant;\n });\n params.participants = validParticipants;\n\n // check if original participants list was to create a 1:1\n if (participants.length === 2 && !(options && options.forceGrouped)) {\n if (!params.participants[1]) {\n return _promise.default.reject(new _convoError.InvalidUserCreation());\n }\n if (options.skipOneOnOneFetch) {\n return _this5._createOneOnOne(params);\n }\n return _this5._maybeCreateOneOnOneThenPost(params, options);\n }\n return _this5._createGrouped(params, options);\n }).then(function (c) {\n idToUrl.set(c.id, c.url);\n if (!params.files) {\n return c;\n }\n return _this5.webex.internal.conversation.share(c, params.files).then(function (a) {\n c.activities.items.push(a);\n return c;\n });\n });\n },\n /**\n * @private\n * generate a deterministic HMAC for a reaction\n * @param {Object} displayName displayName of reaction we are sending\n * @param {Object} parent parent activity of reaction\n * @returns {Promise}\n */\n createReactionHmac: function createReactionHmac(displayName, parent) {\n // not using webex.internal.encryption.getKey() because the JWK it returns does not have a 'k'\n // property. we need jwk.k to correctly generate the HMAC\n\n return this.webex.internal.encryption.unboundedStorage.get(parent.encryptionKeyUrl).then(function (keyString) {\n var key = JSON.parse(keyString);\n // when we stringify this object, keys must be in this order to generate same HMAC as\n // desktop clients\n var formatjwk = {\n k: key.jwk.k,\n kid: key.jwk.kid,\n kty: key.jwk.kty\n };\n var source = \"\".concat((0, _stringify.default)(formatjwk)).concat(parent.id).concat(displayName);\n var hmac = _encHex.default.stringify((0, _hmacSha.default)(source, parent.id));\n return _promise.default.resolve(hmac);\n });\n },\n /**\n * @typedef {Object} ReactionPayload\n * @property {Object} actor\n * @property {string} actor.objectType\n * @property {string} actor.id\n * @property {string} objectType\n * @property {string} verb will be either add' or 'delete'\n * @property {Object} target\n * @property {string} target.id\n * @property {string} target.objectType\n * @property {Object} object this will change on delete vs. add\n * @property {string} object.id present in delete case\n * @property {string} object.objectType 'activity' in delete case, 'reaction2' in add case\n * @property {string} object.displayName must be 'celebrate', 'heart', 'thumbsup', 'smiley', 'haha', 'confused', 'sad'\n * @property {string} object.hmac\n */\n /**\n * @private\n * send add or delete reaction to convo service\n * @param {Object} conversation\n * The payload to send a reaction\n * @param {ReactionPayload} reactionPayload\n * @returns {Promise}\n */\n sendReaction: function sendReaction(conversation, reactionPayload) {\n var _this6 = this;\n var url = this.getConvoUrl(conversation);\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: url\n });\n if (!(0, _lodash.isObject)(reactionPayload)) {\n return _promise.default.reject(new Error('`object` must be an object'));\n }\n return this.prepare(reactionPayload, {\n target: this.prepareConversation(convoWithUrl),\n object: (0, _lodash.pick)(reactionPayload, 'id', 'url', 'objectType')\n }).then(function (act) {\n return _this6.submit(act);\n });\n },\n /**\n * create a reaction\n * @param {Object} conversation the conversation in which the reaction will be added\n * @param {Object} reactionId reaction activity to be deleted\n * @param {Object} actorId id of person object who is reacting\n * @param {String} recipientId used when reacting to direct IMC messages\n * @returns {Promise}\n */\n deleteReaction: function deleteReaction(conversation, reactionId, actorId, recipientId) {\n var deleteReactionPayload = {\n actor: {\n objectType: 'person',\n id: actorId !== null && actorId !== void 0 ? actorId : this.webex.internal.device.userId\n },\n object: {\n id: reactionId,\n objectType: 'activity'\n },\n objectType: 'activity',\n target: {\n id: conversation.id,\n objectType: 'conversation'\n },\n verb: 'delete'\n };\n\n // Is not required for the request to be accepted, but follows specification.\n if (recipientId) {\n deleteReactionPayload.recipients = {\n items: [{\n id: recipientId,\n objectType: 'person'\n }]\n };\n }\n return this.sendReaction(conversation, deleteReactionPayload);\n },\n /**\n * create a reaction\n * @param {Object} conversation the conversation in which the reaction will be added\n * @param {Object} displayName must be 'celebrate', 'heart', 'thumbsup', 'smiley', 'haha', 'confused', 'sad'\n * @param {Object} parentActivity activity object from that we are reacting to\n * @param {Object} actorId id of person object who is reacting\n * @param {String} recipientId used when reacting to direct IMC messages\n * @returns {Promise}\n */\n addReaction: function addReaction(conversation, displayName, parentActivity, actorId, recipientId) {\n var _this7 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n var hmac, addReactionPayload;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!_this7.config.includeEncryptionTransforms) {\n _context.next = 4;\n break;\n }\n _context.next = 3;\n return _this7.createReactionHmac(displayName, parentActivity);\n case 3:\n hmac = _context.sent;\n case 4:\n addReactionPayload = {\n actor: {\n objectType: 'person',\n id: actorId !== null && actorId !== void 0 ? actorId : _this7.webex.internal.device.userId\n },\n target: {\n id: conversation.id,\n objectType: 'conversation'\n },\n verb: 'add',\n objectType: 'activity',\n parent: {\n type: 'reaction',\n id: parentActivity.id\n },\n object: {\n objectType: 'reaction2',\n displayName: displayName,\n hmac: hmac\n }\n };\n if (recipientId) {\n addReactionPayload.recipients = {\n items: [{\n id: recipientId,\n objectType: 'person'\n }]\n };\n }\n return _context.abrupt(\"return\", _this7.sendReaction(conversation, addReactionPayload));\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))();\n },\n /**\n * delete content\n * @param {Object} conversation\n * @param {Object} object\n * @param {Object} activity\n * @returns {Promise}\n */\n delete: function _delete(conversation, object, activity) {\n var _this8 = this;\n var url = this.getConvoUrl(conversation);\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: url\n });\n if (!(0, _lodash.isObject)(object)) {\n return _promise.default.reject(new Error('`object` must be an object'));\n }\n var request = {\n verb: 'delete',\n target: this.prepareConversation(convoWithUrl),\n object: (0, _lodash.pick)(object, 'id', 'url', 'objectType')\n };\n\n // Deleting meeting container requires KMS message\n if (object.object.objectType === 'meetingContainer') {\n // It's building a string uri + \"/authorizations?authId=\" + id, where uri is the meeting container's KRO URL, and id is the conversation's KRO URL.\n request.target.kmsResourceObjectUrl = object.object.kmsResourceObjectUrl;\n request.kmsMessage = {\n method: 'delete',\n uri: \"/authorizations?\".concat(_querystring.default.stringify({\n authId: convoWithUrl.kmsResourceObjectUrl\n }))\n };\n }\n return this.prepare(activity, request).then(function (a) {\n return _this8.submit(a);\n });\n },\n /**\n * Downloads the file specified in item.scr or item.url\n * @param {Object} item\n * @param {Object} item.scr\n * @param {string} item.url\n * @param {Object} options\n * @param {Object} options.headers\n * @param {boolean} options.shouldNotAddExifData\n * @returns {Promise}\n */\n download: function download(item) {\n var _this9 = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var isEncrypted = Boolean(item.scr && item.scr.key);\n var shunt = new _events.EventEmitter();\n var promise;\n if (isEncrypted) {\n promise = this.webex.internal.encryption.download(item.url, item.scr, item.options);\n } else {\n promise = this._downloadUnencryptedFile(item.url, options);\n }\n promise = promise.on('progress', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return shunt.emit.apply(shunt, ['progress'].concat(args));\n }).then(function (res) {\n if (options.shouldNotAddExifData) {\n return res;\n }\n return (0, _helperImage.readExifData)(item, res);\n }).then(function (file) {\n _this9.logger.info('conversation: file downloaded');\n if (item.displayName && !file.name) {\n file.name = item.displayName;\n }\n if (!file.type && item.mimeType) {\n file.type = item.mimeType;\n }\n return file;\n });\n (0, _common.proxyEvents)(shunt, promise);\n return promise;\n },\n /**\n * Downloads an unencrypted file\n * @param {string} uri\n * @param {Object} options\n * @param {Object} options.headers\n * @returns {Promise}\n */\n _downloadUnencryptedFile: function _downloadUnencryptedFile(uri) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _assign.default)(options, {\n uri: uri,\n responseType: 'buffer'\n });\n var promise = this.request(options).then(function (res) {\n return res.body;\n });\n (0, _common.proxyEvents)(options.download, promise);\n return promise;\n },\n /**\n * Helper method that expands a set of parameters into an activty object\n * @param {string} verb\n * @param {Object} object\n * @param {Object} target\n * @param {Object|string} actor\n * @returns {Object}\n */\n expand: function expand(verb, object, target, actor) {\n var activity = {\n actor: actor,\n objectType: 'activity',\n verb: verb\n };\n if (!actor) {\n actor = this.webex.internal.device.userId;\n }\n if ((0, _lodash.isString)(actor)) {\n activity.actor = {\n objectType: 'person',\n id: actor\n };\n }\n if (object) {\n activity.object = object;\n }\n if (target) {\n activity.target = target;\n }\n return activity;\n },\n /**\n * Gets an array of activities with an array of activity URLS\n * @param {Array} activityUrls\n * @param {Object} options\n * @param {String} options.cluster cluster where the activities are located\n * @param {String} options.url base convo url where the activities are located\n * @returns {Promise} Resolves with the activities\n */\n bulkActivitiesFetch: function bulkActivitiesFetch(activityUrls) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cluster;\n var url;\n if (typeof options === 'string') {\n cluster = options;\n } else {\n cluster = options.cluster;\n url = options.url;\n }\n var resource = 'bulk_activities_fetch';\n var params = {\n method: 'POST',\n body: {\n activityUrls: activityUrls\n }\n };\n if (url) {\n var uri = \"\".concat(url, \"/\").concat(resource);\n (0, _assign.default)(params, {\n uri: uri\n });\n } else if (cluster) {\n var _uri = \"\".concat(this.getUrlFromClusterId({\n cluster: cluster\n }), \"/\").concat(resource);\n (0, _assign.default)(params, {\n uri: _uri\n });\n } else {\n (0, _assign.default)(params, {\n api: 'conversation',\n resource: resource\n });\n }\n return this.webex.request(params).then(function (res) {\n var activitiesArr = [];\n if (res.body.multistatus) {\n res.body.multistatus.forEach(function (statusData) {\n if (statusData.status === '200' && statusData.data && statusData.data.activity) {\n activitiesArr.push(statusData.data.activity);\n }\n });\n }\n return activitiesArr;\n });\n },\n /**\n * Fetches a single conversation\n * @param {Object} conversation\n * @param {String} [conversation.url] The URL where the conversation is located.\n * @param {String|UUID} [conversation.user] The user to look up in the conversation service\n * If specified, the user lookup will take precedence over the url lookup\n * @param {Object} options\n * @returns {Promise}\n */\n get: function get(conversation) {\n var _this10 = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var user = conversation.user;\n var uri;\n try {\n uri = !user ? this.getConvoUrl(conversation) : '';\n } catch (err) {\n return _promise.default.reject(Error(err));\n }\n var params = {\n qs: _objectSpread({\n uuidEntryFormat: true,\n personRefresh: true,\n activitiesLimit: 0,\n includeConvWithDeletedUserUUID: false,\n includeParticipants: false\n }, (0, _lodash.omit)(options, 'id', 'user', 'url')),\n disableTransform: options.disableTransform\n };\n\n // Default behavior is to set includeParticipants=false,\n // which makes the payload lighter by removing participant info.\n // If the caller explicitly sets the participantAckFilter or\n // participantsLimit, we don't want that default setting.\n if ('participantAckFilter' in options || 'participantsLimit' in options) {\n delete params.qs.includeParticipants;\n }\n return _promise.default.resolve(user ? this.webex.internal.user.asUUID(user) : null).then(function (userId) {\n if (userId) {\n (0, _assign.default)(params, {\n service: 'conversation',\n resource: \"conversations/user/\".concat(userId)\n });\n } else {\n params.uri = uri;\n }\n return _this10.request(params);\n }).then((0, _common.tap)(function (_ref2) {\n var body = _ref2.body;\n var id = body.id,\n url = body.url;\n _this10._recordUUIDs(body);\n idToUrl.set(id, url);\n })).then(function (res) {\n return res.body;\n });\n },\n /**\n * Leaves the conversation or removes the specified user from the specified\n * conversation\n * @param {Object} conversation\n * @param {Object|string} participant If not specified, defaults to current\n * user\n * @param {Object} activity Reference to the activity that will eventually be\n * posted. Use this to (a) pass in e.g. clientTempId and (b) render a\n * provisional activity\n * @returns {Promise}\n */\n leave: function leave(conversation, participant, activity) {\n var _this11 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return _promise.default.resolve().then(function () {\n if (!participant) {\n participant = _this11.webex.internal.device.userId;\n }\n return _this11.webex.internal.user.asUUID(participant).then(function (id) {\n return _this11.prepare(activity, {\n verb: 'leave',\n target: _this11.prepareConversation(convoWithUrl),\n object: {\n id: id,\n objectType: 'person'\n },\n kmsMessage: {\n method: 'delete',\n uri: \"/authorizations?\".concat(_querystring.default.stringify({\n authId: id\n }))\n }\n });\n });\n }).then(function (a) {\n return _this11.submit(a);\n });\n },\n /**\n * Lists a set of conversations. By default does not fetch activities or\n * participants\n * @param {Object} options\n * @param {boolean} options.summary - when true, use conversationSummary resource\n * @param {Number} options.conversationsLimit - limit the number of conversations fetched\n * @param {boolean} options.deferDecrypt - when true, deferDecrypt tells the\n * payload transformer to normalize (but not decrypt) each received\n * conversation. Instead, the received conversations will each have a bound\n * decrypt method that can be executed at the consumer's leisure\n * @returns {Promise>}\n */\n list: function list() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this._list({\n service: 'conversation',\n resource: options.summary ? 'conversationsSummary' : 'conversations',\n qs: (0, _lodash.omit)(options, ['deferDecrypt', 'summary']),\n deferDecrypt: options.deferDecrypt,\n limit: getConvoLimit(options)\n }).then(function (results) {\n var _iterator = _createForOfIteratorHelper(results),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var convo = _step.value;\n idToUrl.set(convo.id, convo.url);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return results;\n });\n },\n /**\n * Paginates through a set of conversations. By default does not fetch activities or\n * participants\n * @param {Object} options\n * @param {boolean} options.deferDecrypt - when true, deferDecrypt tells the\n * payload transformer to normalize (but not decrypt) each received\n * conversation. Instead, the received conversations will each have a bound\n * decrypt method that can be executed at the consumer's leisure\n * @param {Page} options.page - After the first result has been returned to a consumer,\n * you can pass the Page back to the sdk to get the next list of results.\n * @returns {Promise>}\n */\n paginate: function paginate() {\n var _arguments = arguments,\n _this12 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n var options, queryOptions, reqOptions;\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n options = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : {};\n if (!options.page) {\n _context2.next = 5;\n break;\n }\n if (!(!options.page.links || !options.page.links.next)) {\n _context2.next = 4;\n break;\n }\n throw new Error('No link to follow for the provided page');\n case 4:\n return _context2.abrupt(\"return\", _this12.request({\n url: options.page.links.next\n }).then(function (res) {\n return {\n page: new _webexCore.Page(res, _this12.webex)\n };\n }));\n case 5:\n // No page - so this is the first request to kick off the pagination process\n queryOptions = _objectSpread({\n personRefresh: true,\n uuidEntryFormat: true,\n activitiesLimit: 0,\n participantsLimit: 0,\n paginate: true\n }, (0, _lodash.omit)(options, ['deferDecrypt', 'url']));\n reqOptions = {\n qs: queryOptions,\n deferDecrypt: options.deferDecrypt,\n limit: getConvoLimit(options)\n }; // if options.url is present we likely received one or more additional urls due to federation. In this case\n // we need to initialize pagination against that url instead of the default home cluster\n if (options.url) {\n reqOptions.uri = \"\".concat(options.url, \"/conversations\");\n } else {\n reqOptions.service = 'conversation';\n reqOptions.resource = 'conversations';\n }\n return _context2.abrupt(\"return\", _this12.request(reqOptions).then(function (res) {\n var response = {\n page: new _webexCore.Page(res, _this12.webex)\n };\n if (res.body && res.body.additionalUrls) {\n response.additionalUrls = res.body.additionalUrls;\n }\n return response;\n }));\n case 9:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }))();\n },\n /**\n * Lists the conversations the current user has left. By default does not\n * fetch activities or participants\n * @param {Object} options\n * @returns {Promise>}\n */\n listLeft: function listLeft(options) {\n return this._list({\n service: 'conversation',\n resource: 'conversations/left',\n qs: options,\n limit: getConvoLimit(options)\n }).then(function (results) {\n var _iterator2 = _createForOfIteratorHelper(results),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var convo = _step2.value;\n idToUrl.set(convo.id, convo.url);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return results;\n });\n },\n /**\n * List activities for the specified conversation\n * @param {Object} options\n * @param {String} options.conversationUrl URL to the conversation\n * @returns {Promise>}\n */\n listActivities: function listActivities(options) {\n return this._listActivities((0, _assign.default)(options, {\n resource: 'activities'\n }));\n },\n /**\n * @typedef QueryOptions\n * @param {number} [limit] The limit of child activities that can be returned per request\n * @param {boolean} [latestActivityFirst] Sort order for the child activities\n * @param {boolean} [includeParentActivity] Enables the parent activity to be returned in the activity list\n * @param {string} [sinceDate] Get all child activities after this date\n * @param {string} [maxDate] Get all child activities before this date\n * @param {boolean} [latestActivityFirst] Sort order for the child activities\n * @param {string} [activityType] The type of children to return the parents of, a null value here returns parents of all types of children.\n * The value is one of 'reply', 'edit', 'cardAction', 'reaction', 'reactionSummary', 'reactionSelfSummary'\n */\n /**\n * Get all parent ids for a conversation.\n * @param {string} conversationUrl conversation URL.\n * @param {QueryOptions} [query] object containing query string values to be appended to the url\n * @returns {Promise>}\n */\n listParentActivityIds: function listParentActivityIds(conversationUrl, query) {\n var _this13 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {\n var params, response;\n return _regenerator.default.wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n params = {\n method: 'GET',\n url: \"\".concat(conversationUrl, \"/parents\"),\n qs: query\n };\n _context3.next = 3;\n return _this13.request(params);\n case 3:\n response = _context3.sent;\n return _context3.abrupt(\"return\", response.body);\n case 5:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n },\n /**\n * Returns a list of _all_ child activities for a given parentId within a given conversation\n * @param {object} [options = {}]\n * @param {string} [options.conversationUrl] targeted conversation URL\n * @param {string} [options.activityParentId] parent id of edit activities or thread activities\n * @param {QueryOptions} [options.query] object containing query string values to be appended to the url\n * @returns {Promise}\n */\n listAllChildActivitiesByParentId: function listAllChildActivitiesByParentId() {\n var _arguments2 = arguments,\n _this14 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {\n var options, conversationUrl, activityParentId, query, activityType, initialResponse, page, items, _iterator3, _step3, activity;\n return _regenerator.default.wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n options = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};\n conversationUrl = options.conversationUrl, activityParentId = options.activityParentId, query = options.query;\n activityType = query.activityType;\n _context4.next = 5;\n return _this14.listChildActivitiesByParentId(conversationUrl, activityParentId, activityType, query);\n case 5:\n initialResponse = _context4.sent;\n page = new _webexCore.Page(initialResponse, _this14.webex);\n items = (0, _toConsumableArray2.default)(page.items);\n case 8:\n if (!page.hasNext()) {\n _context4.next = 16;\n break;\n }\n _context4.next = 11;\n return page.next();\n case 11:\n page = _context4.sent;\n _iterator3 = _createForOfIteratorHelper(page);\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n activity = _step3.value;\n items.push(activity);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n _context4.next = 8;\n break;\n case 16:\n // reverse list if needed (see _list for precedent)\n if (items.length && (0, _lodash.last)(items).published < items[0].published) {\n items.reverse();\n }\n return _context4.abrupt(\"return\", items);\n case 18:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }))();\n },\n /**\n * Return a list of child activities with a given conversation, parentId and other constraints.\n * @param {string} conversationUrl targeted conversation URL\n * @param {string} activityParentId parent id of edit activities or thread activities\n * @param {string} activityType type of child activity to return\n * The value is one of 'reply', 'edit', 'cardAction', 'reaction', 'reactionSummary', 'reactionSelfSummary'\n * @param {QueryOptions} [query = {}] object containing query string values to be appended to the url\n * @returns {Promise}\n */\n listChildActivitiesByParentId: function listChildActivitiesByParentId(conversationUrl, activityParentId, activityType) {\n var _arguments3 = arguments,\n _this15 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {\n var query, finalQuery, params;\n return _regenerator.default.wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n query = _arguments3.length > 3 && _arguments3[3] !== undefined ? _arguments3[3] : {};\n finalQuery = _objectSpread(_objectSpread({}, query), {}, {\n activityType: activityType\n });\n params = {\n method: 'GET',\n url: \"\".concat(conversationUrl, \"/parents/\").concat(activityParentId),\n qs: finalQuery\n };\n return _context5.abrupt(\"return\", _this15.request(params));\n case 4:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }))();\n },\n /**\n * Return an array of reactionSummary and reactionSelfSummary objects\n * @param {string} conversationUrl targeted conversation URL\n * @param {string} activityParentId parent id of reaction activities\n * @param {QueryOptions} query object representing query parameters to pass to convo endpoint\n * @returns {Promise}\n */\n getReactionSummaryByParentId: function getReactionSummaryByParentId(conversationUrl, activityParentId, query) {\n var _this16 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {\n var _yield$_this16$reques, body, reactionObjects;\n return _regenerator.default.wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n _context6.next = 2;\n return _this16.request({\n method: 'GET',\n url: \"\".concat(conversationUrl, \"/activities/\").concat(activityParentId),\n qs: query\n });\n case 2:\n _yield$_this16$reques = _context6.sent;\n body = _yield$_this16$reques.body;\n reactionObjects = body.children ? body.children.filter(function (child) {\n return child.type === 'reactionSelfSummary' || child.type === 'reactionSummary';\n }) : [];\n return _context6.abrupt(\"return\", reactionObjects);\n case 6:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }))();\n },\n /**\n * Lists activities in which the current user was mentioned\n * @param {Object} options\n * @returns {Promise>}\n */\n listMentions: function listMentions(options) {\n return this._list({\n service: 'conversation',\n resource: 'mentions',\n qs: (0, _lodash.omit)(options, 'mentions')\n });\n },\n /**\n * Mutes the mentions of a conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n muteMentions: function muteMentions(conversation, activity) {\n return this.tag(conversation, {\n tags: ['MENTION_NOTIFICATIONS_OFF']\n }, activity);\n },\n /**\n * Mutes the messages of a conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n muteMessages: function muteMessages(conversation, activity) {\n return this.tag(conversation, {\n tags: ['MESSAGE_NOTIFICATIONS_OFF']\n }, activity);\n },\n /**\n * Starts ignoring conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n ignore: function ignore(conversation, activity) {\n return this.tag(conversation, {\n tags: ['IGNORED']\n }, activity);\n },\n /**\n * @param {Object} conversation\n * @param {Object} inputs\n * @param {Object} parentActivity\n * @param {Object} activity\n * @returns {Promise}\n */\n cardAction: function cardAction(conversation, inputs, parentActivity) {\n var _this17 = this;\n var activity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n activity.parent = {\n id: parentActivity.id,\n type: 'cardAction'\n };\n return this.prepare(activity, {\n verb: 'cardAction',\n target: this.prepareConversation(convoWithUrl),\n object: _objectSpread({\n objectType: 'submit'\n }, inputs)\n }).then(function (a) {\n return _this17.submit(a);\n });\n },\n /**\n * Posts a message to a conversation\n * @param {Object} conversation\n * @param {Object|string} message if string, treated as plaintext; if object,\n * assumed to be object property of `post` activity\n * @param {Object} activity Reference to the activity that will eventually be\n * posted. Use this to (a) pass in e.g. clientTempId and (b) render a\n * provisional activity\n * @returns {Promise}\n */\n post: function post(conversation, message, activity) {\n var _this18 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n if ((0, _lodash.isString)(message)) {\n message = {\n displayName: message\n };\n }\n return this.prepare(activity, {\n verb: 'post',\n target: this.prepareConversation(convoWithUrl),\n object: _objectSpread({\n objectType: 'comment'\n }, message)\n }).then(function (a) {\n return _this18.submit(a);\n });\n },\n prepareConversation: function prepareConversation(conversation) {\n return (0, _lodash.defaults)((0, _lodash.pick)(conversation, 'id', 'url', 'objectType', 'defaultActivityEncryptionKeyUrl', 'kmsResourceObjectUrl'), {\n objectType: 'conversation'\n });\n },\n prepare: function prepare(activity, params) {\n var _this19 = this;\n params = params || {};\n activity = activity || {};\n return _promise.default.resolve(activity.prepare ? activity.prepare(params) : activity).then(function (act) {\n (0, _lodash.defaults)(act, {\n verb: params.verb,\n kmsMessage: params.kmsMessage,\n objectType: 'activity',\n clientTempId: _uuid.default.v4(),\n actor: _this19.webex.internal.device.userId\n });\n\n // Workaround because parent is a reserved props in Ampersand\n if (activity.parentActivityId && activity.activityType || activity.parent && activity.parent.id && activity.parent.type) {\n act.parent = {\n id: activity.parentActivityId || activity.parent.id,\n type: activity.activityType || activity.parent.type\n };\n }\n if (activity.recipients) {\n act.recipients = activity.recipients;\n }\n if ((0, _lodash.isString)(act.actor)) {\n act.actor = {\n objectType: 'person',\n id: act.actor\n };\n }\n ['actor', 'object'].forEach(function (key) {\n if (params[key]) {\n act[key] = act[key] || {};\n (0, _lodash.defaults)(act[key], params[key]);\n }\n });\n if (params.target) {\n (0, _lodash.merge)(act, {\n target: (0, _lodash.pick)(params.target, 'id', 'url', 'objectType', 'kmsResourceObjectUrl', 'defaultActivityEncryptionKeyUrl')\n });\n }\n ['object', 'target'].forEach(function (key) {\n if (act[key] && act[key].url && !act[key].id) {\n act[key].id = act[key].url.split('/').pop();\n }\n });\n ['actor', 'object', 'target'].forEach(function (key) {\n if (act[key] && !act[key].objectType) {\n // Reminder: throwing here because it's the only way to get out of\n // this loop in event of an error.\n throw new Error(\"`act.\".concat(key, \".objectType` must be defined\"));\n }\n });\n if (act.object && act.object.content && !act.object.displayName) {\n return _promise.default.reject(new Error('Cannot submit activity object with `content` but no `displayName`'));\n }\n return act;\n });\n },\n /**\n * Get a subset of threads for a user.\n * @param {Object} options\n * @returns {Promise>}\n */\n listThreads: function listThreads(options) {\n var _this20 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {\n return _regenerator.default.wrap(function _callee7$(_context7) {\n while (1) switch (_context7.prev = _context7.next) {\n case 0:\n return _context7.abrupt(\"return\", _this20._list({\n service: 'conversation',\n resource: 'threads',\n qs: (0, _lodash.omit)(options, 'showAllTypes')\n }));\n case 1:\n case \"end\":\n return _context7.stop();\n }\n }, _callee7);\n }))();\n },\n /**\n * Handles incoming conversation.activity mercury messages\n * @param {Event} event\n * @returns {Promise}\n */\n processActivityEvent: function processActivityEvent(event) {\n return this.webex.transform('inbound', event).then(function () {\n return event;\n });\n },\n /**\n * Handles incoming conversation.inmeetingchat.activity mercury messages\n * @param {Event} event\n * @returns {Promise}\n */\n processInmeetingchatEvent: function processInmeetingchatEvent(event) {\n return this.webex.transform('inbound', event).then(function () {\n return event;\n });\n },\n /**\n * Removes all mute-related tags\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n removeAllMuteTags: function removeAllMuteTags(conversation, activity) {\n return this.untag(conversation, {\n tags: ['MENTION_NOTIFICATIONS_OFF', 'MENTION_NOTIFICATIONS_ON', 'MESSAGE_NOTIFICATIONS_OFF', 'MESSAGE_NOTIFICATIONS_ON']\n }, activity);\n },\n /**\n * Creates a ShareActivty for the specified conversation\n * @param {Object} conversation\n * @param {Object} activity\n * @returns {ShareActivty}\n */\n makeShare: function makeShare(conversation, activity) {\n // if we pass activity as null then it does not take care of the\n // clientTempId created by the web-client while making the provisional\n // activity, hence we need to pass the activity which was created by the\n // web-client. This fixes the issue where the image activities do not come\n // back properly oriented from the server since the clientTempId is missing\n return _shareActivity.default.create(conversation, activity, this.webex);\n },\n /**\n * Assigns an avatar to a room\n * @param {Object} conversation\n * @param {File} avatar\n * @returns {Promise}\n */\n assign: function assign(conversation, avatar) {\n var _this21 = this;\n var uploadOptions = {\n role: 'spaceAvatar'\n };\n if ((avatar.size || avatar.length) > 1024 * 1024) {\n return _promise.default.reject(new Error('Room avatars must be less than 1MB'));\n }\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return _promise.default.resolve().then(function () {\n var activity = _shareActivity.default.create(conversation, null, _this21.webex);\n activity.enableThumbnails = false;\n activity.add(avatar, uploadOptions);\n return _this21.prepare(activity, {\n target: _this21.prepareConversation(convoWithUrl)\n });\n }).then(function (a) {\n // yes, this seems a little hacky; will likely be resolved as a result\n // of #213\n a.verb = 'assign';\n return _this21.submit(a);\n });\n },\n /**\n * Get url from convo object. If there isn't one, get it from the cache\n *\n * @param {String} url The location of the conversation\n * @param {UUID} id If there is no url, fall back to id to lookup in cache or with cluster\n * @param {String} cluster Used with id to lookup url\n * @param {UUID} generalConversationUuid If this is a team, the id of the general conversation\n * @param {Object} conversations If this is a team, the list of conversations in the team\n * @returns {String} url for the specific convo\n */\n getConvoUrl: function getConvoUrl(_ref3) {\n var id = _ref3.id,\n url = _ref3.url,\n cluster = _ref3.cluster,\n conversations = _ref3.conversations,\n generalConversationUuid = _ref3.generalConversationUuid;\n if (generalConversationUuid) {\n // This is a Team\n // Because Convo doesn't have an endpoint for the team URL\n // we have to use the general convo URL.\n var generalConvo = conversations.items.find(function (convo) {\n return convo.id === generalConversationUuid;\n });\n return generalConvo.url;\n }\n if (url) {\n return url;\n }\n if (id) {\n if (cluster) {\n return this.getUrlFromClusterId({\n cluster: cluster,\n id: id\n });\n }\n this.logger.warn('You should be using the `url` instead of the `id` property');\n var relatedUrl = idToUrl.get(id);\n if (!relatedUrl) {\n throw Error('Could not find the `url` from the given `id`');\n }\n return relatedUrl;\n }\n throw Error('The space needs a `url` property');\n },\n /**\n * Sets the typing status of the current user in a conversation\n *\n * @param {Object} conversation\n * @param {Object} options\n * @param {boolean} options.typing\n * @returns {Promise}\n */\n updateTypingStatus: function updateTypingStatus(conversation, options) {\n if (!conversation.id) {\n if (conversation.url) {\n conversation.id = conversation.url.split('/').pop();\n } else {\n return _promise.default.reject(new Error('conversation: could not identify conversation'));\n }\n }\n var eventType;\n if (options.typing) {\n eventType = 'status.start_typing';\n } else {\n eventType = 'status.stop_typing';\n }\n var url = this.getConvoUrl(conversation);\n var resource = 'status/typing';\n var params = {\n method: 'POST',\n body: {\n conversationId: conversation.id,\n eventType: eventType\n },\n url: \"\".concat(url, \"/\").concat(resource)\n };\n return this.request(params);\n },\n /**\n * Shares files to the specified conversation\n * @param {Object} conversation\n * @param {ShareActivity|Array} activity\n * @returns {Promise}\n */\n share: function share(conversation, activity) {\n var _this22 = this;\n if ((0, _lodash.isArray)(activity)) {\n activity = {\n object: {\n files: activity\n }\n };\n }\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n if (!(activity instanceof _shareActivity.default)) {\n activity = _shareActivity.default.create(convoWithUrl, activity, this.webex);\n }\n return this.prepare(activity, {\n target: this.prepareConversation(convoWithUrl)\n }).then(function (a) {\n return _this22.submit(a);\n });\n },\n /**\n * Submits an activity to the conversation service\n * @param {Object} activity\n * @param {String} [endpoint] endpoint to submit activity. If empty, find in activity\n * @returns {Promise}\n */\n submit: function submit(activity, endpoint) {\n var _this23 = this;\n var url = endpoint || this.getConvoUrl(activity.target);\n var resource = activity.verb === 'share' ? 'content' : 'activities';\n var params = {\n method: 'POST',\n body: activity,\n qs: {\n personRefresh: true\n },\n url: \"\".concat(url, \"/\").concat(resource)\n };\n if (activity.verb === 'share') {\n (0, _assign.default)(params.qs, {\n transcode: true,\n async: false\n });\n }\n /**\n * helper to cloneDeepWith for copying instance function\n * @param {Object|String|Symbol|Array|Date} value (recursive value to clone from params)\n * @returns {Object|null}\n */\n // eslint-disable-next-line consistent-return\n var customActivityCopy = function customActivityCopy(value) {\n var files = params.body.object.files;\n if (files && value && files.items.length > 0 && value.constructor === files.items[0].scr.constructor) {\n var copySrc = (0, _lodash.cloneDeep)(value);\n copySrc.toJWE = value.toJWE;\n copySrc.toJSON = value.toJSON;\n return copySrc;\n }\n };\n var cloneActivity = (0, _lodash.cloneDeepWith)(params, customActivityCopy);\n\n // triggers user-activity to reset logout timer\n this.webex.trigger('user-activity');\n return this.request(params).then(function (res) {\n return res.body;\n }).catch(function (error) {\n // handle when key need to rotate\n if (error.body && error.body.errorCode === _constants.KEY_ROTATION_REQUIRED) {\n cloneActivity.body.target.defaultActivityEncryptionKeyUrl = null;\n _this23.request(cloneActivity);\n } else if (error.body && (error.body.errorCode === _constants.KEY_ALREADY_ROTATED || error.body.errorCode === _constants.ENCRYPTION_KEY_URL_MISMATCH)) {\n // handle when key need to update\n _this23.webex.request({\n method: 'GET',\n api: 'conversation',\n resource: \"conversations/\".concat(params.body.target.id)\n }).then(function (res) {\n cloneActivity.body.target.defaultActivityEncryptionKeyUrl = res.body.defaultActivityEncryptionkeyUrl;\n _this23.request(cloneActivity);\n });\n } else {\n throw error;\n }\n });\n },\n /**\n * Remove the avatar from a room\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise}\n */\n unassign: function unassign(conversation, activity) {\n var _this24 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return this.prepare(activity, {\n verb: 'unassign',\n target: this.prepareConversation(convoWithUrl),\n object: {\n objectType: 'content',\n files: {\n items: []\n }\n }\n }).then(function (a) {\n return _this24.submit(a);\n });\n },\n /**\n * Mutes the mentions of a conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n unmuteMentions: function unmuteMentions(conversation, activity) {\n return this.tag(conversation, {\n tags: ['MENTION_NOTIFICATIONS_ON']\n }, activity);\n },\n /**\n * Mutes the messages of a conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n unmuteMessages: function unmuteMessages(conversation, activity) {\n return this.tag(conversation, {\n tags: ['MESSAGE_NOTIFICATIONS_ON']\n }, activity);\n },\n /**\n * Stops ignoring conversation\n * @param {Conversation~ConversationObject} conversation\n * @param {Conversation~ActivityObject} activity\n * @returns {Promise} Resolves with the created activity\n */\n unignore: function unignore(conversation, activity) {\n return this.untag(conversation, {\n tags: ['IGNORED']\n }, activity);\n },\n /**\n * Update an existing activity\n * @param {Object} conversation\n * @param {Object} object\n * @param {Object} activity\n * @returns {Promise}\n */\n update: function update(conversation, object, activity) {\n var _this25 = this;\n if (!(0, _lodash.isObject)(object)) {\n return _promise.default.reject(new Error('`object` must be an object'));\n }\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return this.prepare(activity, {\n verb: 'update',\n target: this.prepareConversation(convoWithUrl),\n object: object\n }).then(function (a) {\n return _this25.submit(a);\n });\n },\n /**\n * Sets a new key for the conversation\n * @param {Object} conversation\n * @param {Key|string} key (optional)\n * @param {Object} activity Reference to the activity that will eventually be\n * posted. Use this to (a) pass in e.g. clientTempId and (b) render a\n * provisional activity\n * @returns {Promise}\n */\n updateKey: function updateKey(conversation, key, activity) {\n var _this26 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return this.get(convoWithUrl, {\n activitiesLimit: 0,\n includeParticipants: true\n }).then(function (c) {\n return _this26._updateKey(c, key, activity);\n });\n },\n /**\n * Sets a new key for the conversation\n * @param {Object} conversation\n * @param {Key|string} key (optional)\n * @param {Object} activity Reference to the activity that will eventually be\n * posted. Use this to (a) pass in e.g. clientTempId and (b) render a\n * provisional activity\n * @private\n * @returns {Promise}\n */\n _updateKey: function _updateKey(conversation, key, activity) {\n var _this27 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return _promise.default.resolve(key || this.webex.internal.encryption.kms.createUnboundKeys({\n count: 1\n })).then(function (keys) {\n var k = (0, _lodash.isArray)(keys) ? keys[0] : keys;\n var params = {\n verb: 'updateKey',\n target: _this27.prepareConversation(convoWithUrl),\n object: {\n defaultActivityEncryptionKeyUrl: k.uri,\n objectType: 'conversation'\n }\n };\n\n // Reminder: the kmsResourceObjectUrl is only usable if there is\n // defaultActivityEncryptionKeyUrl.\n // Valid defaultActivityEncryptionKeyUrl start with 'kms:'\n if (convoWithUrl.kmsResourceObjectUrl && convoWithUrl.kmsResourceObjectUrl.startsWith('kms:')) {\n params.kmsMessage = {\n method: 'update',\n resourceUri: '',\n uri: k.uri\n };\n } else {\n params.kmsMessage = {\n method: 'create',\n uri: '/resources',\n userIds: (0, _lodash.map)(convoWithUrl.participants.items, 'id'),\n keyUris: [k.uri]\n };\n }\n return _this27.prepare(activity, params).then(function (a) {\n return _this27.submit(a);\n });\n });\n },\n /**\n * @param {Object} payload\n * @param {Object} options\n * @private\n * @returns {Promise}\n */\n _create: function _create(payload) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.request({\n method: 'POST',\n service: 'conversation',\n resource: 'conversations',\n body: payload,\n qs: {\n forceCreate: options.allowPartialCreation\n }\n }).then(function (res) {\n return res.body;\n });\n },\n /**\n * @param {Object} params\n * @param {Object} options\n * @private\n * @returns {Promise}\n */\n _createGrouped: function _createGrouped(params, options) {\n return this._create(this._prepareConversationForCreation(params), options);\n },\n /**\n * @param {Object} params\n * @param {Object} options\n * @private\n * @returns {Promise}\n */\n _createOneOnOne: function _createOneOnOne(params) {\n var payload = this._prepareConversationForCreation(params);\n payload.tags = ['ONE_ON_ONE'];\n return this._create(payload);\n },\n /**\n * Get the current conversation url.\n *\n * @returns {Promise} - conversation url\n */\n getConversationUrl: function getConversationUrl() {\n var _this28 = this;\n this.logger.info('conversation: getting the conversation service url');\n var convoUrl = this.webex.internal.services.get('conversation');\n\n // Validate if the conversation url exists in the services plugin and\n // resolve with its value.\n if (convoUrl) {\n return _promise.default.resolve(convoUrl);\n }\n\n // Wait for the postauth catalog to update and then try to retrieve the\n // conversation service url again.\n return this.webex.internal.waitForCatalog('postauth').then(function () {\n return _this28.webex.internal.services.get('conversation');\n }).catch(function (error) {\n _this28.logger.warn('conversation: unable to get conversation url', error.message);\n return _promise.default.reject(error);\n });\n },\n /**\n * @param {Object} conversation\n * @private\n * @returns {Promise}\n */\n _inferConversationUrl: function _inferConversationUrl(conversation) {\n var _this29 = this;\n if (conversation.id) {\n return this.webex.internal.feature.getFeature('developer', 'web-high-availability').then(function (haMessagingEnabled) {\n if (haMessagingEnabled) {\n // recompute conversation URL each time as the host may have changed\n // since last usage\n return _this29.getConversationUrl().then(function (url) {\n conversation.url = \"\".concat(url, \"/conversations/\").concat(conversation.id);\n return conversation;\n });\n }\n if (!conversation.url) {\n return _this29.getConversationUrl().then(function (url) {\n conversation.url = \"\".concat(url, \"/conversations/\").concat(conversation.id);\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n _this29.logger.warn('conversation: inferred conversation url from conversation id; please pass whole conversation objects to Conversation methods');\n }\n return conversation;\n });\n }\n return _promise.default.resolve(conversation);\n });\n }\n return _promise.default.resolve(conversation);\n },\n /**\n * @param {Object} options\n * @param {String} options.conversationUrl URL to the conversation\n * @param {String} options.resource The URL resource to hit for a list of objects\n * @private\n * @returns {Promise>}\n */\n _listActivities: function _listActivities(options) {\n var id = options.conversationId;\n var url = this.getConvoUrl({\n url: options.conversationUrl,\n id: id\n });\n var resource = options.resource;\n return this._list({\n qs: (0, _lodash.omit)(options, 'resource'),\n url: \"\".concat(url, \"/\").concat(resource)\n });\n },\n /**\n * common interface for facade of generator functions\n * @typedef {object} IGeneratorResponse\n * @param {boolean} done whether there is more to fetch\n * @param {any} value the value yielded or returned by generator\n */\n /**\n * @param {object} options\n * @param {string} options.conversationId\n * @param {string} options.conversationUrl,\n * @param {boolean} options.includeChildren, If set to true, parent activities will be enhanced with child objects\n * @param {number} options.minActivities how many activities to return in first batch\n * @param {?string} [options.queryType] one of older, newer, mid. defines which direction to fetch\n * @param {?object} [options.search] server activity to use as search middle date\n *\n * @returns {object}\n * returns three functions:\n *\n * getOlder - gets older activities than oldest fetched\n *\n * getNewer - gets newer activities than newest fetched\n *\n * jumpToActivity - gets searched-for activity and surrounding activities\n */\n listActivitiesThreadOrdered: function listActivitiesThreadOrdered(options) {\n var _this30 = this;\n var conversationUrl = options.conversationUrl,\n conversationId = options.conversationId;\n if (!conversationUrl && !conversationId) {\n throw new Error('must provide a conversation URL or conversation ID');\n }\n var url = this.getConvoUrl({\n url: conversationUrl,\n id: conversationId\n });\n var baseOptions = _objectSpread(_objectSpread({}, (0, _lodash.omit)(options, ['conversationUrl', 'conversationId'])), {}, {\n url: url\n });\n var olderOptions = _objectSpread(_objectSpread({}, baseOptions), {}, {\n queryType: _activities.OLDER\n });\n var threadOrderer = this._listActivitiesThreadOrdered(baseOptions);\n\n /**\n * gets queried activity and surrounding activities\n * calling this function creates a new generator instance, losing the previous instance's internal state\n * this ensures that jumping to older and newer activities is relative to a single set of timestamps, not many\n * @param {object} searchObject activity object from convo\n * @returns {IGeneratorResponse}\n */\n var jumpToActivity = /*#__PURE__*/function () {\n var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(searchObject) {\n var newUrl, searchOptions, _yield$threadOrderer$, searchResults;\n return _regenerator.default.wrap(function _callee8$(_context8) {\n while (1) switch (_context8.prev = _context8.next) {\n case 0:\n if (searchObject) {\n _context8.next = 2;\n break;\n }\n throw new Error('Search must be an activity object from conversation service');\n case 2:\n newUrl = searchObject.target && searchObject.target.url;\n if (newUrl) {\n _context8.next = 5;\n break;\n }\n throw new Error('Search object must have a target url!');\n case 5:\n searchOptions = _objectSpread(_objectSpread({}, baseOptions), {}, {\n url: newUrl,\n queryType: _activities.MID,\n search: searchObject\n });\n threadOrderer = _this30._listActivitiesThreadOrdered(searchOptions);\n _context8.next = 9;\n return threadOrderer.next(searchOptions);\n case 9:\n _yield$threadOrderer$ = _context8.sent;\n searchResults = _yield$threadOrderer$.value;\n return _context8.abrupt(\"return\", {\n done: true,\n value: searchResults\n });\n case 12:\n case \"end\":\n return _context8.stop();\n }\n }, _callee8);\n }));\n return function jumpToActivity(_x) {\n return _ref4.apply(this, arguments);\n };\n }();\n\n /**\n * gets older activities than oldest fetched\n * @returns {IGeneratorResponse}\n */\n var getOlder = /*#__PURE__*/function () {\n var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {\n var _yield$threadOrderer$2, _yield$threadOrderer$3, value, oldestInBatch, moreActivitiesExist;\n return _regenerator.default.wrap(function _callee9$(_context9) {\n while (1) switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return threadOrderer.next(olderOptions);\n case 2:\n _yield$threadOrderer$2 = _context9.sent;\n _yield$threadOrderer$3 = _yield$threadOrderer$2.value;\n value = _yield$threadOrderer$3 === void 0 ? [] : _yield$threadOrderer$3;\n oldestInBatch = value[0] && value[0].activity;\n moreActivitiesExist = oldestInBatch && (0, _activities.getActivityType)(oldestInBatch) !== _activities.ACTIVITY_TYPES.CREATE;\n return _context9.abrupt(\"return\", {\n done: !moreActivitiesExist,\n value: value\n });\n case 8:\n case \"end\":\n return _context9.stop();\n }\n }, _callee9);\n }));\n return function getOlder() {\n return _ref5.apply(this, arguments);\n };\n }();\n\n /**\n * gets newer activities than newest fetched\n * @returns {IGeneratorResponse}\n */\n var getNewer = /*#__PURE__*/function () {\n var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {\n var newerOptions, _yield$threadOrderer$4, value;\n return _regenerator.default.wrap(function _callee10$(_context10) {\n while (1) switch (_context10.prev = _context10.next) {\n case 0:\n newerOptions = _objectSpread(_objectSpread({}, baseOptions), {}, {\n queryType: _activities.NEWER\n });\n _context10.next = 3;\n return threadOrderer.next(newerOptions);\n case 3:\n _yield$threadOrderer$4 = _context10.sent;\n value = _yield$threadOrderer$4.value;\n return _context10.abrupt(\"return\", {\n done: !value.length,\n value: value\n });\n case 6:\n case \"end\":\n return _context10.stop();\n }\n }, _callee10);\n }));\n return function getNewer() {\n return _ref6.apply(this, arguments);\n };\n }();\n return {\n jumpToActivity: jumpToActivity,\n getNewer: getNewer,\n getOlder: getOlder\n };\n },\n /**\n * Represents reactions to messages\n * @typedef {object} Reaction\n * @property {object} activity reaction2summary server activity object\n */\n /**\n * Represents a root (parent, with or without children) activity, along with any replies and reactions\n * @typedef {object} Activity\n * @property {object} activity server activity object\n * @property {Reaction} reactions\n * @property {Reaction} reactionSelf\n */\n /**\n * @generator\n * @method\n * @async\n * @private\n * @param {object} options\n * @param {string} options.url\n * @param {boolean} options.includeChildren, If set to true, parent activities will be enhanced with child objects\n * @param {string} [options.minActivities] how many activities to return in first batch\n * @param {string} [options.queryType] one of older, newer, mid. defines which direction to fetch\n * @param {object} [options.search] server activity to use as search middle date\n *\n * @yields {Activity[]}\n *\n * @returns {void}\n */\n _listActivitiesThreadOrdered: function _listActivitiesThreadOrdered() {\n var _this = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {\n var _options$minActivitie, minActivities, _options$queryType, queryType, convoUrl, _options$search, search, includeChildren, _bookendManager, setBookends, getNewestAct, getOldestAct, defaultBatchSize, batchSize, _activityManager, getActivityHandlerByKey, getActivityByTypeAndParentId, query, _loop, _ret;\n return _regenerator.default.wrap(function _callee11$(_context13) {\n while (1) switch (_context13.prev = _context13.next) {\n case 0:\n // ***********************************************\n // INSTANCE STATE VARIABLES\n // variables that will be used for the life of the generator\n // ***********************************************\n _options$minActivitie = options.minActivities, minActivities = _options$minActivitie === void 0 ? _activityThreadOrdering.defaultMinDisplayableActivities : _options$minActivitie, _options$queryType = options.queryType, queryType = _options$queryType === void 0 ? _activities.INITIAL : _options$queryType; // must fetch initially before getting newer activities!\n if (queryType === _activities.NEWER) {\n queryType = _activities.INITIAL;\n }\n convoUrl = options.url, _options$search = options.search, search = _options$search === void 0 ? {} : _options$search, includeChildren = options.includeChildren; // manage oldest, newest activities (ie bookends)\n _bookendManager = (0, _activityThreadOrdering.bookendManager)(), setBookends = _bookendManager.setBookends, getNewestAct = _bookendManager.getNewestAct, getOldestAct = _bookendManager.getOldestAct; // default batch should be equal to minActivities when fetching back in time, but halved when fetching newer due to subsequent child fetches filling up the minActivities count\n // reduces server RTs when fetching older activities\n defaultBatchSize = queryType === _activities.INITIAL || queryType === _activities.OLDER ? minActivities : Math.max(_activityThreadOrdering.minBatchSize, Math.ceil(minActivities / 2));\n batchSize = defaultBatchSize; // exposes activity states and handlers with simple getters\n _activityManager = (0, _activityThreadOrdering.activityManager)(), getActivityHandlerByKey = _activityManager.getActivityHandlerByKey, getActivityByTypeAndParentId = _activityManager.getActivityByTypeAndParentId; // set initial query\n query = (0, _activityThreadOrdering.getQuery)(queryType, {\n activityToSearch: search,\n batchSize: batchSize\n });\n /* eslint-disable no-await-in-loop */\n /* eslint-disable no-loop-func */\n _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {\n var _rootActivityManager, getRootActivityHash, addNewRoot, _noMoreActivitiesMana, getNoMoreActs, checkAndSetNoMoreActs, checkAndSetNoOlderActs, checkAndSetNoNewerActs, getActivityHandlerByType, handleNewActivity, handleNewActivities, handleOlderQuery, handleNewerQuery, handleSearch, getQueryResponseHandler, incrementLoopCounter, _loop2, orderedActivities, getRepliesByParentId, orderedRoots, nextOptions, currentOldestPublishedDate, currentNewestPublishedDate;\n return _regenerator.default.wrap(function _loop$(_context12) {\n while (1) switch (_context12.prev = _context12.next) {\n case 0:\n // ***********************************************\n // EXECUTION STATE VARIABLES\n // variables that will be used for each \"batch\" of activities asked for\n // ***********************************************\n // stores all \"root\" activities (activities that are, or could be, thread parents)\n _rootActivityManager = (0, _activityThreadOrdering.rootActivityManager)(), getRootActivityHash = _rootActivityManager.getRootActivityHash, addNewRoot = _rootActivityManager.addNewRoot; // used to determine if we should continue to fetch older activities\n // must be set per iteration, as querying newer activities is still valid when all end of convo has been reached\n _noMoreActivitiesMana = (0, _activityThreadOrdering.noMoreActivitiesManager)(), getNoMoreActs = _noMoreActivitiesMana.getNoMoreActs, checkAndSetNoMoreActs = _noMoreActivitiesMana.checkAndSetNoMoreActs, checkAndSetNoOlderActs = _noMoreActivitiesMana.checkAndSetNoOlderActs, checkAndSetNoNewerActs = _noMoreActivitiesMana.checkAndSetNoNewerActs;\n getActivityHandlerByType = function getActivityHandlerByType(type) {\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _activities.ACTIVITY_TYPES.ROOT, addNewRoot), _activities.ACTIVITY_TYPES.REPLY, getActivityHandlerByKey(_activities.ACTIVITY_TYPES.REPLY)), _activities.ACTIVITY_TYPES.EDIT, getActivityHandlerByKey(_activities.ACTIVITY_TYPES.EDIT)), _activities.ACTIVITY_TYPES.REACTION, getActivityHandlerByKey(_activities.ACTIVITY_TYPES.REACTION)), _activities.ACTIVITY_TYPES.REACTION_SELF, getActivityHandlerByKey(_activities.ACTIVITY_TYPES.REACTION_SELF)), _activities.ACTIVITY_TYPES.TOMBSTONE, addNewRoot), _activities.ACTIVITY_TYPES.CREATE, addNewRoot)[type];\n };\n handleNewActivity = function handleNewActivity(activity) {\n var actType = (0, _activities.getActivityType)(activity);\n\n // ignore deletes\n if ((0, _activities.isDeleteActivity)(activity)) {\n return;\n }\n var activityHandler = getActivityHandlerByType(actType);\n activityHandler(activity);\n };\n handleNewActivities = function handleNewActivities(activities) {\n activities.forEach(function (act) {\n handleNewActivity(act);\n checkAndSetNoOlderActs(act);\n });\n };\n handleOlderQuery = function handleOlderQuery(activities) {\n setBookends(activities, _activities.OLDER);\n handleNewActivities(activities);\n };\n handleNewerQuery = function handleNewerQuery(activities) {\n checkAndSetNoNewerActs(activities);\n if (activities.length) {\n setBookends(activities, _activities.NEWER);\n handleNewActivities(activities);\n }\n };\n handleSearch = function handleSearch(activities) {\n setBookends(activities, _activities.MID);\n handleNewActivities(activities);\n };\n getQueryResponseHandler = function getQueryResponseHandler(type) {\n return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _activities.OLDER, handleOlderQuery), _activities.NEWER, handleNewerQuery), _activities.MID, handleSearch), _activities.INITIAL, handleOlderQuery)[type];\n }; // ***********************************************\n // INNER LOOP\n // responsible for fetching and building our maps of activities\n // fetch until minActivities is reached, or no more acts to fetch, or we hit our max fetch count\n // ***********************************************\n incrementLoopCounter = (0, _activityThreadOrdering.getLoopCounterFailsafe)();\n _loop2 = /*#__PURE__*/_regenerator.default.mark(function _loop2() {\n var allBatchActivitiesConfig, $allBatchActivitiesFetch, $fetchRequests, params, $parentsFetch, _yield$_awaitAsyncGen, _yield$_awaitAsyncGen2, allBatchActivities, _yield$_awaitAsyncGen3, parents, handler, _parents$reply, replyIds, _parents$edit, editIds, _parents$reaction, reactionIds, $reactionFetches, $replyFetches, $editFetches, _iterator4, _step4, activity, actId, childFetchOptions, _yield$_awaitAsyncGen4, _yield$_awaitAsyncGen5, reactions, replies, edits, newReplyReactions, allReactions, rootActivityHash, visibleActivitiesCount, _iterator5, _step5, rootActivity, rootId, repliesByRootId, currentOldestPublishedDate, currentNewestPublishedDate;\n return _regenerator.default.wrap(function _loop2$(_context11) {\n while (1) switch (_context11.prev = _context11.next) {\n case 0:\n // count loops and throw if we detect infinite loop\n incrementLoopCounter();\n\n // configure fetch request. Use a smaller limit when fetching newer or mids to account for potential children fetches\n allBatchActivitiesConfig = _objectSpread({\n conversationUrl: convoUrl,\n limit: batchSize,\n includeChildren: includeChildren\n }, query); // request activities in batches\n $allBatchActivitiesFetch = _this.listActivities(allBatchActivitiesConfig); // contain fetches in array to parallelize fetching as needed\n $fetchRequests = [$allBatchActivitiesFetch]; // if query requires recursive fetches for children acts, add the additional fetch\n if (queryType === _activities.MID || queryType === _activities.NEWER) {\n params = {\n activityType: null\n };\n if (query.sinceDate) {\n params.sinceDate = query.sinceDate;\n }\n $parentsFetch = _this.listParentActivityIds(convoUrl, params);\n $fetchRequests.push($parentsFetch);\n }\n\n // we dont always need to fetch for parents\n _context11.next = 7;\n return (0, _awaitAsyncGenerator2.default)(_promise.default.all($fetchRequests));\n case 7:\n _yield$_awaitAsyncGen = _context11.sent;\n _yield$_awaitAsyncGen2 = (0, _slicedToArray2.default)(_yield$_awaitAsyncGen, 2);\n allBatchActivities = _yield$_awaitAsyncGen2[0];\n _yield$_awaitAsyncGen3 = _yield$_awaitAsyncGen2[1];\n parents = _yield$_awaitAsyncGen3 === void 0 ? {} : _yield$_awaitAsyncGen3;\n // use query type to decide how to handle response\n handler = getQueryResponseHandler(queryType);\n handler(allBatchActivities);\n\n /*\n next we must selectively fetch the children of each of the parents to ensure completeness\n do this by checking the hash for each of the above parent IDs\n fetch children when we have a parent whose ID is represented in the parent ID lists\n */\n _parents$reply = parents.reply, replyIds = _parents$reply === void 0 ? [] : _parents$reply, _parents$edit = parents.edit, editIds = _parents$edit === void 0 ? [] : _parents$edit, _parents$reaction = parents.reaction, reactionIds = _parents$reaction === void 0 ? [] : _parents$reaction; // if no parent IDs returned, do nothing\n if (!(replyIds.length || editIds.length || reactionIds.length)) {\n _context11.next = 35;\n break;\n }\n $reactionFetches = [];\n $replyFetches = [];\n $editFetches = [];\n _iterator4 = _createForOfIteratorHelper(allBatchActivities);\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n activity = _step4.value;\n actId = activity.id;\n childFetchOptions = {\n conversationUrl: convoUrl,\n activityParentId: actId\n };\n if (reactionIds.includes(actId)) {\n $reactionFetches.push(_this.getReactionSummaryByParentId(convoUrl, actId, {\n activityType: 'reactionSummary',\n includeChildren: true\n }));\n }\n if (replyIds.includes(actId)) {\n childFetchOptions.query = {\n activityType: 'reply'\n };\n $replyFetches.push(_this.listAllChildActivitiesByParentId(childFetchOptions));\n }\n if (editIds.includes(actId)) {\n childFetchOptions.query = {\n activityType: 'edit'\n };\n $editFetches.push(_this.listAllChildActivitiesByParentId(childFetchOptions));\n }\n }\n\n // parallelize fetch for speeedz\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n _context11.next = 23;\n return (0, _awaitAsyncGenerator2.default)(_promise.default.all([_promise.default.all($reactionFetches), _promise.default.all($replyFetches), _promise.default.all($editFetches)]));\n case 23:\n _yield$_awaitAsyncGen4 = _context11.sent;\n _yield$_awaitAsyncGen5 = (0, _slicedToArray2.default)(_yield$_awaitAsyncGen4, 3);\n reactions = _yield$_awaitAsyncGen5[0];\n replies = _yield$_awaitAsyncGen5[1];\n edits = _yield$_awaitAsyncGen5[2];\n _context11.next = 30;\n return (0, _awaitAsyncGenerator2.default)(_promise.default.all(replies.filter(function (reply) {\n return replyIds.includes(reply.id);\n }).map(function (reply) {\n return _this.getReactionSummaryByParentId(convoUrl, reply.id, {\n activityType: 'reactionSummary',\n includeChildren: true\n });\n })));\n case 30:\n newReplyReactions = _context11.sent;\n allReactions = [].concat((0, _toConsumableArray2.default)(reactions), (0, _toConsumableArray2.default)(newReplyReactions)); // stick them into activity hashes\n replies.forEach(function (replyArr) {\n return handleNewActivities(replyArr);\n });\n edits.forEach(function (editArr) {\n return handleNewActivities(editArr);\n });\n allReactions.forEach(function (reactionArr) {\n return handleNewActivities(reactionArr);\n });\n case 35:\n rootActivityHash = getRootActivityHash();\n visibleActivitiesCount = rootActivityHash.size;\n _iterator5 = _createForOfIteratorHelper(rootActivityHash.values());\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n rootActivity = _step5.value;\n rootId = rootActivity.id;\n repliesByRootId = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REPLY, rootId);\n if (repliesByRootId && repliesByRootId.size) {\n visibleActivitiesCount += repliesByRootId.size || 0;\n }\n }\n\n // stop fetching if we've reached desired count of visible activities\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n if (!(visibleActivitiesCount >= minActivities)) {\n _context11.next = 41;\n break;\n }\n return _context11.abrupt(\"return\", 1);\n case 41:\n checkAndSetNoMoreActs(queryType, visibleActivitiesCount, batchSize);\n\n // batchSize should be equal to minimum activities when fetching older activities\n // covers \"best case\" when we reach minActivities on the first fetch\n if (queryType === _activities.OLDER) {\n batchSize = minActivities;\n }\n\n // since a MID query can bump the batchSize, we need to reset it _after_ a potential MID query\n // reset batchSize in case of MID queries bumping it up\n if (queryType === _activities.NEWER) {\n batchSize = defaultBatchSize;\n }\n currentOldestPublishedDate = (0, _activities.getPublishedDate)(getOldestAct());\n currentNewestPublishedDate = (0, _activities.getPublishedDate)(getNewestAct()); // we're still building our activity list - derive new query from prior query and start loop again\n if (queryType === _activities.INITIAL) {\n query = (0, _activityThreadOrdering.getQuery)(_activities.OLDER, {\n oldestPublishedDate: currentOldestPublishedDate,\n batchSize: batchSize\n });\n } else {\n query = (0, _activityThreadOrdering.getQuery)(queryType, {\n batchSize: batchSize,\n activityToSearch: search,\n oldestPublishedDate: currentOldestPublishedDate,\n newestPublishedDate: currentNewestPublishedDate\n });\n }\n\n // if we're still building out the midDate search, bump the search limit to include activities on both sides\n if (queryType === _activities.MID) {\n batchSize += _activityThreadOrdering.batchSizeIncrementCount;\n }\n case 48:\n case \"end\":\n return _context11.stop();\n }\n }, _loop2);\n });\n case 11:\n if (getNoMoreActs()) {\n _context12.next = 17;\n break;\n }\n return _context12.delegateYield(_loop2(), \"t0\", 13);\n case 13:\n if (!_context12.t0) {\n _context12.next = 15;\n break;\n }\n return _context12.abrupt(\"break\", 17);\n case 15:\n _context12.next = 11;\n break;\n case 17:\n orderedActivities = [];\n getRepliesByParentId = function getRepliesByParentId(replyParentId) {\n var replies = [];\n var repliesByParentId = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REPLY, replyParentId);\n if (!repliesByParentId) {\n return replies;\n }\n var sortedReplies = (0, _activities.sortActivitiesByPublishedDate)((0, _activityThreadOrdering.getActivityObjectsFromMap)(repliesByParentId));\n sortedReplies.forEach(function (replyActivity) {\n var replyId = replyActivity.id;\n var edit = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.EDIT, replyId);\n var reaction = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REACTION, replyId);\n var reactionSelf = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REACTION_SELF, replyId);\n var latestActivity = edit || replyActivity;\n // hash of root activities (in case of plain reply) and the reply activity (in case of edit)\n var allRelevantActivitiesArr = [].concat((0, _toConsumableArray2.default)((0, _activityThreadOrdering.getActivityObjectsFromMap)(getRootActivityHash())), (0, _toConsumableArray2.default)((0, _activityThreadOrdering.getActivityObjectsFromMap)(repliesByParentId)));\n var allRelevantActivities = allRelevantActivitiesArr.reduce(function (hashMap, act) {\n hashMap[act.id] = act;\n return hashMap;\n }, {});\n var finalReply = _this._createParsedServerActivity(latestActivity, allRelevantActivities);\n var fullReply = {\n id: replyId,\n activity: finalReply,\n reaction: reaction,\n reactionSelf: reactionSelf\n };\n var sanitizedFullReply = (0, _activities.sanitizeActivity)(fullReply);\n replies.push(sanitizedFullReply);\n });\n return replies;\n };\n orderedRoots = (0, _activities.sortActivitiesByPublishedDate)((0, _activityThreadOrdering.getActivityObjectsFromMap)(getRootActivityHash()));\n orderedRoots.forEach(function (rootActivity) {\n var rootId = rootActivity.id;\n var replies = getRepliesByParentId(rootId);\n var edit = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.EDIT, rootId);\n var reaction = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REACTION, rootId);\n var reactionSelf = getActivityByTypeAndParentId(_activities.ACTIVITY_TYPES.REACTION_SELF, rootId);\n var latestActivity = edit || rootActivity;\n var finalActivity = _this._createParsedServerActivity(latestActivity, (0, _defineProperty2.default)({}, rootId, rootActivity));\n var fullRoot = {\n id: rootId,\n activity: finalActivity,\n reaction: reaction,\n reactionSelf: reactionSelf\n };\n var sanitizedFullRoot = (0, _activities.sanitizeActivity)(fullRoot);\n orderedActivities.push(sanitizedFullRoot);\n replies.forEach(function (reply) {\n return orderedActivities.push(reply);\n });\n });\n _context12.next = 23;\n return orderedActivities;\n case 23:\n nextOptions = _context12.sent;\n if (!nextOptions) {\n _context12.next = 32;\n break;\n }\n minActivities = nextOptions.minActivities || minActivities;\n currentOldestPublishedDate = (0, _activities.getPublishedDate)(getOldestAct());\n currentNewestPublishedDate = (0, _activities.getPublishedDate)(getNewestAct());\n queryType = nextOptions.queryType;\n query = (0, _activityThreadOrdering.getQuery)(queryType, {\n activityToSearch: search,\n oldestPublishedDate: currentOldestPublishedDate,\n newestPublishedDate: currentNewestPublishedDate,\n batchSize: batchSize\n });\n _context12.next = 33;\n break;\n case 32:\n return _context12.abrupt(\"return\", {\n v: void 0\n });\n case 33:\n case \"end\":\n return _context12.stop();\n }\n }, _loop);\n });\n case 9:\n if (!true) {\n _context13.next = 16;\n break;\n }\n return _context13.delegateYield(_loop(), \"t0\", 11);\n case 11:\n _ret = _context13.t0;\n if (!_ret) {\n _context13.next = 14;\n break;\n }\n return _context13.abrupt(\"return\", _ret.v);\n case 14:\n _context13.next = 9;\n break;\n case 16:\n case \"end\":\n return _context13.stop();\n }\n }, _callee11);\n }))();\n },\n /**\n * @typedef {object} EditActivity\n * @property {object} editParent\n *\n * @typedef {object} ReplyActivity\n * @property {object} replyParent\n *\n * @typedef {object} EditedReplyActivity\n * @property {object} replyParent\n * @property {object} editParent\n *\n * @typedef {EditActivity | ReplyActivity | EditedReplyActivity} ParsedServerActivity\n */\n /**\n * hashmap of server activities, keyed by id\n * @typedef {object} ActivityHash\n * @property {Object}\n */\n /**\n * extends a given server object with fields that point to their parent activities from the hashmap passed in\n * @param {object} activity server activity\n * @param {ActivityHash} allActivitiesHash hashmap of all server activities caller would like to pass in\n * @returns {ParsedServerActivity} server activity extended with edit and reply parent fields\n */\n _createParsedServerActivity: function _createParsedServerActivity(activity) {\n var allActivitiesHash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var isOrphan = (0, _activities.getIsActivityOrphaned)(activity, allActivitiesHash);\n if (isOrphan) {\n throw new Error('activity has a parent that cannot be found in allActivitiesHash! please handle this as necessary');\n }\n var activityType = (0, _activities.determineActivityType)(activity, allActivitiesHash);\n switch (activityType) {\n case _activities.ACTIVITY_TYPES.ROOT:\n {\n return (0, _activities.createRootActivity)(activity);\n }\n case _activities.ACTIVITY_TYPES.EDIT:\n {\n // `activities` must also have the original activity\n return (0, _activities.createEditActivity)(activity, allActivitiesHash);\n }\n case _activities.ACTIVITY_TYPES.REPLY:\n {\n return (0, _activities.createReplyActivity)(activity);\n }\n case _activities.ACTIVITY_TYPES.REPLY_EDIT:\n {\n // `activities` must also have the reply activity\n return (0, _activities.createReplyEditActivity)(activity, allActivitiesHash);\n }\n default:\n {\n return activity;\n }\n }\n },\n /**\n * @param {Object} options\n * @private\n * @returns {Promise>}\n */\n _list: function _list(options) {\n var _this31 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {\n var res, list, limit, results, _iterator6, _step6, result, items;\n return _regenerator.default.wrap(function _callee12$(_context14) {\n while (1) switch (_context14.prev = _context14.next) {\n case 0:\n options.qs = _objectSpread({\n personRefresh: true,\n uuidEntryFormat: true,\n activitiesLimit: 0,\n participantsLimit: 0\n }, options.qs);\n _context14.next = 3;\n return _this31.request(options);\n case 3:\n res = _context14.sent;\n if (!res.body || !res.body.items || res.body.items.length === 0) {\n list = [];\n } else {\n list = res.body.items.slice(0);\n if ((0, _lodash.last)(list).published < list[0].published) {\n list.reverse();\n }\n }\n\n // The user has more data in another cluster.\n // Follow the 'additionalUrls' for that data.\n if (!res.body.additionalUrls) {\n _context14.next = 14;\n break;\n }\n limit = 0; // If the user asked for a specific amount of data,\n // don't fetch more than what was asked.\n // Here we figure out how much is left from the original request.\n // Divide that by the number of additional URLS.\n // This won't get us the exact limit but it will retrieve something\n // from every cluster listed.\n if (options.limit) {\n limit = Math.floor((options.limit.value - list.length) / res.body.additionalUrls.length);\n }\n\n // If the limit is 0 for some reason,\n // don't bother requesting from other clusters\n if (!(!options.limit || limit !== 0)) {\n _context14.next = 14;\n break;\n }\n _context14.next = 11;\n return _promise.default.all(res.body.additionalUrls.map(function (host) {\n var url = \"\".concat(host, \"/\").concat(options.resource);\n var newOptions = _objectSpread(_objectSpread({}, options), {}, {\n uri: url,\n url: url\n });\n if (options.limit) {\n newOptions.qs[newOptions.limit.name] = limit;\n }\n return _this31.request(newOptions);\n }));\n case 11:\n results = _context14.sent;\n _iterator6 = _createForOfIteratorHelper(results);\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n result = _step6.value;\n if (result.body && result.body.items && result.body.items.length) {\n items = result.body.items;\n if ((0, _lodash.last)(items).published < items[0].published) {\n items.reverse();\n }\n list = list.concat(items);\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n case 14:\n _context14.next = 16;\n return _promise.default.all(list.map(function (item) {\n return _this31._recordUUIDs(item);\n }));\n case 16:\n return _context14.abrupt(\"return\", list);\n case 17:\n case \"end\":\n return _context14.stop();\n }\n }, _callee12);\n }))();\n },\n /**\n * @param {Object} params\n * @param {Object} options\n * @private\n * @returns {Promise}\n */\n _maybeCreateOneOnOneThenPost: function _maybeCreateOneOnOneThenPost(params, options) {\n var _this32 = this;\n return this.get((0, _lodash.defaults)({\n // the use of uniq in Conversation#create guarantees participant[1] will\n // always be the other user\n user: params.participants[1]\n }), (0, _assign.default)(options, {\n includeConvWithDeletedUserUUID: true,\n includeParticipants: true\n })).then(function (conversation) {\n if (params.comment || params.html) {\n return _this32.post(conversation, {\n content: params.html,\n displayName: params.comment\n }).then(function (activity) {\n conversation.activities.items.push(activity);\n return conversation;\n });\n }\n return conversation;\n }).catch(function (reason) {\n if (reason.statusCode !== 404) {\n return _promise.default.reject(reason);\n }\n return _this32._createOneOnOne(params);\n });\n },\n /**\n * @param {Object} params\n * @private\n * @returns {Object}\n */\n _prepareConversationForCreation: function _prepareConversationForCreation(params) {\n var _this33 = this;\n var payload = {\n activities: {\n items: [this.expand('create')]\n },\n objectType: 'conversation',\n kmsMessage: {\n method: 'create',\n uri: '/resources',\n userIds: (0, _lodash.cloneDeep)(params.participants),\n keyUris: []\n }\n };\n if (params.displayName) {\n payload.displayName = params.displayName;\n }\n if (params.tags) {\n payload.tags = params.tags;\n }\n params.participants.forEach(function (participant) {\n payload.activities.items.push(_this33.expand('add', {\n objectType: 'person',\n id: participant\n }));\n });\n if (params.comment) {\n payload.activities.items.push(this.expand('post', {\n objectType: 'comment',\n content: params.html,\n displayName: params.comment\n }));\n }\n if (!params.isDefaultClassification && params.classificationId) {\n payload.activities.items.push(this.expand('update', {\n objectType: 'classification',\n classificationId: params.classificationId,\n effectiveDate: params.effectiveDate\n }));\n }\n if (params.favorite) {\n payload.activities.items.push(this.expand('favorite', {\n objectType: 'conversation'\n }));\n }\n return payload;\n },\n /**\n * @param {Object} conversation\n * @private\n * @returns {Promise}\n */\n _recordUUIDs: function _recordUUIDs(conversation) {\n var _this34 = this;\n if (!conversation.participants || !conversation.participants.items) {\n return _promise.default.resolve(conversation);\n }\n return _promise.default.all(conversation.participants.items.map(function (participant) {\n // ROOMs or LYRA_SPACEs do not have email addresses, so there's no point attempting to\n // record their UUIDs.\n if (participant.type === 'ROOM' || participant.type === 'LYRA_SPACE') {\n return _promise.default.resolve();\n }\n return _this34.webex.internal.user.recordUUID(participant).catch(function (err) {\n return _this34.logger.warn('Could not record uuid', err);\n });\n }));\n },\n version: \"3.7.0-web-workers-keepalive.1\"\n});\n['favorite', 'hide', 'lock', 'mute', 'unfavorite', 'unhide', 'unlock', 'unmute'].forEach(function (verb) {\n Conversation.prototype[verb] = function submitSimpleActivity(conversation, activity) {\n var _this35 = this;\n var convoWithUrl = this.prepareConversation(_objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n }));\n return this.prepare(activity, {\n verb: verb,\n object: convoWithUrl,\n target: convoWithUrl\n }).then(function (a) {\n return _this35.submit(a);\n });\n };\n});\n['assignModerator', 'unassignModerator'].forEach(function (verb) {\n Conversation.prototype[verb] = function submitModerationChangeActivity(conversation, moderator, activity) {\n var _this36 = this;\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return _promise.default.all([convoWithUrl, moderator ? this.webex.internal.user.asUUID(moderator) : this.webex.internal.device.userId]).then(function (_ref7) {\n var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),\n c = _ref8[0],\n userId = _ref8[1];\n return _this36.prepare(activity, {\n verb: verb,\n target: _this36.prepareConversation(c),\n object: {\n id: userId,\n objectType: 'person'\n }\n });\n }).then(function (a) {\n return _this36.submit(a);\n });\n };\n});\n\n/**\n * Sets/unsets space property for convo\n * @param {Object} conversation\n * @param {string} tag\n * @param {Activity} activity\n * @returns {Promise}\n */\n['setSpaceProperty', 'unsetSpaceProperty'].forEach(function (fnName) {\n var verb = fnName.startsWith('set') ? 'set' : 'unset';\n Conversation.prototype[fnName] = function submitSpacePropertyActivity(conversation, tag, activity) {\n var _this37 = this;\n if (!(0, _lodash.isString)(tag)) {\n return _promise.default.reject(new Error('`tag` must be a string'));\n }\n var convoWithUrl = _objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n });\n return this.prepare(activity, {\n verb: verb,\n target: this.prepareConversation(convoWithUrl),\n object: {\n tags: [tag],\n objectType: 'spaceProperty'\n }\n }).then(function (a) {\n return _this37.submit(a);\n });\n };\n});\n['tag', 'untag'].forEach(function (verb) {\n Conversation.prototype[verb] = function submitObjectActivity(conversation, object, activity) {\n var _this38 = this;\n if (!(0, _lodash.isObject)(object)) {\n return _promise.default.reject(new Error('`object` must be an object'));\n }\n var c = this.prepareConversation(_objectSpread(_objectSpread({}, conversation), {}, {\n url: this.getConvoUrl(conversation)\n }));\n return this.prepare(activity, {\n verb: verb,\n target: c,\n object: (0, _assign.default)(c, object)\n }).then(function (a) {\n return _this38.submit(a);\n });\n };\n});\nvar _default = exports.default = Conversation;\n//# sourceMappingURL=conversation.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.InvalidUserCreation = exports.ConversationError = void 0;\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * General conversation error\n */\nvar ConversationError = exports.ConversationError = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(ConversationError, _Exception);\n var _super = _createSuper(ConversationError);\n function ConversationError() {\n (0, _classCallCheck2.default)(this, ConversationError);\n return _super.apply(this, arguments);\n }\n return (0, _createClass2.default)(ConversationError);\n}(_common.Exception);\n/**\n * InvalidUserCreation thrown when failed to create conversation with invalid user\n */\nvar InvalidUserCreation = exports.InvalidUserCreation = /*#__PURE__*/function (_ConversationError) {\n (0, _inherits2.default)(InvalidUserCreation, _ConversationError);\n var _super2 = _createSuper(InvalidUserCreation);\n function InvalidUserCreation() {\n (0, _classCallCheck2.default)(this, InvalidUserCreation);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(InvalidUserCreation);\n}(ConversationError);\n//# sourceMappingURL=convo-error.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.transforms = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _isInteger = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/number/is-integer\"));\nvar _lodash = require(\"lodash\");\nvar _toArray = _interopRequireDefault(require(\"./to-array\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar decryptTextProp = (0, _lodash.curry)(function (name, ctx, key, object) {\n return ctx.transform('decryptTextProp', name, key, object);\n});\n\n// eslint-disable-next-line import/prefer-default-export\nvar transforms = exports.transforms = (0, _toArray.default)('inbound', {\n /**\n * This function is used recursively to decrypt various properties on conversations, activities, etc\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS encryption key url\n * @param {Object} object Generic object that you want to decrypt some property on based on the type\n * @returns {Promise} Returns a transform promise\n */\n decryptObject: function decryptObject(ctx, key, object) {\n if (!object) {\n object = key; // eslint-disable-line no-param-reassign\n key = undefined; // eslint-disable-line no-param-reassign\n }\n\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.objectType) {\n return _promise.default.resolve();\n }\n if (!key && object.encryptionKeyUrl) {\n key = object.encryptionKeyUrl; // eslint-disable-line no-param-reassign\n }\n\n // Transcoded content was not showing up on the activities since the\n // decryptFile was not being called. Calling decryptFile for\n // transcodedContent fixes the issue.\n if (object.objectType === 'transcodedContent') {\n return _promise.default.all(object.files.items.map(function (item) {\n return ctx.transform('decryptFile', key, item);\n }));\n }\n return ctx.transform(\"decrypt\".concat((0, _lodash.capitalize)(object.objectType)), key, object);\n },\n /**\n * Decrypt an individual submit object from a cardAction activity\n * (object.objectType === 'submit')\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS key\n * @param {Object} object An instance of a Webex submit object\n * these objects are returned when a user clicks on a Action.Submit button in a card\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptSubmit: function decryptSubmit(ctx, key, object) {\n if (!object.inputs) {\n return _promise.default.resolve();\n }\n var decryptionFailureMessage = ctx.webex.internal.conversation.config.decryptionFailureMessage;\n return ctx.transform('decryptPropCardItem', 0, key, [object.inputs]).then(function (inputs) {\n object.inputs = JSON.parse(inputs[0]); // eslint-disable-line no-param-reassign\n }).catch(function (reason) {\n ctx.webex.logger.warn(\"plugin-conversation: failed to decrypt attachmentAction.inputs: \".concat(reason));\n object.inputs = decryptionFailureMessage; // eslint-disable-line no-param-reassign\n\n return _promise.default.resolve(decryptionFailureMessage);\n });\n },\n /**\n * Decrypt an individual reaction2Summary activity (object.objectType === 'reaction2Summary')\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS key\n * @param {Object} object An instance of a Webex reaction2Summary object\n * these objects are returned by various conversation APIs and over mercury\n * represents an aggregated summary of all reactions to a specific activity\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptReaction2summary: function decryptReaction2summary(ctx, key, object) {\n if (!object.reactions) {\n return _promise.default.resolve();\n }\n return _promise.default.all(object.reactions.map(function (reaction) {\n return ctx.transform('decryptPropDisplayName', key, reaction);\n }));\n },\n /**\n * Decrypt an individual reaction2SelfSummary activity (object.objectType === 'reaction2SelfSummary')\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS key\n * @param {Object} object An instance of a Webex reaction2SelfSummary object\n * these objects are returned by various conversation APIs and NOT over mercury\n * they are ONLY received by the self user\n * they represent ONLY the self user's reactions and are used for enforcing\n * limit of times they can react to a specific activity\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptReaction2selfsummary: function decryptReaction2selfsummary(ctx, key, object) {\n if (!object.reactions) {\n return _promise.default.resolve();\n }\n return _promise.default.all(object.reactions.map(function (reaction) {\n return ctx.transform('decryptPropDisplayName', key, reaction);\n }));\n },\n /**\n * Decrypt an individual reaction2 activity (object.objectType === 'reaction2')\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS key\n * @param {Object} object An instance of a Webex reaction2 object\n * these objects are returned by various conversation APIs and over mercury\n * ONLY self users receive these objects\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptReaction2: function decryptReaction2(ctx, key, object) {\n return ctx.transform('decryptPropDisplayName', key, object);\n },\n /**\n * Decrypt an individual threadObject\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {Object} threadObject An instance of a Webex threadObject (the objects returned by the /conversation/api/v1/threads api)\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptThread: function decryptThread(ctx, threadObject) {\n var promises = [];\n if (threadObject.childActivities && (0, _isArray.default)(threadObject.childActivities)) {\n promises = threadObject.childActivities.map(function (child) {\n return ctx.transform('decryptObject', null, child);\n });\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypt an individual meeting container activity\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {object} key KMS encryption key url\n * @param {Object} meetingContainerActivity An instance of a Webex meeting container activity\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptMeetingcontainer: function decryptMeetingcontainer(ctx, key, meetingContainerActivity) {\n var promises = [];\n if (meetingContainerActivity.displayName) {\n var usableKey = meetingContainerActivity.encryptionKeyUrl || key;\n promises.push(ctx.transform('decryptPropDisplayName', usableKey, meetingContainerActivity));\n }\n if (meetingContainerActivity.extensions) {\n var itemsToDecrypt = meetingContainerActivity.extensions.items.filter(function (item) {\n return item.data.objectType === 'recording';\n });\n itemsToDecrypt.forEach(function (itemToDecrypt) {\n promises.push(ctx.transform('decryptPropTopic', itemToDecrypt.encryptionKeyUrl, itemToDecrypt.data));\n });\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypts a given conversation and it's activities by building an array of promises that call\n * decryptObject, which may then call other decrypt functions\n *\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS encryption key url (or actual key?)\n * @param {Object} conversation A Webex conversation object\n * @returns {Promise} Returns the result of Promise.all\n */\n decryptConversation: function decryptConversation(ctx, key, conversation) {\n var promises = [];\n if (conversation.activities.items) {\n promises.push(_promise.default.all(conversation.activities.items.map(function (item) {\n return ctx.transform('decryptObject', null, item);\n })));\n }\n var usableKey = conversation.encryptionKeyUrl || key;\n var decryptionFailureMessage = ctx.webex.internal.conversation.config.decryptionFailureMessage;\n if (usableKey) {\n promises.push(ctx.transform('decryptPropDisplayName', usableKey, conversation).catch(function (error) {\n ctx.webex.logger.warn('plugin-conversation: failed to decrypt display name of ', conversation.url, error);\n _promise.default.resolve(decryptionFailureMessage);\n }));\n promises.push(ctx.transform('decryptPropContent', usableKey, conversation));\n }\n if (conversation.avatarEncryptionKeyUrl) {\n promises.push(ctx.transform('decryptObject', conversation.avatarEncryptionKeyUrl, conversation.avatar));\n }\n // TODO (holsted 04/06/19): This was deprecated in favor of .previousValue below. I wanted to remove this entirely\n // but I wasn't sure if some open source use cases may be reading from cached conversations or not so leaving it for now.\n if (conversation.previous) {\n promises.push(ctx.transform('decryptPropDisplayName', usableKey, conversation.previous));\n }\n if (conversation.previousValue) {\n promises.push(ctx.transform('decryptPropDisplayName', usableKey, conversation.previousValue));\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypt an individual activity\n * @param {Object} ctx An object containing a webex instance and a transform\n * @param {String} key KMS encryption key url (or actual key?)\n * @param {Object} activity An instance of a Webex activity\n * @returns {Promise} Returns a ctx.transform promise\n */\n decryptActivity: function decryptActivity(ctx, key, activity) {\n if (!activity.encryptionKeyUrl && !(activity.object && activity.object.encryptionKeyUrl)) {\n return _promise.default.resolve(activity);\n }\n var keyUrl = activity.encryptionKeyUrl || activity.object.encryptionKeyUrl || key;\n var promises = [];\n\n // iterate and recursively decrypt over children objects\n\n if (activity.children && (0, _isArray.default)(activity.children)) {\n promises = activity.children.map(function (child) {\n return ctx.transform('decryptObject', keyUrl, child.activity);\n });\n }\n promises.push(ctx.transform('decryptObject', keyUrl, activity.object));\n return _promise.default.all(promises);\n },\n /**\n * Decrypts a microappInstance (recording) model\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} microappInstance A microappInstance which includes several properties of a recording\n * @param {String} microappInstance.model An encrypted string which decrypts to an object\n * @returns {Promise} Returns a context transform\n */\n decryptMicroappinstance: function decryptMicroappinstance(ctx, key, microappInstance) {\n return ctx.transform('decryptPropModel', key, microappInstance);\n },\n /**\n * Decrypts a comment...\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} comment A comment object with a displayName and content (encrypted)\n * @returns {Promise} Returns the results of Promise.all on two transforms\n */\n decryptComment: function decryptComment(ctx, key, comment) {\n var promises = [ctx.transform('decryptPropDisplayName', key, comment), ctx.transform('decryptPropContent', key, comment)];\n if (comment.cards && (0, _isArray.default)(comment.cards)) {\n comment.cards.map(function (item, index) {\n return promises.push(ctx.transform('decryptPropCardItem', index, key, comment.cards));\n });\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypts a content field\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} content An object with properties to be decrypted\n * @returns {Promise} A promise that will return when the decryption has finished\n */\n decryptContent: function decryptContent(ctx, key, content) {\n if (content.contentCategory === 'links') {\n return ctx.transform('decryptContentLinks', key, content);\n }\n return ctx.transform('decryptContentFiles', key, content);\n },\n /**\n * Decrypts a content field which contains files and possibly links\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} content An object with properties to be decrypted\n * @param {Array} content.files An array of files to decrypt by calling decryptObject\n * @param {Array} content.links An array of links to decrypt by calling decryptObject\n * @returns {Promise} A promise that will return when the decryption has finished\n */\n decryptContentFiles: function decryptContentFiles(ctx, key, content) {\n if (!content.files || !content.files.items || !(0, _isArray.default)(content.files.items)) {\n return _promise.default.resolve();\n }\n var promises = content.files.items.map(function (item) {\n return ctx.transform('decryptObject', key, item);\n });\n promises.push(ctx.transform('decryptComment', key, content));\n if (content.links && content.links.items && (0, _isArray.default)(content.links.items)) {\n content.links.items.forEach(function (item) {\n return promises.push(ctx.transform('decryptObject', key, item));\n });\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypts a content field which contains links\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} content An object with properties to be decrypted\n * @param {Array} content.links An array of links to decrypt by calling decryptObject\n * @returns {Promise} A promise that will return when the decryption has finished\n */\n decryptContentLinks: function decryptContentLinks(ctx, key, content) {\n if (!content.links || !content.links.items || !(0, _isArray.default)(content.links.items)) {\n return _promise.default.resolve();\n }\n var promises = content.links.items.map(function (item) {\n return ctx.transform('decryptObject', key, item);\n });\n promises.push(ctx.transform('decryptComment', key, content));\n return _promise.default.all(promises);\n },\n /**\n * Decrypts what may be a meeting event?\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} event An object with a display name and location to be decrypted\n * @returns {Promise} Returns the result of Promise.all\n */\n decryptEvent: function decryptEvent(ctx, key, event) {\n var promises = [ctx.transform('decryptPropDisplayName', key, event)];\n if (event.location && event.location.split('.').length === 5) {\n promises.push(ctx.transform('decryptPropLocation', key, event));\n }\n return _promise.default.all(promises);\n },\n /**\n * Decrypts a file and it's transcodedContents if they exist\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} file A file object with file props an optional transcodedCollection to decrypt\n * @returns {Promise} Returns the result of Promise.all\n */\n decryptFile: function decryptFile(ctx, key, file) {\n // using object encryption keyUrl for images instead of activity encryptionKeyUrl\n if (file.encryptionKeyUrl && file.encryptionKeyUrl !== key) {\n key = file.encryptionKeyUrl;\n }\n return _promise.default.all([file.transcodedCollection && _promise.default.all(file.transcodedCollection.items.map(function (item) {\n return ctx.transform('decryptObject', key, item);\n })), ctx.transform('decryptPropScr', key, file), ctx.transform('decryptPropDisplayName', key, file), ctx.transform('decryptPropContent', key, file), file.image && ctx.transform('decryptPropScr', key, file.image)]);\n },\n /**\n * Decrypts a file and it's transcodedContents if they exist\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} link A link object with a URL to decrypt\n * @returns {Promise} Returns the result of Promise.all\n */\n decryptLink: function decryptLink(ctx, key, link) {\n return _promise.default.all([ctx.transform('decryptPropSslr', key, link), ctx.transform('decryptPropDisplayName', key, link)]);\n },\n /**\n * Decrypts transcoded file content. Calls decryptFile\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} transcodedContent Transcoded content with a files prop\n * @returns {Promise} Returns the result of Promise.all\n */\n decryptTranscodedContent: function decryptTranscodedContent(ctx, key, transcodedContent) {\n return _promise.default.all(transcodedContent.files.items.map(function (item) {\n return ctx.transform('decryptFile', key, item);\n }));\n },\n /**\n * Decrypts an image uri\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {String} imageURI URI of the image to decrypt\n * @returns {Promise} Returns a promise.\n */\n decryptImageURI: function decryptImageURI(ctx, key, imageURI) {\n return ctx.transform('decryptPropLocation', key, imageURI);\n },\n /**\n * The heart of most decryption logic ends here. Decrypting text.\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} name Property of an object to be decrypted\n * @param {String} key KMS key\n * @param {Object} object A generic object with text props to be decrypted\n * @returns {Promise} Returns a lonely Promise\n */\n decryptTextProp: function decryptTextProp(ctx, name, key, object) {\n if (!object[name]) {\n return _promise.default.resolve();\n }\n var decryptionFailureMessage = ctx.webex.internal.conversation.config.decryptionFailureMessage;\n return ctx.webex.internal.encryption.decryptText(key, object[name]).then(function (plaintext) {\n if (ctx.webex.config.conversation.keepEncryptedProperties) {\n var encryptedPropName = (0, _lodash.camelCase)(\"encrypted_\".concat(name));\n object[encryptedPropName] = object[name]; // eslint-disable-line no-param-reassign\n }\n\n object[name] = plaintext; // eslint-disable-line no-param-reassign\n }).catch(function (reason) {\n ctx.webex.logger.warn(\"plugin-conversation: failed to decrypt \".concat(name, \" \"), reason);\n object[name] = decryptionFailureMessage; // eslint-disable-line no-param-reassign\n\n return _promise.default.resolve(decryptionFailureMessage);\n });\n },\n /**\n * Decrypting an element in an Array.\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {Integer} index Property of an object to be decrypted\n * @param {String} key KMS key\n * @param {Array} array An array of Strings to be decrypted\n * @returns {Promise} Returns a lonely Promise\n */\n decryptPropCardItem: function decryptPropCardItem(ctx, index, key, array) {\n if (!(0, _isInteger.default)(index) || !array || !(0, _isArray.default)(array) || index < 0 || index >= array.length || !(array[index] instanceof String || typeof array[index] === 'string')) {\n return _promise.default.resolve();\n }\n var decryptionFailureMessage = ctx.webex.internal.conversation.config.decryptionFailureMessage;\n return ctx.webex.internal.encryption.decryptText(key, array[index]).then(function (plaintext) {\n array[index] = plaintext; // eslint-disable-line no-param-reassign\n }).catch(function (reason) {\n ctx.webex.logger.warn(\"plugin-conversation: failed to decrypt card at \".concat(index, \" \"), reason);\n array[index] = decryptionFailureMessage; // eslint-disable-line no-param-reassign\n\n return _promise.default.resolve(decryptionFailureMessage);\n });\n },\n /**\n * Decrypts the src of an object (for images?)\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} object An object with a scr property to be decrypted\n * @returns {Promise} Returns a promise\n */\n decryptPropScr: function decryptPropScr(ctx, key, object) {\n return ctx.webex.internal.encryption.decryptScr(key, object.scr).then(function (scr) {\n object.scr = scr; // eslint-disable-line no-param-reassign\n });\n },\n /**\n * Decrypts the sslr object\n * @param {Object} ctx An object containing a webex instance and transform prop\n * @param {String} key KMS key\n * @param {Object} object An object with a sslr property to be decrypted\n * @returns {Promise} Returns a promise\n */\n decryptPropSslr: function decryptPropSslr(ctx, key, object) {\n return ctx.webex.internal.encryption.decryptScr(key, object.sslr).then(function (sslr) {\n object.sslr = sslr; // eslint-disable-line no-param-reassign\n });\n },\n\n decryptPropDisplayName: decryptTextProp('displayName'),\n decryptPropContent: decryptTextProp('content'),\n decryptPropModel: decryptTextProp('model'),\n decryptPropLocation: decryptTextProp('location'),\n decryptPropTopic: decryptTextProp('topic')\n});\n//# sourceMappingURL=decryption-transforms.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.transforms = void 0;\nvar _symbol = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/symbol\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _lodash = require(\"lodash\");\nvar _toArray = _interopRequireDefault(require(\"./to-array\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar KEY = (0, _symbol.default)('KEY');\nvar encryptTextProp = (0, _lodash.curry)(function (name, ctx, key, object) {\n return ctx.transform('encryptTextProp', name, key, object);\n});\nvar encryptJsonProp = (0, _lodash.curry)(function (name, ctx, key, object) {\n return ctx.transform('encryptJsonProp', name, key, object);\n});\n\n// eslint-disable-next-line import/prefer-default-export\nvar transforms = exports.transforms = (0, _toArray.default)('outbound', {\n encryptObject: function encryptObject(ctx, key, object) {\n if (!object) {\n object = key;\n key = undefined;\n }\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.objectType) {\n return _promise.default.resolve();\n }\n if (key === false) {\n return _promise.default.resolve();\n }\n return ctx.transform(\"encrypt\".concat((0, _lodash.capitalize)(object.objectType)), key, object);\n },\n encryptReaction2: function encryptReaction2(ctx, key, reaction2) {\n return ctx.transform('encryptPropDisplayName', key, reaction2);\n },\n encryptConversation: function encryptConversation(ctx, key, conversation) {\n if (key === false) {\n return _promise.default.resolve();\n }\n return _promise.default.resolve(key || ctx.webex.internal.encryption.kms.createUnboundKeys({\n count: 1\n })).then(function (keys) {\n var k = (0, _lodash.isArray)(keys) ? keys[0] : keys;\n if ((0, _lodash.has)(conversation, 'kmsMessage.keyUris') && !conversation.kmsMessage.keyUris.includes(k.uri)) {\n conversation.kmsMessage.keyUris.push(k.uri);\n }\n return _promise.default.all([\n // too many implicit returns on the same line is difficult to interpret\n // eslint-disable-next-line arrow-body-style\n (0, _lodash.has)(conversation, 'activities.items') && conversation.activities.items.reduce(function (p, activity) {\n // eslint-disable-next-line max-nested-callbacks\n return p.then(function () {\n return ctx.transform('encryptObject', k, activity);\n });\n }, _promise.default.resolve()), ctx.transform('encryptPropDisplayName', k, conversation)]).then(function () {\n conversation.encryptionKeyUrl = k.uri || k;\n // we only want to set the defaultActivityEncryptionKeyUrl if we've\n // bound a new key\n if (!key) {\n conversation.defaultActivityEncryptionKeyUrl = conversation.defaultActivityEncryptionKeyUrl || k.uri || k;\n }\n });\n });\n },\n encryptActivity: function encryptActivity(ctx, key, activity) {\n var _activity$target, _activity$object, _activity$object2;\n // Meeting Container policy update requests do not need to be encrypted.\n if ((activity === null || activity === void 0 ? void 0 : (_activity$target = activity.target) === null || _activity$target === void 0 ? void 0 : _activity$target.objectType) === 'meetingContainer' && (activity === null || activity === void 0 ? void 0 : (_activity$object = activity.object) === null || _activity$object === void 0 ? void 0 : _activity$object.objectType) === 'policies') {\n return _promise.default.resolve();\n }\n\n // Activity is already encrypted\n if (activity.encryptionKeyUrl || ((_activity$object2 = activity.object) === null || _activity$object2 === void 0 ? void 0 : _activity$object2.created) === 'True') {\n return _promise.default.resolve();\n }\n return ctx.transform(\"encrypt\".concat((0, _lodash.capitalize)(activity.verb), \"Activity\"), key, activity).then(function () {\n key = key || activity[KEY];\n return ctx.transform('prepareActivityKmsMessage', key, activity);\n });\n },\n encryptVerbActivity: function encryptVerbActivity(ctx, key, activity) {\n return ctx.transform('maybeEncryptTarget', key, activity).then(function () {\n key = key || activity[KEY];\n }).then(function () {\n return ctx.transform('encryptObject', key, activity.object);\n });\n },\n maybeEncryptTarget: function maybeEncryptTarget(ctx, key, activity) {\n // This isn't quite right; if we just go by key, we have no guarantee that\n // we have a proper KRO available for add activities\n if (key) {\n return _promise.default.resolve();\n }\n if ((0, _lodash.has)(activity, 'target.defaultActivityEncryptionKeyUrl') && activity.target.defaultActivityEncryptionKeyUrl && (0, _lodash.has)(activity, 'target.kmsResourceObjectUrl')) {\n activity[KEY] = key || activity.target.defaultActivityEncryptionKeyUrl;\n return _promise.default.resolve();\n }\n var conversationUrl = activity.target && activity.target.url;\n if (!conversationUrl) {\n return _promise.default.reject(new Error(\"Cannot determine encryption key for activity's conversation; no key url or conversation url provided\"));\n }\n return ctx.webex.internal.conversation.get({\n url: conversationUrl\n }).then(function (conversation) {\n if (!conversation.defaultActivityEncryptionKeyUrl) {\n return ctx.webex.internal.conversation.updateKey(conversation).then(function (updateKeyActivity) {\n if (updateKeyActivity.kmsMessage.resource) {\n activity.target.kmsResourceObjectUrl = updateKeyActivity.kmsMessage.resource.uri;\n }\n activity[KEY] = activity.target.defaultActivityEncryptionKeyUrl = updateKeyActivity.object.defaultActivityEncryptionKeyUrl;\n });\n }\n if (!activity.target.defaultActivityEncryptionKeyUrl) {\n ctx.webex.logger.warn('plugin-conversation: downloaded conversation to determine its defaultActivityEncryptionKeyUrl; make sure to pass all encryption related properties when calling Webex.conversation methods.');\n }\n if (!activity.target.kmsResourceObjectUrl) {\n ctx.webex.logger.warn('plugin-conversation: downloaded conversation to determine its kmsResourceObjectUrl; make sure to pass all encryption related properties when calling Webex.conversation methods.');\n }\n activity[KEY] = activity.target.defaultActivityEncryptionKeyUrl = conversation.defaultActivityEncryptionKeyUrl;\n activity.target.kmsResourceObjectUrl = conversation.kmsResourceObjectUrl;\n return _promise.default.resolve();\n });\n },\n prepareActivityKmsMessage: function prepareActivityKmsMessage(ctx, key, activity) {\n if (activity.kmsMessage) {\n if (!key && activity.verb === 'delete') {\n key = (0, _lodash.get)(activity, 'target.defaultActivityEncryptionKeyUrl');\n }\n if (!key && activity.verb === 'updateKey' && (0, _lodash.has)(activity, 'object.defaultActivityEncryptionKeyUrl')) {\n key = (0, _lodash.get)(activity, 'object.defaultActivityEncryptionKeyUrl');\n }\n if (!key && activity.verb === 'leave' && (0, _lodash.has)(activity, 'target.defaultActivityEncryptionKeyUrl')) {\n key = (0, _lodash.get)(activity, 'target.defaultActivityEncryptionKeyUrl');\n }\n if (key) {\n var kro = activity.target.kmsResourceObjectUrl;\n ['uri', 'resourceUri'].forEach(function (k) {\n if (activity.kmsMessage[k] && !kro && activity.kmsMessage[k].includes('')) {\n throw new Error('encrypter: cannot determine kro');\n }\n if (activity.kmsMessage[k]) {\n activity.kmsMessage[k] = activity.kmsMessage[k].replace('', kro);\n // key may be a key or a key url\n activity.kmsMessage[k] = activity.kmsMessage[k].replace('', key.keyUrl || key);\n }\n });\n }\n // If we made it this far and still don't have an encryption key, assume\n // this is a conversation that is not encrypted and we're performing an\n // action that should not encrypt it (e.g. `leave`)\n else {\n (0, _deleteProperty.default)(activity, 'kmsMessage');\n }\n }\n },\n encryptVerbActivityWithKey: {\n direction: 'outbound',\n fn: function fn(ctx, key, activity) {\n return ctx.transform('encryptVerbActivity', key, activity).then(function () {\n key = key || activity[KEY];\n activity.encryptionKeyUrl = key.uri || key;\n });\n }\n },\n encryptAddActivity: {\n direction: 'outbound',\n fn: function fn(ctx, key, activity) {\n if ((0, _lodash.has)(activity, 'object.objectType') && activity.object.objectType === 'reaction2') {\n return ctx.transform('encryptVerbActivityWithKey', key, activity);\n }\n return ctx.transform('encryptVerbActivity', key, activity);\n }\n },\n encryptAssignActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivityWithKey'\n },\n encryptCreateActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivity'\n },\n encryptPostActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivityWithKey'\n },\n encryptShareActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivityWithKey'\n },\n encryptCardactionActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivityWithKey'\n },\n encryptUpdateActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivityWithKey'\n },\n encryptUpdateKeyActivity: {\n direction: 'outbound',\n alias: 'encryptVerbActivity'\n },\n encryptComment: function encryptComment(ctx, key, comment) {\n return _promise.default.all([ctx.transform('encryptPropDisplayName', key, comment), ctx.transform('encryptPropContent', key, comment)]);\n },\n encryptContent: function encryptContent(ctx, key, content) {\n var promises = content.files.items.map(function (item) {\n return ctx.transform('encryptObject', key, item);\n });\n promises.push(ctx.transform('encryptPropContent', key, content));\n promises.push(ctx.transform('encryptPropDisplayName', key, content));\n return _promise.default.all(promises);\n },\n encryptFile: function encryptFile(ctx, key, file) {\n if (file.image && !file.image.scr) {\n return _promise.default.reject(new Error('`file.image` must have an `scr`'));\n }\n return _promise.default.all([ctx.transform('encryptPropScr', key, file), ctx.transform('encryptPropDisplayName', key, file), ctx.transform('encryptPropContent', key, file), file.image && ctx.transform('encryptPropScr', key, file.image)]);\n },\n encryptSubmit: function encryptSubmit(ctx, key, submit) {\n return ctx.transform('encryptPropInputs', key, submit);\n },\n // TODO is this used for anything other than the now-removed stickies service?\n encryptImageURI: function encryptImageURI(ctx, key, imageURI) {\n return ctx.transform('encryptPropLocation', key, imageURI);\n },\n encryptPropContent: encryptTextProp('content'),\n encryptPropDisplayName: encryptTextProp('displayName'),\n encryptPropInputs: encryptJsonProp('inputs'),\n encryptPropLocation: encryptTextProp('location'),\n encryptPropScr: function encryptPropScr(ctx, key, object) {\n if (!object.scr) {\n return _promise.default.resolve();\n }\n return ctx.webex.internal.encryption.encryptScr(key, object.scr).then(function (scr) {\n object.scr = scr;\n });\n },\n encryptJsonProp: function encryptJsonProp(ctx, name, key, object) {\n if (!object[name]) {\n return _promise.default.resolve();\n }\n return ctx.webex.internal.encryption.encryptText(key.uri || key, (0, _stringify.default)(object[name])).then(function (ciphertext) {\n object[name] = ciphertext;\n });\n },\n encryptTextProp: function encryptTextProp(ctx, name, key, object) {\n if (!object[name]) {\n return _promise.default.resolve();\n }\n return ctx.webex.internal.encryption.encryptText(key.uri || key, object[name]).then(function (ciphertext) {\n object[name] = ciphertext;\n });\n }\n});\n//# sourceMappingURL=encryption-transforms.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"ConversationError\", {\n enumerable: true,\n get: function get() {\n return _convoError.ConversationError;\n }\n});\n_Object$defineProperty(exports, \"InvalidUserCreation\", {\n enumerable: true,\n get: function get() {\n return _convoError.InvalidUserCreation;\n }\n});\n_Object$defineProperty(exports, \"ShareActivity\", {\n enumerable: true,\n get: function get() {\n return _shareActivity.default;\n }\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _conversation.default;\n }\n});\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nrequire(\"@webex/internal-plugin-encryption\");\nrequire(\"@webex/internal-plugin-user\");\nvar _common = require(\"@webex/common\");\nvar _helperHtml = require(\"@webex/helper-html\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _lodash = require(\"lodash\");\nvar _conversation = _interopRequireDefault(require(\"./conversation\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _shareActivity = _interopRequireDefault(require(\"./share-activity\"));\nvar _convoError = require(\"./convo-error\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('conversation', _conversation.default, {\n payloadTransformer: {\n predicates: [{\n name: 'transformObject',\n test: function test(ctx, optionsOrResponse) {\n return _promise.default.resolve((0, _lodash.has)(optionsOrResponse, 'body.objectType'));\n },\n extract: function extract(optionsOrResponse) {\n return _promise.default.resolve(optionsOrResponse.body);\n }\n }, {\n name: 'transformObject',\n direction: 'inbound',\n test: function test(ctx, event) {\n return _promise.default.resolve((0, _lodash.has)(event, 'activity'));\n },\n extract: function extract(event) {\n return _promise.default.resolve(event.activity);\n }\n }, {\n name: 'transformObjectArray',\n direction: 'inbound',\n test: function test(ctx, response) {\n return _promise.default.resolve((0, _lodash.has)(response, 'body.multistatus'));\n },\n extract: function extract(response) {\n return _promise.default.resolve(response.body.multistatus.map(function (item) {\n return item && item.data && item.data.activity;\n }));\n }\n }, {\n name: 'normalizeConversationListAndBindDecrypters',\n direction: 'inbound',\n test: function test(ctx, options) {\n if (!(0, _lodash.has)(options, 'body.items[0].objectType')) {\n return _promise.default.resolve(false);\n }\n if ((0, _lodash.get)(options, 'options.deferDecrypt')) {\n return _promise.default.resolve(true);\n }\n return _promise.default.resolve(false);\n },\n extract: function extract(options) {\n return _promise.default.resolve(options.body.items);\n }\n }, {\n name: 'transformObjectArray',\n direction: 'inbound',\n test: function test(ctx, options) {\n if (!(0, _lodash.has)(options, 'body.items[0].objectType')) {\n return _promise.default.resolve(false);\n }\n if ((0, _lodash.get)(options, 'options.deferDecrypt')) {\n return _promise.default.resolve(false);\n }\n return _promise.default.resolve(true);\n },\n extract: function extract(options) {\n return _promise.default.resolve(options.body.items);\n }\n }, {\n name: 'transformThreadArray',\n direction: 'inbound',\n test: function test(ctx, options) {\n if (!(0, _lodash.has)(options, 'body.items[0].childType') || !(0, _lodash.has)(options, 'body.items[0].actorId')) {\n return _promise.default.resolve(false);\n }\n if ((0, _lodash.get)(options, 'options.deferDecrypt')) {\n return _promise.default.resolve(false);\n }\n return _promise.default.resolve(true);\n },\n extract: function extract(options) {\n return _promise.default.resolve(options.body.items);\n }\n }],\n transforms: [{\n name: 'normalizeConversationListAndBindDecrypters',\n fn: function fn(ctx, array) {\n return _promise.default.all(array.map(function (item) {\n return ctx.transform('normalizeObject', item).then(function () {\n item.decrypt = function decrypt() {\n (0, _deleteProperty.default)(item, 'decrypt');\n return ctx.transform('decryptObject', item);\n };\n return item;\n });\n }));\n }\n }, {\n name: 'transformObjectArray',\n fn: function fn(ctx, array) {\n return _promise.default.all(array.map(function (item) {\n return ctx.transform('transformObject', item);\n }));\n }\n }, {\n name: 'transformThreadArray',\n fn: function fn(ctx, array) {\n return _promise.default.all(array.map(function (item) {\n return ctx.transform('transformThread', item);\n }));\n }\n }, {\n name: 'transformObject',\n direction: 'outbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.objectType) {\n return _promise.default.resolve();\n }\n return ctx.transform('normalizeObject', object).then(function () {\n return ctx.transform('encryptObject', object);\n }).then(function () {\n return ctx.transform('encryptKmsMessage', object);\n });\n }\n }, {\n name: 'transformObject',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.objectType) {\n return _promise.default.resolve();\n }\n return ctx.transform('decryptObject', object).then(function () {\n return ctx.transform('normalizeObject', object);\n });\n }\n }, {\n name: 'normalizeObject',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n if (!object.objectType) {\n return _promise.default.resolve();\n }\n return _promise.default.all([ctx.transform(\"normalize\".concat((0, _lodash.capitalize)(object.objectType)), object), ctx.transform('normalizePropContent', object)]);\n }\n }, {\n name: 'transformThread',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object) {\n return _promise.default.resolve();\n }\n return ctx.transform('decryptThread', object).then(function () {\n return ctx.transform('normalizeThread', object);\n });\n }\n }, {\n name: 'normalizePropContent',\n direction: 'inbound',\n fn: function fn(ctx, object) {\n if (!object.content) {\n return _promise.default.resolve();\n }\n var _ctx$webex$config$con = ctx.webex.config.conversation,\n inboundProcessFunc = _ctx$webex$config$con.inboundProcessFunc,\n allowedInboundTags = _ctx$webex$config$con.allowedInboundTags,\n allowedInboundStyles = _ctx$webex$config$con.allowedInboundStyles;\n return (0, _helperHtml.filter)(inboundProcessFunc, allowedInboundTags || {}, allowedInboundStyles, object.content).then(function (c) {\n object.content = c;\n });\n }\n }, {\n name: 'normalizePropContent',\n direction: 'outbound',\n fn: function fn(ctx, object) {\n if (!object.content) {\n return _promise.default.resolve();\n }\n var _ctx$webex$config$con2 = ctx.webex.config.conversation,\n outboundProcessFunc = _ctx$webex$config$con2.outboundProcessFunc,\n allowedOutboundTags = _ctx$webex$config$con2.allowedOutboundTags,\n allowedOutboundStyles = _ctx$webex$config$con2.allowedOutboundStyles;\n return (0, _helperHtml.filterEscape)(outboundProcessFunc, allowedOutboundTags || {}, allowedOutboundStyles, object.content).then(function (c) {\n object.content = c;\n });\n }\n }, {\n name: 'normalizeConversation',\n fn: function fn(ctx, conversation) {\n conversation.activities = conversation.activities || {};\n conversation.activities.items = conversation.activities.items || [];\n conversation.participants = conversation.participants || {};\n conversation.participants.items = conversation.participants.items || [];\n return _promise.default.all([_promise.default.all(conversation.activities.items.map(function (item) {\n return ctx.transform('normalizeObject', item);\n })), _promise.default.all(conversation.participants.items.map(function (item) {\n return ctx.transform('normalizeObject', item);\n }))]);\n }\n }, {\n name: 'normalizeActivity',\n fn: function fn(ctx, activity) {\n return _promise.default.all([ctx.transform('normalizeObject', activity.actor), ctx.transform('normalizeObject', activity.object), ctx.transform('normalizeObject', activity.target)]);\n }\n }, {\n name: 'normalizeThread',\n fn: function fn(ctx, threadActivity) {\n // childActivities are of type Activity\n return _promise.default.all(threadActivity.childActivities.map(function (item) {\n return ctx.transform('normalizeObject', item);\n }));\n }\n }, {\n name: 'normalizePerson',\n // eslint-disable-next-line complexity\n fn: function fn(ctx, person) {\n var email = person.entryEmail || person.emailAddress || person.id;\n var id = person.entryUUID || person.id;\n if (_common.patterns.email.test(email)) {\n person.entryEmail = person.emailAddress = email.toLowerCase();\n } else {\n (0, _deleteProperty.default)(person, 'entryEmail');\n (0, _deleteProperty.default)(person, 'emailAddress');\n }\n if (person.roomProperties) {\n person.roomProperties.isModerator = Boolean(person.roomProperties.isModerator);\n }\n if (_common.patterns.uuid.test(id)) {\n person.entryUUID = person.id = id.toLowerCase();\n return _promise.default.resolve(person);\n }\n if (!email) {\n return _promise.default.reject(new Error('cannot determine id without an `emailAddress` or `entryUUID` property'));\n }\n return ctx.webex.internal.user.asUUID(email).then(function (uuid) {\n person.entryUUID = person.id = uuid;\n return person;\n });\n }\n }]\n },\n config: _config.default\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Array$from = require(\"@babel/runtime-corejs2/core-js/array/from\");\nvar _Symbol2 = require(\"@babel/runtime-corejs2/core-js/symbol\");\nvar _Symbol$iterator = require(\"@babel/runtime-corejs2/core-js/symbol/iterator\");\nvar _Array$isArray = require(\"@babel/runtime-corejs2/core-js/array/is-array\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.FILE_SYMBOL = exports.EMITTER_SYMBOL = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _symbol = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/symbol\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _events = require(\"events\");\nvar _nodeScr = _interopRequireDefault(require(\"node-scr\"));\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _lodash = require(\"lodash\");\nvar _helperImage = require(\"@webex/helper-image\");\nvar _sha = _interopRequireDefault(require(\"crypto-js/sha256\"));\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol2 !== \"undefined\" && o[_Symbol$iterator] || o[\"@@iterator\"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _Array$from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar EMITTER_SYMBOL = exports.EMITTER_SYMBOL = (0, _symbol.default)('EMITTER_SYMBOL');\nvar FILE_SYMBOL = exports.FILE_SYMBOL = (0, _symbol.default)('FILE_SYMBOL');\nvar PROMISE_SYMBOL = (0, _symbol.default)('PROMISE_SYMBOL');\n\n/**\n * @class\n */\nvar ShareActivity = _webexCore.WebexPlugin.extend({\n getSymbols: function getSymbols() {\n return {\n file: FILE_SYMBOL,\n emitter: EMITTER_SYMBOL\n };\n },\n namespace: 'Conversation',\n derived: {\n target: {\n deps: ['conversation'],\n fn: function fn() {\n return this.conversation;\n }\n }\n },\n session: {\n claimedFileType: 'string',\n conversation: {\n required: true,\n type: 'object'\n },\n content: 'string',\n clientTempId: 'string',\n displayName: 'string',\n enableThumbnails: {\n default: true,\n type: 'boolean'\n },\n hiddenSpaceUrl: 'object',\n mentions: 'object',\n spaceUrl: 'object',\n uploads: {\n type: 'object',\n default: function _default() {\n return new _map.default();\n }\n }\n },\n initialize: function initialize(attrs, options) {\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.initialize, this, [attrs, options]);\n if (attrs && attrs.conversation) {\n this.spaceUrl = _promise.default.resolve(attrs.conversation._spaceUrl || this._retrieveSpaceUrl(\"\".concat(attrs.conversation.url, \"/space\")).then(function (url) {\n attrs.conversation._spaceUrl = url;\n return url;\n }));\n this.hiddenSpaceUrl = _promise.default.resolve(attrs.conversation._hiddenSpaceUrl || this._retrieveSpaceUrl(\"\".concat(attrs.conversation.url, \"/space/hidden\")).then(function (url) {\n attrs.conversation._hiddenSpaceUrl = url;\n return url;\n }));\n }\n },\n /**\n * Adds an additional GIF to the share activity\n * Different from regular add to skip uploading to webex files service\n * @param {File} gif\n * @param {File} gif.image // thumbnail\n * @param {Object} options\n * @param {Object} options.actions\n * @returns {Promise}\n */\n addGif: function addGif(gif, options) {\n var gifToAdd = this.uploads.get(gif);\n\n // If the gif already exists, then don't do anything\n if (gifToAdd) {\n return _promise.default.resolve();\n }\n gifToAdd = _objectSpread((0, _defineProperty2.default)({\n displayName: gif.name,\n fileSize: gif.size || gif.byteLength || gif.length,\n mimeType: gif.type,\n url: 'https://giphy.com',\n objectType: 'file',\n height: gif.height,\n width: gif.width,\n image: {\n height: gif.image.height,\n width: gif.image.width,\n url: 'https://giphy.com'\n }\n }, FILE_SYMBOL, gif), (0, _lodash.pick)(options, 'actions'));\n this.uploads.set(gif, gifToAdd);\n\n /* Instead of encryptBinary, which produces a encrypted version of\n * the file for upload and a SCR (contains info needed to encrypt the\n * SCR itself and the displayName), we directly create an SCR.\n * Because we are skipping uploading, the encrypted file is not needed.\n */\n return _nodeScr.default.create().then(function (scr) {\n scr.loc = gif.url;\n gifToAdd.scr = scr;\n return _nodeScr.default.create();\n }).then(function (thumbnailScr) {\n thumbnailScr.loc = gif.image.url;\n gifToAdd.image.scr = thumbnailScr;\n });\n },\n /**\n * Adds an additional file to the share and begins submitting it to webex\n * files\n * @param {File} file\n * @param {Object} options\n * @param {Object} options.actions\n * @returns {EventEmittingPromise}\n */\n add: function add(file, options) {\n var _this = this;\n options = options || {};\n options.claimedFileType = file.name.substring(file.name.lastIndexOf('.'));\n var upload = this.uploads.get(file);\n if (upload) {\n return upload[PROMISE_SYMBOL];\n }\n var emitter = new _events.EventEmitter();\n upload = _objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)({\n displayName: file.name,\n fileSize: file.size || file.byteLength || file.length,\n mimeType: file.type,\n objectType: 'file'\n }, EMITTER_SYMBOL, emitter), FILE_SYMBOL, file), (0, _lodash.pick)(options, 'actions'));\n this.uploads.set(file, upload);\n var promise = (0, _helperImage.detectFileType)(file, this.logger).then(function (type) {\n upload.mimeType = type;\n return (0, _helperImage.processImage)({\n file: file,\n type: type,\n thumbnailMaxWidth: _this.config.thumbnailMaxWidth,\n thumbnailMaxHeight: _this.config.thumbnailMaxHeight,\n enableThumbnails: _this.enableThumbnails,\n logger: _this.logger\n });\n }).then(function (imageData) {\n var main = _this.webex.internal.encryption.encryptBinary(file).then(function (_ref) {\n var scr = _ref.scr,\n cdata = _ref.cdata;\n upload.scr = scr;\n return _promise.default.all([cdata, _this.spaceUrl]);\n }).then(function (_ref2) {\n var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),\n cdata = _ref3[0],\n spaceUrl = _ref3[1];\n var uploadPromise = _this._upload(cdata, \"\".concat(spaceUrl, \"/upload_sessions\"), options);\n (0, _common.transferEvents)('progress', uploadPromise, emitter);\n return uploadPromise;\n }).then(function (metadata) {\n upload.url = upload.scr.loc = metadata.downloadUrl;\n });\n var thumb;\n if (imageData) {\n var _imageData = (0, _slicedToArray2.default)(imageData, 3),\n thumbnail = _imageData[0],\n fileDimensions = _imageData[1],\n thumbnailDimensions = _imageData[2];\n (0, _assign.default)(upload, fileDimensions);\n if (thumbnail && thumbnailDimensions) {\n upload.image = thumbnailDimensions;\n thumb = _this.webex.internal.encryption.encryptBinary(thumbnail).then(function (_ref4) {\n var scr = _ref4.scr,\n cdata = _ref4.cdata;\n upload.image.scr = scr;\n return _promise.default.all([cdata, _this.hiddenSpaceUrl]);\n }).then(function (_ref5) {\n var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),\n cdata = _ref6[0],\n spaceUrl = _ref6[1];\n return _this._upload(cdata, \"\".concat(spaceUrl, \"/upload_sessions\"));\n }).then(function (metadata) {\n upload.image.url = upload.image.scr.loc = metadata.downloadUrl;\n });\n }\n }\n return _promise.default.all([main, thumb]);\n });\n upload[PROMISE_SYMBOL] = promise;\n (0, _common.proxyEvents)(emitter, promise);\n return promise;\n },\n /**\n * Fetches the files from the share\n * @returns {Array}\n */\n getFiles: function getFiles() {\n var files = [];\n var _iterator = _createForOfIteratorHelper(this.uploads),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = (0, _slicedToArray2.default)(_step.value, 1),\n key = _step$value[0];\n files.push(this.uploads.get(key)[FILE_SYMBOL]);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return files;\n },\n /**\n * @param {File} file\n * @param {string} uri\n * @param {Object} uploadOptions - Optional object adding additional params to request body\n * @private\n * @returns {Promise}\n */\n _upload: function _upload(file, uri, uploadOptions) {\n var fileSize = file.length || file.size || file.byteLength;\n var fileHash = (0, _sha.default)(file).toString();\n var _ref7 = uploadOptions !== null && uploadOptions !== void 0 ? uploadOptions : {},\n role = _ref7.role,\n claimedFileType = _ref7.claimedFileType;\n var initializeBody = _objectSpread({\n fileSize: fileSize,\n claimedFileType: claimedFileType\n }, role && {\n role: role\n });\n return this.webex.upload({\n uri: uri,\n file: file,\n qs: {\n transcode: true\n },\n phases: {\n initialize: {\n body: initializeBody\n },\n upload: {\n $url: function $url(session) {\n return session.uploadUrl;\n }\n },\n finalize: {\n $uri: function $uri(session) {\n return session.finishUploadUrl;\n },\n body: {\n fileSize: fileSize,\n fileHash: fileHash\n }\n }\n }\n });\n },\n /**\n * Removes the specified file from the share (Does not currently delete the\n * uploaded file)\n * @param {File} file\n * @returns {Promise}\n */\n remove: function remove(file) {\n this.uploads.delete(file);\n\n // Returns a promise for future-proofiness.\n return _promise.default.resolve();\n },\n /**\n * @private\n * @returns {Promise}\n */\n prepare: function prepare() {\n if (!this.uploads.size) {\n throw new Error('Cannot submit a share activity without at least one file');\n }\n var activity = {\n verb: 'share',\n object: {\n objectType: 'content',\n displayName: this.object && this.object.displayName ? this.object.displayName : undefined,\n content: this.object && this.object.content ? this.object.content : undefined,\n mentions: this.object && this.object.mentions ? this.object.mentions : undefined,\n files: {\n items: []\n }\n },\n clientTempId: this.clientTempId\n };\n var promises = [];\n this.uploads.forEach(function (item) {\n activity.object.files.items.push(item);\n promises.push(item[PROMISE_SYMBOL]);\n });\n activity.object.contentCategory = this._determineContentCategory(activity.object.files.items);\n return _promise.default.all(promises).then(function () {\n return activity;\n });\n },\n /**\n * @param {Array} items\n * @param {string} mimeType\n * @private\n * @returns {boolean}\n */\n _itemContainsActionWithMimeType: function _itemContainsActionWithMimeType(items, mimeType) {\n return (0, _lodash.some)(items.map(function (item) {\n return (0, _lodash.some)(item.actions, {\n mimeType: mimeType\n });\n }));\n },\n /**\n * @param {Array} items\n * @private\n * @returns {string}\n */\n _determineContentCategory: function _determineContentCategory(items) {\n // determine if the items contain an image\n if (this._itemContainsActionWithMimeType(items, 'application/x-cisco-webex-whiteboard')) {\n return 'documents';\n }\n var mimeTypes = (0, _lodash.filter)((0, _lodash.map)(items, 'mimeType'));\n if (mimeTypes.length !== items.length) {\n return 'documents';\n }\n var contentCategory = mimeTypes[0].split('/').shift();\n if (contentCategory !== 'video' && contentCategory !== 'image') {\n return 'documents';\n }\n var _iterator2 = _createForOfIteratorHelper(mimeTypes),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var mimeType = _step2.value;\n if (mimeType.split('/').shift() !== contentCategory) {\n return 'documents';\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return \"\".concat(contentCategory, \"s\");\n },\n /**\n * @param {string} uri\n * @returns {Promise}\n */\n _retrieveSpaceUrl: function _retrieveSpaceUrl(uri) {\n return this.webex.request({\n method: 'PUT',\n uri: uri\n }).then(function (res) {\n return res.body.spaceUrl;\n });\n },\n version: \"3.7.0-web-workers-keepalive.1\"\n});\n\n/**\n * Instantiates a ShareActivity\n * @param {Object} conversation\n * @param {ShareActivity|Object|array} object\n * @param {ProxyWebex} webex\n * @returns {ShareActivity}\n */\nShareActivity.create = function create(conversation, object, webex) {\n var _object$object, _files$items, _files;\n if (object instanceof ShareActivity) {\n return object;\n }\n var files;\n if (object !== null && object !== void 0 && (_object$object = object.object) !== null && _object$object !== void 0 && _object$object.files) {\n files = object.object.files;\n (0, _deleteProperty.default)(object.object, 'files');\n }\n var share = new ShareActivity(_objectSpread({\n conversation: conversation\n }, object), {\n parent: webex\n });\n files = (_files$items = (_files = files) === null || _files === void 0 ? void 0 : _files.items) !== null && _files$items !== void 0 ? _files$items : files;\n if (files) {\n files.forEach(function (file) {\n return share.add(file);\n });\n }\n return share;\n};\nvar _default2 = exports.default = ShareActivity;\n//# sourceMappingURL=share-activity.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toArray;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _lodash = require(\"lodash\");\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Helper to convert objects into arrays of transforms. probably belongs in\n * webex-core\n * @param {string} direction \"inbound\"|\"outbound\"\n * @param {Object} obj\n * @private\n * @returns {Array}\n */\nfunction toArray(direction, obj) {\n return (0, _keys.default)(obj).map(function (name) {\n var entry = obj[name];\n if ((0, _lodash.isFunction)(entry)) {\n return {\n name: name,\n direction: direction,\n fn: entry\n };\n }\n return _objectSpread({\n name: name\n }, entry);\n });\n}\n//# sourceMappingURL=to-array.js.map\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _common = require(\"@webex/common\");\nvar _default = exports.default = {\n device: {\n /**\n * The duration to wait for the catalog to populate in seconds.\n *\n * @type {number}\n */\n canRegisterWaitDuration: 10,\n /**\n * The default configuration group when sending registration requests.\n *\n * @type {Object}\n */\n defaults: {\n /**\n * The default body configuration of registration requests.\n *\n * @type {Object}\n */\n body: {\n name: (typeof process.title === 'string' ? process.title.trim() : undefined) || _common.inBrowser && 'browser' || 'javascript',\n deviceType: _common.deviceType.WEB,\n model: 'web-js-sdk',\n localizedModel: 'webex-js-sdk',\n systemName: 'WEBEX_JS_SDK',\n systemVersion: '1.0.0'\n }\n },\n /**\n * When true, the **wdm** service will enforce an inactivity duration.\n *\n * @type {boolean}\n */\n enableInactivityEnforcement: false,\n /**\n * When true, the device registration will include a ttl value of\n * {@link config.device.ephemeralDeviceTTL} and refresh on an interval of\n * {@link config.device.ephemeralDeviceTTL} / 2 + 60 seconds.\n *\n * @type {boolean}\n */\n ephemeral: false,\n /**\n * The ttl value to include in device registration if\n * {@link config.device.ephemeral} is true. Measured in seconds.\n *\n * @type {boolean}\n */\n ephemeralDeviceTTL: 30 * 60,\n /**\n * energyForcast\n * @type {boolean}\n */\n energyForecast: false\n },\n /**\n * installationId is used exclusively as web client for fraud prevention,\n * and is aliased to as machineId by CA.\n *\n * @alias device.machineId\n * @type {string}\n */\n installationId: undefined\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FEATURE_TYPES = exports.FEATURE_COLLECTION_USER = exports.FEATURE_COLLECTION_NAMES = exports.FEATURE_COLLECTION_ENTITLEMENT = exports.FEATURE_COLLECTION_DEVELOPER = exports.DEVICE_EVENT_REGISTRATION_SUCCESS = exports.DEVICE_EVENTS = exports.CISCO_DEVICE_URL = void 0;\n// Feature constants.\nvar FEATURE_COLLECTION_DEVELOPER = exports.FEATURE_COLLECTION_DEVELOPER = 'developer';\nvar FEATURE_COLLECTION_ENTITLEMENT = exports.FEATURE_COLLECTION_ENTITLEMENT = 'entitlement';\nvar FEATURE_COLLECTION_USER = exports.FEATURE_COLLECTION_USER = 'user';\nvar CISCO_DEVICE_URL = exports.CISCO_DEVICE_URL = 'cisco-device-url';\nvar FEATURE_COLLECTION_NAMES = exports.FEATURE_COLLECTION_NAMES = [FEATURE_COLLECTION_DEVELOPER, FEATURE_COLLECTION_ENTITLEMENT, FEATURE_COLLECTION_USER];\nvar FEATURE_TYPES = exports.FEATURE_TYPES = {\n BOOLEAN: 'boolean',\n NUMBER: 'number',\n STRING: 'string'\n};\n\n// Device constants.\nvar DEVICE_EVENT_REGISTRATION_SUCCESS = exports.DEVICE_EVENT_REGISTRATION_SUCCESS = 'registration:success';\nvar DEVICE_EVENTS = exports.DEVICE_EVENTS = [DEVICE_EVENT_REGISTRATION_SUCCESS];\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _lodash = require(\"lodash\");\nvar _metrics = _interopRequireDefault(require(\"./metrics\"));\nvar _constants = require(\"./constants\");\nvar _featuresModel = _interopRequireDefault(require(\"./features/features-model\"));\nvar _ipNetworkDetector = _interopRequireDefault(require(\"./ipNetworkDetector\"));\nvar _types = require(\"./types\");\nvar _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _obj; // Internal Dependencies\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\n/**\n * Determine if the plugin should be initialized based on cached storage.\n *\n * @returns {boolean} - If the device is ephemeral.\n */\nfunction decider() {\n return !this.config.ephemeral;\n}\nvar Device = _webexCore.WebexPlugin.extend((_dec = (0, _webexCore.waitForValue)('@'), _dec2 = (0, _webexCore.waitForValue)('@'), _dec3 = (0, _webexCore.waitForValue)('@'), _dec4 = (0, _webexCore.waitForValue)('@'), _dec5 = (0, _common.deprecated)('device#markUrlFailedAndGetNew(): Use services#markFailedUrl()'), _dec6 = (0, _webexCore.persist)('@', decider), (_obj = {\n // Ampersand property members.\n\n namespace: 'Device',\n // Allow for extra properties to prevent the plugin from failing due to\n // **WDM** service DTO changes.\n extraProperties: 'allow',\n idAttribute: 'url',\n children: {\n /**\n * The class object that contains all of the feature collections.\n *\n * @type {FeaturesModel}\n */\n features: _featuresModel.default,\n /**\n * Helper class for detecting what IP network version (ipv4, ipv6) we're on.\n *\n * @type {IpNetworkDetector}\n */\n ipNetworkDetector: _ipNetworkDetector.default\n },\n /**\n * A collection of device properties mostly assigned by the retrieved DTO from\n * the **WDM** service that are mapped against the ampersand properties.\n *\n * @type {Object}\n */\n props: {\n /**\n * This property determines whether or not giphy support is enabled.\n *\n * @type {'ALLOW' | 'BLOCK'}\n */\n clientMessagingGiphy: 'string',\n /**\n * This property should store the company name.\n *\n * @type {string}\n */\n customerCompanyName: 'string',\n /**\n * This property should store the logo url.\n *\n * @type {string}\n */\n customerLogoUrl: 'string',\n /**\n * This property doesn't have any real values, but is sent during device\n * refresh to prevent the **wdm** service from falling back to an iOS device\n * type.\n *\n * @type {string}\n */\n deviceType: 'string',\n /**\n * This property should store the help url.\n *\n * @type {string}\n */\n helpUrl: 'string',\n /**\n * This property should store the intranet inactivity timer duration.\n *\n * @type {number}\n */\n intranetInactivityDuration: 'number',\n /**\n * This property stores the url required to validate if the device is able\n * to actively reach the intranet network.\n *\n * @type {string}\n */\n intranetInactivityCheckUrl: 'string',\n /**\n * This property stores the inactivity timer duration, and could possibly\n * deprecate the `intranetInactivityDuration` property.\n *\n * @type {number}\n */\n inNetworkInactivityDuration: 'number',\n /**\n * This property stores the ECM (external content management) enabled value\n * for the whole organization.\n *\n * @type {boolean}\n */\n ecmEnabledForAllUsers: ['boolean', false, false],\n /**\n * This property stores an array of ECM (external content management)\n * providers that are currently available.\n *\n * @returns {Array}\n */\n ecmSupportedStorageProviders: ['array', false, function () {\n return [];\n }],\n /**\n * This property stores the modification time value retrieved from the\n * **WDM** endpoint formatted as ISO 8601.\n *\n * @type {string}\n */\n modificationTime: 'string',\n /**\n * This property stores the navigation bar color.\n *\n * @type {string}\n */\n navigationBarColor: 'string',\n /**\n * This property stores the partner company's name when available.\n *\n * @type {string}\n */\n partnerCompanyName: 'string',\n /**\n * This property stores the partner company's logo when available.\n *\n * @type {string}\n */\n partnerLogoUrl: 'string',\n /**\n * This property stores the availability of people data from the **WDM**\n * service.\n *\n * @type {boolean}\n */\n peopleInsightsEnabled: 'boolean',\n /**\n * This property stores the reporting site's description when available.\n *\n * @type {string}\n */\n reportingSiteDesc: 'string',\n /**\n * This property stores the reporting site's access url when available.\n *\n * @type {string}\n */\n reportingSiteUrl: 'string',\n /**\n * This property stores the encryption key url when available.\n *\n * @type {string}\n */\n searchEncryptionKeyUrl: 'string',\n /**\n * This property stores the availability of support-provided text from the\n * **WDM** service.\n *\n * @type {boolean}\n */\n showSupportText: 'boolean',\n /**\n * This property stores the support provider's company name when available.\n *\n * @type {string}\n */\n supportProviderCompanyName: 'string',\n /**\n * This property stores the support provider's logo url when available.\n *\n * @type {string}\n */\n supportProviderLogoUrl: 'string',\n /**\n * This property stores the device's url retrieved from a registration\n * request. This property gets set via the initial registration process by a\n * `this.set()` method.\n *\n * @type {string}\n */\n url: 'string',\n /**\n * This property stores the device's userId uuid value, which can also be\n * derived from the device's registerd user's userId retrieved from\n * the **Hydra** service.\n *\n * @type {string}\n */\n userId: 'string',\n /**\n * This property stores whether or not file sharing is enabled\n *\n * @type {'BLOCK_BOTH' | 'BLOCK_UPLOAD'}\n */\n webFileShareControl: 'string',\n /**\n * This property stores the current web socket url used by the registered\n * device.\n *\n * @type {string}\n */\n webSocketUrl: 'string',\n /**\n * This property stores the value indicating whether or not white board file\n * sharing is enabled for the current device.\n *\n * @type {'ALLOW' | 'BLOCK'}\n */\n whiteboardFileShareControl: 'string'\n },\n /**\n * A list of derived properties that populate based when their parent data\n * available via the device's properties.\n *\n * @type {Object}\n */\n derived: {\n /**\n * This property determines if the current device is registered.\n *\n * @type {boolean}\n */\n registered: {\n deps: ['url'],\n /**\n * Checks if the device is registered by validating that the url exists.\n * Amperstand does not allow this to method to be written as an arrow\n * function.\n *\n * @returns {boolean}\n */\n fn: function fn() {\n return !!this.url;\n }\n }\n },\n /**\n * Stores timer data as well as other state details.\n *\n * @type {Object}\n */\n session: {\n /**\n * This property stores the logout timer object\n *\n * @type {any}\n */\n logoutTimer: 'any',\n /**\n * This property stores the date for the last activity the user made\n * with the current device.\n *\n * @type {number}\n */\n lastUserActivityDate: 'number',\n /**\n * This property stores whether or not the reachability check has been\n * performed to prevent the reachability check from performing its\n * operation more than once after a successful check.\n *\n * @returns {boolean}\n */\n isReachabilityChecked: ['boolean', false, false],\n /**\n * This property stores whether or not the next refresh or register request should request energy forecast data\n * in order to prevent over fetching energy forecasts\n *\n * @type {boolean}\n */\n energyForecastConfig: 'boolean',\n /**\n * This property stores whether or not the current device is in a meeting\n * to prevent an unneeded timeout of a meeting due to inactivity.\n *\n * @type {boolean}\n */\n isInMeeting: 'boolean',\n /**\n * This property identifies if the device is currently in network to prevent\n * the `resetLogoutTimer()` method from being called repeatedly once its\n * known client is connected to the organization's internal network.\n *\n * @type {boolean}\n */\n isInNetwork: 'boolean'\n },\n // Event method members.\n /**\n * Trigger meeting started event for webex instance. Used by web-client team.\n *\n * @returns {void}\n */\n meetingStarted: function meetingStarted() {\n this.webex.trigger('meeting started');\n },\n /**\n * Trigger meeting ended event for webex instance. Used by web-client team.\n *\n * @returns {void}\n */\n meetingEnded: function meetingEnded() {\n this.webex.trigger('meeting ended');\n },\n /**\n * Set the value of energy forecast config for the current registered device.\n * @param {boolean} [energyForecastConfig=false] - fetch an energy forecast on the next refresh/register\n * @returns {void}\n */\n setEnergyForecastConfig: function setEnergyForecastConfig() {\n var energyForecastConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.energyForecastConfig = energyForecastConfig;\n },\n refresh: function refresh() {\n var _this = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('device: refreshing');\n\n // Validate that the device can be registered.\n return this.canRegister().then(function () {\n // Validate if the device is not registered and register instead.\n if (!_this.registered) {\n _this.logger.info('device: device not registered, registering');\n return _this.register(deviceRegistrationOptions);\n }\n\n // Merge body configurations, overriding defaults.\n var body = _objectSpread(_objectSpread({}, _this.serialize()), _this.config.body ? _this.config.body : {});\n\n // Remove unneeded properties from the body object.\n delete body.features;\n delete body.mediaCluster;\n delete body.etag;\n\n // Append a ttl value if the device is marked as ephemeral.\n if (_this.config.ephemeral) {\n body.ttl = _this.config.ephemeralDeviceTTL;\n }\n\n // Merge header configurations, overriding defaults.\n var headers = _objectSpread(_objectSpread(_objectSpread({}, _this.config.defaults.headers ? _this.config.defaults.headers : {}), _this.config.headers ? _this.config.headers : {}), _this.etag ? {\n 'If-None-Match': _this.etag\n } : {});\n var _deviceRegistrationOp = deviceRegistrationOptions.includeDetails,\n includeDetails = _deviceRegistrationOp === void 0 ? _types.CatalogDetails.all : _deviceRegistrationOp;\n return _this.request({\n method: 'PUT',\n uri: _this.url,\n body: body,\n headers: headers,\n qs: {\n includeUpstreamServices: \"\".concat(includeDetails).concat(_this.config.energyForecast && _this.energyForecastConfig ? ',energyforecast' : '')\n }\n }).then(function (response) {\n return _this.processRegistrationSuccess(response);\n }).catch(function (reason) {\n // Handle a 404 error, which indicates that the device is no longer\n // valid and needs to be registered as a new device.\n if (reason.statusCode === 404) {\n _this.logger.info('device: refresh failed, device is not valid');\n _this.logger.info('device: attempting to register a new device');\n _this.clear();\n return _this.register(deviceRegistrationOptions);\n }\n return _promise.default.reject(reason);\n });\n });\n },\n /**\n * Fetches the web devices and deletes the third of them which are not recent devices in use\n * @returns {Promise}\n */\n deleteDevices: function deleteDevices() {\n var _this2 = this;\n // Fetch devices with a GET request\n return this.request({\n method: 'GET',\n service: 'wdm',\n resource: 'devices'\n }).then(function (response) {\n var devices = response.body.devices;\n var _this2$_getBody = _this2._getBody(),\n deviceType = _this2$_getBody.deviceType;\n\n // Filter devices of type deviceType\n var webDevices = devices.filter(function (item) {\n return item.deviceType === deviceType;\n });\n var sortedDevices = (0, _lodash.orderBy)(webDevices, [function (item) {\n return new Date(item.modificationTime);\n }]);\n\n // If there are more than two devices, delete the last third\n if (sortedDevices.length > 2) {\n var totalItems = sortedDevices.length;\n var countToDelete = Math.ceil(totalItems / 3);\n var urlsToDelete = sortedDevices.slice(0, countToDelete).map(function (item) {\n return item.url;\n });\n return _promise.default.race(urlsToDelete.map(function (url) {\n return _this2.request({\n uri: url,\n method: 'DELETE'\n });\n }));\n }\n return _promise.default.resolve();\n }).catch(function (error) {\n _this2.logger.error('Failed to retrieve devices:', error);\n return _promise.default.reject(error);\n });\n },\n register: function register() {\n var _this3 = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('device: registering');\n this.webex.internal.newMetrics.callDiagnosticMetrics.setDeviceInfo(this);\n\n // Validate that the device can be registered.\n return this.canRegister().then(function () {\n // Validate if the device is already registered and refresh instead.\n if (_this3.registered) {\n _this3.logger.info('device: device already registered, refreshing');\n return _this3.refresh(deviceRegistrationOptions);\n }\n return _this3._registerInternal(deviceRegistrationOptions).catch(function (error) {\n var _error$body;\n if ((error === null || error === void 0 ? void 0 : (_error$body = error.body) === null || _error$body === void 0 ? void 0 : _error$body.message) === 'User has excessive device registrations') {\n return _this3.deleteDevices().then(function () {\n return _this3._registerInternal(deviceRegistrationOptions);\n });\n }\n throw error;\n });\n });\n },\n _getBody: function _getBody() {\n return _objectSpread(_objectSpread({}, this.config.defaults.body ? this.config.defaults.body : {}), this.config.body ? this.config.body : {});\n },\n _registerInternal: function _registerInternal() {\n var _this4 = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('device: making registration request');\n\n // Merge body configurations, overriding defaults.\n var body = this._getBody();\n\n // Merge header configurations, overriding defaults.\n var headers = _objectSpread(_objectSpread({}, this.config.defaults.headers ? this.config.defaults.headers : {}), this.config.headers ? this.config.headers : {});\n\n // Append a ttl value if the device is marked as ephemeral\n if (this.config.ephemeral) {\n body.ttl = this.config.ephemeralDeviceTTL;\n }\n this.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.request'\n });\n var _deviceRegistrationOp2 = deviceRegistrationOptions.includeDetails,\n includeDetails = _deviceRegistrationOp2 === void 0 ? _types.CatalogDetails.all : _deviceRegistrationOp2;\n\n // This will be replaced by a `create()` method.\n return this.request({\n method: 'POST',\n service: 'wdm',\n resource: 'devices',\n body: body,\n headers: headers,\n qs: {\n includeUpstreamServices: \"\".concat(includeDetails).concat(this.config.energyForecast && this.energyForecastConfig ? ',energyforecast' : '')\n }\n }).catch(function (error) {\n _this4.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.response'\n });\n throw error;\n }).then(function (response) {\n // Do not add any processing of response above this as that will affect timestamp\n _this4.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.response'\n });\n _this4.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_WDM_REGISTRATION_SUCCESSFUL);\n return _this4.processRegistrationSuccess(response);\n }).catch(function (error) {\n _this4.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_WDM_REGISTRATION_FAILED, {\n fields: {\n error: error\n }\n });\n throw error;\n });\n },\n unregister: function unregister() {\n var _this5 = this;\n this.logger.info('device: unregistering');\n if (!this.registered) {\n this.logger.warn('device: not registered');\n return _promise.default.resolve();\n }\n return this.request({\n uri: this.url,\n method: 'DELETE'\n }).then(function () {\n return _this5.clear();\n }).catch(function (reason) {\n if (reason.statusCode === 404) {\n _this5.logger.info('device: 404 when deleting device, device is already deleted, clearing device');\n _this5.clear();\n }\n throw reason;\n });\n },\n /* eslint-enable require-jsdoc */\n // Helper method members\n /**\n * Determine if registration methods can be performed. This method utilizes\n * the `services` plugin to confirm if the appropriate service urls are\n * available for device registration.\n *\n * @returns {Promise}\n */\n canRegister: function canRegister() {\n this.logger.info('device: validating if registration can occur');\n\n // Destructure the services plugin for ease of reference.\n var services = this.webex.internal.services;\n\n // Wait for the postauth catalog to populate.\n return services.waitForCatalog('postauth', this.config.canRegisterWaitDuration).then(function () {\n return (\n // Validate that the service exists after waiting for the catalog.\n services.get('wdm') ? _promise.default.resolve() : _promise.default.reject(new Error(['device: cannot register,', \"'wdm' service is not available from the postauth catalog\"].join(' ')))\n );\n });\n },\n /**\n * Check if the device can currently reach the inactivity check url.\n *\n * @returns {Promise}\n */\n checkNetworkReachability: function checkNetworkReachability() {\n var _this6 = this;\n this.logger.info('device: checking network reachability');\n\n // Validate if the device has been checked and reset the logout timer.\n if (this.isReachabilityChecked) {\n return _promise.default.resolve(this.resetLogoutTimer());\n }\n this.isReachabilityChecked = true;\n\n // Validate if the device has a intranet checking url.\n if (!this.intranetInactivityCheckUrl) {\n this.isInNetwork = false;\n return _promise.default.resolve(this.resetLogoutTimer());\n }\n\n // Clear unnecessary headers for reachability request.\n var headers = {\n 'cisco-no-http-redirect': null,\n 'spark-user-agent': null,\n trackingid: null\n };\n\n // Send the network reachability request.\n return this.request({\n headers: headers,\n method: 'GET',\n uri: this.intranetInactivityCheckUrl\n }).then(function () {\n _this6.isInNetwork = true;\n return _promise.default.resolve(_this6.resetLogoutTimer());\n }).catch(function () {\n _this6.logger.info('device: did not reach ping endpoint');\n _this6.logger.info('device: triggering off-network timer');\n _this6.isInNetwork = false;\n return _promise.default.resolve(_this6.resetLogoutTimer());\n });\n },\n /**\n * Clears the registration ttl value if available.\n *\n * @param {Object} options - Values to be cleared.\n * @returns {void}\n */\n clear: function clear() {\n this.logger.info('device: clearing registered device');\n\n // Prototype the extended class in order to preserve the parent member.\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.clear, this, args);\n },\n /**\n * Get the current websocket url with the appropriate priority host.\n *\n * @param {boolean} [wait=false] - Willing to wait on a valid url.\n * @returns {Promise} - The priority-mapped web socket url.\n */\n getWebSocketUrl: function getWebSocketUrl() {\n var _this7 = this;\n var wait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.logger.info('device: getting the current websocket url');\n\n // Destructure the services plugin for ease of reference.\n var services = this.webex.internal.services;\n\n // Validate if the method should wait for registration.\n if (wait) {\n return this.waitForRegistration().then(function () {\n return services.convertUrlToPriorityHostUrl(_this7.webSocketUrl);\n }).catch(function (error) {\n _this7.logger.warn(error.message);\n return _promise.default.reject(new Error('device: failed to get the current websocket url'));\n });\n }\n\n // Validate if the device is registered.\n if (!this.registered) {\n return _promise.default.reject(new Error('device: cannot get websocket url, device is not registered'));\n }\n\n // Attempt to collect the priority-host-mapped web socket URL.\n var wsUrl = services.convertUrlToPriorityHostUrl(this.webSocketUrl);\n\n // Validate that the url was collected.\n if (wsUrl) {\n return _promise.default.resolve(wsUrl);\n }\n return _promise.default.reject(new Error('device: failed to get the current websocket url'));\n },\n /**\n * Process a successful device registration.\n *\n * @param {Object} response - response object from registration success.\n * @returns {void}\n */\n processRegistrationSuccess: function processRegistrationSuccess(response) {\n var _this8 = this;\n this.logger.info('device: received registration payload');\n\n // Clone the response body for service cleaning.\n var body = _objectSpread({}, response.body);\n\n // Clean service data.\n delete body.services;\n delete body.serviceHostMap;\n var _ref = response.headers || {},\n etag = _ref.etag;\n if (this.etag && etag && this.etag === etag) {\n // If current etag matches the previous one and we have sent\n // If-None-Match header the developer and entitlement feature\n // toggles will not be returned\n var features = body.features;\n delete body.features;\n // When using the etag feature cache, user and entitlement features are still returned\n this.features.user.reset(features.user);\n this.features.entitlement.reset(features.entitlement);\n }\n\n // Assign the recieved DTO from **WDM** to this device.\n this.set(body);\n\n // Assign the new etag to this device.\n this.set({\n etag: etag\n });\n\n // Validate if device is ephemeral and setup refresh timer.\n if (this.config.ephemeral) {\n this.logger.info('device: enqueuing device refresh');\n var delay = (this.config.ephemeralDeviceTTL / 2 + 60) * 1000;\n this.refreshTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return _this8.refresh();\n }, delay);\n }\n\n // Emit the registration:success event.\n this.trigger(_constants.DEVICE_EVENT_REGISTRATION_SUCCESS, this);\n },\n /**\n * Reset the current local logout timer for the registered device if\n * registered.\n *\n * @returns {void}\n */\n resetLogoutTimer: function resetLogoutTimer() {\n this.logger.info('device: resetting logout timer');\n\n // Clear current logout timer.\n clearTimeout(this.logoutTimer);\n\n // Remove last activity date event listener.\n this.off('change:lastUserActivityDate');\n\n // Remove the logout timer.\n this.unset('logoutTimer');\n\n // Validate if the device is currently in a meeting and is configured to\n // required inactivity enforcement.\n if (!this.isInMeeting && this.config.enableInactivityEnforcement && this.isReachabilityChecked) {\n if (this.isInNetwork) {\n this.setLogoutTimer(this.inNetworkInactivityDuration);\n } else {\n this.setLogoutTimer(this.intranetInactivityDuration);\n }\n }\n },\n /**\n * Set the value of the logout timer for the current registered device.\n *\n * @param {number} duration - Value in seconds of the new logout timer.\n * @returns {void}\n */\n setLogoutTimer: function setLogoutTimer(duration) {\n var _this9 = this;\n this.logger.info('device: setting logout timer');\n if (!duration || duration <= 0) {\n return;\n }\n\n // Setup user activity date event listener.\n this.on('change:lastUserActivityDate', function () {\n _this9.resetLogoutTimer();\n });\n\n // Initialize a new timer.\n this.logoutTimer = (0, _commonTimers.safeSetTimeout)(function () {\n _this9.webex.logout();\n }, duration * 1000);\n },\n /**\n * Wait for the device to be registered.\n *\n * @param {number} [timeout=10] - The maximum duration to wait, in seconds.\n * @returns {Promise}\n */\n waitForRegistration: function waitForRegistration() {\n var _this10 = this;\n var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;\n this.logger.info('device: waiting for registration');\n return new _promise.default(function (resolve, reject) {\n if (_this10.registered) {\n resolve();\n }\n var timeoutTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return reject(new Error('device: timeout occured while waiting for registration'));\n }, timeout * 1000);\n _this10.once(_constants.DEVICE_EVENT_REGISTRATION_SUCCESS, function () {\n clearTimeout(timeoutTimer);\n resolve();\n });\n });\n },\n markUrlFailedAndGetNew: function markUrlFailedAndGetNew(url) {\n return _promise.default.resolve(this.webex.internal.services.markFailedUrl(url));\n },\n initialize: function initialize() {\n var _this11 = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n // Prototype the extended class in order to preserve the parent member.\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.initialize, this, args);\n\n // Initialize feature events and listeners.\n _constants.FEATURE_COLLECTION_NAMES.forEach(function (collectionName) {\n _this11.features.on(\"change:\".concat(collectionName), function (model, value, options) {\n _this11.trigger('change', _this11, options);\n _this11.trigger('change:features', _this11, _this11.features, options);\n });\n });\n\n // Initialize network reachability checking event for url change.\n this.on('change:intranetInactivityCheckUrl', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize network reachability checking event for duration change.\n this.on('change:intranetInactivityDuration', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize network reachability checking event for duration change.\n this.on('change:inNetworkInactivityDuration', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize listener for activity checking.\n this.listenTo(this.webex, 'user-activity', function () {\n _this11.lastUserActivityDate = (0, _now.default)();\n });\n\n // Initialize listener for meeting started event.\n this.listenTo(this.webex, 'meeting started', function () {\n _this11.isInMeeting = true;\n _this11.resetLogoutTimer();\n });\n\n // Initialize listener for meeting ended event.\n this.listenTo(this.webex, 'meeting ended', function () {\n _this11.isInMeeting = false;\n _this11.resetLogoutTimer();\n });\n } /* eslint-enable require-jsdoc */,\n version: \"3.7.0-web-workers-keepalive.1\"\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"refresh\", [_common.oneFlight, _dec], (0, _getOwnPropertyDescriptor.default)(_obj, \"refresh\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"register\", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, \"register\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"_registerInternal\", [_common.oneFlight, _dec3], (0, _getOwnPropertyDescriptor.default)(_obj, \"_registerInternal\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"unregister\", [_common.oneFlight, _dec4], (0, _getOwnPropertyDescriptor.default)(_obj, \"unregister\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"markUrlFailedAndGetNew\", [_dec5], (0, _getOwnPropertyDescriptor.default)(_obj, \"markUrlFailedAndGetNew\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"initialize\", [_dec6], (0, _getOwnPropertyDescriptor.default)(_obj, \"initialize\"), _obj)), _obj)));\nvar _default = exports.default = Device;\n//# sourceMappingURL=device.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ampersandCollection = _interopRequireDefault(require(\"ampersand-collection\"));\nvar _featureModel = _interopRequireDefault(require(\"./feature-model\"));\n// External dependencies.\n\n// Local Dependencies\n\n/**\n * Feature collection model.\n *\n * @description\n * This model contains a collection of features under a specific collection\n * group.\n */\nvar FeatureCollection = _ampersandCollection.default.extend({\n /**\n * The unique identifier for the models in this collection.\n *\n * @type {string}\n */\n mainIndex: 'key',\n /**\n * The type of model this collection can contain.\n *\n * @type {Class}\n */\n model: _featureModel.default\n});\nvar _default = exports.default = FeatureCollection;\n//# sourceMappingURL=feature-collection.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _isNan = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/number/is-nan\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _lodash = require(\"lodash\");\nvar _constants = require(\"../constants\");\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } // External dependencies.\n/**\n * The model returned from the {@link FeatureModel#parse} method.\n *\n * @typedef {Object} ParsedFeatureModel\n * @property {boolean|number|string} ParsedFeatureModel.value - The parsed val.\n * @property {string} ParsedFeatureModel.type - The type of the parsed val.\n */\n/**\n * Feature model.\n *\n * @description\n * This model contains details on a single feature and is received from the\n * **WDM** service upon registration.\n */\nvar FeatureModel = _ampersandState.default.extend({\n idAttribute: 'key',\n // needed by Ampersand to determine unique item\n\n // Ampersand property members.\n\n props: {\n /**\n * Contains the unique identifier for this feature to be addressed by.\n *\n * @type {string}\n */\n key: 'string',\n /**\n * This property contains the date in which this feature was last modified.\n *\n * @type {date}\n */\n lastModified: 'date',\n /**\n * This property defines whether or not the feature is mutable.\n *\n * @type {boolean}\n */\n mutable: 'boolean',\n /**\n * This property contains the data type the string value should be\n * interpreted as.\n *\n * @type {FEATURE_TYPES}\n */\n type: 'string',\n /**\n * This property contains the string value of this feature.\n *\n * @type {string}\n */\n val: 'string',\n /**\n * This property contains the interpreted value of this feature.\n *\n * @type {any}\n */\n value: 'any'\n },\n /**\n * Class object constructor. This method safely initializes the class object\n * prior to it fully loading to allow data to be accessed and modified\n * immediately after construction instead of initialization.\n *\n * @override\n * @param {Object} attrs - An object to map against the feature's properties.\n * @param {Object} [options={}] - Ampersand options for `parse` and `parent`.\n */\n constructor: function constructor(attrs) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _lodash.defaults)(options, {\n parse: true\n });\n return (0, _apply.default)(_ampersandState.default.prototype.constructor, this, [attrs, options]);\n },\n // Ampsersand method members.\n /**\n * Parse {@link FeatureModel} properties recieved as strings from **WDM**\n * and cast them as their appropriate types.\n *\n * @private\n * @memberof FeatureModel\n * @param {Object} model - The model to parse.\n * @property {string} model.val - The value to be parsed.\n * @returns {ParsedFeatureModel} - The parsed model.\n */\n parse: function parse(model) {\n // Validate that a model was provided and that it is an object.\n if (!model || (0, _typeof2.default)(model) !== 'object') {\n // Return an empty object to satisfy the requirements of `Ampersand`.\n return {};\n }\n var parsedModel = _objectSpread({}, model);\n var val = parsedModel.val;\n\n // Validate that the value is a number.\n if (!(0, _isNan.default)(Number(val))) {\n parsedModel.type = _constants.FEATURE_TYPES.NUMBER;\n parsedModel.value = Number(val);\n }\n // Validate if the value should be a true boolean.\n else if (typeof val === 'string' && val.toLowerCase() === 'true') {\n parsedModel.type = _constants.FEATURE_TYPES.BOOLEAN;\n parsedModel.value = true;\n }\n // Validate if the value should be a false boolean.\n else if (typeof val === 'string' && val.toLowerCase() === 'false') {\n parsedModel.type = _constants.FEATURE_TYPES.BOOLEAN;\n parsedModel.value = false;\n }\n // In all other cases, the value is string, even if it is undefined.\n else {\n parsedModel.type = _constants.FEATURE_TYPES.STRING;\n parsedModel.value = val;\n }\n return parsedModel;\n },\n /**\n * Serialize the feature using the parent ampersand method with its date as an\n * ISO string. This converts the feature into a request-transportable object.\n *\n * @override\n * @param {Record} [args] - List of properties to serialize.\n * @returns {Object} - The request-ready transport object.\n */\n serialize: function serialize() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Call the overloaded class member.\n var attrs = (0, _apply.default)(_ampersandState.default.prototype.serialize, this, args);\n\n // Validate that the overloaded class member returned an object with the\n // `lastModified` key-value pair and instance it as an ISO string.\n if (attrs.lastModified) {\n attrs.lastModified = new Date(attrs.lastModified).toISOString();\n }\n return attrs;\n },\n /**\n * Set a property of this object to a specific value. This method utilizes\n * code that exists within the `ampersand-state` dependency to handle\n * scenarios in which `key = {\"key\": \"value\"}` or\n * `key = \"key\", value = \"value\"`. Since the snippet is pulled directly from\n * `ampersand-state`, there is no need to test both scenarios.\n *\n * @override\n * @param {object | string} key - The key value, or object to be set.\n * @param {any} value - The key value or object to set the keyed pair to.\n * @param {any} options - The object to set the keyed pair to.\n * @returns {any} - The changed property.\n */\n set: function set(key, value, options) {\n // Declare formatted output variables for properly setting the targetted\n // property for this method.\n var attrs;\n var optns;\n\n // Validate if the key is an instance of any object or not.\n if ((0, _lodash.isObject)(key) || key === null) {\n attrs = key;\n optns = value;\n } else {\n attrs = {};\n attrs[key] = value;\n optns = options;\n }\n attrs = this.parse(attrs, optns);\n return (0, _apply.default)(_ampersandState.default.prototype.set, this, [attrs, optns]);\n }\n});\nvar _default = exports.default = FeatureModel;\n//# sourceMappingURL=feature-model.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _constants = require(\"../constants\");\nvar _featureCollection = _interopRequireDefault(require(\"./feature-collection\"));\n// External dependencies.\n\n// Local Dependencies\n\n/**\n * Feature collection parent container.\n *\n * @description\n * This class contains all of the feature collection class objects to help\n * organize the data retrieved from the **wdm** service on device registration.\n */\nvar FeaturesModel = _ampersandState.default.extend({\n // Ampersand property members.\n\n collections: {\n /**\n * This collection contains the developer feature collection.\n *\n * @type {FeatureCollection}\n */\n developer: _featureCollection.default,\n /**\n * This collection contains the entitlement feature collection.\n *\n * @type {FeatureCollection}\n */\n entitlement: _featureCollection.default,\n /**\n * This collection contains the user feature collection.\n *\n * @type {FeatureCollection}\n */\n user: _featureCollection.default\n },\n // Helper method members.\n /**\n * Recursively clear attributes, children, and collections.\n *\n * @param {Object} options - Attribute options to unset.\n * @returns {this}\n */\n clear: function clear(options) {\n var _this = this;\n // Clear the ampersand attributes safely if there are any. This class should\n // never have any attributes.\n (0, _keys.default)(this.attributes).forEach(function (key) {\n _this.unset(key, options);\n });\n\n // Clear the ampersand children safely if there are any. This class should\n // never have any children.\n /* eslint-disable-next-line no-underscore-dangle */\n (0, _keys.default)(this._children).forEach(function (key) {\n _this[key].clear();\n });\n\n // Clear the ampersand collections safely.\n /* eslint-disable-next-line no-underscore-dangle */\n (0, _keys.default)(this._collections).forEach(function (key) {\n _this[key].reset();\n });\n return this;\n },\n // Ampersand method members.\n /**\n * Initializer method for FeatureModel class object.\n *\n * @override\n * @returns {void}\n */\n initialize: function initialize() {\n var _this2 = this;\n // Declare the collection event names.\n var eventNames = ['change:value', 'add', 'remove'];\n\n // Initialize collection event listeners.\n eventNames.forEach(function (eventName) {\n _constants.FEATURE_COLLECTION_NAMES.forEach(function (collectionName) {\n _this2[collectionName].on(eventName, function (model, options) {\n _this2.trigger(\"change:\".concat(collectionName), _this2, _this2[collectionName], options);\n });\n });\n });\n }\n});\nvar _default = exports.default = FeaturesModel;\n//# sourceMappingURL=features-model.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"FeatureCollection\", {\n enumerable: true,\n get: function get() {\n return _featureCollection.default;\n }\n});\n_Object$defineProperty(exports, \"FeatureModel\", {\n enumerable: true,\n get: function get() {\n return _featureModel.default;\n }\n});\n_Object$defineProperty(exports, \"FeaturesModel\", {\n enumerable: true,\n get: function get() {\n return _featuresModel.default;\n }\n});\nvar _featureCollection = _interopRequireDefault(require(\"./feature-collection\"));\nvar _featureModel = _interopRequireDefault(require(\"./feature-model\"));\nvar _featuresModel = _interopRequireDefault(require(\"./features-model\"));\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"CatalogDetails\", {\n enumerable: true,\n get: function get() {\n return _types.CatalogDetails;\n }\n});\n_Object$defineProperty(exports, \"DeviceRegistrationOptions\", {\n enumerable: true,\n get: function get() {\n return _types.DeviceRegistrationOptions;\n }\n});\n_Object$defineProperty(exports, \"DeviceUrlInterceptor\", {\n enumerable: true,\n get: function get() {\n return _deviceUrl.default;\n }\n});\n_Object$defineProperty(exports, \"FeatureCollection\", {\n enumerable: true,\n get: function get() {\n return _index.FeatureCollection;\n }\n});\n_Object$defineProperty(exports, \"FeatureModel\", {\n enumerable: true,\n get: function get() {\n return _index.FeatureModel;\n }\n});\n_Object$defineProperty(exports, \"FeaturesModel\", {\n enumerable: true,\n get: function get() {\n return _index.FeaturesModel;\n }\n});\n_Object$defineProperty(exports, \"config\", {\n enumerable: true,\n get: function get() {\n return _config.default;\n }\n});\nexports.constants = void 0;\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _device.default;\n }\n});\nrequire(\"@webex/internal-plugin-metrics\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _device = _interopRequireDefault(require(\"./device\"));\nvar _index = require(\"./features/index\");\nvar _deviceUrl = _interopRequireDefault(require(\"./interceptors/device-url\"));\nvar constants = _interopRequireWildcard(require(\"./constants\"));\nexports.constants = constants;\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _types = require(\"./types\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n// Internal dependencies.\n// Need to import metrics plugin for the devices to send metrics on succes/failure registration\n\n// Plugin dependencies.\n\n(0, _webexCore.registerInternalPlugin)('device', _device.default, {\n config: _config.default,\n interceptors: {\n DeviceUrlInterceptor: _deviceUrl.default.create\n },\n /**\n * Unregister the device in the case that the webex instance has logged out.\n *\n * @returns {Promise}\n */\n onBeforeLogout: function onBeforeLogout() {\n return this.unregister();\n }\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nvar _lodash = require(\"lodash\");\nvar _constants = require(\"../constants\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Adds 'cisco-device-url' header, as appropriate, to requests\n */\nvar DeviceUrlInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(DeviceUrlInterceptor, _Interceptor);\n var _super = _createSuper(DeviceUrlInterceptor);\n function DeviceUrlInterceptor() {\n (0, _classCallCheck2.default)(this, DeviceUrlInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(DeviceUrlInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var headers = options.headers,\n service = options.service,\n uri = options.uri;\n var _this$webex$internal = this.webex.internal,\n device = _this$webex$internal.device,\n services = _this$webex$internal.services;\n\n // Check if header is already set before moving forward\n if (!device.url || headers && _constants.CISCO_DEVICE_URL in headers && !!headers[_constants.CISCO_DEVICE_URL]) {\n return _promise.default.resolve(options);\n }\n\n // Wait for catalog and service to be defined.\n return services.waitForService({\n service: service,\n url: uri\n }).then(function (url) {\n // Grab the service name with the url returned from waitForService\n var _ref = services.getServiceFromUrl(url) || {},\n serviceName = _ref.name;\n var invalidServices = ['idbroker', 'oauth', 'saml'];\n\n // Check if service is not one of the invalid services\n // Assign the url to the device header\n if (serviceName && !invalidServices.includes(serviceName)) {\n (0, _lodash.set)(options, \"headers['\".concat(_constants.CISCO_DEVICE_URL, \"']\"), device.url);\n }\n return options;\n }).catch(function (error) {\n // Validate that the error came from getServiceFromUrl\n if (error.message.match(/was not found after waiting/)) {\n return options;\n }\n return _promise.default.reject(error);\n });\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {DeviceUrlInterceptor}\n */\n function create() {\n /* eslint no-invalid-this: [0] */\n return new DeviceUrlInterceptor({\n webex: this\n });\n }\n }]);\n return DeviceUrlInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=device-url.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _webexCore = require(\"@webex/webex-core\");\n/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar STATE = {\n INITIAL: 'initial',\n IN_PROGRESS: 'in-progress',\n IDLE: 'idle'\n};\n\n/**\n * @class\n */\nvar IpNetworkDetector = _webexCore.WebexPlugin.extend({\n idAttribute: 'IpNetworkDetectorId',\n namespace: 'Device',\n props: {\n firstIpV4: ['number', true, -1],\n // time [ms] it took to receive first IPv4 candidate\n firstIpV6: ['number', true, -1],\n // time [ms] it took to receive first IPv6 candidate\n firstMdns: ['number', true, -1],\n // time [ms] it took to receive first mDNS candidate\n totalTime: ['number', true, -1],\n // total time [ms] it took to do the last IP network detection\n state: ['string', true, STATE.INITIAL],\n pendingDetection: ['object', false, undefined]\n },\n derived: {\n /**\n * True if we know we're on an IPv4 network,\n * False if we know that we are not on an IPv4 network,\n * undefined if we are not sure\n */\n supportsIpV4: {\n deps: ['firstIpV4', 'firstIpV6', 'firstMdns', 'totalTime'],\n /**\n * Function for calculating the value of supportsIpV4 prop\n * @returns {boolean | undefined}\n */\n fn: function fn() {\n if (this.firstIpV4 >= 0) {\n return true;\n }\n if (this.totalTime < 0) {\n // we haven't completed the detection, yet\n return undefined;\n }\n if (this.receivedOnlyMDnsCandidates()) {\n return undefined;\n }\n return false;\n }\n },\n /**\n * True if we know we're on an IPv6 network,\n * False if we know that we are not on an IPv6 network,\n * undefined if we are not sure\n */\n supportsIpV6: {\n deps: ['firstIpV4', 'firstIpV6', 'firstMdns', 'totalTime'],\n /**\n * Function for calculating the value of supportsIpV6 prop\n * @returns {boolean | undefined}\n */\n fn: function fn() {\n if (this.firstIpV6 >= 0) {\n return true;\n }\n if (this.totalTime < 0) {\n // we haven't completed the detection, yet\n return undefined;\n }\n if (this.receivedOnlyMDnsCandidates()) {\n return undefined;\n }\n return false;\n }\n }\n },\n /**\n * Returns true if we have received only mDNS candidates - browsers usually do that if we don't have any user media permissions\n *\n * @private\n * @returns {boolean}\n */\n receivedOnlyMDnsCandidates: function receivedOnlyMDnsCandidates() {\n return this.totalTime >= 0 && this.firstMdns >= 0 && this.firstIpV4 < 0 && this.firstIpV6 < 0;\n },\n /**\n *\n * @param {RTCPeerConnection} pc Peer connection to use\n * @private\n * @returns {Promise}\n */\n gatherLocalCandidates: function gatherLocalCandidates(pc) {\n var _this = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", new _promise.default(function (resolve, reject) {\n var done = false;\n _this.firstIpV4 = -1;\n _this.firstIpV6 = -1;\n _this.firstMdns = -1;\n _this.totalTime = -1;\n var startTime = performance.now();\n var doneGatheringIceCandidates = function doneGatheringIceCandidates() {\n if (done) {\n return;\n }\n done = true;\n _this.totalTime = performance.now() - startTime;\n resolve();\n };\n pc.onicecandidate = function (event) {\n var _event$candidate;\n if ((_event$candidate = event.candidate) !== null && _event$candidate !== void 0 && _event$candidate.address) {\n if (event.candidate.address.endsWith('.local')) {\n // if we don't have camera/mic permissions, browser just gives us mDNS candidates\n if (_this.firstMdns === -1) {\n _this.firstMdns = performance.now() - startTime;\n }\n } else if (event.candidate.address.includes(':')) {\n if (_this.firstIpV6 === -1) {\n _this.firstIpV6 = performance.now() - startTime;\n }\n } else if (_this.firstIpV4 === -1) {\n _this.firstIpV4 = performance.now() - startTime;\n }\n if (_this.firstIpV4 >= 0 && _this.firstIpV6 >= 0) {\n // if we've got both ipv4 and ipv6 candidates, there is no need to wait for any more candidates, we can resolve now\n resolve();\n }\n } else if (event.candidate === null) {\n doneGatheringIceCandidates();\n }\n };\n pc.onicegatheringstatechange = function () {\n if (pc.iceGatheringState === 'complete') {\n doneGatheringIceCandidates();\n }\n };\n pc.createDataChannel('data');\n pc.createOffer().then(function (offer) {\n return pc.setLocalDescription(offer);\n }).catch(function (e) {\n _this.webex.logger.error('Failed to detect ip network version:', e);\n reject(e);\n });\n }));\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))();\n },\n /**\n * Detects if we are on IPv4 and/or IPv6 network. Once it resolves, read the\n * supportsIpV4 and supportsIpV6 props to find out the result.\n *\n * @param {boolean} force - if false, the detection will only be done if we haven't managed to get any meaningful results yet\n * @returns {Promise}\n */\n detect: function detect() {\n var _arguments = arguments,\n _this2 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n var force, results, pc, forceParam;\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n force = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : false;\n if (!(_this2.state === STATE.IN_PROGRESS)) {\n _context2.next = 4;\n break;\n }\n _this2.pendingDetection = {\n force: force\n };\n return _context2.abrupt(\"return\");\n case 4:\n if (!(!force && _this2.state !== STATE.INITIAL && !_this2.receivedOnlyMDnsCandidates())) {\n _context2.next = 6;\n break;\n }\n return _context2.abrupt(\"return\");\n case 6:\n _context2.prev = 6;\n _this2.state = STATE.IN_PROGRESS;\n pc = new RTCPeerConnection();\n _context2.next = 11;\n return _this2.gatherLocalCandidates(pc);\n case 11:\n results = _context2.sent;\n case 12:\n _context2.prev = 12;\n pc.close();\n _this2.state = STATE.IDLE;\n return _context2.finish(12);\n case 16:\n if (_this2.pendingDetection) {\n forceParam = _this2.pendingDetection.force;\n _this2.pendingDetection = undefined;\n _this2.detect(forceParam);\n }\n case 17:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[6,, 12, 16]]);\n }))();\n },\n version: \"3.7.0-web-workers-keepalive.1\"\n});\nvar _default = exports.default = IpNetworkDetector;\n//# sourceMappingURL=ipNetworkDetector.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// Metric to do with WDM registration\nvar _default = exports.default = {\n JS_SDK_WDM_REGISTRATION_SUCCESSFUL: 'JS_SDK_WDM_REGISTRATION_SUCCESSFUL',\n JS_SDK_WDM_REGISTRATION_FAILED: 'JS_SDK_WDM_REGISTRATION_FAILED'\n};\n//# sourceMappingURL=metrics.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CatalogDetails = void 0;\nvar CatalogDetails = exports.CatalogDetails = /*#__PURE__*/function (CatalogDetails) {\n CatalogDetails[\"all\"] = \"all\";\n CatalogDetails[\"features\"] = \"features\";\n CatalogDetails[\"websocket\"] = \"websocket\";\n CatalogDetails[\"none\"] = \"none\";\n return CatalogDetails;\n}({});\n//# sourceMappingURL=types.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2022 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = {\n dss: {\n /**\n * Timeout before DSS request fails, in milliseconds.\n * @type {Number}\n */\n requestTimeout: 6000,\n /**\n * Debounce wait (ms) before sending a dss request (gap between lookups that will trigger a request)\n * @type {Number}\n */\n batcherWait: 50,\n /**\n * Maximum queue size before sending a dss request\n * @type {Number}\n */\n batcherMaxCalls: 50,\n /**\n * Debounce max wait (ms) before sending a dss request (time from first lookup that will trigger a request)\n * @type {Number}\n */\n batcherMaxWait: 150\n }\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SEARCH_TYPES = exports.SEARCH_DATA_PATH = exports.LOOKUP_REQUEST_KEY = exports.LOOKUP_NOT_FOUND_PATH = exports.LOOKUP_FOUND_PATH = exports.LOOKUP_DATA_PATH = exports.DSS_UNREGISTERED = exports.DSS_SERVICE_NAME = exports.DSS_SEARCH_MERCURY_EVENT = exports.DSS_RESULT = exports.DSS_REGISTERED = exports.DSS_LOOKUP_RESULT = exports.DSS_LOOKUP_MERCURY_EVENT = void 0;\nvar DSS_REGISTERED = exports.DSS_REGISTERED = 'dss:registered';\nvar DSS_UNREGISTERED = exports.DSS_UNREGISTERED = 'dss:unregistered';\nvar DSS_LOOKUP_MERCURY_EVENT = exports.DSS_LOOKUP_MERCURY_EVENT = 'event:directory.lookup';\nvar DSS_SEARCH_MERCURY_EVENT = exports.DSS_SEARCH_MERCURY_EVENT = 'event:directory.search';\nvar DSS_LOOKUP_RESULT = exports.DSS_LOOKUP_RESULT = 'dss:lookup.result';\nvar DSS_RESULT = exports.DSS_RESULT = 'dss:result';\nvar DSS_SERVICE_NAME = exports.DSS_SERVICE_NAME = 'directorySearch';\nvar SEARCH_TYPES = exports.SEARCH_TYPES = {\n PERSON: 'PERSON',\n CALLING_SERVICE: 'CALLING_SERVICE',\n EXTERNAL_CALLING: 'EXTERNAL_CALLING',\n ROOM: 'ROOM',\n ROBOT: 'ROBOT'\n};\nvar LOOKUP_DATA_PATH = exports.LOOKUP_DATA_PATH = 'lookupResult.entities';\nvar LOOKUP_FOUND_PATH = exports.LOOKUP_FOUND_PATH = 'lookupResult.entitiesFound';\nvar LOOKUP_NOT_FOUND_PATH = exports.LOOKUP_NOT_FOUND_PATH = 'lookupResult.entitiesNotFound';\nvar LOOKUP_REQUEST_KEY = exports.LOOKUP_REQUEST_KEY = 'lookupValues';\nvar SEARCH_DATA_PATH = exports.SEARCH_DATA_PATH = 'directoryEntities';\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _webexCore = require(\"@webex/webex-core\");\n/*!\n * Copyright (c) 2015-2022 Cisco Systems, Inc. See LICENSE file.\n */\n/* eslint-disable no-underscore-dangle */\n\n/**\n * @class\n */\nvar DssBatcher = _webexCore.Batcher.extend({\n namespace: 'DSS',\n props: {\n resource: {\n type: 'string',\n required: true,\n setOnce: true,\n allowNull: false\n },\n dataPath: {\n type: 'string',\n required: true,\n setOnce: true,\n allowNull: false\n },\n entitiesFoundPath: {\n type: 'string',\n required: true,\n setOnce: true,\n allowNull: false\n },\n entitiesNotFoundPath: {\n type: 'string',\n required: true,\n setOnce: true,\n allowNull: false\n },\n requestKey: {\n type: 'string',\n required: true,\n setOnce: true,\n allowNull: false\n }\n },\n /**\n * Submits the DSS request\n * @param {Object} payload\n * @returns {Promise}\n */\n submitHttpRequest: function submitHttpRequest(payload) {\n return this.parent._request({\n dataPath: this.dataPath,\n foundPath: this.entitiesFoundPath,\n notFoundPath: this.entitiesNotFoundPath,\n resource: this.resource,\n params: {\n lookupValues: payload\n }\n });\n },\n /**\n * Actions taken when the http request returns a success\n * @param {Promise} res\n * @returns {Promise}\n */\n handleHttpSuccess: function handleHttpSuccess(res) {\n var _this = this;\n var successItems = res.foundArray.map(function (requestValue, index) {\n return {\n requestValue: requestValue,\n entity: res.resultArray[index]\n };\n });\n var failureItems = res.notFoundArray.map(function (requestValue) {\n return {\n requestValue: requestValue,\n entity: null\n };\n });\n return _promise.default.all(successItems.concat(failureItems).map(function (item) {\n return _this.acceptItem(item);\n }));\n },\n /**\n * Checks if the item was found\n * @param {Object} item\n * @returns {Promise}\n */\n didItemFail: function didItemFail(item) {\n return _promise.default.resolve(item.entity === null);\n },\n /**\n * Finds the Defer for the specified item and resolves its promise with null\n * @param {Object} item\n * @returns {Promise}\n */\n handleItemFailure: function handleItemFailure(item) {\n return this.getDeferredForResponse(item).then(function (defer) {\n defer.resolve(null);\n });\n },\n /**\n * Finds the Defer for the specified item and resolves its promise\n * @param {Object} item\n * @returns {Promise}\n */\n handleItemSuccess: function handleItemSuccess(item) {\n return this.getDeferredForResponse(item).then(function (defer) {\n defer.resolve(item.entity);\n });\n },\n /**\n * Returns a promise with the unique key for the item\n * @param {Object} item\n * @returns {Promise}\n */\n fingerprintRequest: function fingerprintRequest(item) {\n return _promise.default.resolve(item);\n },\n /**\n * Returns a promise with the unique key for the item\n * @param {Object} item\n * @returns {Promise}\n */\n fingerprintResponse: function fingerprintResponse(item) {\n return _promise.default.resolve(item.requestValue);\n }\n});\nvar _default = exports.default = DssBatcher;\n//# sourceMappingURL=dss-batcher.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DssTimeoutError = void 0;\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * Thrown when an expected DSS respond is not received in a timely manner.\n */\nvar DssTimeoutError = exports.DssTimeoutError = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(DssTimeoutError, _Exception);\n var _super = _createSuper(DssTimeoutError);\n /**\n * Construct DssTimeoutError\n * @param {DssTimeoutErrorParams} details\n */\n // eslint-disable-next-line no-useless-constructor\n function DssTimeoutError(details) {\n (0, _classCallCheck2.default)(this, DssTimeoutError);\n return _super.call(this, details);\n }\n\n /**\n * Parse Error details\n *\n * @param {DssTimeoutErrorParams} details\n * @returns {string}\n */\n (0, _createClass2.default)(DssTimeoutError, [{\n key: \"parse\",\n value: function parse(details) {\n return \"The DSS did not respond within \".concat(details.timeout, \" ms.\") + \"\\n Request Id: \".concat(details.requestId) + \"\\n Resource: \".concat(details.resource) + \"\\n Params: \".concat((0, _stringify.default)(details.params));\n }\n }]);\n return DssTimeoutError;\n}(_common.Exception);\n//# sourceMappingURL=dss-errors.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar _webexCore = require(\"@webex/webex-core\");\nrequire(\"@webex/internal-plugin-mercury\");\nvar _lodash = require(\"lodash\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _constants = require(\"./constants\");\nvar _dssBatcher = _interopRequireDefault(require(\"./dss-batcher\"));\nvar _dssErrors = require(\"./dss-errors\");\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable no-underscore-dangle */ /*!\n * Copyright (c) 2015-2022 Cisco Systems, Inc. See LICENSE file.\n */ /* eslint-disable no-underscore-dangle */\nvar DSS = _webexCore.WebexPlugin.extend({\n namespace: 'DSS',\n /**\n * registered value indicating events registration is successful\n * @instance\n * @type {Boolean}\n * @memberof DSS\n */\n registered: false,\n /**\n * Initializer\n * @private\n * @param {Object} attrs\n * @param {Object} options\n * @returns {undefined}\n */\n initialize: function initialize() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.initialize, this, args);\n this.batchers = {};\n },\n /**\n * Explicitly sets up the DSS plugin by connecting to mercury, and listening for DSS events.\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n register: function register() {\n var _this = this;\n if (!this.webex.canAuthorize) {\n this.logger.error('DSS->register#ERROR, Unable to register, SDK cannot authorize');\n return _promise.default.reject(new Error('SDK cannot authorize'));\n }\n if (this.registered) {\n this.logger.info('dss->register#INFO, DSS plugin already registered');\n return _promise.default.resolve();\n }\n return this.webex.internal.mercury.connect().then(function () {\n _this.listenForEvents();\n _this.trigger(_constants.DSS_REGISTERED);\n _this.registered = true;\n }).catch(function (error) {\n _this.logger.error(\"DSS->register#ERROR, Unable to register, \".concat(error.message));\n return _promise.default.reject(error);\n });\n },\n /**\n * Explicitly tears down the DSS plugin by disconnecting from mercury, and stops listening to DSS events\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n unregister: function unregister() {\n var _this2 = this;\n if (!this.registered) {\n this.logger.info('DSS->unregister#INFO, DSS plugin already unregistered');\n return _promise.default.resolve();\n }\n this.stopListeningForEvents();\n return this.webex.internal.mercury.disconnect().then(function () {\n _this2.trigger(_constants.DSS_UNREGISTERED);\n _this2.registered = false;\n });\n },\n /**\n * registers for DSS events through mercury\n * @returns {undefined}\n * @private\n */\n listenForEvents: function listenForEvents() {\n var _this3 = this;\n this.webex.internal.mercury.on(_constants.DSS_LOOKUP_MERCURY_EVENT, function (envelope) {\n _this3._handleEvent(envelope.data);\n });\n this.webex.internal.mercury.on(_constants.DSS_SEARCH_MERCURY_EVENT, function (envelope) {\n _this3._handleEvent(envelope.data);\n });\n },\n /**\n * unregisteres all the DSS events from mercury\n * @returns {undefined}\n * @private\n */\n stopListeningForEvents: function stopListeningForEvents() {\n this.webex.internal.mercury.off(_constants.DSS_LOOKUP_MERCURY_EVENT);\n this.webex.internal.mercury.off(_constants.DSS_SEARCH_MERCURY_EVENT);\n },\n /**\n * constructs the event name based on request id\n * @param {UUID} requestId the id of the request\n * @returns {string}\n */\n _getResultEventName: function _getResultEventName(requestId) {\n return \"\".concat(_constants.DSS_RESULT).concat(requestId);\n },\n /**\n * Takes incoming data and triggers correct events\n * @param {Object} data the event data\n * @returns {undefined}\n */\n _handleEvent: function _handleEvent(data) {\n this.trigger(this._getResultEventName(data.requestId), data);\n this.trigger(_constants.DSS_LOOKUP_RESULT, data);\n },\n /**\n * Makes the request to the directory service\n * @param {Object} options\n * @param {string} options.resource the URL to query\n * @param {Mixed} options.params additional params for the body of the request\n * @param {string} options.dataPath the path to get the data in the result object\n * @param {string} [options.foundPath] the path to get the lookups of the found data\n * @param {string} [options.notFoundPath] the path to get the lookups of the not found data\n * @returns {Promise} result Resolves with an object\n * @returns {Array} result.resultArray an array of entities found\n * @returns {Array} result.foundArray an array of the lookups of the found entities (if foundPath provided)\n * @returns {Array} result.notFoundArray an array of the lookups of the not found entities (if notFoundPath provided)\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n _request: function _request(options) {\n var _this4 = this;\n var resource = options.resource,\n params = options.params,\n dataPath = options.dataPath,\n foundPath = options.foundPath,\n notFoundPath = options.notFoundPath;\n var timeout = this.config.requestTimeout;\n var requestId = _uuid.default.v4();\n var eventName = this._getResultEventName(requestId);\n var result = {};\n var expectedSeqNums;\n var notFoundArray;\n return new _promise.default(function (resolve, reject) {\n var timer = new _commonTimers.Timer(function () {\n _this4.stopListening(_this4, eventName);\n reject(new _dssErrors.DssTimeoutError({\n requestId: requestId,\n timeout: timeout,\n resource: resource,\n params: params\n }));\n }, timeout);\n _this4.listenTo(_this4, eventName, function (data) {\n timer.reset();\n var resultData = (0, _lodash.get)(data, dataPath, []);\n var found;\n if (foundPath) {\n found = (0, _lodash.get)(data, foundPath, []);\n }\n result[data.sequence] = foundPath ? {\n resultData: resultData,\n found: found\n } : {\n resultData: resultData\n };\n if (data.finished) {\n expectedSeqNums = (0, _lodash.range)(data.sequence + 1).map(String);\n if (notFoundPath) {\n notFoundArray = (0, _lodash.get)(data, notFoundPath, []);\n }\n }\n var done = (0, _lodash.isEqual)(expectedSeqNums, (0, _keys.default)(result));\n if (done) {\n timer.cancel();\n var resultArray = [];\n var foundArray = [];\n expectedSeqNums.forEach(function (index) {\n var seqResult = result[index];\n if (seqResult) {\n resultArray.push.apply(resultArray, (0, _toConsumableArray2.default)(seqResult.resultData));\n if (foundPath) {\n foundArray.push.apply(foundArray, (0, _toConsumableArray2.default)(seqResult.found));\n }\n }\n });\n var resolveValue = {\n resultArray: resultArray\n };\n if (foundPath) {\n resolveValue.foundArray = foundArray;\n }\n if (notFoundPath) {\n resolveValue.notFoundArray = notFoundArray;\n }\n resolve(resolveValue);\n _this4.stopListening(_this4, eventName);\n }\n });\n _this4.webex.request({\n service: _constants.DSS_SERVICE_NAME,\n resource: resource,\n method: 'POST',\n contentType: 'application/json',\n body: _objectSpread({\n requestId: requestId\n }, params)\n });\n timer.start();\n });\n },\n /**\n * Uses a batcher to make the request to the directory service\n * @param {Object} options\n * @param {string} options.resource the URL to query\n * @param {string} options.value the id or email to lookup\n * @returns {Promise} Resolves with an array of entities found\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n _batchedLookup: function _batchedLookup(options) {\n var resource = options.resource,\n lookupValue = options.lookupValue;\n var dataPath = _constants.LOOKUP_DATA_PATH;\n var entitiesFoundPath = _constants.LOOKUP_FOUND_PATH;\n var entitiesNotFoundPath = _constants.LOOKUP_NOT_FOUND_PATH;\n var requestKey = _constants.LOOKUP_REQUEST_KEY;\n this.batchers[resource] = this.batchers[resource] || new _dssBatcher.default({\n resource: resource,\n dataPath: dataPath,\n entitiesFoundPath: entitiesFoundPath,\n entitiesNotFoundPath: entitiesNotFoundPath,\n requestKey: requestKey,\n parent: this\n });\n return this.batchers[resource].request(lookupValue);\n },\n /**\n * Retrieves detailed information about an entity\n * @param {Object} options\n * @param {UUID} options.id the id of the entity to lookup\n * @returns {Promise} Resolves with the entity found or null if not found\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n lookupDetail: function lookupDetail(options) {\n var id = options.id;\n var resource = \"/lookup/orgid/\".concat(this.webex.internal.device.orgId, \"/identity/\").concat(id, \"/detail\");\n return this._request({\n dataPath: _constants.LOOKUP_DATA_PATH,\n foundPath: _constants.LOOKUP_FOUND_PATH,\n resource: resource\n }).then(function (_ref) {\n var resultArray = _ref.resultArray,\n foundArray = _ref.foundArray;\n // TODO: find out what is actually returned!\n if (foundArray[0] === id) {\n return resultArray[0];\n }\n return null;\n });\n },\n /**\n * Retrieves basic information about an entity within an organization\n * @param {Object} options\n * @param {UUID} options.id the id of the entity to lookup\n * @param {UUID} [options.entityProviderType] the provider to query\n * @param {Boolean} options.shouldBatch whether to batch the query, set to false for single immediate result (defaults to true)\n * @returns {Promise} Resolves with the entity found or null if not found\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n lookup: function lookup(options) {\n var id = options.id,\n entityProviderType = options.entityProviderType,\n _options$shouldBatch = options.shouldBatch,\n shouldBatch = _options$shouldBatch === void 0 ? true : _options$shouldBatch;\n var resource = entityProviderType ? \"/lookup/orgid/\".concat(this.webex.internal.device.orgId, \"/entityprovidertype/\").concat(entityProviderType) : \"/lookup/orgid/\".concat(this.webex.internal.device.orgId, \"/identities\");\n if (shouldBatch) {\n return this._batchedLookup({\n resource: resource,\n lookupValue: id\n });\n }\n return this._request({\n dataPath: _constants.LOOKUP_DATA_PATH,\n foundPath: _constants.LOOKUP_FOUND_PATH,\n resource: resource,\n params: (0, _defineProperty2.default)({}, _constants.LOOKUP_REQUEST_KEY, [id])\n }).then(function (_ref2) {\n var resultArray = _ref2.resultArray,\n foundArray = _ref2.foundArray;\n if (foundArray[0] === id) {\n return resultArray[0];\n }\n return null;\n });\n },\n /**\n * Retrieves basic information about an enitity within an organization\n * @param {Object} options\n * @param {UUID} options.email the email of the entity to lookup\n * @returns {Promise} Resolves with the entity found or rejects if not found\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n lookupByEmail: function lookupByEmail(options) {\n var email = options.email;\n var resource = \"/lookup/orgid/\".concat(this.webex.internal.device.orgId, \"/emails\");\n return this._request({\n dataPath: _constants.LOOKUP_DATA_PATH,\n foundPath: _constants.LOOKUP_FOUND_PATH,\n resource: resource,\n params: (0, _defineProperty2.default)({}, _constants.LOOKUP_REQUEST_KEY, [email])\n }).then(function (_ref3) {\n var resultArray = _ref3.resultArray,\n foundArray = _ref3.foundArray;\n if (foundArray[0] === email) {\n return resultArray[0];\n }\n return null;\n });\n },\n /**\n * Search for information about entities\n * @param {Object} options\n * @param {SearchType[]} options.requestedTypes an array of search types from: PERSON, CALLING_SERVICE, EXTERNAL_CALLING, ROOM, ROBOT\n * @param {string[]} options.queryString A query string that will be transformed into a Directory search filter query. It is used to search the following fields: username, givenName, familyName, displayName and email\n * @param {number} options.resultSize The maximum number of results returned from each provider\n * @returns {Promise} Resolves with an array of entities found\n * @throws {DssTimeoutError} when server does not respond in the specified timeframe\n */\n search: function search(options) {\n var requestedTypes = options.requestedTypes,\n resultSize = options.resultSize,\n queryString = options.queryString;\n return this._request({\n dataPath: _constants.SEARCH_DATA_PATH,\n resource: \"/search/orgid/\".concat(this.webex.internal.device.orgId, \"/entities\"),\n params: {\n queryString: queryString,\n resultSize: resultSize,\n requestedTypes: requestedTypes\n }\n }).then(function (_ref4) {\n var resultArray = _ref4.resultArray;\n return resultArray;\n });\n },\n /**\n * Search for information about places\n * @param {Object} options\n * @param {string} options.queryString A query string that will be transformed into a Directory search filter query. It is used to search the following fields: placeName, displayName.\n * @param {number} options.resultSize The maximum number of results returned from each provider\n * @returns {Promise} Resolves with an array of entities found\n */\n searchPlaces: function searchPlaces(options) {\n var _this5 = this;\n var resultSize = options.resultSize,\n queryString = options.queryString,\n isOnlySchedulableRooms = options.isOnlySchedulableRooms;\n return this._request({\n dataPath: 'directoryEntities',\n resource: \"/search/orgid/\".concat(this.webex.internal.device.orgId, \"/places\"),\n params: {\n queryString: queryString,\n resultSize: resultSize,\n isOnlySchedulableRooms: isOnlySchedulableRooms\n }\n }).catch(function (error) {\n _this5.logger.error(\"DSS->search place#ERROR, search place failure, \".concat(error.message));\n return _promise.default.reject(error);\n });\n },\n version: \"3.7.0\"\n});\nvar _default = exports.default = DSS;\n//# sourceMappingURL=dss.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _dss.default;\n }\n});\nvar _webexCore = require(\"@webex/webex-core\");\nvar _dss = _interopRequireDefault(require(\"./dss\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\n(0, _webexCore.registerInternalPlugin)('dss', _dss.default, {\n config: _config.default\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Timer = void 0;\nexports.safeSetInterval = safeSetInterval;\nexports.safeSetTimeout = safeSetTimeout;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Wrapper around setTimout which (in node) unrefs the returned timer to avoid\n * wedging the process open unexpectedly.\n * @param {Mixed} args\n * @protected\n * @returns {NodeJS.Timeout|Number}\n */\nfunction safeSetTimeout() {\n var timer = setTimeout.apply(void 0, arguments);\n if (timer.unref) {\n timer.unref();\n }\n return timer;\n}\n\n/**\n * Wrapper around setInterval which (in node) unrefs the returned timer to avoid\n * wedging the process open unexpectedly.\n * @param {Mixed} args\n * @protected\n * @returns {NodeJS.Timeout|Number}\n */\nfunction safeSetInterval() {\n var interval = setInterval.apply(void 0, arguments);\n if (interval.unref) {\n interval.unref();\n }\n return interval;\n}\n\n/**\n * Create a restartable timer\n */\nvar Timer = exports.Timer = /*#__PURE__*/function () {\n /**\n * Construct timer\n * @param {Function} callback Function called when the timer expired\n * @param {number} timeout duration of the timeout in milliseconds\n */\n function Timer(callback, timeout) {\n var _this = this;\n (0, _classCallCheck2.default)(this, Timer);\n (0, _defineProperty2.default)(this, \"state\", void 0);\n (0, _defineProperty2.default)(this, \"timeout\", void 0);\n (0, _defineProperty2.default)(this, \"callback\", void 0);\n (0, _defineProperty2.default)(this, \"currentTimer\", void 0);\n this.state = 'init';\n this.timeout = timeout;\n this.callback = function () {\n _this.state = 'done';\n callback();\n };\n }\n\n /**\n * Start timer\n * @returns {void}\n */\n (0, _createClass2.default)(Timer, [{\n key: \"start\",\n value: function start() {\n if (this.state !== 'init') {\n throw new Error(\"Can't start the timer when it's in \".concat(this.state, \" state\"));\n }\n this.startTimer();\n this.state = 'running';\n }\n\n /**\n * Clear the current timer and start a new one\n * @returns {void}\n */\n }, {\n key: \"reset\",\n value: function reset() {\n if (this.state !== 'running') {\n throw new Error(\"Can't reset the timer when it's in \".concat(this.state, \" state\"));\n }\n this.clearTimer();\n this.startTimer();\n }\n\n /**\n * Clear the timer\n * @returns {void}\n */\n }, {\n key: \"cancel\",\n value: function cancel() {\n if (this.state !== 'running') {\n throw new Error(\"Can't cancel the timer when it's in \".concat(this.state, \" state\"));\n }\n this.clearTimer();\n this.state = 'done';\n }\n\n /**\n * Create the actual timer\n * @private\n * @returns {undefined}\n */\n }, {\n key: \"startTimer\",\n value: function startTimer() {\n this.currentTimer = safeSetTimeout(this.callback, this.timeout);\n }\n\n /**\n * Clear the actual timer\n * @private\n * @returns {undefined}\n */\n }, {\n key: \"clearTimer\",\n value: function clearTimer() {\n clearTimeout(this.currentTimer);\n }\n }]);\n return Timer;\n}();\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.decode = decode;\nexports.default = void 0;\nexports.encode = encode;\nexports.fromBase64url = fromBase64url;\nexports.toBase64Url = toBase64Url;\nexports.validate = validate;\nvar _urlsafeBase = _interopRequireDefault(require(\"urlsafe-base64\"));\nvar _safeBuffer = require(\"safe-buffer\");\nvar _isBuffer = _interopRequireDefault(require(\"./isBuffer\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Converts a string from a base64url-encoded string\n * @param {string} str\n * @returns {string}\n */\nfunction fromBase64url(str) {\n return _urlsafeBase.default.decode(str).toString();\n}\n\n/**\n * Converts a string to a base64url-encoded string. It also accepts a buffer\n * @param {string|buffer} str\n * @returns {string}\n */\nfunction toBase64Url(str) {\n var buffer = str;\n if (!(0, _isBuffer.default)(buffer)) {\n buffer = _safeBuffer.Buffer.from(buffer);\n }\n return _urlsafeBase.default.encode(buffer);\n}\n\n/**\n * Converts a string to a base64url-encoded string. It also accepts a buffer\n * @param {string|buffer} str\n * @returns {string}\n */\nfunction encode(str) {\n return toBase64Url(str);\n}\n\n/**\n * Converts a string from a base64url-encoded string\n * @param {string} str\n * @returns {string}\n */\nfunction decode(str) {\n return fromBase64url(str);\n}\n\n/**\n * Indicates if the provided string is, in fact, a base64 string\n * @param {String} str\n * @returns {Boolean}\n */\nfunction validate(str) {\n return _urlsafeBase.default.validate(str);\n}\nvar _default = exports.default = {\n fromBase64url: fromBase64url,\n toBase64Url: toBase64Url,\n encode: encode,\n decode: decode,\n validate: validate\n};\n//# sourceMappingURL=base64.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBrowserSerial = exports.default = void 0;\nvar _bowser = _interopRequireDefault(require(\"bowser\"));\nvar _lodash = require(\"lodash\");\nvar _window = _interopRequireDefault(require(\"global/window\"));\nvar _constants = require(\"./constants\");\nvar getBrowserSerial = exports.getBrowserSerial = function getBrowserSerial() {\n var browserData;\n try {\n var _window$navigator;\n browserData = _window.default !== null && _window.default !== void 0 && (_window$navigator = _window.default.navigator) !== null && _window$navigator !== void 0 && _window$navigator.userAgent ? _bowser.default.getParser(_window.default.navigator.userAgent) : {\n error: _constants.browserDetection.unableToAccessUserAgent\n };\n } catch (err) {\n browserData = {\n error: err.message\n };\n }\n return browserData;\n};\nvar mockDetectionObject = {\n /* eslint-disable global-require */\n getOSName: function getOSName() {\n return require('os').platform();\n },\n getOSVersion: function getOSVersion() {\n return require('os').release();\n },\n /* eslint-enable global-require */\n getBrowserName: function getBrowserName() {\n return '';\n },\n getBrowserVersion: function getBrowserVersion() {\n return '';\n },\n isBrowser: function isBrowser() {\n return false;\n }\n};\nvar createDetectionObject = function createDetectionObject(results) {\n var getOSName = function getOSName() {\n var _results$getOSName;\n return (_results$getOSName = results === null || results === void 0 ? void 0 : results.getOSName()) !== null && _results$getOSName !== void 0 ? _results$getOSName : '';\n };\n var getOSVersion = function getOSVersion() {\n var _results$getOSVersion;\n return (_results$getOSVersion = results === null || results === void 0 ? void 0 : results.getOSVersion()) !== null && _results$getOSVersion !== void 0 ? _results$getOSVersion : '';\n };\n var getBrowserName = function getBrowserName() {\n var _results$getBrowserNa;\n return (_results$getBrowserNa = results === null || results === void 0 ? void 0 : results.getBrowserName()) !== null && _results$getBrowserNa !== void 0 ? _results$getBrowserNa : '';\n };\n var getBrowserVersion = function getBrowserVersion() {\n var _results$getBrowserVe;\n return (_results$getBrowserVe = results === null || results === void 0 ? void 0 : results.getBrowserVersion()) !== null && _results$getBrowserVe !== void 0 ? _results$getBrowserVe : '';\n };\n var isBrowser = function isBrowser(name) {\n return !!(results !== null && results !== void 0 && results.isBrowser(name, true));\n };\n return {\n getOSName: getOSName,\n getOSVersion: getOSVersion,\n getBrowserName: getBrowserName,\n getBrowserVersion: getBrowserVersion,\n isBrowser: isBrowser\n };\n};\nvar _default = exports.default = (0, _lodash.memoize)(function (agent) {\n var _window$navigator2;\n return agent || (_window$navigator2 = _window.default.navigator) !== null && _window$navigator2 !== void 0 && _window$navigator2.userAgent ? createDetectionObject(_bowser.default.getParser(agent || _window.default.navigator.userAgent)) : mockDetectionObject;\n});\n//# sourceMappingURL=browser-detection.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = debounce;\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Behaves like debounce, but additionally executes after a number of calls are\n * attempted, rather than just time\n * @param {Function} fn\n * @param {Number} wait\n * @param {Object} options\n * @returns {Function}\n */\nfunction debounce(fn, wait, options) {\n /* eslint no-invalid-this: [0] */\n\n if (!fn) {\n throw new Error('`fn` must be a function');\n }\n if (!wait) {\n throw new Error('`wait` is required');\n }\n options = options || {};\n if (!options.maxWait) {\n throw new Error('`options.maxWait` is required');\n }\n if (!options.maxCalls) {\n throw new Error('`options.maxCalls` is required');\n }\n var _options = options,\n maxCalls = _options.maxCalls,\n maxWait = _options.maxWait;\n var count = 0;\n var maxWaitTimer;\n var waitTimer;\n return function wrapper() {\n count += 1;\n clearTimeout(waitTimer);\n waitTimer = setTimeout(function () {\n return exec();\n }, wait);\n if (!maxWaitTimer) {\n maxWaitTimer = setTimeout(function () {\n return exec();\n }, maxWait);\n }\n if (count >= maxCalls) {\n (0, _apply.default)(exec, this, []);\n }\n };\n\n /**\n * @private\n * @returns {undefined}\n */\n function exec() {\n clearTimeout(waitTimer);\n waitTimer = null;\n clearTimeout(maxWaitTimer);\n maxWaitTimer = null;\n count = 0;\n (0, _apply.default)(fn, this, []);\n }\n}\n//# sourceMappingURL=capped-debounce.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = checkRequired;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Check object for the specified keys\n * @param {Array} keys\n * @param {Object} object\n * @returns {undefined}\n * @throws Error\n */\nfunction checkRequired(keys, object) {\n keys.forEach(function (key) {\n if (!object[key]) {\n throw new Error(\"missing required property \".concat(key, \" from \").concat(object));\n }\n });\n}\n//# sourceMappingURL=check-required.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hydraTypes = exports.deviceType = exports.browserDetection = exports.SDK_EVENT = exports.INTERNAL_US_INTEGRATION_CLUSTER_NAME = exports.INTERNAL_US_CLUSTER_NAME = void 0;\nvar SDK_EVENT = exports.SDK_EVENT = {\n INTERNAL: {\n WEBEX_ACTIVITY: 'event:conversation.activity',\n ACTIVITY_FIELD: {\n ACTOR: 'actor',\n OBJECT: 'object',\n TARGET: 'target'\n },\n ACTIVITY_VERB: {\n ACKNOWLEDGE: 'acknowledge',\n CARD_ACTION: 'cardAction',\n CREATE: 'create',\n POST: 'post',\n SHARE: 'share',\n DELETE: 'delete',\n ADD: 'add',\n LEAVE: 'leave',\n ADD_MODERATOR: 'assignModerator',\n REMOVE_MODERATOR: 'unassignModerator',\n LOCK: 'lock',\n UNLOCK: 'unlock',\n HIDE: 'hide',\n UPDATE: 'update'\n },\n ACTIVITY_TAG: {\n HIDDEN: 'HIDDEN',\n ONE_ON_ONE: 'ONE_ON_ONE',\n LOCKED: 'LOCKED'\n }\n },\n EXTERNAL: {\n EVENT_TYPE: {\n CREATED: 'created',\n DELETED: 'deleted',\n UPDATED: 'updated',\n SEEN: 'seen'\n },\n OWNER: {\n CREATOR: 'creator',\n ORG: 'org'\n },\n STATUS: {\n ACTIVE: 'active',\n DISABLED: 'disabled'\n },\n SPACE_TYPE: {\n DIRECT: 'direct',\n GROUP: 'group'\n },\n RESOURCE: {\n ATTACHMENT_ACTIONS: 'attachmentActions',\n MEMBERSHIPS: 'memberships',\n MESSAGES: 'messages',\n ROOMS: 'rooms'\n },\n ATTACHMENTS: {\n CARD_CONTENT_TYPE: 'application/vnd.microsoft.card.adaptive'\n }\n }\n};\nvar browserDetection = exports.browserDetection = {\n unableToAccessUserAgent: 'unable to access window.navigator.userAgent'\n};\nvar hydraTypes = exports.hydraTypes = {\n ATTACHMENT_ACTION: 'ATTACHMENT_ACTION',\n CONTENT: 'CONTENT',\n MEMBERSHIP: 'MEMBERSHIP',\n MESSAGE: 'MESSAGE',\n ORGANIZATION: 'ORGANIZATION',\n PEOPLE: 'PEOPLE',\n ROOM: 'ROOM',\n TEAM: 'TEAM'\n};\nvar deviceType = exports.deviceType = {\n PROVISIONAL: 'PROVISIONAL',\n WEB: 'WEB'\n};\nvar INTERNAL_US_CLUSTER_NAME = exports.INTERNAL_US_CLUSTER_NAME = 'urn:TEAM:us-east-2_a';\nvar INTERNAL_US_INTEGRATION_CLUSTER_NAME = exports.INTERNAL_US_INTEGRATION_CLUSTER_NAME = 'urn:TEAM:us-east-1_int13';\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = Defer;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Creates a new `Defer`red object,\n * @returns {Defer}\n */\nfunction Defer() {\n var _this = this;\n this.promise = new _promise.default(function (resolve, reject) {\n /**\n * @instance\n * @memberof Defer\n * @type {function}\n */\n _this.resolve = resolve;\n /**\n * @instance\n * @memberof Defer\n * @type {function}\n */\n _this.reject = reject;\n });\n}\n//# sourceMappingURL=defer.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _coreDecorators = require(\"core-decorators\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @private\n * @returns {function}\n */\nfunction emptyDecorator() {\n return function noop() {\n /* eslint no-empty:[0] */\n };\n}\nvar exportedDeprecated = process.env.NODE_ENV === 'production' ? emptyDecorator : _coreDecorators.deprecated;\nvar _default = exports.default = exportedDeprecated;\n//# sourceMappingURL=deprecated.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createEventEnvelope = createEventEnvelope;\nexports.ensureMyIdIsAvailable = ensureMyIdIsAvailable;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _constants = require(\"./constants\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Creates a 'webhook' envelope to wrap Webex events in\n * @param {object} webex - sdk object\n * @param {string} resource - resource to create an envelope for\n * @returns {object} - Returns a promise of an event envelope object\n */\nfunction createEventEnvelope(webex, resource) {\n return ensureMyIdIsAvailable(webex).then(function () {\n return _promise.default.resolve({\n createdBy: webex.internal.me.id,\n orgId: webex.internal.me.orgId,\n resource: resource,\n // id -- webhook id concept does not correlate to SDK socket event\n // name -- webhook name concept does not correlate to SDK socket event\n // targetUrl -- targetUrl concept does not correlate to SDK socket event\n // secret -- secret concept does not correlate to SDK socket event\n ownedBy: _constants.SDK_EVENT.EXTERNAL.OWNER.CREATOR,\n status: _constants.SDK_EVENT.EXTERNAL.STATUS.ACTIVE,\n created: new Date().toISOString(),\n data: {}\n });\n }).catch(function (e) {\n _promise.default.reject(new Error(\"Unable to get person info for \".concat(resource, \" event envelope: \").concat(e.message)));\n });\n}\n\n/**\n * Stores SDK users info in the sdk object if it doesn't already exist\n * @param {object} webex - sdk object\n * @returns {Promise} - Returns a promise that user info will be available\n */\nfunction ensureMyIdIsAvailable(_x) {\n return _ensureMyIdIsAvailable.apply(this, arguments);\n}\nfunction _ensureMyIdIsAvailable() {\n _ensureMyIdIsAvailable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(webex) {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!('me' in webex.internal)) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", _promise.default.resolve());\n case 2:\n return _context.abrupt(\"return\", webex.people.get('me').then(function (person) {\n webex.internal.me = person;\n return _promise.default.resolve();\n }));\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _ensureMyIdIsAvailable.apply(this, arguments);\n}\n//# sourceMappingURL=event-envelope.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.proxyEvents = proxyEvents;\nexports.transferEvents = transferEvents;\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Proxies the event binding methods of emitter onto proxy\n * @param {EventEmitter|EventEmitterProxy} emitter\n * @param {mixed} proxy (probably a promise)\n * @returns {EventEmitter} Returns the source emitter to ease use in promise chains\n */\nfunction proxyEvents(emitter, proxy) {\n ['on', 'once'].forEach(function (key) {\n proxy[key] = function () {\n emitter[key].apply(emitter, arguments);\n return proxy;\n };\n });\n return emitter;\n}\n\n/**\n * Given a list of events, fires them on drain when they're emitted from source\n * @param {Array|string} events\n * @param {EventEmitter} source\n * @param {EventEmitter} drain\n * @returns {undefined}\n */\nfunction transferEvents(events, source, drain) {\n events = (0, _lodash.isArray)(events) ? events : [events];\n events.forEach(function (event) {\n if (source.on) {\n source.on(event, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return emit.apply(void 0, [drain, event].concat(args));\n });\n }\n });\n}\n\n/**\n * Emits an event\n * @param {EventEmitter} target The EventEmitter from which to emit an event\n * @returns {mixed}\n */\nfunction emit(target) {\n var method = target.trigger || target.emit;\n\n /* istanbul ignore if */\n if (!method) {\n throw new Error('count not determine emit method');\n }\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n return (0, _apply.default)(method, target, rest);\n}\n//# sourceMappingURL=events.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _wrapNativeSuper2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/wrapNativeSuper\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Base Exception class\n */\nvar Exception = exports.default = /*#__PURE__*/function (_Error) {\n (0, _inherits2.default)(Exception, _Error);\n var _super = _createSuper(Exception);\n /**\n * constructor\n * @param {mixed} args\n * @returns {Exception}\n */\n function Exception() {\n var _this;\n (0, _classCallCheck2.default)(this, Exception);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n var message;\n if (_this.parse) {\n var _this2;\n message = (_this2 = _this).parse.apply(_this2, args);\n } else if (_this.constructor.parse) {\n var _this$constructor;\n message = (_this$constructor = _this.constructor).parse.apply(_this$constructor, args);\n }\n if (!message) {\n message = _this.constructor.defaultMessage;\n }\n _this.name = _this.constructor.name;\n _this.message = message;\n return _this;\n }\n\n /**\n * Generates the value assigned to `this.message`. You'll probably want to\n * override this in your custom Exception\n * @param {mixed} args\n * @returns {string}\n */\n (0, _createClass2.default)(Exception, null, [{\n key: \"parse\",\n value: function parse() {\n return arguments.length <= 0 ? undefined : arguments[0];\n }\n }]);\n return Exception;\n}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));\n(0, _defineProperty2.default)(Exception, \"defaultMessage\", 'An error occurred');\n//# sourceMappingURL=exception.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = true;\n//# sourceMappingURL=browser.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _node.default;\n }\n});\nvar _node = _interopRequireDefault(require(\"./node\"));\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"BrowserDetection\", {\n enumerable: true,\n get: function get() {\n return _browserDetection.default;\n }\n});\n_Object$defineProperty(exports, \"Defer\", {\n enumerable: true,\n get: function get() {\n return _defer.default;\n }\n});\n_Object$defineProperty(exports, \"Exception\", {\n enumerable: true,\n get: function get() {\n return _exception.default;\n }\n});\n_Object$defineProperty(exports, \"INTERNAL_US_CLUSTER_NAME\", {\n enumerable: true,\n get: function get() {\n return _constants.INTERNAL_US_CLUSTER_NAME;\n }\n});\n_Object$defineProperty(exports, \"INTERNAL_US_INTEGRATION_CLUSTER_NAME\", {\n enumerable: true,\n get: function get() {\n return _constants.INTERNAL_US_INTEGRATION_CLUSTER_NAME;\n }\n});\n_Object$defineProperty(exports, \"SDK_EVENT\", {\n enumerable: true,\n get: function get() {\n return _constants.SDK_EVENT;\n }\n});\n_Object$defineProperty(exports, \"base64\", {\n enumerable: true,\n get: function get() {\n return _base.default;\n }\n});\n_Object$defineProperty(exports, \"buildHydraMembershipId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.buildHydraMembershipId;\n }\n});\n_Object$defineProperty(exports, \"buildHydraMessageId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.buildHydraMessageId;\n }\n});\n_Object$defineProperty(exports, \"buildHydraOrgId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.buildHydraOrgId;\n }\n});\n_Object$defineProperty(exports, \"buildHydraPersonId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.buildHydraPersonId;\n }\n});\n_Object$defineProperty(exports, \"buildHydraRoomId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.buildHydraRoomId;\n }\n});\n_Object$defineProperty(exports, \"cappedDebounce\", {\n enumerable: true,\n get: function get() {\n return _cappedDebounce.default;\n }\n});\n_Object$defineProperty(exports, \"checkRequired\", {\n enumerable: true,\n get: function get() {\n return _checkRequired.default;\n }\n});\n_Object$defineProperty(exports, \"constructHydraId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.constructHydraId;\n }\n});\n_Object$defineProperty(exports, \"createEventEnvelope\", {\n enumerable: true,\n get: function get() {\n return _eventEnvelope.createEventEnvelope;\n }\n});\n_Object$defineProperty(exports, \"deconstructHydraId\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.deconstructHydraId;\n }\n});\n_Object$defineProperty(exports, \"deprecated\", {\n enumerable: true,\n get: function get() {\n return _deprecated.default;\n }\n});\n_Object$defineProperty(exports, \"deviceType\", {\n enumerable: true,\n get: function get() {\n return _constants.deviceType;\n }\n});\n_Object$defineProperty(exports, \"ensureMyIdIsAvailable\", {\n enumerable: true,\n get: function get() {\n return _eventEnvelope.ensureMyIdIsAvailable;\n }\n});\n_Object$defineProperty(exports, \"getBrowserSerial\", {\n enumerable: true,\n get: function get() {\n return _browserDetection.getBrowserSerial;\n }\n});\n_Object$defineProperty(exports, \"getHydraClusterString\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.getHydraClusterString;\n }\n});\n_Object$defineProperty(exports, \"getHydraFiles\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.getHydraFiles;\n }\n});\n_Object$defineProperty(exports, \"getHydraRoomType\", {\n enumerable: true,\n get: function get() {\n return _uuidUtils.getHydraRoomType;\n }\n});\n_Object$defineProperty(exports, \"hydraTypes\", {\n enumerable: true,\n get: function get() {\n return _constants.hydraTypes;\n }\n});\n_Object$defineProperty(exports, \"inBrowser\", {\n enumerable: true,\n get: function get() {\n return _inBrowser.default;\n }\n});\n_Object$defineProperty(exports, \"isBuffer\", {\n enumerable: true,\n get: function get() {\n return _isBuffer.default;\n }\n});\n_Object$defineProperty(exports, \"make\", {\n enumerable: true,\n get: function get() {\n return _templateContainer.default;\n }\n});\n_Object$defineProperty(exports, \"makeStateDataType\", {\n enumerable: true,\n get: function get() {\n return _makeStateDatatype.default;\n }\n});\n_Object$defineProperty(exports, \"oneFlight\", {\n enumerable: true,\n get: function get() {\n return _oneFlight.default;\n }\n});\n_Object$defineProperty(exports, \"patterns\", {\n enumerable: true,\n get: function get() {\n return _patterns.default;\n }\n});\n_Object$defineProperty(exports, \"proxyEvents\", {\n enumerable: true,\n get: function get() {\n return _events.proxyEvents;\n }\n});\n_Object$defineProperty(exports, \"resolveWith\", {\n enumerable: true,\n get: function get() {\n return _resolveWith.default;\n }\n});\n_Object$defineProperty(exports, \"retry\", {\n enumerable: true,\n get: function get() {\n return _retry.default;\n }\n});\n_Object$defineProperty(exports, \"tap\", {\n enumerable: true,\n get: function get() {\n return _tap.default;\n }\n});\n_Object$defineProperty(exports, \"transferEvents\", {\n enumerable: true,\n get: function get() {\n return _events.transferEvents;\n }\n});\n_Object$defineProperty(exports, \"whileInFlight\", {\n enumerable: true,\n get: function get() {\n return _whileInFlight.default;\n }\n});\nvar _base = _interopRequireDefault(require(\"./base64\"));\nvar _isBuffer = _interopRequireDefault(require(\"./isBuffer\"));\nvar _cappedDebounce = _interopRequireDefault(require(\"./capped-debounce\"));\nvar _checkRequired = _interopRequireDefault(require(\"./check-required\"));\nvar _defer = _interopRequireDefault(require(\"./defer\"));\nvar _makeStateDatatype = _interopRequireDefault(require(\"./make-state-datatype\"));\nvar _templateContainer = _interopRequireDefault(require(\"./template-container\"));\nvar _oneFlight = _interopRequireDefault(require(\"./one-flight\"));\nvar _patterns = _interopRequireDefault(require(\"./patterns\"));\nvar _events = require(\"./events\");\nvar _eventEnvelope = require(\"./event-envelope\");\nvar _resolveWith = _interopRequireDefault(require(\"./resolve-with\"));\nvar _retry = _interopRequireDefault(require(\"./retry\"));\nvar _tap = _interopRequireDefault(require(\"./tap\"));\nvar _whileInFlight = _interopRequireDefault(require(\"./while-in-flight\"));\nvar _exception = _interopRequireDefault(require(\"./exception\"));\nvar _deprecated = _interopRequireDefault(require(\"./deprecated\"));\nvar _inBrowser = _interopRequireDefault(require(\"./in-browser\"));\nvar _constants = require(\"./constants\");\nvar _browserDetection = _interopRequireWildcard(require(\"./browser-detection\"));\nvar _uuidUtils = require(\"./uuid-utils\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n *\n * Grabbed from https://github.com/feross/is-buffer/blob/master/index.js => es6 + prettier\n *\n * @param {buffer} buffer\n * @returns {boolean}\n */\nvar _default = exports.default = function _default(buffer) {\n return buffer != null && buffer.constructor != null && typeof buffer.constructor.isBuffer === 'function' && buffer.constructor.isBuffer(buffer);\n};\n//# sourceMappingURL=isBuffer.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = makeStateDataType;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Reminder: any class using this function must have something like the\n// following in its initialize method:\n//\n// // HACK to deal with the fact that AmpersandState#dataTypes#set is a pure\n// // function.\n// this._dataTypes = cloneDeep(this._dataTypes);\n// Object.keys(this._dataTypes).forEach((key) => {\n// if (this._dataTypes[key].set) {\n// this._dataTypes[key].set = this._dataTypes[key].set.bind(this);\n// }\n// });\n// // END HACK\n\n/**\n * Creates an ampersand state object that wires its event handlers like a an\n * ampersand child\n * @param {Function} Constructor\n * @param {string} name\n * @returns {Object}\n */\nfunction makeStateDataType(Constructor, name) {\n if (!Constructor || !name) {\n throw new Error('missing parameter for makeStateDataType');\n }\n return {\n dataType: {\n set: function set(newVal) {\n // newVal.parent = this;\n if (newVal instanceof Constructor) {\n newVal.parent = this;\n return {\n val: newVal,\n type: name\n };\n }\n\n // We only want to construct the new instance if we have some set of\n // attributes (even an empty object) to base it on. This is to deal with\n // the unexpected side effect that AmpState#unset will create a new\n // instance.\n return {\n val: newVal ? new Constructor(newVal, {\n parent: this\n }) : undefined,\n type: name\n };\n },\n compare: function compare(currentValue, newVal) {\n return currentValue === newVal;\n },\n onChange: function onChange(newVal, previousVal, attributeName) {\n // Copied from ampersand-state.js\n // if this has changed we want to also handle\n // event propagation\n if (previousVal) {\n this.stopListening(previousVal, 'all', this._getCachedEventBubblingHandler(attributeName));\n }\n if (newVal) {\n this.listenTo(newVal, 'all', this._getCachedEventBubblingHandler(attributeName));\n }\n }\n },\n prop: {\n /**\n * This is a really unfortunate hack to deal with ampersand`s decision to\n * make the dateType#set function pure. The only function called with the\n * scope of the parent at set time seems to be test\n * @param {AmpersandState} newVal\n * @returns {boolean}\n */\n test: function test(newVal) {\n if (!newVal) {\n return false;\n }\n newVal.parent = this;\n return false;\n },\n type: name\n }\n };\n}\n//# sourceMappingURL=make-state-datatype.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = oneFlight;\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _templateContainer = _interopRequireDefault(require(\"./template-container\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Alias Map and WeakMap to get around a babel compiler bug\nvar W = _weakMap.default;\nvar M = _map.default;\nvar WeakMappedMappedMap = (0, _templateContainer.default)(W, M, M);\nvar flights = new WeakMappedMappedMap();\n\n/**\n * @memberof Util\n * @param {Object} options\n * @param {Function} options.keyFactory\n * @param {boolean} options.cacheFailures\n * @param {boolean} options.cacheSuccesses\n * @returns {Function}\n */\nfunction oneFlight() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length === 3) {\n return (0, _apply.default)(oneFlightDecorator, null, params);\n }\n var options = params[0] || {};\n var cacheFailures = options.cacheFailures,\n cacheSuccesses = options.cacheSuccesses,\n keyFactory = options.keyFactory;\n return oneFlightDecorator;\n\n /**\n * @param {Object} target\n * @param {string} prop\n * @param {Object} descriptor\n * @private\n * @returns {Object}\n */\n function oneFlightDecorator(target, prop, descriptor) {\n var key = prop;\n descriptor.value = (0, _lodash.wrap)(descriptor.value, function oneFlightExecutor(fn) {\n var _this = this;\n var innerKey = key;\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n if (keyFactory) {\n innerKey = \"\".concat(innerKey, \"_\").concat(keyFactory.apply(void 0, args));\n }\n\n /* eslint no-invalid-this: [0] */\n var flight = flights.get(this, target, innerKey);\n if (flight) {\n return flight;\n }\n flight = (0, _apply.default)(fn, this, args);\n if (!cacheFailures && flight && flight.catch) {\n flight = flight.catch(function (reason) {\n flights.delete(_this, target, innerKey);\n return _promise.default.reject(reason);\n });\n }\n if (!cacheSuccesses && flight && flight.then) {\n flight = flight.then(function (result) {\n flights.delete(_this, target, innerKey);\n return result;\n });\n }\n flights.set(this, target, innerKey, flight);\n return flight;\n });\n\n // This *should* make decorators compatible with AmpersandState class\n // definitions\n if ((0, _typeof2.default)(target) === 'object' && !target.prototype) {\n target[prop] = descriptor.value;\n }\n return descriptor;\n }\n}\n//# sourceMappingURL=one-flight.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @description Set of regex patterns to compile once and use throughout the\n * app. All non-prefixed patterns have start/end characters to ensure exact\n * matches. Patterns prefixed with \"exec\" are the same as their non-prefixed\n * counterparts but without the start/end characters so they can be used with\n * methods like `RegExp#exec`.\n */\nvar _default = exports.default = {\n /**\n * Regular express that validates a string is strictly an email.\n * Allows for validation of emails within services such as conversation\n * activities or user details.\n * See [RegEx information here]{@link https://ihateregex.io/expr/email-2}.\n *\n * @type {RegExp}\n */\n email: /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n /**\n * Regular expression that validates an ambiguous string contains emails\n * (one or more) within.\n * See [RegEx information here]{@link https://ihateregex.io/expr/email-2}.\n *\n * @type {RegExp}\n */\n containsEmails: /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))/g,\n /**\n * Matches a UUID\n * @type {RegExp}\n */\n uuid: /^[a-f\\d]{8}(?:-[a-f\\d]{4}){3}-[a-f\\d]{12}$/,\n /**\n * Regular expression that validates an ambiguous string contains MTID\n * @type {RegExp}\n */\n containsMTID: /(MTID=)[^&$#]*/g,\n /**\n * Same as this.email, but allows for surrounding characters\n * @type {RegExp}\n */\n execEmail: /[^\\s]+?@[^\\s]+?/,\n /**\n * Same as this.uuid but allows for surrounding characters\n * @type {RegExp}\n */\n execUuid: /[a-f\\d]{8}(?:-[a-f\\d]{4}){3}-[a-f\\d]{12}/\n};\n//# sourceMappingURL=patterns.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = resolveWith;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Sugar method for returning the desired object at the end of a promise chain\n * @param {any} object the item with which to resolve the promise chain\n * @returns {function}\n * @example\n * var item = {\n * prop: 2\n * };\n * Promise\n * .resolve(item.prop)\n * .then(resolveWith(item))\n * .then(function(res) {\n * require('assert').deepEqual(res, {prop:2});\n * return 'success'\n * })\n * // => success\n *\n */\nfunction resolveWith(object) {\n return function resolver() {\n return _promise.default.resolve(object);\n };\n}\n//# sourceMappingURL=resolve-with.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = retry;\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _events = require(\"events\");\nvar _lodash = require(\"lodash\");\nvar _backoff = _interopRequireDefault(require(\"backoff\"));\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* eslint max-nested-callbacks: [0] */\n/**\n * Makes a promise-returning method retryable according to the specified backoff\n * pattern\n * @param {Object} options\n * @param {boolean} options.backoff\n * @param {number} options.delay\n * @param {number} options.initialDelay\n * @param {number} options.maxAttempts\n * @param {number} options.maxDelay\n *\n * @returns {Function}\n */\nfunction retry() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n var options = params[0] || {};\n options = _objectSpread({}, options);\n (0, _lodash.defaults)(options, {\n backoff: true,\n delay: 1,\n maxAttempts: 3\n });\n var strategyOptions;\n if (options.backoff) {\n strategyOptions = {\n initialDelay: options.delay,\n maxDelay: options.maxDelay\n };\n } else {\n strategyOptions = {\n initialDelay: 1,\n maxDelay: 1\n };\n }\n if (params.length === 3) {\n return (0, _apply.default)(retryDecorator, null, params);\n }\n return retryDecorator;\n\n /**\n * @param {Object} target\n * @param {string} prop\n * @param {Object} descriptor\n * @private\n * @returns {Object}\n */\n function retryDecorator(target, prop, descriptor) {\n descriptor.value = (0, _lodash.wrap)(descriptor.value, function retryExecutor(fn) {\n var _this = this;\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n var emitter = new _events.EventEmitter();\n var promise = new _promise.default(function (resolve, reject) {\n // backoff.call is not Function.prototype.call; it's an unfortunate naming\n // collision.\n /* eslint prefer-reflect: [0] */\n var call = _backoff.default.call(function (cb) {\n /* eslint no-invalid-this: [0] */\n var innerPromise = (0, _apply.default)(fn, _this, args);\n if ((0, _lodash.isFunction)(innerPromise.on)) {\n innerPromise.on('progress', emitter.emit.bind(emitter, 'progress'));\n innerPromise.on('upload-progress', emitter.emit.bind(emitter, 'upload-progress'));\n innerPromise.on('download-progress', emitter.emit.bind(emitter, 'download-progress'));\n }\n return innerPromise.then(function (res) {\n cb(null, res);\n }).catch(function (reason) {\n if (!reason) {\n reason = new Error('retryable method failed without providing an error object');\n }\n cb(reason);\n });\n }, function (err, res) {\n if (err) {\n return reject(err);\n }\n return resolve(res);\n });\n call.setStrategy(new _backoff.default.ExponentialStrategy(strategyOptions));\n if (options.maxAttempts) {\n call.failAfter(options.maxAttempts - 1);\n }\n call.start();\n });\n promise.on = function on(key, callback) {\n emitter.on(key, callback);\n return promise;\n };\n return promise;\n });\n\n // This *should* make decorators compatible with AmpersandState class\n // definitions\n if ((0, _typeof2.default)(target) === 'object' && !target.prototype) {\n target[prop] = descriptor.value;\n }\n return descriptor;\n }\n}\n//# sourceMappingURL=retry.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = tap;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Injects code into a promise chain without modifying the promise chain's result\n * @param {Function} fn\n * @returns {Promise}\n * @example\n * function f() {\n * return Promise.resolve(5);\n * }\n *\n * f()\n * .then(tap(() => 12))\n * // => 5\n */\nfunction tap(fn) {\n return function (r) {\n return new _promise.default(function (resolve) {\n resolve(fn(r));\n }).then(function () {\n return r;\n }).catch(function () {\n return r;\n });\n };\n}\n//# sourceMappingURL=tap.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = make;\nvar _construct2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/construct\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _util = _interopRequireDefault(require(\"util\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Factory which produces a multi-keyed container based on the provided set of\n * constructors\n * @param {mixed} containers\n * @returns {Container}\n */\nfunction make() {\n for (var _len = arguments.length, containers = new Array(_len), _key = 0; _key < _len; _key++) {\n containers[_key] = arguments[_key];\n }\n var TopContainer = containers.shift();\n var data = new _weakMap.default();\n var sizes = new _weakMap.default();\n var ChildContainer = containers.length > 1 ? make.apply(void 0, containers) : containers[0];\n var name = \"(\".concat([TopContainer.name].concat(containers.map(function (container) {\n return container.name;\n })).join(', '), \")\");\n\n /**\n * Container that wraps an arbitrary set of tupples to their values\n */\n var Container = /*#__PURE__*/function () {\n /**\n * @constructs Container\n */\n function Container() {\n (0, _classCallCheck2.default)(this, Container);\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n data.set(this, (0, _construct2.default)(TopContainer, args));\n sizes.set(this, 0);\n }\n\n /**\n * getter for .size\n * @returns {number}\n */\n (0, _createClass2.default)(Container, [{\n key: \"size\",\n get: function get() {\n return sizes.get(this);\n }\n\n /**\n * Identical to Container#set() but leads slightly more intuitive code when\n * the container is based on a Set rather than a Map.\n * @returns {Container}\n */\n }, {\n key: \"add\",\n value: function add() {\n return this.set.apply(this, arguments);\n }\n\n /**\n * Removes all items from the container\n * @returns {undefined}\n */\n }, {\n key: \"clear\",\n value: function clear() {\n var ret = data.get(this).clear();\n sizes.set(this, 0);\n return ret;\n }\n\n /**\n * Removes the specified item to the container\n * @param {mixed} key\n * @param {Array} keys\n * @returns {boolean}\n */\n }, {\n key: \"delete\",\n value: function _delete(key) {\n var mine = data.get(this);\n for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n keys[_key3 - 1] = arguments[_key3];\n }\n if (!keys.length) {\n return mine.delete(key);\n }\n var next = mine.get(key);\n if (!next) {\n return false;\n }\n var ret = next.delete.apply(next, keys);\n if (ret) {\n sizes.set(this, sizes.get(this) - 1);\n }\n if (next.size === 0) {\n mine.delete(key);\n }\n return ret;\n }\n\n /**\n * Retrieves the specified item from the container\n * @param {mixed} key\n * @param {Array} keys\n * @returns {mixed}\n */\n }, {\n key: \"get\",\n value: function get(key) {\n var mine = data.get(this);\n if (!mine.get) {\n return mine;\n }\n for (var _len4 = arguments.length, keys = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n keys[_key4 - 1] = arguments[_key4];\n }\n if (!keys.length) {\n return mine.get(key);\n }\n var next = mine.get(key);\n if (!next) {\n return undefined;\n }\n if (!next.get) {\n return next;\n }\n return next.get.apply(next, keys);\n }\n\n /**\n * Indicates whether the container holds the specified item\n * @param {mixed} key\n * @param {Array} keys\n * @returns {Boolean}\n */\n }, {\n key: \"has\",\n value: function has() {\n return typeof this.get.apply(this, arguments) !== 'undefined';\n }\n\n /**\n * Stores the specified item in the container\n * @param {mixed} key\n * @param {Array} args\n * @param {mixed} value\n * @returns {Container}\n */\n }, {\n key: \"set\",\n value: function set() {\n var overwrite = false;\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n if (this.has.apply(this, args)) {\n overwrite = true;\n }\n var mine = data.get(this);\n var key = args.shift();\n if (!mine.get) {\n insert.apply(void 0, [mine, key].concat(args));\n return this;\n }\n var next = mine.get(key);\n if (!next) {\n if (!ChildContainer) {\n insert.apply(void 0, [mine, key].concat(args));\n return this;\n }\n next = new ChildContainer();\n insert(mine, key, next);\n }\n insert.apply(void 0, [next].concat(args));\n if (!overwrite) {\n sizes.set(this, sizes.get(this) + 1);\n }\n return this;\n }\n\n /**\n * @private\n * @returns {string}\n */\n }, {\n key: \"inspect\",\n value: function inspect() {\n return \"Container\".concat(name, \" {\\n \").concat(_util.default.inspect(data.get(this), {\n depth: null\n }), \"\\n}\");\n }\n }]);\n return Container;\n }();\n return Container;\n}\n\n/**\n * Inserts into an arbitrary container\n * @param {Map|WeakMap|Set|WeakSet} container\n * @param {Array} args\n * @private\n * @returns {undefined}\n */\nfunction insert(container) {\n for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n args[_key6 - 1] = arguments[_key6];\n }\n if (container.add) {\n container.add.apply(container, args);\n return;\n }\n if (container.set) {\n container.set.apply(container, args);\n return;\n }\n if (container.push) {\n container.push.apply(container, args);\n return;\n }\n throw new TypeError('Could not determine how to insert into the specified container');\n}\n//# sourceMappingURL=template-container.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.buildHydraMembershipId = buildHydraMembershipId;\nexports.buildHydraMessageId = buildHydraMessageId;\nexports.buildHydraOrgId = buildHydraOrgId;\nexports.buildHydraPersonId = buildHydraPersonId;\nexports.buildHydraRoomId = buildHydraRoomId;\nexports.constructHydraId = constructHydraId;\nexports.deconstructHydraId = deconstructHydraId;\nexports.getHydraClusterString = getHydraClusterString;\nexports.getHydraFiles = getHydraFiles;\nexports.getHydraRoomType = getHydraRoomType;\nvar _base = require(\"./base64\");\nvar _constants = require(\"./constants\");\nvar hydraBaseUrl = 'https://api.ciscospark.com/v1';\nvar isRequired = function isRequired() {\n throw Error('parameter is required');\n};\n\n/**\n * Constructs a Hydra ID for a given UUID and type.\n *\n * @export\n * @param {string} type one of PEOPLE, TEAM, ROOM\n * @param {any} id identifying the \"TYPE\" object\n * @param {string} cluster containing the \"TYPE\" object\n * @returns {string}\n */\nfunction constructHydraId() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : isRequired();\n var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isRequired();\n var cluster = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'us';\n if (!type.toUpperCase) {\n throw Error('\"type\" must be a string');\n }\n if (type === _constants.hydraTypes.PEOPLE || type === _constants.hydraTypes.ORGANIZATION) {\n // Cluster is always \"us\" for people and orgs\n return (0, _base.encode)(\"ciscospark://us/\".concat(type.toUpperCase(), \"/\").concat(id));\n }\n return (0, _base.encode)(\"ciscospark://\".concat(cluster, \"/\").concat(type.toUpperCase(), \"/\").concat(id));\n}\n\n/**\n * @typedef {Object} DeconstructedHydraId\n * @property {UUID} id identifying the object\n * @property {String} type of the object\n * @property {String} cluster containing the object\n */\n\n/**\n * Deconstructs a Hydra ID.\n *\n * @export\n * @param {String} id Hydra style id\n * @returns {DeconstructedHydraId} deconstructed id\n */\nfunction deconstructHydraId(id) {\n var payload = (0, _base.decode)(id).split('/');\n return {\n id: payload.pop(),\n type: payload.pop(),\n cluster: payload.pop()\n };\n}\n\n/**\n * Constructs a Hydra ID for a message based on internal UUID\n *\n * @export\n * @param {any} uuid\n * @param {string} cluster containing the message\n * @returns {string}\n */\nfunction buildHydraMessageId(uuid, cluster) {\n return constructHydraId(_constants.hydraTypes.MESSAGE, uuid, cluster);\n}\n\n/**\n * Constructs a Hydra ID for a person based on internal UUID\n *\n * @export\n * @param {any} uuid\n * @param {string} cluster containing the person\n * @returns {string}\n */\nfunction buildHydraPersonId(uuid, cluster) {\n return constructHydraId(_constants.hydraTypes.PEOPLE, uuid, cluster);\n}\n\n/**\n * Constructs a Hydra ID for a room based on internal UUID\n *\n * @export\n * @param {any} uuid\n * @param {string} cluster containing the room\n * @returns {string}\n */\nfunction buildHydraRoomId(uuid, cluster) {\n return constructHydraId(_constants.hydraTypes.ROOM, uuid, cluster);\n}\n\n/**\n * Constructs a Hydra ID for an organization based on internal UUID\n *\n * @export\n * @param {any} uuid\n * @param {string} cluster containing the organization\n * @returns {string}\n */\nfunction buildHydraOrgId(uuid, cluster) {\n return constructHydraId(_constants.hydraTypes.ORGANIZATION, uuid, cluster);\n}\n\n/**\n * Constructs a Hydra ID for an membership based on an\n * internal UUID for the person, and the space\n *\n * @export\n * @param {any} personUUID\n * @param {any} spaceUUID\n * @param {string} cluster containing the membership\n * @returns {string}\n */\nfunction buildHydraMembershipId(personUUID, spaceUUID, cluster) {\n return constructHydraId(_constants.hydraTypes.MEMBERSHIP, \"\".concat(personUUID, \":\").concat(spaceUUID), cluster);\n}\n\n/**\n * Returns a hydra cluster string based on a conversation url\n * @private\n * @memberof Messages\n * @param {Object} webex sdk instance\n * @param {String} conversationUrl url of space where activity took place\n * @returns {String} string suitable for UUID -> public ID encoding\n */\nfunction getHydraClusterString(webex, conversationUrl) {\n var internalClusterString = webex.internal.services.getClusterId(conversationUrl);\n if (internalClusterString.startsWith(_constants.INTERNAL_US_CLUSTER_NAME) || internalClusterString.startsWith(_constants.INTERNAL_US_INTEGRATION_CLUSTER_NAME)) {\n // Original US cluster is simply 'us' for backwards compatibility\n return 'us';\n }\n var clusterParts = internalClusterString.split(':');\n if (clusterParts.length < 3) {\n throw Error(\"Unable to determine cluster for convo: \".concat(conversationUrl));\n }\n return \"\".concat(clusterParts[0], \":\").concat(clusterParts[1], \":\").concat(clusterParts[2]);\n}\n\n/**\n * Returns a Hydra roomType based on conversation tags\n *\n * @export\n * @param {arra} tags\n * @returns {string}\n */\nfunction getHydraRoomType(tags) {\n if (tags.includes(_constants.SDK_EVENT.INTERNAL.ACTIVITY_TAG.ONE_ON_ONE)) {\n return _constants.SDK_EVENT.EXTERNAL.SPACE_TYPE.DIRECT;\n }\n return _constants.SDK_EVENT.EXTERNAL.SPACE_TYPE.GROUP;\n}\n\n/**\n * Returns file URLs for the activity, adhering to Hydra details,\n * e.g., https://api.ciscospark.com/v1/contents/Y2lzY29zcGF...\n * @see https://developer.webex.com/docs/api/v1/messages/get-message-details\n * @param {Object} activity from mercury\n * @param {string} cluster containing the files\n * @returns {Array} file URLs\n */\nfunction getHydraFiles(activity, cluster) {\n var hydraFiles = [];\n var files = activity.object.files;\n if (files) {\n var items = files.items;\n\n // Note: Generated ID is dependent on file order.\n for (var i = 0; i < items.length; i += 1) {\n var contentId = constructHydraId(_constants.hydraTypes.CONTENT, \"\".concat(activity.id, \"/\").concat(i), cluster);\n hydraFiles.push(\"\".concat(hydraBaseUrl, \"/contents/\").concat(contentId));\n }\n }\n return hydraFiles;\n}\n//# sourceMappingURL=uuid-utils.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = whileInFlight;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _lodash = require(\"lodash\");\nvar _tap = _interopRequireDefault(require(\"./tap\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint no-invalid-this: [0] */\n\n/**\n * While the promise returned by the decorated is unfullfilled, sets, the\n * specified boolean on the target class to `true`\n * @param {string} param\n * @returns {Function}\n */\nfunction whileInFlight(param) {\n return function whileInFlightDecorator(target, name, descriptor) {\n descriptor.value = (0, _lodash.wrap)(descriptor.value, function whileInFlightExecutor(fn) {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return new _promise.default(function (resolve) {\n _this[param] = true;\n resolve((0, _apply.default)(fn, _this, args).then((0, _tap.default)(function () {\n _this[param] = false;\n })).catch(function (reason) {\n _this[param] = false;\n return _promise.default.reject(reason);\n }));\n });\n });\n };\n}\n//# sourceMappingURL=while-in-flight.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = makeSubTypes;\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _parseInt2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/parse-int\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @param {Error} Base\n * @returns {undefined}\n */\nfunction makeSubTypes(Base) {\n /**\n * NetworkOrCORSError\n */\n var NetworkOrCORSError = /*#__PURE__*/function (_Base) {\n (0, _inherits2.default)(NetworkOrCORSError, _Base);\n var _super = _createSuper(NetworkOrCORSError);\n function NetworkOrCORSError() {\n (0, _classCallCheck2.default)(this, NetworkOrCORSError);\n return _super.apply(this, arguments);\n }\n return (0, _createClass2.default)(NetworkOrCORSError);\n }(Base);\n /**\n * BadRequest\n */\n var BadRequest = /*#__PURE__*/function (_Base2) {\n (0, _inherits2.default)(BadRequest, _Base2);\n var _super2 = _createSuper(BadRequest);\n function BadRequest() {\n (0, _classCallCheck2.default)(this, BadRequest);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(BadRequest);\n }(Base);\n /**\n * Unauthorized\n */\n var Unauthorized = /*#__PURE__*/function (_BadRequest) {\n (0, _inherits2.default)(Unauthorized, _BadRequest);\n var _super3 = _createSuper(Unauthorized);\n function Unauthorized() {\n (0, _classCallCheck2.default)(this, Unauthorized);\n return _super3.apply(this, arguments);\n }\n return (0, _createClass2.default)(Unauthorized);\n }(BadRequest);\n /**\n * PaymentRequired\n */\n var PaymentRequired = /*#__PURE__*/function (_BadRequest2) {\n (0, _inherits2.default)(PaymentRequired, _BadRequest2);\n var _super4 = _createSuper(PaymentRequired);\n function PaymentRequired() {\n (0, _classCallCheck2.default)(this, PaymentRequired);\n return _super4.apply(this, arguments);\n }\n return (0, _createClass2.default)(PaymentRequired);\n }(BadRequest);\n /**\n * Forbidden\n */\n var Forbidden = /*#__PURE__*/function (_BadRequest3) {\n (0, _inherits2.default)(Forbidden, _BadRequest3);\n var _super5 = _createSuper(Forbidden);\n function Forbidden() {\n (0, _classCallCheck2.default)(this, Forbidden);\n return _super5.apply(this, arguments);\n }\n return (0, _createClass2.default)(Forbidden);\n }(BadRequest);\n /**\n * NotFound\n */\n var NotFound = /*#__PURE__*/function (_BadRequest4) {\n (0, _inherits2.default)(NotFound, _BadRequest4);\n var _super6 = _createSuper(NotFound);\n function NotFound() {\n (0, _classCallCheck2.default)(this, NotFound);\n return _super6.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotFound);\n }(BadRequest);\n /**\n * MethodNotAllowed\n */\n var MethodNotAllowed = /*#__PURE__*/function (_BadRequest5) {\n (0, _inherits2.default)(MethodNotAllowed, _BadRequest5);\n var _super7 = _createSuper(MethodNotAllowed);\n function MethodNotAllowed() {\n (0, _classCallCheck2.default)(this, MethodNotAllowed);\n return _super7.apply(this, arguments);\n }\n return (0, _createClass2.default)(MethodNotAllowed);\n }(BadRequest);\n /**\n * NotAcceptable\n */\n var NotAcceptable = /*#__PURE__*/function (_BadRequest6) {\n (0, _inherits2.default)(NotAcceptable, _BadRequest6);\n var _super8 = _createSuper(NotAcceptable);\n function NotAcceptable() {\n (0, _classCallCheck2.default)(this, NotAcceptable);\n return _super8.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotAcceptable);\n }(BadRequest);\n /**\n * ProxyAuthenticationRequired\n */\n var ProxyAuthenticationRequired = /*#__PURE__*/function (_BadRequest7) {\n (0, _inherits2.default)(ProxyAuthenticationRequired, _BadRequest7);\n var _super9 = _createSuper(ProxyAuthenticationRequired);\n function ProxyAuthenticationRequired() {\n (0, _classCallCheck2.default)(this, ProxyAuthenticationRequired);\n return _super9.apply(this, arguments);\n }\n return (0, _createClass2.default)(ProxyAuthenticationRequired);\n }(BadRequest);\n /**\n * RequestTimeout\n */\n var RequestTimeout = /*#__PURE__*/function (_BadRequest8) {\n (0, _inherits2.default)(RequestTimeout, _BadRequest8);\n var _super10 = _createSuper(RequestTimeout);\n function RequestTimeout() {\n (0, _classCallCheck2.default)(this, RequestTimeout);\n return _super10.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestTimeout);\n }(BadRequest);\n /**\n * Conflict\n */\n var Conflict = /*#__PURE__*/function (_BadRequest9) {\n (0, _inherits2.default)(Conflict, _BadRequest9);\n var _super11 = _createSuper(Conflict);\n function Conflict() {\n (0, _classCallCheck2.default)(this, Conflict);\n return _super11.apply(this, arguments);\n }\n return (0, _createClass2.default)(Conflict);\n }(BadRequest);\n /**\n * Gone\n */\n var Gone = /*#__PURE__*/function (_BadRequest10) {\n (0, _inherits2.default)(Gone, _BadRequest10);\n var _super12 = _createSuper(Gone);\n function Gone() {\n (0, _classCallCheck2.default)(this, Gone);\n return _super12.apply(this, arguments);\n }\n return (0, _createClass2.default)(Gone);\n }(BadRequest);\n /**\n * LengthRequired\n */\n var LengthRequired = /*#__PURE__*/function (_BadRequest11) {\n (0, _inherits2.default)(LengthRequired, _BadRequest11);\n var _super13 = _createSuper(LengthRequired);\n function LengthRequired() {\n (0, _classCallCheck2.default)(this, LengthRequired);\n return _super13.apply(this, arguments);\n }\n return (0, _createClass2.default)(LengthRequired);\n }(BadRequest);\n /**\n * PreconditionFailed\n */\n var PreconditionFailed = /*#__PURE__*/function (_BadRequest12) {\n (0, _inherits2.default)(PreconditionFailed, _BadRequest12);\n var _super14 = _createSuper(PreconditionFailed);\n function PreconditionFailed() {\n (0, _classCallCheck2.default)(this, PreconditionFailed);\n return _super14.apply(this, arguments);\n }\n return (0, _createClass2.default)(PreconditionFailed);\n }(BadRequest);\n /**\n * RequestEntityTooLarge\n */\n var RequestEntityTooLarge = /*#__PURE__*/function (_BadRequest13) {\n (0, _inherits2.default)(RequestEntityTooLarge, _BadRequest13);\n var _super15 = _createSuper(RequestEntityTooLarge);\n function RequestEntityTooLarge() {\n (0, _classCallCheck2.default)(this, RequestEntityTooLarge);\n return _super15.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestEntityTooLarge);\n }(BadRequest);\n /**\n * RequestUriTooLong\n */\n var RequestUriTooLong = /*#__PURE__*/function (_BadRequest14) {\n (0, _inherits2.default)(RequestUriTooLong, _BadRequest14);\n var _super16 = _createSuper(RequestUriTooLong);\n function RequestUriTooLong() {\n (0, _classCallCheck2.default)(this, RequestUriTooLong);\n return _super16.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestUriTooLong);\n }(BadRequest);\n /**\n * UnsupportedMediaType\n */\n var UnsupportedMediaType = /*#__PURE__*/function (_BadRequest15) {\n (0, _inherits2.default)(UnsupportedMediaType, _BadRequest15);\n var _super17 = _createSuper(UnsupportedMediaType);\n function UnsupportedMediaType() {\n (0, _classCallCheck2.default)(this, UnsupportedMediaType);\n return _super17.apply(this, arguments);\n }\n return (0, _createClass2.default)(UnsupportedMediaType);\n }(BadRequest);\n /**\n * RequestRangeNotSatisfiable\n */\n var RequestRangeNotSatisfiable = /*#__PURE__*/function (_BadRequest16) {\n (0, _inherits2.default)(RequestRangeNotSatisfiable, _BadRequest16);\n var _super18 = _createSuper(RequestRangeNotSatisfiable);\n function RequestRangeNotSatisfiable() {\n (0, _classCallCheck2.default)(this, RequestRangeNotSatisfiable);\n return _super18.apply(this, arguments);\n }\n return (0, _createClass2.default)(RequestRangeNotSatisfiable);\n }(BadRequest);\n /**\n * ExpectationFailed\n */\n var ExpectationFailed = /*#__PURE__*/function (_BadRequest17) {\n (0, _inherits2.default)(ExpectationFailed, _BadRequest17);\n var _super19 = _createSuper(ExpectationFailed);\n function ExpectationFailed() {\n (0, _classCallCheck2.default)(this, ExpectationFailed);\n return _super19.apply(this, arguments);\n }\n return (0, _createClass2.default)(ExpectationFailed);\n }(BadRequest);\n /**\n * TooManyRequests\n */\n var TooManyRequests = /*#__PURE__*/function (_BadRequest18) {\n (0, _inherits2.default)(TooManyRequests, _BadRequest18);\n var _super20 = _createSuper(TooManyRequests);\n function TooManyRequests() {\n (0, _classCallCheck2.default)(this, TooManyRequests);\n return _super20.apply(this, arguments);\n }\n return (0, _createClass2.default)(TooManyRequests);\n }(BadRequest);\n /**\n * InternalServerError\n */\n var InternalServerError = /*#__PURE__*/function (_Base3) {\n (0, _inherits2.default)(InternalServerError, _Base3);\n var _super21 = _createSuper(InternalServerError);\n function InternalServerError() {\n (0, _classCallCheck2.default)(this, InternalServerError);\n return _super21.apply(this, arguments);\n }\n return (0, _createClass2.default)(InternalServerError);\n }(Base);\n /**\n * NotImplemented\n */\n var NotImplemented = /*#__PURE__*/function (_InternalServerError) {\n (0, _inherits2.default)(NotImplemented, _InternalServerError);\n var _super22 = _createSuper(NotImplemented);\n function NotImplemented() {\n (0, _classCallCheck2.default)(this, NotImplemented);\n return _super22.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotImplemented);\n }(InternalServerError);\n /**\n * BadGateway\n */\n var BadGateway = /*#__PURE__*/function (_InternalServerError2) {\n (0, _inherits2.default)(BadGateway, _InternalServerError2);\n var _super23 = _createSuper(BadGateway);\n function BadGateway() {\n (0, _classCallCheck2.default)(this, BadGateway);\n return _super23.apply(this, arguments);\n }\n return (0, _createClass2.default)(BadGateway);\n }(InternalServerError);\n /**\n * ServiceUnavailable\n */\n var ServiceUnavailable = /*#__PURE__*/function (_InternalServerError3) {\n (0, _inherits2.default)(ServiceUnavailable, _InternalServerError3);\n var _super24 = _createSuper(ServiceUnavailable);\n function ServiceUnavailable() {\n (0, _classCallCheck2.default)(this, ServiceUnavailable);\n return _super24.apply(this, arguments);\n }\n return (0, _createClass2.default)(ServiceUnavailable);\n }(InternalServerError);\n /**\n * GatewayTimeout\n */\n var GatewayTimeout = /*#__PURE__*/function (_InternalServerError4) {\n (0, _inherits2.default)(GatewayTimeout, _InternalServerError4);\n var _super25 = _createSuper(GatewayTimeout);\n function GatewayTimeout() {\n (0, _classCallCheck2.default)(this, GatewayTimeout);\n return _super25.apply(this, arguments);\n }\n return (0, _createClass2.default)(GatewayTimeout);\n }(InternalServerError);\n /**\n * HttpVersionNotSupported\n */\n var HttpVersionNotSupported = /*#__PURE__*/function (_InternalServerError5) {\n (0, _inherits2.default)(HttpVersionNotSupported, _InternalServerError5);\n var _super26 = _createSuper(HttpVersionNotSupported);\n function HttpVersionNotSupported() {\n (0, _classCallCheck2.default)(this, HttpVersionNotSupported);\n return _super26.apply(this, arguments);\n }\n return (0, _createClass2.default)(HttpVersionNotSupported);\n }(InternalServerError);\n (0, _assign.default)(Base, {\n 0: NetworkOrCORSError,\n NetworkOrCORSError: NetworkOrCORSError,\n 400: BadRequest,\n BadRequest: BadRequest,\n 401: Unauthorized,\n Unauthorized: Unauthorized,\n 402: PaymentRequired,\n PaymentRequired: PaymentRequired,\n 403: Forbidden,\n Forbidden: Forbidden,\n 404: NotFound,\n NotFound: NotFound,\n 405: MethodNotAllowed,\n MethodNotAllowed: MethodNotAllowed,\n 406: NotAcceptable,\n NotAcceptable: NotAcceptable,\n 407: ProxyAuthenticationRequired,\n ProxyAuthenticationRequired: ProxyAuthenticationRequired,\n 408: RequestTimeout,\n RequestTimeout: RequestTimeout,\n 409: Conflict,\n Conflict: Conflict,\n 410: Gone,\n Gone: Gone,\n 411: LengthRequired,\n LengthRequired: LengthRequired,\n 412: PreconditionFailed,\n PreconditionFailed: PreconditionFailed,\n 413: RequestEntityTooLarge,\n RequestEntityTooLarge: RequestEntityTooLarge,\n 414: RequestUriTooLong,\n RequestUriTooLong: RequestUriTooLong,\n 415: UnsupportedMediaType,\n UnsupportedMediaType: UnsupportedMediaType,\n 416: RequestRangeNotSatisfiable,\n RequestRangeNotSatisfiable: RequestRangeNotSatisfiable,\n 417: ExpectationFailed,\n ExpectationFailed: ExpectationFailed,\n 429: TooManyRequests,\n TooManyRequests: TooManyRequests,\n 500: InternalServerError,\n InternalServerError: InternalServerError,\n 501: NotImplemented,\n NotImplemented: NotImplemented,\n 502: BadGateway,\n BadGateway: BadGateway,\n 503: ServiceUnavailable,\n ServiceUnavailable: ServiceUnavailable,\n 504: GatewayTimeout,\n GatewayTimeout: GatewayTimeout,\n 505: HttpVersionNotSupported,\n HttpVersionNotSupported: HttpVersionNotSupported,\n select: function select(statusCode) {\n if (typeof statusCode === 'undefined' || statusCode === null) {\n return Base;\n }\n statusCode = statusCode.statusCode || statusCode;\n var E = Base[statusCode];\n if (E) {\n return E;\n }\n\n // Fallback to the default for the category (e.g. BadRequest for 429)\n statusCode = \"\".concat(statusCode.toString().split('').shift(), \"00\");\n statusCode = (0, _parseInt2.default)(statusCode, 10);\n return Base[statusCode] || Base;\n }\n });\n}\n//# sourceMappingURL=http-error-subtypes.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _values = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/values\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _httpErrorSubtypes = _interopRequireDefault(require(\"./http-error-subtypes\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Base HttpError class. Unlikely to be thrown directly, but handy for general\n * type comparison.\n */\nvar HttpError = exports.default = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(HttpError, _Exception);\n var _super = _createSuper(HttpError);\n function HttpError() {\n (0, _classCallCheck2.default)(this, HttpError);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(HttpError, [{\n key: \"parse\",\n value:\n /**\n * Parses HttpResponse objects for useful information (status, headers, etc)\n * as well as attempting to extract a useful error message.\n * @param {HttpResponse} res\n * @returns {string}\n */\n function parse(res) {\n // complexity is high here because of all the default values below.\n /* eslint complexity: [0] */\n var body = res.body;\n var message;\n switch ((0, _typeof2.default)(body)) {\n case 'string':\n try {\n body = JSON.parse(body);\n message = this.parseObject(body);\n } catch (err) {\n message = body;\n }\n break;\n case 'object':\n message = this.parseObject(body);\n break;\n default:\n }\n if (!message) {\n message = this.defaultMessage;\n }\n (0, _defineProperties.default)(this, {\n body: {\n enumerable: false,\n value: body\n },\n httpVersion: {\n enumerable: false,\n value: res.httpVersion\n },\n headers: {\n enumerable: false,\n value: res.headers || {}\n },\n rawHeaders: {\n enumerable: false,\n value: res.rawHeaders || []\n },\n trailers: {\n enumerable: false,\n value: res.trailers || {}\n },\n rawTrailers: {\n enumerable: false,\n value: res.rawTrailers || []\n },\n method: {\n enumerable: false,\n value: res.method\n },\n url: {\n enumerable: false,\n value: res.url\n },\n statusCode: {\n enumerable: false,\n value: res.statusCode\n },\n statusMessage: {\n enumerable: false,\n value: res.statusMessage\n },\n socket: {\n enumerable: false,\n value: res.socket\n },\n _res: {\n enumerable: false,\n value: res\n }\n });\n return message;\n }\n\n /**\n * Recursively parses an error body looking for a likely error candidate\n * @param {object} body\n * @returns {string}\n */\n }, {\n key: \"parseObject\",\n value: function parseObject(body) {\n // Search body for common names of error strings\n var messages = (0, _values.default)((0, _lodash.pick)(body, HttpError.errorKeys));\n\n // If no error candidate was found, stringify the entire body\n if (messages.length === 0) {\n return (0, _stringify.default)(body, null, 2);\n }\n\n // Assume the first key found was the error explanation\n var message = messages[0];\n\n // If the explanation is an object, recurse and try again\n if ((0, _typeof2.default)(message) === 'object') {\n return this.parseObject(message);\n }\n\n // Return the first key\n return message;\n }\n }]);\n return HttpError;\n}(_common.Exception);\n/**\n * @example Extend via\n * MyError extends HttpError {\n * static errorKeys = HttpError.errorKeys.concat([\n * `key1`,\n * `key2`\n * ])\n * }\n *\n * @type {Array}\n */\n(0, _defineProperty2.default)(HttpError, \"errorKeys\", ['error', 'errorString', 'response', 'errorResponse', 'message', 'msg']);\n/**\n * Default error string if no error can be extracted from the http response\n * @type {string}\n */\n(0, _defineProperty2.default)(HttpError, \"defaultMessage\", 'An error was received while trying to fulfill the request');\n(0, _httpErrorSubtypes.default)(HttpError);\nHttpError.makeSubTypes = _httpErrorSubtypes.default;\n//# sourceMappingURL=http-error.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"HttpError\", {\n enumerable: true,\n get: function get() {\n return _httpError.default;\n }\n});\n_Object$defineProperty(exports, \"HttpStatusInterceptor\", {\n enumerable: true,\n get: function get() {\n return _httpStatus.default;\n }\n});\n_Object$defineProperty(exports, \"Interceptor\", {\n enumerable: true,\n get: function get() {\n return _interceptor.default;\n }\n});\n_Object$defineProperty(exports, \"ProgressEvent\", {\n enumerable: true,\n get: function get() {\n return _progressEvent.default;\n }\n});\nexports.defaults = void 0;\n_Object$defineProperty(exports, \"detect\", {\n enumerable: true,\n get: function get() {\n return _detect.default;\n }\n});\nexports.setTimingsAndFetch = exports.request = exports.protoprepareFetchOptions = void 0;\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/get-own-property-descriptor\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _lodash = require(\"lodash\");\nvar _httpStatus = _interopRequireDefault(require(\"./interceptors/http-status\"));\nvar _request2 = _interopRequireDefault(require(\"./request\"));\nvar _utils = require(\"./request/utils\");\nvar _progressEvent = _interopRequireDefault(require(\"./progress-event\"));\nvar _interceptor = _interopRequireDefault(require(\"./lib/interceptor\"));\nvar _httpError = _interopRequireDefault(require(\"./http-error\"));\nvar _detect = _interopRequireDefault(require(\"./lib/detect\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Curry protorequest so we generate a function with default options built in.\nvar protorequest = (0, _lodash.curry)(function protorequest(defaultOptions, options) {\n // allow for options to be a string (and therefore expect options in the third\n // position) to match request's api.\n if ((0, _lodash.isString)(options)) {\n var uri = options;\n\n /* eslint prefer-rest-params: [0] */\n options = arguments[2] || {};\n options.uri = uri;\n }\n\n // Hide useless elements from logs\n ['download', 'interceptors', 'logger', 'upload'].forEach(function (prop) {\n var descriptor = (0, _getOwnPropertyDescriptor.default)(options, prop);\n descriptor = (0, _lodash.assign)({}, descriptor, {\n enumerable: false,\n writable: true\n });\n (0, _defineProperty.default)(options, prop, descriptor);\n });\n (0, _lodash.defaults)(options, defaultOptions);\n if (!options.json && options.json !== false) {\n (0, _deleteProperty.default)(options, 'json');\n }\n options.logger = options.logger || this.logger || console;\n return (0, _request2.default)(options);\n});\nvar protoprepareFetchOptions = exports.protoprepareFetchOptions = (0, _lodash.curry)(function protoprepareFetchOptions(defaultOptions, options) {\n // Hide useless elements from logs\n ['download', 'interceptors', 'logger', 'upload'].forEach(function (prop) {\n var descriptor = (0, _getOwnPropertyDescriptor.default)(options, prop);\n descriptor = (0, _lodash.assign)({}, descriptor, {\n enumerable: false,\n writable: true\n });\n (0, _defineProperty.default)(options, prop, descriptor);\n });\n (0, _lodash.defaults)(options, defaultOptions);\n options.logger = options.logger || this.logger || console;\n return (0, _utils.prepareFetchOptions)(options);\n});\n\n/**\n * Sets the $timings value(s) before the request/fetch.\n * This function is only useful if you are about to send a request\n * using prepared fetch options; normally it is done in webex.request();\n *\n * @param {any} options\n * @returns {any} the updated options object\n */\nvar setRequestTimings = function setRequestTimings(options) {\n var now = new Date().getTime();\n options.$timings = options.$timings || {};\n options.$timings.requestStart = now;\n options.$timings.networkStart = now;\n return options;\n};\n\n/**\n * Submits a metric from pre-built request options via the fetch API. Updates\n * the \"$timings\" values to Date.now() since the existing times were set when\n * the options were built (not submitted).\n *\n * @param {any} options - the pre-built request options for submitting a metric\n * @returns {Promise} promise that resolves to a response object\n */\nvar setTimingsAndFetch = exports.setTimingsAndFetch = function setTimingsAndFetch(options) {\n var opts = setRequestTimings(options);\n\n // call the fetch API\n return fetch(opts.uri, opts);\n};\nvar defaultOptions = {\n json: true,\n interceptors: [\n // Reminder: this is supposed to be an instantiated interceptor.\n _httpStatus.default.create()]\n};\nvar defaults = exports.defaults = protorequest;\nvar request = exports.request = protorequest(defaultOptions);\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpError = _interopRequireDefault(require(\"../http-error\"));\nvar _interceptor = _interopRequireDefault(require(\"../lib/interceptor\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar LOCUS_REDIRECT_ERROR = 2000002;\n\n/**\n * @class\n */\nvar HttpStatusInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(HttpStatusInterceptor, _Interceptor);\n var _super = _createSuper(HttpStatusInterceptor);\n /**\n * @param {Object} webex\n * @param {Object} options\n * @returns {HttpStatusInterceptor}\n */\n function HttpStatusInterceptor(webex, options) {\n var _this;\n (0, _classCallCheck2.default)(this, HttpStatusInterceptor);\n _this = _super.call(this, webex);\n var ErrorConstructor = options && (options.error || options.ErrorConstructor) || _httpError.default;\n (0, _defineProperties.default)((0, _assertThisInitialized2.default)(_this), {\n ErrorConstructor: {\n value: ErrorConstructor\n }\n });\n return _this;\n }\n\n /**\n * @param {Object} options\n * @returns {HttpStatusInterceptor}\n */\n (0, _createClass2.default)(HttpStatusInterceptor, [{\n key: \"onResponse\",\n value:\n /**\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise}\n */\n function onResponse(options, response) {\n if (response.statusCode) {\n if (response.statusCode < 400) {\n return _promise.default.resolve(response);\n }\n // to handle locus redirects\n if (response.statusCode === 404 && response.body && response.body.errorCode === LOCUS_REDIRECT_ERROR) {\n return _promise.default.resolve(response);\n }\n }\n\n // Note: the extra parenthesis below are required to make sure `new` is\n // applied to the correct method (i.e., the result of `select()`, not\n // `select()` itself).\n return _promise.default.reject(new (this.ErrorConstructor.select(response.statusCode))(response));\n }\n }], [{\n key: \"create\",\n value: function create(options) {\n return new HttpStatusInterceptor(this, options);\n }\n }]);\n return HttpStatusInterceptor;\n}(_interceptor.default);\n//# sourceMappingURL=http-status.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = detect;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _fileType = require(\"file-type\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Determine mimeType for the specified buffer;\n * @param {Buffer|Uint8Array|ArrayBuffer} buffer\n * @returns {Promise}\n */\nfunction detect(_x) {\n return _detect.apply(this, arguments);\n}\nfunction _detect() {\n _detect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(buffer) {\n var fileType;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(!(buffer instanceof Blob) && !(buffer instanceof ArrayBuffer) && !(buffer instanceof Uint8Array))) {\n _context.next = 2;\n break;\n }\n throw new Error('`detect` requires a buffer of type Blob, ArrayBuffer, or Uint8Array');\n case 2:\n if (!(buffer instanceof Blob)) {\n _context.next = 4;\n break;\n }\n return _context.abrupt(\"return\", buffer.type);\n case 4:\n _context.next = 6;\n return (0, _fileType.fromBuffer)(buffer);\n case 6:\n fileType = _context.sent;\n if (fileType) {\n _context.next = 9;\n break;\n }\n return _context.abrupt(\"return\", 'application/octet-stream');\n case 9:\n return _context.abrupt(\"return\", fileType.mime);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _detect.apply(this, arguments);\n}\n//# sourceMappingURL=detect.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar Interceptor = exports.default = /*#__PURE__*/function () {\n /**\n * @constructor\n * @param {Object} attrs\n * @returns {UrlInterceptor}\n */\n function Interceptor(attrs) {\n var _this = this;\n (0, _classCallCheck2.default)(this, Interceptor);\n if (attrs) {\n (0, _keys.default)(attrs).forEach(function (key) {\n var value = attrs[key];\n (0, _defineProperty.default)(_this, key, {\n enumerable: true,\n value: value\n });\n });\n }\n }\n\n /**\n * Logs the options of a request. This should be utilized\n * during the intercepting process, but can be used at any\n * time otherwise.\n * @param {object} options\n * @returns {void}\n */\n (0, _createClass2.default)(Interceptor, [{\n key: \"logOptions\",\n value: function logOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n if (!process.env.ENABLE_VERBOSE_NETWORK_LOGGING || !logger) {\n return;\n }\n\n // prepend a header for the interceptor\n logger.info('/***** Interceptor ****************************************************\\\\');\n logger.info(\"\".concat(this.constructor.name, \" - \").concat((0, _stringify.default)(options, null, 2)));\n }\n\n /**\n * @abstract\n * @returns {Interceptor}\n */\n }, {\n key: \"onRequest\",\n value:\n /**\n * Transform request options before sending them\n * @param {Object} options\n * @returns {Promise}\n */\n function onRequest(options) {\n return _promise.default.resolve(options);\n }\n\n /**\n * Handle request failures\n * @param {Object} options\n * @param {Error} reason\n * @returns {RejectedPromise}\n */\n }, {\n key: \"onRequestError\",\n value: function onRequestError(options, reason) {\n return _promise.default.reject(reason);\n }\n\n /**\n * Transform response before returning it\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n return _promise.default.resolve(response);\n }\n\n /**\n * Handle response errors\n * @param {Object} options\n * @param {WebexHttpError} reason\n * @returns {Promise}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value: function create() {\n throw new Error('`Interceptor.create()` must be defined');\n }\n }]);\n return Interceptor;\n}();\n//# sourceMappingURL=interceptor.js.map\n","/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Need to fork xhr to support environments with full object freezing; namely,\n// SalesForce's Aura and Locker environment.\n\n// See https://github.com/naugtur/xhr for license information\n\n// Maintain the original code style of https://github.com/naugtur/xhr since\n// we're trying to diverge as little as possible.\n/* eslint-disable */\n\n'use strict';\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar window = require('global/window');\nvar isFunction = require('is-function');\nvar parseHeaders = require('parse-headers');\nvar xtend = require('xtend');\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = 'withCredentials' in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray(['get', 'put', 'post', 'patch', 'head', 'delete'], function (method) {\n createXHR[method === 'delete' ? 'del' : method] = function (uri, options, callback) {\n options = initParams(uri, options, callback);\n options.method = method.toUpperCase();\n return _createXHR(options);\n };\n});\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i += 1) {\n iterator(array[i]);\n }\n}\nfunction isEmpty(obj) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) return false;\n }\n return true;\n}\nfunction initParams(uri, options, callback) {\n var params = uri;\n if (isFunction(options)) {\n callback = options;\n if (typeof uri === 'string') {\n params = {\n uri: uri\n };\n }\n } else {\n params = xtend(options, {\n uri: uri\n });\n }\n params.callback = callback;\n return params;\n}\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback);\n return _createXHR(options);\n}\nfunction _createXHR(options) {\n if (typeof options.callback === 'undefined') {\n throw new Error('callback argument missing');\n }\n var called = false;\n var callback = function cbOnce(err, response, body) {\n if (!called) {\n called = true;\n options.callback(err, response, body);\n }\n };\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0);\n }\n }\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined;\n if (xhr.response) {\n body = xhr.response;\n } else {\n body = xhr.responseText || getXml(xhr);\n }\n if (isJson) {\n try {\n body = JSON.parse(body);\n } catch (e) {}\n }\n return body;\n }\n function errorFunc(evt) {\n clearTimeout(timeoutTimer);\n if (!(evt instanceof Error)) {\n if (evt instanceof ProgressEvent) {\n var _evt$target;\n evt = new Error(\"XMLHttpRequest Error: ProgressEvent: loaded=\".concat(evt.loaded, \", total=\").concat(evt.total, \", lengthComputable=\").concat(evt.lengthComputable, \", target.readyState=\").concat((_evt$target = evt.target) === null || _evt$target === void 0 ? void 0 : _evt$target.readyState));\n } else {\n evt = new Error('' + (evt || 'Unknown XMLHttpRequest Error'));\n }\n }\n evt.statusCode = 0;\n return callback(evt, failureResponse);\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return;\n var status;\n clearTimeout(timeoutTimer);\n if (options.useXDR && xhr.status === undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200;\n } else {\n status = xhr.status === 1223 ? 204 : xhr.status;\n }\n var response = failureResponse;\n var err = null;\n if (status !== 0) {\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n };\n if (xhr.getAllResponseHeaders) {\n //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders());\n }\n } else {\n err = new Error('Internal XMLHttpRequest Error');\n }\n return callback(err, response, response.body);\n }\n var xhr = options.xhr || null;\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest();\n } else {\n xhr = new createXHR.XMLHttpRequest();\n }\n }\n var key;\n var aborted;\n var uri = options.uri || options.url;\n var method = options.method || 'GET';\n var body = options.body || options.data;\n var headers = options.headers || {};\n var sync = !!options.sync;\n var isJson = false;\n var timeoutTimer;\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n };\n if ('json' in options && options.json !== false) {\n isJson = true;\n headers['accept'] || headers['Accept'] || (headers['Accept'] = 'application/json'); //Don't override existing accept header declared by user\n if (method !== 'GET' && method !== 'HEAD') {\n headers['content-type'] || headers['Content-Type'] || (headers['Content-Type'] = 'application/json'); //Don't override existing accept header declared by user\n body = (0, _stringify.default)(options.json === true ? body : options.json);\n }\n }\n xhr.onreadystatechange = readystatechange;\n xhr.onload = loadFunc;\n xhr.onerror = errorFunc;\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n };\n xhr.onabort = function () {\n aborted = true;\n };\n xhr.ontimeout = errorFunc;\n xhr.open(method, uri, !sync, options.username, options.password);\n //has to be after open\n if (!sync) {\n xhr.withCredentials = !!options.withCredentials;\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0) {\n timeoutTimer = setTimeout(function () {\n if (aborted) return;\n aborted = true; //IE9 may still call readystatechange\n xhr.abort('timeout');\n var e = new Error('XMLHttpRequest timeout');\n e.code = 'ETIMEDOUT';\n errorFunc(e);\n }, options.timeout);\n }\n if (xhr.setRequestHeader) {\n for (key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error('Headers cannot be set on an XDomainRequest object');\n }\n if ('responseType' in options) {\n xhr.responseType = options.responseType;\n }\n if ('beforeSend' in options && typeof options.beforeSend === 'function') {\n options.beforeSend(xhr);\n }\n\n // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n xhr.send(body || null);\n return xhr;\n}\nfunction getXml(xhr) {\n if (xhr.responseType === 'document') {\n return xhr.responseXML;\n }\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === 'parsererror';\n if (xhr.responseType === '' && !firefoxBugTakenEffect) {\n return xhr.responseXML;\n }\n return null;\n}\nfunction noop() {}\nvar _default = exports.default = createXHR;\n//# sourceMappingURL=xhr.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ProgressEvent;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _isNan = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/number/is-nan\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Object of the same shape as web browser ProgressEvents\n * @class ProgressEvent\n * @param {integer} loaded\n * @param {integer} total\n * @returns {ProgressEvent}\n */\nfunction ProgressEvent(loaded, total) {\n (0, _defineProperties.default)(this, {\n loaded: {\n enumerable: true,\n value: loaded,\n writable: false\n },\n total: {\n enumerable: true,\n value: total,\n writable: false\n },\n lengthComputable: {\n enumerable: true,\n value: (0, _lodash.isNumber)(loaded) && !(0, _isNan.default)(loaded) && (0, _lodash.isNumber)(total) && !(0, _isNan.default)(total) && total > 0,\n writable: false\n }\n });\n}\n//# sourceMappingURL=progress-event.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = request;\nvar _events = require(\"events\");\nvar _request2 = _interopRequireDefault(require(\"./request\"));\nvar _utils = require(\"./utils\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @param {Object} options\n * @returns {Promise}\n */\nfunction request(options) {\n if (options.url) {\n options.uri = options.url;\n options.url = null;\n }\n options.headers = options.headers || {};\n options.download = new _events.EventEmitter();\n options.upload = new _events.EventEmitter();\n return (0, _utils.intercept)(options, options.interceptors, 'Request').then(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // if provided own request function, use that instead\n // there are use cases where developer may want to provide whatever request promise they wish\n // for example, may even use window.postMessages for parent iframe uses cases\n if (options.request) {\n return options.request.apply(options, [options].concat(args));\n }\n return _request2.default.apply(void 0, [options].concat(args));\n }).then(function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _utils.intercept.apply(void 0, [options, options.interceptors.slice().reverse(), 'Response'].concat(args));\n });\n}\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Array$from = require(\"@babel/runtime-corejs2/core-js/array/from\");\nvar _Symbol = require(\"@babel/runtime-corejs2/core-js/symbol\");\nvar _Symbol$iterator = require(\"@babel/runtime-corejs2/core-js/symbol/iterator\");\nvar _Array$isArray = require(\"@babel/runtime-corejs2/core-js/array/is-array\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _request;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _lodash = require(\"lodash\");\nvar _qs = _interopRequireDefault(require(\"qs\"));\nvar _xhr = _interopRequireDefault(require(\"../lib/xhr\"));\nvar _detect = _interopRequireDefault(require(\"../lib/detect\"));\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== \"undefined\" && o[_Symbol$iterator] || o[\"@@iterator\"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _Array$from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable no-underscore-dangle */ /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */ /* eslint-env browser */ // Note: several code paths are ignored in this file. As far as I can tell, any\n// error conditions that would provoke those paths are otherwise prevented and\n// reported.\n/**\n * @name request\n * @param {Object} options\n * @returns {Promise}\n */\nfunction _request(options) {\n return new _promise.default(function (resolve) {\n var params = (0, _lodash.pick)(options, 'method', 'uri', 'withCredentials', 'headers', 'timeout', 'responseType');\n\n // Set `response` to `true` to approximate an `HttpResponse` object\n params.response = true;\n setXhr(params);\n bindProgressEvents(params, options);\n setAuth(params, options);\n setCookies(params, options);\n setDefaults(params, options);\n setResponseType(params, options);\n setContentType(params, options);\n setPayload(params, options);\n setQs(params, options);\n options.logger.debug(\"start http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri));\n var x = (0, _xhr.default)(params, function (error, response) {\n /* istanbul ignore next */\n if (error) {\n options.logger.warn(\"XHR error for \".concat(options.method || 'request', \" to \").concat(options.uri, \" :\"), error);\n }\n\n /* istanbul ignore else */\n if (response) {\n if (response.statusCode >= 400) {\n options.logger.warn(\"http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri, \" result: \").concat(response.statusCode));\n } else {\n options.logger.debug(\"http \".concat(options.method ? options.method : 'request', \" to \").concat(options.uri, \" result: \").concat(response.statusCode));\n }\n response.options = options;\n processResponseJson(response, params);\n resolve(response);\n } else {\n resolve({\n statusCode: 0,\n options: options,\n headers: options.headers,\n method: options.method,\n url: options.uri,\n body: error\n });\n }\n });\n x.onprogress = options.download.emit.bind(options.download, 'progress');\n }).catch(function (error) {\n options.logger.warn(error);\n\n /* eslint arrow-body-style: [0] */\n /* istanbul ignore next */\n return {\n statusCode: 0,\n options: options,\n headers: options.headers,\n method: options.method,\n url: options.uri,\n body: error\n };\n });\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function bindProgressEvents(params, o) {\n if (params.method && ['PATCH', 'POST', 'PUT'].includes(params.method.toUpperCase())) {\n if (!params.xhr) {\n params.xhr = new XMLHttpRequest();\n }\n params.xhr.upload.onprogress = o.upload.emit.bind(o.upload, 'progress');\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setXhr(params) {\n params.xhr = new XMLHttpRequest();\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setAuth(params, o) {\n if (o.auth) {\n if (o.auth.bearer) {\n params.headers.authorization = \"Bearer \".concat(o.auth.bearer);\n } else {\n var user = o.auth.user || o.auth.username;\n var pass = o.auth.pass || o.auth.password;\n var token = btoa(\"\".concat(user, \":\").concat(pass));\n params.headers.Authorization = \"Basic \".concat(token);\n }\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setCookies(params, o) {\n if (o.jar) {\n params.withCredentials = true;\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setDefaults(params, o) {\n var defs = {\n cors: true,\n // raynos/xhr defaults withCredentials to true if cors is true, so we need\n // to make it explicitly false by default\n withCredentials: false,\n timeout: 0\n };\n (0, _lodash.defaults)(params, (0, _lodash.pick)(o, (0, _keys.default)(defs)), defs);\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setResponseType(params, o) {\n if (o.responseType === 'buffer') {\n params.responseType = 'arraybuffer';\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setContentType(_x, _x2) {\n return _setContentType.apply(this, arguments);\n }\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function _setContentType() {\n _setContentType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params, o) {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(o.body instanceof Blob || o.body instanceof ArrayBuffer)) {\n _context.next = 8;\n break;\n }\n o.json = params.json = false;\n _context.t0 = params.headers['content-type'];\n if (_context.t0) {\n _context.next = 7;\n break;\n }\n _context.next = 6;\n return (0, _detect.default)(o.body);\n case 6:\n _context.t0 = _context.sent;\n case 7:\n params.headers['content-type'] = _context.t0;\n case 8:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _setContentType.apply(this, arguments);\n }\n function setQs(params, o) {\n if (o.qs) {\n params.uri += \"?\".concat(_qs.default.stringify(o.qs));\n }\n }\n\n /**\n * Converts arraybuffers to blobs before uploading them\n * @param {mixed} file\n * @private\n * @returns {mixed}\n */\n function ensureBlob(file) {\n if (file instanceof ArrayBuffer) {\n var ret = file.type ? new Blob([file], {\n type: file.type\n }) : new Blob([file]);\n ret.filename = file.filename || file.name || 'untitled';\n return ret;\n }\n return file;\n }\n\n /**\n * Appends an item to a form\n * @param {FormData} form\n * @param {string} key\n * @param {mixed} value\n * @returns {undefined}\n */\n function append(form, key, value) {\n if ((0, _lodash.isArray)(value)) {\n var _iterator = _createForOfIteratorHelper(value),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var v = _step.value;\n append(form, key, v);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return;\n }\n value = ensureBlob(value);\n if (value.name) {\n value.filename = value.name;\n form.append(key, value, value.name);\n } else {\n form.append(key, value);\n }\n }\n\n /**\n * @param {Object} params\n * @param {Object} o\n * @private\n * @returns {undefined}\n */\n function setPayload(params, o) {\n if ((!('json' in o) || o.json === true) && o.body) {\n params.json = o.body;\n } else if (o.form) {\n params.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n params.body = _qs.default.stringify(o.form);\n (0, _deleteProperty.default)(params, 'json');\n } else if (o.formData) {\n params.body = (0, _keys.default)(o.formData).reduce(function (fd, key) {\n var value = o.formData[key];\n append(fd, key, value);\n return fd;\n }, new FormData());\n } else {\n params.body = o.body;\n (0, _deleteProperty.default)(params, 'json');\n }\n }\n\n /**\n * @param {Object} response\n * @param {Object} params\n * @private\n * @returns {undefined}\n */\n function processResponseJson(response, params) {\n // If params.json is not defined, xhr won't deserialize the response\n // so we should give it a shot just in case.\n if (!params.json && (0, _typeof2.default)(response.body) !== 'object') {\n try {\n response.body = JSON.parse(response.body);\n } catch (e) {\n /* eslint no-empty: [0] */\n }\n }\n }\n}\n//# sourceMappingURL=request.shim.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.intercept = intercept;\nexports.prepareFetchOptions = prepareFetchOptions;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _events = require(\"events\");\n/* eslint-disable import/prefer-default-export */\n\n/**\n * @param {Object} options\n * @param {Array} interceptors\n * @param {string} key\n * @param {Object | undefined} res\n * @private\n * @returns {Promise}\n */\nfunction intercept(options, interceptors, key) {\n var res = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;\n var successKey = \"on\".concat(key);\n var errorKey = \"on\".concat(key, \"Error\");\n return interceptors.reduce(function (promise, interceptor) {\n return promise.then(function (result) {\n interceptor.logOptions(options);\n if (interceptor[successKey]) {\n return interceptor[successKey](options, result);\n }\n return _promise.default.resolve(result);\n }, function (reason) {\n interceptor.logOptions(options);\n if (interceptor[errorKey]) {\n return interceptor[errorKey](options, reason);\n }\n return _promise.default.reject(reason);\n });\n }, _promise.default.resolve(res));\n}\n\n/**\n * Prepare options for a fetch.\n * @param {object} options\n * @returns {Promise}\n */\nfunction prepareFetchOptions(_x) {\n return _prepareFetchOptions.apply(this, arguments);\n}\nfunction _prepareFetchOptions() {\n _prepareFetchOptions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (options.url) {\n options.uri = options.url;\n options.url = null;\n }\n options.headers = options.headers || {};\n if (options.json) {\n // don't override existing accept header declared by user\n options.headers.accept = options.headers.accept || options.headers.Accept || 'application/json';\n\n // don't override existing content-type header declared by user\n if (options.method !== 'GET' && options.method !== 'HEAD') {\n options.headers['content-type'] = options.headers['content-type'] || options.headers['Content-Type'] || 'application/json';\n options.body = (0, _stringify.default)(options.json === true ? options.body : options.json);\n }\n } else if (options.json !== undefined) {\n (0, _deleteProperty.default)(options, 'json');\n }\n options.download = new _events.EventEmitter();\n options.upload = new _events.EventEmitter();\n options.keepalive = true;\n return _context.abrupt(\"return\", intercept(options, options.interceptors, 'Request').then(function () {\n return options;\n }));\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _prepareFetchOptions.apply(this, arguments);\n}\n//# sourceMappingURL=utils.js.map\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n"],"names":[],"sourceRoot":""}