{"version":3,"sources":["webpack:///webpack/bootstrap 1d929b7f02880910a827","webpack:///./main.js","webpack:///./lib/MHE-lib/utils/index.js","webpack:///./lib/MHE-base/common/index.js","webpack:///./lib/MHE-lib/dom/index.js","webpack:///./lib/MHE-base/slide_activity/digfir/MC_Query.js","webpack:///./lib/MHE-lib/utils/jq_utils/index.js","webpack:///./lib/MHE-base/shared/UtilsShuffle.js","webpack:///./lib/MHE-base/shared/digfir/AYS_Figures.js","webpack:///./lib/MHE-base/slide_activity/digfir/Activity.js","webpack:///./assets/css/main.less","webpack:///./lib/MHE-base/slide_activity/assets/css/main.less","webpack:///./lib/MHE-base/common/assets/css/common.sass","webpack:///./lib/MHE-base/shared/aria/texts.yml","webpack:///../~/platform/platform.js","webpack:///../~/webpack/buildin/global.js","webpack:///../~/webpack/buildin/module.js","webpack:///./lib/MHE-base/common/initialize.js","webpack:///./lib/MHE-base/shared/CB_Shuffle.js","webpack:///./lib/MHE-base/shared/aria/index.js","webpack:///./lib/MHE-base/shared/digfir/mixins/QueryMixin.js","webpack:///./lib/MHE-base/slide_activity/digfir/DD_Query.js","webpack:///./lib/MHE-base/slide_activity/digfir/Essay_Query.js","webpack:///./lib/MHE-base/slide_activity/digfir/FB_Query.js","webpack:///./lib/MHE-base/slide_activity/digfir/Player.js","webpack:///./lib/MHE-base/slide_activity/digfir/Question.js","webpack:///./lib/MHE-lib/ada_utils/ShadowSpeech/main.js","webpack:///./lib/MHE-lib/core/object.js"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAA0C,WAAW,EAAE;AACvD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW;;AAEzE;AACA;;;;;;;;ACvJA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,6BAA6B,2CAA2C;AACxE;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,mDAAmD;AACnD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA,aAAa;;AAEb,iBAAiB,wDAAwD;;AAEzE;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET,OAAO,EAAE;AACT,KAAK;AACL;;AAEA,CAAC;;AAED;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,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;;AAEA,oBAAoB,kFAAkF;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA,wFAAwF;AACxF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wEAAwE;AACxE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wBAAwB,mCAAmC;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,kCAAkC,gDAAgD,EAAE;AACpF;AACA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;;AAEH;AACA,oBAAoB,0CAA0C;AAC9D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,0BAA0B;AAC7C;;AAEA;AACA,sCAAsC,0BAA0B;AAChE;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,mBAAmB,0BAA0B;AAC7C;;AAEA;AACA,sCAAsC,0BAA0B;AAChE;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,2DAA2D,mBAAmB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,iCAAiC;AACvD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA,oDAAoD;AACpD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0BAA0B,mCAAmC;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,8BAA8B,MAAM;;AAEpC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;;AAEA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;;AAEA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,0FAA0F;AACxH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA,oBAAoB,0CAA0C;AAC9D;AACA,wBAAwB,MAAM,KAAK,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA,GAAG;;AAEH;AACA,oBAAoB,6CAA6C;AACjE;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;;AAGA,8BAA8B,MAAM;;AAEpC,8BAA8B;AAC9B;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,uCAAuC,sEAAsE;AAC7G;;AAEA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;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,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,6BAA6B,+CAA+C;AAC5E;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,mDAAmD;AACnD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;;ACz7DA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC9BA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,UAAU;;AAElB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,qBAAqB;;AAErD,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3QA;;AAEA,QAAQ,UAAU;;AAElB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ,SAAS;;AAEjB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,GAAG;;AAEH;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;;AAEA;AACA,SAAS;AACT;AACA,wFAAwF;AACxF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;;;;;;;ACjIA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,E;;;;;;;ACrBA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,cAAc;AAC/B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,qBAAqB;AACtC;AACA;;AAEA;AACA,qBAAqB,gBAAgB;AACrC;;AAEA,+BAA+B,iCAAiC;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kCAAkC;AAClE;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8B;;;;;;;AC3DA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;;AAEA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;;AAEA;AACA;;AAEA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,iBAAiB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0DAA0D,KAAK,QAAQ,KAAK;;AAE5E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH,OAAO,sCAAsC,QAAQ,wCAAwC,UAAU,yCAAyC,WAAW,2KAA2K,SAAS,GAAG,4GAA4G,WAAW;AAClkB;AACA;;AAEA,kEAAkE;AAClE;AACA;;AAEA,KAAK;AACL;AACA,CAAC;;AAED,6B;;;;;;;ACrOA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;AC7KA,yC;;;;;;ACAA,yC;;;;;;;;;;;;;;;;;;;;;;ACAA,yC;;;;;;;;;;;;;;;;;;;;;;ACAA,kBAAkB,UAAU,eAAe,kCAAkC,cAAc,0C;;;;;;sDCA3F;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE;AACf,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,SAAS;AACtB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO,yCAAyC;AAChD;AACA,OAAO,8CAA8C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,+CAA+C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,2DAA2D;AAClE;AACA,OAAO,4DAA4D;AACnE;AACA;AACA,OAAO,4CAA4C;AACnD;AACA;AACA;AACA;AACA;AACA,OAAO,4CAA4C;AACnD;AACA,OAAO,qCAAqC;AAC5C;AACA,OAAO,wDAAwD;AAC/D,OAAO,yDAAyD;AAChE,OAAO,iDAAiD;AACxD,OAAO,uCAAuC;AAC9C,OAAO,mCAAmC;AAC1C;AACA;;AAEA;AACA;AACA,OAAO,2CAA2C;AAClD;AACA,OAAO,6CAA6C;AACpD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,8CAA8C;AACrD,OAAO,6CAA6C;AACpD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD,OAAO,6CAA6C;AACpD,OAAO,kDAAkD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,mEAAmE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA;AACA,OAAO,yCAAyC;AAChD;AACA;;AAEA;AACA;AACA,gBAAgB,oCAAoC;AACpD,kBAAkB;AAClB,iBAAiB,gCAAgC;AACjD,eAAe,mBAAmB;AAClC,yBAAyB,YAAY;AACrC,qBAAqB,gBAAgB;AACrC,iBAAiB,6BAA6B;AAC9C,aAAa,gBAAgB;AAC7B,eAAe;AACf,cAAc;AACd,oBAAoB,2BAA2B;AAC/C,mBAAmB,YAAY;AAC/B,mBAAmB,wBAAwB;AAC3C,gBAAgB,aAAa;AAC7B,kBAAkB,gEAAgE;AAClF,eAAe;AACf,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,OAAO,0CAA0C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kCAAkC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA,8BAA8B,eAAe;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AChsCD;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;ACrBA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH,CAAC,I;;;;;;;ACjBD;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4B;;;;;;;ACnCA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;;;;;;;AC5FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;AC3CA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,CAAC;;AAED;;;;;;;AC7HA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAoD;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACtEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,CAAC;;AAED;;;;;;;;ACpHA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B,wBAAwB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,kCAAkC,wBAAwB;AAC1D,GAAG;;AAEH;AACA;;AAEA,kCAAkC,wBAAwB;AAC1D,GAAG;;AAEH;AACA;;AAEA,kCAAkC,+BAA+B;AACjE,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qFAAqF,+BAA+B;AACpH,OAAO;AACP,kEAAkE;;AAElE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;;AAEA;AACA,uGAAuG;AACvG,+FAA+F;AAC/F;;AAEA;AACA,GAAG;;AAEH;AACA;;AAEA,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gDAAgD,yCAAyC;AACzF,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,yCAAyC,uBAAuB;AAChE;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;;;;;;;;ACjeA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED,mB;;;;;;;ACdA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5BA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA","file":"asset/shell/js/common-bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t17: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"js/\" + chunkId + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 76);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1d929b7f02880910a827","'use strict';\r\n\r\nvar common = require('common');\r\nvar aria = require('shared/aria');\r\nvar platform = require('lib/utils').run_on;\r\nvar dom = require( 'lib/dom' );\r\nvar KEY_CODES = require('mhe_base/common').KEYCODES;\r\n\r\nvar A11yGlossary = Glossary.extend({\r\n  show_definition: function (el) {\r\n    var jq = $(el);\r\n    var index = jq.attr(\"data-term\");\r\n    if (index == \"\" || index == null) {\r\n      index = jq.html();\r\n    }\r\n    if (index != \"\" && index != null) {\r\n      index = index.toLowerCase();\r\n      var term = player.glossary.terms[index];\r\n      var html;\r\n      if (term == null) {\r\n        html = \"No definition found for \" + index;\r\n      } else {\r\n        html = \"<strong>\" + term.term + \":</strong> \" + term.definition;\r\n      }\r\n      Standard_Dialog.open(html, {\r\n        \"title\": \"Glossary\",\r\n        // \"modal\": false,\r\n        // \"draggable\": true,\r\n        \"buttons\": \"OK\",\r\n        from: jq\r\n      });\r\n    }\r\n  }\r\n});\r\n\r\n// Dialog\r\nwindow.Standard_Dialog = function() {\r\n  var $manuscript = $('#manuscript');\r\n  var $body = $('body');\r\n  var $dialog, $content;\r\n  var options = {};\r\n\r\n  return {\r\n    open: function(html, opt) {\r\n      // Extend default options\r\n      options = $.extend(true, (opt || {}), {\r\n        width: 450,\r\n        modal: true,\r\n        draggable: false,\r\n        resizable: false\r\n      });\r\n\r\n      // Set buttons\r\n      if (options.buttons === 'none') {\r\n        options.buttons = null;\r\n      }\r\n      else if (options.buttons === 'OK' || !options.buttons) {\r\n        options.buttons = [ { text: 'OK', click: Standard_Dialog.close } ];\r\n      }\r\n\r\n      // Remove previous dialog\r\n      $('#standard_dialog_div').dialog('close').remove();\r\n\r\n      if (options.modal) {\r\n        $body.css('overflow', 'hidden');\r\n      }\r\n\r\n      // Hide other content from reader for mobile devices\r\n      $manuscript.attr('aria-hidden', 'true');\r\n\r\n      $dialog = $('<div id=\"standard_dialog_div\"></div>');\r\n      $content = $('<div class=\"dialog-div\">' + (html || '') + '</div>');\r\n\r\n      $dialog.append($content);\r\n      $dialog.dialog(options);\r\n\r\n      // If we open toc we use as description only instruction in the top of dialog and not links\r\n      var isMenu = $content.find('#toc_head').length;\r\n      var labelledBy = isMenu ? 'toc_head' : 'standard_dialog_div';\r\n\r\n      var $parentDialog = $dialog.parent().attr({\r\n        'tabindex': '0',\r\n        'role': 'dialog',\r\n        'aria-labelledby': 'ui-dialog-title-standard_dialog_div ' + labelledBy\r\n      });\r\n\r\n      $parentDialog.find('#ui-dialog-title-standard_dialog_div').attr({\r\n        'role': 'heading',\r\n        'aria-level': '1'\r\n      });\r\n\r\n      // Remove close btn\r\n      $('.ui-dialog-titlebar-close').remove();\r\n\r\n      var $lastBtn = $parentDialog.find('button').last();\r\n      var $firstBtn = $parentDialog.find('button').first();\r\n\r\n      // Attach events\r\n      $parentDialog.bind('keydown', function(e) {\r\n        var code = e.keyCode || e.which;\r\n\r\n        if (code === KEY_CODES.ESC) {\r\n          Standard_Dialog.close(true);\r\n        }\r\n\r\n        if (e.target === this && e.shiftKey && code === KEY_CODES.TAB) {\r\n          e.preventDefault();\r\n          $lastBtn.focus();\r\n        }\r\n      });\r\n      $lastBtn.bind('keydown', function(e) {\r\n        var code = e.keyCode || e.which;\r\n\r\n        if (!e.shiftKey && code === KEY_CODES.TAB) {\r\n          $parentDialog.focus();\r\n          e.preventDefault();\r\n        }\r\n      });\r\n\r\n      if (platform.android) {\r\n        // For android we set focus on dialog in any cases\r\n        $parentDialog.focus();\r\n      }\r\n      else if (isMenu) {\r\n        // If it is menu put focus on first link\r\n        $parentDialog.find('a').first().focus();\r\n      }\r\n      else {\r\n        // For other platform we set focus on first button\r\n        $firstBtn.focus();\r\n      }\r\n    },\r\n\r\n    // for now alert is just like any other dialog; we could change that later.\r\n    wait: function(html, opt) {\r\n      options = opt || {};\r\n      options.buttons = 'none';\r\n      Standard_Dialog.open(html, options);\r\n    },\r\n\r\n    alert: function(html, opt) {\r\n      Standard_Dialog.open(html, opt);\r\n    },\r\n\r\n    close: function() {\r\n      // Show other content\r\n      $manuscript.removeAttr('aria-hidden');\r\n\r\n      if ($dialog) {\r\n        $dialog.dialog('close').remove();\r\n      }\r\n      else {\r\n        $(\"#standard_dialog_div\").remove();\r\n      }\r\n\r\n      if (options.from) {\r\n        options.from.focus();\r\n      }\r\n\r\n      if (options.modal) {\r\n        $body.css('overflow', 'auto');\r\n      }\r\n    }\r\n  };\r\n}();\r\n\r\nvar OldFigures = require( 'shared/digfir/AYS_Figures' );\r\n\r\nvar A11yFigures = OldFigures.extend({\r\n\r\n  bcVideo: {}, // holds all of the video players (by ID)\r\n\r\n  bcPlayerData: { 'accountId': '1500315202001', 'playerId': 'B1AhVYg4l' },\r\n\r\n  process_media: function() {\r\n\r\n    var context = this;\r\n\r\n    // Process each video\r\n    $(\"[data-mmtype='mov']\").each(function() {\r\n      var $this = $(this);\r\n      var $parent = $this.parent(\"[data-type='figure']\");\r\n\r\n      var video_mmsrc = $this.attr(\"data-mmsrc\");\r\n      //var video_id = \"vidPlayerID\";\r\n      var video_id = \"vidId\" + video_mmsrc;\r\n\r\n      // Replace the current figure HTML with the new HTML5 video HTML\r\n      playerHTML = '<div id=\\\"outer_outer_video\\\"><div id=\\\"outer_video\\\"><video id=\\\"' + video_id + '\\\" data-video-id=\\\"' + video_mmsrc + '\\\"  data-account=\\\"' + context.bcPlayerData.accountId + '\\\" data-player=\\\"' + context.bcPlayerData.playerId + '\\\" data-embed=\\\"default\\\" class=\\\"video-js\\\" controls></video></div></div>';\r\n      $parent.before(playerHTML);\r\n      $parent.remove();\r\n\r\n      // instantiate the player\r\n      bc(document.getElementById(video_id));\r\n\r\n      // create player instance and set up cuepoints\r\n      videojs(video_id).ready(function() {\r\n\r\n        context.bcVideo[video_id] = this;\r\n\r\n        // reset the video to the beginning after it ends\r\n        context.bcVideo[video_id].on(\"ended\", function() {\r\n          context.bcVideo[video_id].currentTime(0);\r\n          context.bcVideo[video_id].pause();\r\n          $(\"#\" + video_id).removeClass(\"vjs-has-started\");\r\n        });\r\n\r\n        context.bcVideo[video_id].on(\"play\", function() {\r\n          $(\"#\" + video_id).addClass(\"vjs-has-started\");\r\n        });\r\n\r\n      }); //end ready\r\n    });\r\n  }\r\n\r\n});\r\n\r\nvar A11yInteractions = Interactions.extend({\r\n  onclick_handler: function(index, element) {\r\n    var action = $(element).attr(\"data-onclick\");\r\n    if (action == \"show\") {\r\n      // add a \"clicked\" class to the trigger if the item is being shown here\r\n      // (that is, if the item is at this point hidden)\r\n      if (!$(element).is(\":visible\")) {\r\n        $(element).parent().find(\"[data-onclick_trigger]\").addClass(\"clicked\");\r\n        $(element).parent().find(\"[data-onclick_trigger]\").attr('aria-expanded', 'true');\r\n        // otherwise we're hiding the item, so remove the \"clicked\" class below\r\n      }\r\n      $(element).slideToggle(\"fast\", function() {\r\n        // add a \"clicked\" class to the trigger if the item is being shown here\r\n        // (that is, if the item is at this point hidden)\r\n        if (!$(element).is(\":visible\")) {\r\n          $(element).parent().find(\"[data-onclick_trigger]\").removeClass(\"clicked\");\r\n          $(element).parent().find(\"[data-onclick_trigger]\").attr('aria-expanded', 'false');\r\n        }\r\n      });\r\n    } else {\r\n      player.interactions[action](element);\r\n    }\r\n  }\r\n});\r\n// Question\r\nvar ConcreteQuestion = require('subtype/digfir/Question');\r\n\r\nQuestion = ConcreteQuestion.extend({\r\n  extract_metadata: function() {\r\n  if ( this.jq == null ) {\r\n    return;\r\n  }\r\n\r\n  this.md.add_from_jq( this.jq.children( \"[data-type=metadata]\" ) );\r\n  player.processNextStepConditionals( this );\r\n\r\n  player.processModelUpdateConditionals( this );\r\n  },\r\n\r\n  checkModelUpdateConditionals: function( question_index ) {\r\n    var q_string = \"player.activity.questions[\" + question_index + \"]\";\r\n\r\n    for ( var i = 0; i < player.activity.questions[question_index].md.model_update_conditional.length; ++i ) {\r\n      var c = player.activity.questions[question_index].md.model_update_conditional[i];\r\n      var condition = c.condition.replace( /qq/g, q_string );\r\n      condition = condition.replace( /model/g, \"player.model\" );\r\n      var updateStatement = c.updateStatement.replace( /setModel/g, \"player.setModel\" );\r\n      updateStatement = updateStatement.replace( /model/g, \"player.model\" );\r\n      updateStatement = updateStatement.replace( /qq/g, q_string );\r\n      updateStatement = unescape( updateStatement );\r\n      condition = unescape( condition );\r\n\r\n\r\n      condition = condition.replace( /&/g, '&' );\r\n\r\n      if ( condition == \"else\" || eval( condition ) == true ) {\r\n        // if section_to_show is \"done\", we're done!\r\n        eval( updateStatement );\r\n      }\r\n    }\r\n    return;\r\n  }\r\n});\r\n\r\n// Essay\r\nvar Concrete_Essay_Query = require('subtype/digfir/Essay_Query');\r\n\r\nEssay_Query = Concrete_Essay_Query.extend({\r\n  getHTML: function(mode) {\r\n    // Start with the query text, if there\r\n    var html = this.query_text_html();\r\n    var val = '';\r\n    var disabled = '';\r\n\r\n    if (this.userHasAnswered() && mode !== 'preview') {\r\n      // Make sure we convert double quotes to &#34; for placement in 'value=\"xxx\"' attributes\r\n      // Convert breaks to newlines\r\n      val = this.user_answer.replace(/<br *(\\/)?>/g, '\\n');\r\n\r\n      // Also disable the input if we're not in review_correct_incorrect mode\r\n      disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';\r\n    }\r\n\r\n    var queryTextId = 'query_text_' + this.query_index;\r\n    var feedbackId = 'essay_question_evaluation_feedback_' + this.query_index;\r\n\r\n    // Add short label for mobile devices\r\n    var labelledBy = platform.mobile ? ' aria-label=\"Enter your answer for the question\" aria-labelledby=\"' + feedbackId + '\"' :\r\n    ' aria-labelledby=\"' + feedbackId + ' ' + queryTextId + '\"';\r\n\r\n    html += '<textarea id=\"query_answer_' + this.query_index + '\" class=\"query_essay_ta\" ' + disabled + labelledBy + '>' + val + '</textarea>';\r\n\r\n    if (this.answer_was_just_entered && this.grade == 100 && this.md.points_are_provisional == \"true\") {\r\n      html += \"<div class='essay_question_evaulation_feedback'>Your answer has been provisionally accepted. You'll get full credit for now, but your instructor may update your grade later after evaluating it.</div>\";\r\n    }\r\n\r\n    return html;\r\n  }\r\n});\r\n\r\n// MC\r\nvar ConcreteMC = require('subtype/digfir/MC_Query');\r\n\r\nMC_Query = ConcreteMC.extend({\r\n  getHTML: function( mode ) {\r\n    // Initialize image map elements\r\n    if ( this.imagemap_initialized === false ) {\r\n      var question_jq = this.jq.parent();\r\n      this.im_init( question_jq );\r\n      this.imagemap_initialized = true;\r\n    }\r\n\r\n    // Wrap answers in radio group\r\n    var html = '<fieldset class=\"mc_query_group\">';\r\n\r\n    // Add the query text\r\n    html += this.query_text_html();\r\n\r\n    for ( var i = 0; i < this.choices.length; i++ ) {\r\n      var index = this.choice_order[ i ];\r\n\r\n      // If this is review mode\r\n      var checked = '';\r\n      var disabled = '';\r\n      var className = '';\r\n      var mark = '';\r\n      var markId = '';\r\n      var corIncor = 'query_choice_feedback_label';\r\n\r\n      if ( mode === 'review' || mode === 'review_correct_incorrect' || mode === 'preview' ) {\r\n        // If it is correct answer\r\n        if ( index === this.correct_answer_index ) {\r\n          // Mark it in green\r\n          if ( mode !== 'review_correct_incorrect' || index === this.user_answer_index ) {\r\n            className = 'mc_correct_choice';\r\n            html += '<span class=\"query_correct_feedback_span\" aria-hidden=\"true\">&nbsp;</span>';\r\n            markId = 'mark_' + this.query_index + '_' + index;\r\n            corIncor = 'query_correct_feedback_label';\r\n            mark = '<span class=\"visually-hidden\" id=\"' + markId + '\">Correct</span>';\r\n          }\r\n\r\n          // Mark it in red\r\n        } else if ( index === this.user_answer_index && this.md.no_correct_answer !== 'true' ) {\r\n          className = 'mc_incorrect_choice';\r\n          html += '<span class=\"query_incorrect_feedback_span\" aria-hidden=\"true\">&nbsp;</span>';\r\n          markId = 'mark_' + this.query_index + '_' + index;\r\n          corIncor = 'query_incorrect_feedback_label';\r\n          mark = '<span class=\"visually-hidden\" id=\"' + markId + '\">Incorrect</span>';\r\n        }\r\n\r\n        // And the input should be disabled, unless we're in review_correct_incorrect mode\r\n        disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';\r\n      }\r\n\r\n      // If this is the choice the user clicked, it's checked (regardless of mode)\r\n      checked = (index === this.user_answer_index) ? 'checked' : '';\r\n\r\n      var id = 'query_answer_' + this.query_index + '_' + index;\r\n      var labelId = 'query_answer_label_' + this.query_index + '_' + index;\r\n\r\n      // Hide label to avoid twice reading, but not for FF, otherwise FF doesn't read\r\n      var labelHidden = platform.android || platform.ios ? 'aria-hidden=\"true\"' : '';\r\n\r\n\r\n      html +=\r\n        '<div class=\"wrap_query\"><div  class=\"' + corIncor + '\"><input class=\"query_mc_choice_radio ' + className + '\" type=\"radio\" name=\"query_answer_' + this.query_index + '\" id=\"' + id + '\" ' +\r\n        ' value=\"' + index + '\" ' + checked + ' ' + disabled + ' aria-labelledby=\"' + labelId + '\"/></div>' +\r\n\r\n        '<label ' + labelHidden + ' id=\"' + labelId + '\" for=\"' + id + '\">' + this.choice_ids[ index ] + '. ' + this.choices[ index ] + ' ' + mark + '</label></div>';\r\n\r\n    }\r\n\r\n    // Get a possible feedback string for each option\r\n    html += this.correct_incorrect_feedback();\r\n\r\n    html += \"</fieldset>\";\r\n\r\n    html = dom.createHTML( html );\r\n    common.parseMathExpresions( html );\r\n\r\n    return html;\r\n  },\r\n\r\n  evaluateAnswer: function() {\r\n    var jq = this.parent_question.queries[0].jq.parent().find('input[type=\"button\"]');\r\n\r\n    if ( $( 'input:radio[name=query_answer_' + this.query_index + ']:checked' ).val() !== undefined ) {\r\n      // get the user's selected answer, which will be 0-based\r\n      this.user_answer_index = $( 'input:radio[name=query_answer_' + this.query_index + ']:checked' ).val() * 1;\r\n\r\n      // set grade accordingly (if this.md.no_correct_answer is true, any answer is correct)\r\n      if ( this.user_answer_index == this.correct_answer_index || this.md.no_correct_answer == \"true\" ) {\r\n        this.setGrade( 100 );\r\n      }\r\n      else {\r\n        this.setGrade( 0 );\r\n      }\r\n\r\n      return true;\r\n    }\r\n    else {\r\n\r\n      if ( this.parent_question.queries.length != 1 ) {\r\n        window.Standard_Dialog.open( \"<p style=\\\"text-align: center;\\\">You must answer the questions before proceeding.</p>\", {\r\n          \"title\": \"Please answer questions\",\r\n          \"draggable\": false,\r\n          \"width\": 400,\r\n          \"buttons\": [\r\n            { text: 'OK', click: window.Standard_Dialog.close }\r\n          ],\r\n          from: jq\r\n        } );\r\n      }\r\n      else {\r\n        window.Standard_Dialog.open( \"<p style=\\\"text-align: center;\\\">You must answer the question before proceeding.</p>\", {\r\n          \"title\": \"Please answer question\",\r\n          \"draggable\": false,\r\n          \"width\": 400,\r\n          \"buttons\": [\r\n            { text: 'OK', click: window.Standard_Dialog.close }\r\n          ],\r\n          from: jq\r\n        } );\r\n      }\r\n      return false;\r\n    }\r\n\r\n  }\r\n});\r\n\r\n// DD\r\nDD_Query = require('subtype/digfir/DD_Query');\r\n\r\n// FB\r\nFB_Query = require('subtype/digfir/FB_Query');\r\n\r\n//CB\r\n\r\nCB_Query = CB_Query.extend({\r\n  query_text_html: function(text) {\r\n    var id = 'question_text_' + this.parent_question.index;\r\n\r\n    // Set id for use it to associate query text with input checkboxes\r\n    if (platform.ios) {\r\n      // iOS doesn't see legend\r\n      return '<div id=\"' + id + '\" class=\"query_text\">' + text + '</div>';\r\n    } else {\r\n      return '<legend id=\"' + id + '\" class=\"query_text\">' + text + '</legend>';\r\n    }\r\n  },\r\n  /**\r\n   * Build correct HTML for query\r\n   * @param {string} mode Mode for the question\r\n   * @returns {string} Html for the question\r\n   */\r\n  getHTML: function(mode) {\r\n    var html = '';\r\n\r\n    // If we're in preview mode or\r\n    // (a student answer has been given and we're not in review_correct_incorrect mode),\r\n    // or the student got it correct disable the checkbox\r\n    var disabled = (mode === 'preview' || (mode !== 'review_correct_incorrect' && this.user_answer_index != null) || this.isCorrect()) ?\r\n      'disabled' : '';\r\n\r\n    // If user has answered with choice 0, it should be checked, unless we're in preview mode\r\n    var checked = (this.user_answer_index === 0 && mode !== 'preview') ? 'checked' : '';\r\n\r\n    var id = 'query_answer_' + this.query_index;\r\n    var labelId = 'query_answer_label_' + this.query_index;\r\n    var textId = 'question_text_' + this.parent_question.index;\r\n    var nameId = 'question_name_' + this.parent_question.index;\r\n\r\n    // FF + NVDA doesn't read legend in particular cases\r\n    var labelledBy = platform.firefox ? textId + ' ' + labelId : labelId;\r\n\r\n    html += '<input type=\"checkbox\" class=\"query_cb\" id=\"' + id + '\" ' + disabled + ' ' + checked + ' aria-labelledby=\"' + labelledBy + '\" name=\"' + nameId+ '\">';\r\n    html += this.finish_inline_query(this.choices[this.correct_answer_index], mode);\r\n\r\n    return html;\r\n  },\r\n  /**\r\n   * Build qroup for question with some checkboxes\r\n   */\r\n  postInit: function() {\r\n    var queryGroup = this.parent_question.jq.find('.cb_query_group');\r\n\r\n    // Create query_text\r\n    if (!queryGroup.length) {\r\n      queryGroup = $('<fieldset class=\"cb_query_group\"></fieldset>');\r\n      this.parent_question.jq.find('h3').after(queryGroup);\r\n\r\n      var queryText = this.parent_question.jq.find('p').first().remove().text();\r\n\r\n      queryGroup.append(this.query_text_html(queryText));\r\n    }\r\n\r\n    // Rearrange checkboxes\r\n    var paragraph = this.jq.parent();\r\n    var choiceText = paragraph.text().split(' ');\r\n\r\n    choiceText.shift();\r\n    choiceText = choiceText.join(' ');\r\n\r\n    var id = 'query_answer_' + this.query_index;\r\n    var labelId = 'query_answer_label_' + this.query_index;\r\n\r\n    // Hide label to avoid twice reading for mobile\r\n    var labelHidden = platform.android || platform.ios ? 'aria-hidden=\"true\"' : '';\r\n    var label = '<label id=\"' + labelId + '\" for=\"' + id + '\" ' + labelHidden + '>' + choiceText + '</label>';\r\n\r\n    queryGroup.append(this.jq).append(label);\r\n    queryGroup.append('<div class=\"query_group_br\"></div>');\r\n\r\n    paragraph.remove();\r\n  },\r\n  /**\r\n   * Add aria-label for image\r\n   * @param correct_answer\r\n   * @param mode\r\n   * @returns {string}\r\n   */\r\n  finish_inline_query: function(correct_answer, mode) {\r\n    // Don't show in special modes\r\n    if (mode === 'delivery' || !mode || this.md.no_correct_answer === 'true') {\r\n      return '';\r\n    }\r\n\r\n    var html = '';\r\n    var mark = '';\r\n\r\n    // Image that indicates if the query is correct or incorrect\r\n    if (mode === 'review' || mode === 'review_correct_incorrect') {\r\n      var label = this.isCorrect() ? 'correct' : 'incorrect';\r\n      var className = 'query_' + label + '_feedback_span';\r\n\r\n      html += '<span class=\"' + className + '\" aria-hidden=\"true\">&nbsp;</span>';\r\n    }\r\n\r\n    // Show correct answer not in mode review_correct_incorrect\r\n    if (mode !== 'review_correct_incorrect') {\r\n      mark = '<span class=\"visually-hidden\">' + label + '. </span>';\r\n      html += '<span class=\"query_correct_answer_span\">' + mark + correct_answer + '</span>';\r\n    }\r\n\r\n    html += '</span>';\r\n\r\n    return html;\r\n  }\r\n});\r\n\r\n//Activity\r\nvar ConcreteActivity = require('subtype/digfir/Activity');\r\n\r\nvar A11yActivity = ConcreteActivity.extend({\r\n  submit_question: function( question_index ) {\r\n    // the arg may be a number or an event object; in the latter case...\r\n    if ( typeof question_index == \"object\" ) {\r\n      // extract the question_index from the object\r\n      question_index = question_index.data.question_index;\r\n    }\r\n    //remove any previously added show question again messages\r\n    player.get_current_section().jq.find( \".incorrect_message, .correct_message\" ).remove();\r\n\r\n    var t = player.activity;\r\n    var question = t.questions[question_index];\r\n    var all_answers_correct = true;\r\n\r\n    var isComboBox = false;\r\n    var answerSubmit = false;\r\n    if ( question.queries.length ) {\r\n      var query = question.queries[0];\r\n      if ( query.query_source.match( /^CB.*/g ) ) {\r\n        isComboBox = true;\r\n      }\r\n    }\r\n    // for each query in the question...\r\n    for ( var i = 0; i < question.queries.length; ++i ) {\r\n      var query = question.queries[i];\r\n\r\n      // evaluate the answer. If evaluateAnswer returns false, the answer isn't submittable at this time --\r\n      // most likely because it's a free-response answer that needs to be evaluated via MAVE.\r\n      var answer_submittable = query.evaluateAnswer( question_index );\r\n      if ( answer_submittable === false ) {\r\n        // as soon as we get an unsubmittable answer, we return. submit_question\r\n        // will be called again, either by the callback fn of MAVE or because the student\r\n        // resubmits. At that point we'll catch any additional free-response answers that need\r\n        // checking, or we'll finish this loop here and move on.\r\n        return;\r\n      }\r\n\r\n      if ( query.user_answer_index === 0 ) {\r\n        answerSubmit = true;\r\n      }\r\n\r\n      all_answers_correct = all_answers_correct && query.isCorrect();\r\n    }\r\n    if ( isComboBox && !answerSubmit ) {\r\n      var subBtn = query.jq.parent().parent().find('input[type=\"button\"');\r\n\r\n      window.Standard_Dialog.open( \"<p style=\\\"text-align: center;\\\">Check one or more options from the list.</p>\", {\r\n        \"title\": \"Please check one or more options\",\r\n        \"draggable\": false,\r\n        \"width\": 320,\r\n        \"buttons\": [\r\n          { text: 'OK', click: window.Standard_Dialog.close }\r\n        ],\r\n        from: subBtn\r\n      } );\r\n      return;\r\n    }\r\n\r\n    // if we made it to here, we're at least going to show which items are correct and incorrect\r\n    // we might overwrite with review mode below, but that's OK\r\n    for ( var i = 0; i < question.queries.length; ++i ) {\r\n      var query = question.queries[i];\r\n      query.jq.html( query.getHTML( \"review_correct_incorrect\" ) );\r\n    }\r\n\r\n    // update question tries\r\n    ++question.tries;\r\n\r\n    // if answer is incorrect, and max_tries is set, and # of tries is less than max_tries\r\n    // (and the user didn't just give up)\r\n    if ( (!all_answers_correct && question.md.max_tries != null && question.tries < question.md.max_tries) && question.gave_up != true ) {\r\n      // tell user he can try again\r\n      t.show_question_feedback( question, false, true );\r\n      return;\r\n    }\r\n    else {\r\n      t.show_question_feedback( question, all_answers_correct, false );\r\n    }\r\n\r\n    // if we make it to here we need to set ARGA info for the question, and show queries in review mode\r\n    // if md.question_report_text is set, we submit the question as a whole, rather than as individual queries\r\n    var query_correct_answers = \"\";\r\n    var query_responses = \"\";\r\n    var query_responses_for_questionData = \"\";\r\n    var query_grade_sum = 0;\r\n    // for each query in the question...\r\n    for ( var i = 0; i < question.queries.length; ++i ) {\r\n      var query = question.queries[i];\r\n\r\n      // establish a question number to use\r\n      var query_number = t.get_query_number( question, i );\r\n\r\n      // get a query weight\r\n      var query_weight = question.get_weight();\r\n      // if the question has more than one query, divide weight accordingly\r\n      if ( question.queries.length > 1 ) {\r\n        query_weight = Math.round( query_weight / question.queries.length );\r\n      }\r\n\r\n      // if credit_after_max_tries is set, give at least that credit now, as long as the student tried\r\n      if ( question.md.credit_after_max_tries != null ) {\r\n        var query_grade = query.getGradeForARGA();\r\n        if ( query_grade >= 0 && query_grade < question.md.credit_after_max_tries ) {\r\n          query.overrideGrade( question.md.credit_after_max_tries * 1 );\r\n        }\r\n      }\r\n\r\n      // set the ARGA response, unless we're saving one response for the whole question\r\n      if ( !question.md_set( \"question_report_text\" ) ) {\r\n        t.ARGA_set_query_response( query, query_number, query_weight );\r\n\r\n        // otherwise compose query roll-ups\r\n      }\r\n      else {\r\n        if ( query_correct_answers != \"\" ) {\r\n          query_correct_answers += \" / \";\r\n          query_responses += \" / \";\r\n          query_responses_for_questionData += t.query_responses_separator;\r\n        }\r\n        query_correct_answers += query.getCorrectAnswerForARGA();\r\n        query_responses += query.getUserAnswerForARGA();\r\n        // see restore_saved_answers for how this is used later\r\n        query_responses_for_questionData += query.getUserAnswerForARGA()\r\n          + t.query_responses_grade_separator\r\n          + query.getOriginalGrade();\r\n        query_grade_sum += query.getGradeForARGA() * 1;\r\n      }\r\n\r\n      // show in review mode, unless question metadata says not to show correct answers\r\n      if ( question.md.show_correct_answers != \"false\" ) {\r\n        if ( isComboBox ) {\r\n          var jq = query.parent_question.jq.find( '#query_answer_' + query.query_index ).parent();\r\n          jq.html( query.getHTML( \"review\" ) );\r\n        }\r\n        else {\r\n          query.jq.html( query.getHTML( \"review\" ) );\r\n\r\n        }\r\n      }\r\n    }\r\n\r\n    // if we're saving one response for the whole question, save here\r\n    if ( question.md_set( \"question_report_text\" ) ) {\r\n      var question_grade = Math.round( query_grade_sum / question.queries.length );\r\n      t.ARGA_set_question_response( question, query_correct_answers, query_responses, question_grade, query_responses_for_questionData );\r\n    }\r\n\r\n    // update section status\r\n    player.update_section_status();\r\n\r\n    // grade the activity\r\n    t.grade_activity();\r\n\r\n    // then if ARGA is running, submit data; show_grade_saved_message will be called on completion.\r\n    if ( player.ARGA_running ) {\r\n      t.ARGA_submit_data();\r\n    }\r\n\r\n    // update the question_action_div\r\n    t.update_question_action_div( question_index );\r\n\r\n    // if the item is in a sequence, show the next question\r\n    t.show_next_question( question );\r\n\r\n\r\n    var s = player.get_current_section();\r\n\r\n    // if all questions are answered and all sequences are complete\r\n    // (these are set by _super)\r\n    if ( s.all_questions_answered && s.all_question_sequences_completed ) {\r\n      // if we're not on the final step\r\n      if ( s.index < player.sections.length - 1 ) {\r\n        // then show the buttona\r\n        UI_Elements.toggle_button( \"step_button\", true );\r\n        // otherwise we're done!\r\n      }\r\n      else {\r\n        player.show_completion_message();\r\n\r\n        player.on_last_page_message();\r\n      }\r\n    }\r\n\r\n    if ( typeof question_index == \"object\" ) {\r\n      // extract the question_index from the object\r\n      question_index = question_index.data.question_index;\r\n    }\r\n\r\n    player.activity.questions[question_index].checkModelUpdateConditionals( question_index );\r\n\r\n    // re-call mathjax conversion here\r\n    MathJax.Hub.Queue( [\"Typeset\", MathJax.Hub] );\r\n\r\n    if ( $( \"[data-question_index=\" + question_index + \"]\" ).hasClass( \"resubmission\" ) ) {\r\n      player.get_current_section().all_questions_answered = true;\r\n    }\r\n\r\n    if ( player.get_current_section().all_questions_answered === undefined ) {\r\n      safe_log(\"all_questions_answered === undefined\");\r\n      player.get_current_section().all_questions_answered = true;\r\n    }\r\n    if ( player.get_current_section().all_questions_answered === true && player.section_currently_showing !== ( player.sections.length - 1 ) ) {\r\n      $( \"#step_button\" ).show();\r\n      $('#step_button').focus();\r\n      $( \".hint_button\" ).hide();\r\n    }\r\n\r\n    var cur_question_md = $( \"[data-question_index=\" + question_index + \"]\" ).children( \"[data-type=metadata]\" );\r\n\r\n    var branches = {};\r\n    if ( cur_question_md ) {\r\n      var modelUpdateConditional = $( cur_question_md ).find( \"[key=branches]\" );\r\n      if ( modelUpdateConditional.length ) {\r\n\r\n        modelUpdateConditional = $( modelUpdateConditional ).text();\r\n        modelUpdateConditional = modelUpdateConditional.split( ',' );\r\n\r\n        for ( var i = 0; i < modelUpdateConditional.length; i++ ) {\r\n          var branch = modelUpdateConditional[i].split( ':' );\r\n          branches[ branch[0] ] = branch[1];\r\n        }\r\n\r\n        if ( !player.activity.questions[question_index].queries[0].user_answer_index ) {\r\n          player.activity.questions[question_index].queries[0].user_answer_index = 0;\r\n        }\r\n        var sectionID = branches[player.activity.questions[question_index].queries[0].user_answer_index];\r\n\r\n        player.get_current_section().md.next_section = sectionID;\r\n\r\n        var section_index = player.lookup_section_index_by_sectionID( sectionID );\r\n\r\n        if ( isNaN( section_index ) ) {\r\n          throw( 'There is not section with id ' + sectionID );\r\n        }\r\n\r\n        $( \"#step_button\" )[0].onclick = function() {\r\n          var section_jq = player.get_current_section_jq();\r\n          var figures = section_jq.find( '[data-type=\"figure\"]' );\r\n\r\n          player.stopVideoPlayer( figures );\r\n          player.show_section( section_index );\r\n        };\r\n      }\r\n    }\r\n  },\r\n\r\n  grade_activity: function() {\r\n    this.answered_all_queries = true;\r\n    this.total_points_possible = 0;\r\n    this.total_points_earned = 0;\r\n\r\n    for ( var x = 0; x < this.queries.length; x++ ) {\r\n      var q = this.queries[x];\r\n\r\n      // see if the user answered at all\r\n      if ( !q.userHasAnswered() ) {\r\n        this.answered_all_queries = false;\r\n      }\r\n\r\n      // add up points and score\r\n      this.total_points_possible += q.getPointsPossible();\r\n      this.total_points_earned += q.getPointsAwarded();\r\n    }\r\n\r\n    // if there aren't any questions, user gets 100% just for hitting the activity\r\n    if ( this.total_points_possible == 0 ) {\r\n      this.grade_percent = 100;\r\n      // else calculate grade percent, rounded to nearest whole percentage\r\n    }\r\n    else {\r\n      this.grade_percent = Math.round( (this.total_points_earned / this.total_points_possible) * 100 );\r\n    }\r\n\r\n    var current_section = player.get_current_section();\r\n    var answered_all_queries = ( current_section && current_section.all_questions_answered === true && current_section.index == (player.sections.length - 1) )\r\n\r\n    // If all queries have been answered, do ARGA stuff\r\n    if ( player.ARGA_running ) {\r\n      if ( answered_all_queries ) {\r\n        // set \"complete\" appropriately\r\n        Set_ARGA_Data( 'complete', 'yes' );\r\n        // and save the grade\r\n        Set_ARGA_Grade( this.grade_percent );\r\n\r\n        // we don't want a partial grade set on the server until the student is done.\r\n\r\n        // otherwise\r\n      }\r\n      else {\r\n        // make sure \"complete\" is set to \"no\"\r\n        Set_ARGA_Data( 'complete', 'no' );\r\n      }\r\n\r\n      // note that we don't commit to the server in this function;\r\n      // that has to be done separately.\r\n    }\r\n  },\r\n  update_question_action_div: function( question_index ) {\r\n    var question = this.questions[question_index];\r\n    // calculate points_awarded and points_possible\r\n    var points_awarded = 0;\r\n    var points_possible = 0;\r\n    var points_provisional = false;\r\n    for ( var i = 0; i < question.queries.length; ++i ) {\r\n      var query = question.queries[i];\r\n      points_awarded += query.getPointsAwarded();\r\n      points_possible += query.getPointsPossible();\r\n      if ( query.pointsAreProvisional() == true ) {\r\n        points_provisional = true;\r\n      }\r\n    }\r\n\r\n    if ( question.md && question.md.save_grade && question.md.save_grade === 'true' ) {\r\n      player.quiz_data.points_awarded += points_awarded;\r\n      player.quiz_data.points_possible += points_possible;\r\n    }\r\n\r\n    // round to at most two decimal places\r\n    points_awarded = Math.round( points_awarded * 100 ) / 100;\r\n    points_possible = Math.round( points_possible * 100 ) / 100;\r\n\r\n    // hide submit button (and any other similar buttons that might be added by subtypes), but show points earned\r\n    var jq = $( \"#question_action_div_\" + question.index );\r\n    jq.find( \".question_submit_button\" ).hide();\r\n    var points_html = \"<div class='points_awarded_div'>Total points awarded for this quiz: \" + points_awarded + \" of \" + points_possible;\r\n\r\n    if ( points_provisional ) {\r\n      points_html += \" (includes 1 provisional points for <span class='grid'>#</span>5)\";\r\n    }\r\n    points_html += \"</div>\";\r\n\r\n    var jq = $( \"#question_action_div_\" + question.index );\r\n    jq.find( \".points_awarded_div\" ).remove();\r\n    if ( jq.find( \".question_feedback\" ).length > 0 ) {\r\n      jq.find( \".question_feedback\" ).after( points_html );\r\n    }\r\n    else {\r\n      jq.prepend( points_html );\r\n    }\r\n\r\n\r\n    question.jq.find( '[data-type=termref]' ).each( function( index, element ) {\r\n      // It is placed here because it should work for queries\r\n      var $element = $( element );\r\n      $element.unbind();\r\n      $element.click( function() { window.player.glossary.show_definition( this ); } );\r\n      $element.keydown(function(e) {\r\n        if (e.which === 13 || e.which === 32) {\r\n\r\n          e.currentTarget.click();\r\n        }\r\n      });\r\n    } );\r\n\r\n  }\r\n});\r\n\r\n// Player\r\nvar ConcretePlayer = require('subtype/digfir/Player');\r\n\r\n//Custom Player\r\nvar A11y4myersPlayer = ConcretePlayer.extend({\r\n  model: {},\r\n  quiz_data: {\r\n    points_awarded: 0,\r\n    points_possible: 0\r\n  },\r\n  prev_part: {\r\n    title: 'intro',\r\n    index: 1\r\n  },\r\n\r\n  doSectionUpdateConditionals: function( s ) {\r\n    for ( var i = 0; i < s.md.model_update_conditional.length; ++i ) {\r\n      var c = s.md.model_update_conditional[i];\r\n      var condition = c.condition;\r\n      condition = condition.replace( /model/g, \"player.model\" );\r\n\r\n      var updateStatement = c.updateStatement.replace( /setModel/g, \"player.setModel\" );\r\n      updateStatement = updateStatement.replace( /\\smodel/g, \"player.model\" );\r\n\r\n      updateStatement = unescape( updateStatement );\r\n      condition = unescape( condition );\r\n\r\n      condition = condition.replace( /&/g, '&' );\r\n\r\n      if ( condition == \"else\" || eval( condition ) == true ) {\r\n        // if section_to_show is \"done\", we're done!\r\n        eval( updateStatement );\r\n      }\r\n    }\r\n\r\n  },\r\n\r\n  show_navigation: function() {\r\n    var sectionsIndex = [];\r\n    // top_banner\r\n    var html = \"<div id='top_banner'>\" +\r\n      \"<h1 id='banner_activity_title'>\" + this.activity_title + \"</h1>\" +\r\n      \"</div>\";\r\n\r\n    // navigation bar\r\n    html += \"<div id='nav_bar'><div id='nav_item_container' role='tablist' aria-label='Navigation menu'>\";\r\n    for ( var i = 0; i < this.sections.length; ++i ) {\r\n      if ( this.sections[i].md.section_title ) {\r\n        html += \"<button class='nav_item' id='nav_item_\" + this.sections[i].md.section_title.toLowerCase() + \"' role='tab' onclick='player.jump_to_section(\" + i + \")' >\"\r\n          + this.sections[i].md.section_title + \"</button>\";\r\n\r\n        sectionsIndex.push(i);\r\n      }\r\n    }\r\n    html += \"</div>\";\r\n\r\n    var $chapter = $( \"[data-type=chapter]\" );\r\n    $chapter.prepend( html );\r\n\r\n    //add aria-labelledby to tabpanel\r\n    for (var i = 0; i < sectionsIndex.length; i++) {\r\n      var ariaLableledby = 'nav_item_' + this.sections[sectionsIndex[i]].md.section_title.toLowerCase();\r\n\r\n      if (i < sectionsIndex.length - 1) {\r\n        for (var j = sectionsIndex[i]; j < sectionsIndex[i + 1]; j++) {\r\n          $('[data-type=section]').eq(j).attr('aria-labelledby', ariaLableledby);\r\n        }\r\n      } else {\r\n        $('[data-type=section]').eq(sectionsIndex[i]).attr('aria-labelledby', ariaLableledby);\r\n      }\r\n    }\r\n\r\n    //add aria-controls to tab\r\n    for (var i = 0; i < sectionsIndex.length; ++i) {\r\n      var ariaControls = '';\r\n\r\n      if (i < sectionsIndex.length - 1) {\r\n        for (var j = sectionsIndex[i]; j < sectionsIndex[i + 1]; j++) {\r\n          ariaControls += ' digfir_section_' + j;\r\n        }\r\n      } else {\r\n        ariaControls = ' digfir_section_' + j;\r\n      }\r\n\r\n      $('.nav_item').eq(i).attr('aria-controls', ariaControls);\r\n    }\r\n\r\n    //remove extra headings\r\n    $('h1.section-title').remove();\r\n    $('div.section-title[aria-level=\"3\"]').remove();\r\n\r\n    // button at the bottom of the manuscript to go on to the next step\r\n    $chapter.append( '<button id=\"step_button\" class=\"ui-button ui-state-default ui-corner-all ui-button-text-icon-secondary\" role=\"button\" aria-disabled=\"false\"><span class=\"ui-button-text\">Next</span></button>' );\r\n\r\n    html = \"<div class='preloading_fonts' style='opacity:0;position: absolute;'>\" +\r\n      \"<div class=\\\"opensans\\\"> </div>\" +\r\n      \"<div class=\\\"opensans-italic\\\"> </div>\" +\r\n      \"<div class=\\\"opensans-bold\\\"> </div>\" +\r\n      \"<div class=\\\"opensans-italic-bold\\\"> </div>\" +\r\n      \"<div class=\\\"droid\\\"> </div>\" +\r\n      \"<div class=\\\"droid-italic\\\"> </div>\" +\r\n      \"<div class=\\\"droid-bold\\\"> </div>\" +\r\n      \"<div class=\\\"droid-italic-bold\\\"> </div>\" +\r\n      \"</div>\";\r\n\r\n    $chapter.append( html );\r\n    // activate all other buttons\r\n    UI_Elements.activate_buttons();\r\n  },\r\n\r\n  jump_to_section: function( section_index ) {\r\n    if ( this.last_available_section >= section_index ) {\r\n      player.show_section( section_index );\r\n    }\r\n  },\r\n\r\n  stopVideoPlayer: function( figures ) {\r\n    figures.each( function() {\r\n        var id = $( this ).data( 'figure-id' );\r\n        if ( id && videos[id] ) {\r\n          var vPlayer = brightcove.api.getExperience( id );\r\n\r\n          if ( vPlayer ) {\r\n            var videoModule = vPlayer.getModule( brightcove.api.modules.APIModules.VIDEO_PLAYER );\r\n            videoModule.pause( true );\r\n          }\r\n        }\r\n      }\r\n    )\r\n  },\r\n\r\n  show_section: function(section_to_show) {\r\n    this._super(section_to_show);\r\n    //turn focus on nav item\r\n    var navItem = $('.passed.active');\r\n\r\n    if (navItem.length) {\r\n      setTimeout(function () {\r\n        $('.passed.active').focus();\r\n      }, 0)\r\n    }\r\n  },\r\n\r\n  show_section_animate: function( section_to_show, direction ) {\r\n    if ( this.section_currently_showing !== null ) {\r\n      var section_jq = this.get_current_section_jq();\r\n      section_jq.hide();\r\n\r\n      var figures = section_jq.find( '[data-type=\"figure\"]' );\r\n      this.stopVideoPlayer( figures );\r\n    }\r\n    this.section_currently_showing = section_to_show;\r\n\r\n    // hide navigation bar on first section\r\n    if ( section_to_show === 0 ) {\r\n      $( '#nav_bar' ).hide();\r\n    }\r\n    else {\r\n      $( '#nav_bar' ).show();\r\n    }\r\n\r\n    this.update_section_status();\r\n\r\n    player.show_variables();\r\n\r\n    this.process_conditional_display( this.get_current_section_jq() );\r\n    this.get_current_section_jq().show();\r\n\r\n    if ( this.sections[section_to_show].md.section_title ) {\r\n      var section_title = this.sections[section_to_show].md.section_title.toLowerCase();\r\n\r\n      var $newVisibleSection =  $( \"#nav_item_\" + section_title )\r\n      .addClass( \"active\" )\r\n      .addClass( \"passed\" )\r\n      .attr('tabindex','0')\r\n      .attr('aria-selected', 'true');\r\n\r\n      var $invisibleSections =  $( \".nav_item:not(#nav_item_\" + section_title + \")\" );\r\n      $invisibleSections.attr({\r\n        'aria-selected': 'false',\r\n        'aria-disabled': 'true',\r\n        'tabindex': '-1'\r\n      });\r\n      $invisibleSections.removeClass( \"active\" );\r\n      $newVisibleSection.prevAll().addClass( 'passed' );\r\n      $( \".nav_item.passed\" ).removeAttr('aria-disabled');\r\n    }\r\n\r\n    this.doSectionUpdateConditionals( this.get_current_section() );\r\n\r\n    if ( !this.sections[section_to_show].all_questions_answered || this.section_currently_showing === ( this.sections.length - 1 ) ) {\r\n      safe_log(\"Hiding step button\");\r\n      $( \"#step_button\" ).hide();\r\n    }\r\n    else {\r\n      safe_log(\"Showing step button\");\r\n      $( \"#step_button\" ).show();\r\n    }\r\n\r\n    if ( player.get_current_section().all_questions_answered === true ) {\r\n      player.get_current_section().jq.find( \".hint_button\" ).hide();\r\n    }\r\n    else {\r\n      player.get_current_section().jq.find( \".hint_button\" ).show();\r\n    }\r\n\r\n    if ( this.sections[section_to_show].md.show_step_button && this.sections[section_to_show].md.show_step_button === 'true' ) {\r\n      $( \"#step_button\" ).show();\r\n      player.get_current_section().jq.find( \".hint_button\" ).show();\r\n    }\r\n\r\n    if ( this.sections[section_to_show].md.time_enable_next && !this.sections[section_to_show].is_watched ) {\r\n      $( \"#step_button\" ).hide();\r\n      setTimeout( function() {\r\n        $( \"#step_button\" ).show()\r\n      }, ( this.sections[section_to_show].md.time_enable_next * 1000 ) );\r\n    }\r\n\r\n    // update button click function\r\n    var section = this.get_current_section();\r\n    var sectionID = section.md.next_section;\r\n    if ( sectionID ) {\r\n      var section_index = player.lookup_section_index_by_sectionID( sectionID );\r\n      if ( isNaN( section_index ) ) {\r\n        throw( 'There is not section with id ' + sectionID );\r\n      }\r\n\r\n      $( \"#step_button\" )[0].onclick = function() {\r\n        var section_jq = player.get_current_section_jq();\r\n        var figures = section_jq.find( '[data-type=\"figure\"]' );\r\n\r\n        player.stopVideoPlayer( figures );\r\n        player.show_section( section_index );\r\n      };\r\n    }\r\n    else {\r\n      $( \"#step_button\" )[0].onclick = function() {\r\n        var section_jq = player.get_current_section_jq();\r\n        var figures = section_jq.find( '[data-type=\"figure\"]' );\r\n\r\n        player.stopVideoPlayer( figures );\r\n        player.show_section( 'next' );\r\n      };\r\n    }\r\n\r\n    var show_question_again = section.md.show_question_again;\r\n    if ( show_question_again ) {\r\n      var show_questions_again = player.get_show_questions_again( show_question_again );\r\n\r\n      for ( var i = 0; i < show_questions_again.length; i++ ) {\r\n        player.show_question_again( show_questions_again[i].question, show_questions_again[i].reset, section.md.type_section );\r\n      }\r\n    }\r\n\r\n    player.glossary.set_click_event_for_terms_in_section( this.get_current_section_jq() );\r\n\r\n    this.sections[section_to_show].is_watched = true;\r\n\r\n    //added by devlions....\r\n    if(this.get_current_section_jq().find(\"input[disabled]\").length && !this.sections[this.section_currently_showing].md.cb){\r\n      var question_index = this.get_current_section_jq().find(\"[data-question_index]\").attr(\"data-question_index\");\r\n\r\n      // the arg may be a number or an event object; in the latter case...\r\n      if ( typeof question_index == \"object\" ) {\r\n        // extract the question_index from the object\r\n        question_index = question_index.data.question_index;\r\n      }\r\n\r\n      //remove any previously added show question again messages\r\n      player.get_current_section().jq.find( \".incorrect_message, .correct_message\" ).remove();\r\n\r\n      var t = player.activity;\r\n      var question = t.questions[question_index];\r\n\r\n      // update section status\r\n      player.update_section_status();\r\n\r\n      // update the question_action_div\r\n      t.update_question_action_div( question_index );\r\n\r\n      // if the item is in a sequence, show the next question\r\n      t.show_next_question( question );\r\n\r\n      var s = player.get_current_section();\r\n\r\n      // if all questions are answered and all sequences are complete\r\n      // (these are set by _super)\r\n      if ( s.all_questions_answered && s.all_question_sequences_completed ) {\r\n        // if we're not on the final step\r\n        if ( s.index < player.sections.length - 1 ) {\r\n          // then show the buttona\r\n          UI_Elements.toggle_button( \"step_button\", true );\r\n          // otherwise we're done!\r\n        }\r\n        else {\r\n          player.show_completion_message();\r\n          player.on_last_page_message();\r\n        }\r\n      }\r\n\r\n      if ( typeof question_index == \"object\" ) {\r\n        // extract the question_index from the object\r\n        question_index = question_index.data.question_index;\r\n      }\r\n\r\n      player.activity.questions[question_index].checkModelUpdateConditionals( question_index );\r\n\r\n      // re-call mathjax conversion here\r\n      if (typeof MathJax !== 'undefined'){\r\n        MathJax.Hub.Queue( [\"Typeset\", MathJax.Hub] );\r\n      }\r\n\r\n      if ( $( \"[data-question_index=\" + question_index + \"]\" ).hasClass( \"resubmission\" ) ) {\r\n        player.get_current_section().all_questions_answered = true;\r\n      }\r\n\r\n      if ( player.get_current_section().all_questions_answered === undefined ) {\r\n        safe_log(\"all_questions_answered === undefined\");\r\n        player.get_current_section().all_questions_answered = true;\r\n      }\r\n      if ( player.get_current_section().all_questions_answered === true && player.section_currently_showing !== ( player.sections.length - 1 ) ) {\r\n        $( \"#step_button\" ).show();\r\n        $( \".hint_button\" ).hide();\r\n      }\r\n\r\n      var cur_question_md = $( \"[data-question_index=\" + question_index + \"]\" ).children( \"[data-type=metadata]\" );\r\n\r\n      var branches = {};\r\n      if ( cur_question_md ) {\r\n        var modelUpdateConditional = $( cur_question_md ).find( \"[key=branches]\" );\r\n        if ( modelUpdateConditional.length ) {\r\n\r\n          modelUpdateConditional = $( modelUpdateConditional ).text();\r\n          modelUpdateConditional = modelUpdateConditional.split( ',' );\r\n\r\n          for ( var i = 0; i < modelUpdateConditional.length; i++ ) {\r\n            var branch = modelUpdateConditional[i].split( ':' );\r\n            branches[ branch[0] ] = branch[1];\r\n          }\r\n\r\n          if ( !player.activity.questions[question_index].queries[0].user_answer_index ) {\r\n            player.activity.questions[question_index].queries[0].user_answer_index = 0;\r\n          }\r\n          var sectionID = branches[player.activity.questions[question_index].queries[0].user_answer_index];\r\n\r\n          player.get_current_section().md.next_section = sectionID;\r\n\r\n          var section_index = player.lookup_section_index_by_sectionID( sectionID );\r\n\r\n          if ( isNaN( section_index ) ) {\r\n            throw( 'There is not section with id ' + sectionID );\r\n          }\r\n\r\n          $( \"#step_button\" )[0].onclick = function() {\r\n            var section_jq = player.get_current_section_jq();\r\n            var figures = section_jq.find( '[data-type=\"figure\"]' );\r\n\r\n            player.stopVideoPlayer( figures );\r\n            player.show_section( section_index );\r\n          };\r\n\r\n        }\r\n      }\r\n    }\r\n\r\n    //added by devlions\r\n    if(this.get_current_section_jq().find('[data-type=\"question\"]').length == 0){\r\n      if(this.sections.length > this.section_currently_showing + 1){\r\n        $('#step_button').css('display','block');\r\n      }\r\n    }\r\n    // if the \"text input box\" has been submitted already (has attribute disabled), then the next button should show\r\n    if(this.get_current_section_jq().find('textarea[disabled]').length !== 0) {\r\n      //last section then no \"next button should appear\r\n      if(this.sections.length > this.section_currently_showing + 1){\r\n        $('#step_button').css('display','block');\r\n      }\r\n    }\r\n  },\r\n\r\n  get_show_questions_again: function( show_questions_again ) {\r\n    var result = [];\r\n    var qu = show_questions_again.split( ',' );\r\n    for ( var i = 0; i < qu.length; i++ ) {\r\n      var s = qu[i].split( ':' );\r\n      var reset = ( s[1] === 'true' );\r\n      result.push( { question: s[0], reset: reset } );\r\n    }\r\n    return result;\r\n  },\r\n\r\n  update_navigation: function() {\r\n    if ( (player.get_current_section().all_questions_answered === true) && (player.get_current_section().index == player.sections.length - 1) ) {\r\n      player.show_completion_message();\r\n      player.on_last_page_message();\r\n    }\r\n  },\r\n\r\n  show_variables: function() {\r\n    //look through all the p nodes\r\n    var section = this.get_current_section_jq();\r\n    var regex = new RegExp( \"{(.+?)}\", \"gmi\" );\r\n\r\n    $( section ).find( \"p, label, option, table\" ).each( function( index, element ) {\r\n      var text = $( element ).html();\r\n      text = text.replace( regex, function( a, b ) {\r\n        return eval( \"player.\" + b );\r\n      } );\r\n      $( element ).html( text );\r\n    } );\r\n  },\r\n\r\n  show_completion_message: function() {\r\n    // player.activity.grade_activity will always have been called before this fn\r\n    // so we'll have access to the properly-calculated activity properties below\r\n\r\n    var grade_percent;\r\n    if ( player.quiz_data.points_possible == 0 ) {\r\n      grade_percent = 100;\r\n      // else calculate grade percent, rounded to nearest whole percentage\r\n    }\r\n    else {\r\n      grade_percent = Math.round( (player.quiz_data.points_awarded / player.quiz_data.points_possible) * 100 );\r\n    }\r\n\r\n    var html = \"<div><i>You've completed this activity.</i>\"\r\n      + \"<div id='total_score_message'>\"\r\n      + \"Total Score: \" + player.quiz_data.points_awarded\r\n      + \" out of \" + player.quiz_data.points_possible\r\n      + \" points (\" + grade_percent + \"%)\"\r\n      + \"</div>\"\r\n      + \"<div id='grade_submitted_message'>Your grade has been submitted to your instructor.</div></div>\";\r\n\r\n    //set focus on OK button again after 600 ms\r\n    setTimeout(function() {\r\n      // section should have a block_type=activity_report paragraph to receive this info\r\n      window.Standard_Dialog.open( html, {\r\n        \"title\": \"Congratulations\",\r\n        \"draggable\": false,\r\n        \"width\": 400,\r\n        \"buttons\": [\r\n          { text: 'OK', click: window.Standard_Dialog.close }\r\n        ]\r\n      } );\r\n\r\n      $('#standard_dialog_div').next().find('button').focus();\r\n\r\n      // show the grade submitted message if user_has_received_completion_alert is true\r\n      $( \"#grade_submitted_message\" ).show();\r\n    }, 600);\r\n  },\r\n\r\n  initialize_sections: function() {\r\n    this._super();\r\n\r\n    // extract metadata for section, for conditional steps\r\n    for ( var j = 0; j < this.sections.length; ++j ) {\r\n      var s = this.sections[j];\r\n\r\n      s.md = new Metadata( { lowercase_keys: true } );\r\n\r\n      // define any md items that need to be arrays\r\n      s.md.next_step_conditional = [];\r\n      s.md.model_update_conditional = [];\r\n\r\n      s.md.add_from_jq( s.jq.children( \"[data-type=metadata]\" ) );\r\n\r\n      // now parse any conditional steps we found\r\n\r\n      this.processNextStepConditionals( s );\r\n\r\n      this.processModelUpdateConditionals( s );\r\n    }\r\n  },\r\n\r\n  process_conditional_display: function( section_to_show ) {\r\n    //first hide them all in the section in case we're coming back a second time\r\n    section_to_show.find( \"[data-block_type=conditional_display]\" ).hide();\r\n    var h = section_to_show;\r\n    player.get_current_section_jq().find( \"[data-block_type=conditional_display]\" ).each( function( index, element ) {\r\n\r\n      var md = new Metadata( { jq: $( element ).children( \"[data-type=box_inner]\" ).children( \"[data-type=metadata]\" ) } );\r\n      var condition = md[\"display_conditional\"];\r\n      // alert(\"condition: \" + condition);\r\n\r\n      if ( typeof condition != 'undefined' ) {\r\n\r\n        condition = condition.replace( /model/g, \"player.model\" );\r\n        condition = condition.replace( /&/g, \"\\&\" );\r\n\r\n        var div = document.createElement( 'div' );\r\n        div.innerHTML = condition;\r\n        condition = div.firstChild.nodeValue;\r\n\r\n        if ( eval( condition ) ) {\r\n          //if this displayed box has questions, make sure any next_section_button boxes are hidden\r\n\r\n          if ( $( element ).children().children( \"[data-type=question]\" ).length > 0 ) {\r\n            player.get_current_section_jq().find( \".next_section_button\" ).hide();\r\n\r\n          }\r\n          $( element ).show();\r\n\r\n          //now run the model updates in the block\r\n          // player.initialize_explain(element);\r\n        }\r\n      }\r\n    });\r\n  },\r\n\r\n  processNextStepConditionals: function( s ) {\r\n    for ( var i = 0; i < s.md[\"next_step_conditional\"].length; ++i ) {\r\n      var c = s.md.next_step_conditional[i];\r\n      if ( c.search( /\\{(.*)\\}\\s*\\{(.*)\\}/ ) > -1 ) {\r\n        // extract condition, section to show if it's met\r\n        c = {};\r\n        c.condition = RegExp.$1;\r\n        c.section_to_show = RegExp.$2;\r\n        c.message = $.trim( RegExp.$3 );\r\n        c.condition = this.processCondition( c.condition );\r\n\r\n        s.md.next_step_conditional[i] = c;\r\n      }\r\n      else {\r\n        s.md.next_step_conditional[i] = { condition: \"false\" };\r\n      }\r\n    }\r\n  },\r\n\r\n  processModelUpdateConditionals: function( s ) {\r\n    for ( var i = 0; i < s.md[\"model_update_conditional\"].length; ++i ) {\r\n      var c = s.md.model_update_conditional[i];\r\n      if ( c.search( /\\{(.*)\\}\\s*(.*)/ ) > -1 ) {\r\n        // extract condition, section to show if it's met, and optional message\r\n        c = new Object();\r\n        c.condition = RegExp.$1;\r\n        c.updateStatement = RegExp.$2;\r\n        c.updateStatement = this.processCondition( c.updateStatement );\r\n        c.condition = this.processCondition( c.condition );\r\n\r\n        s.md.model_update_conditional[i] = c;\r\n\r\n      }\r\n      else {\r\n        s.md.model_update_conditional[i] = { condition: \"false\" };\r\n      }\r\n    }\r\n  },\r\n\r\n  processCondition: function( condition ) {\r\n    // < > in condition\r\n    condition = condition.replace( /</g, \"<\" );\r\n    condition = condition.replace( />/g, \">\" );\r\n\r\n    var div = document.createElement( 'div' );\r\n    div.innerHTML = condition;\r\n    var condition = div.firstChild.nodeValue;\r\n\r\n    // substitute for queries in condition...\r\n\r\n    // query is correct or incorrect\r\n    condition = condition.replace( /qq(\\d+)\\s*==\\s*true/g, \"qq.queries[$1-1].isCorrect()\" );\r\n    condition = condition.replace( /qq(\\d+)\\s*==\\s*false/g, \"!qq.queries[$1-1].isCorrect()\" );\r\n\r\n    //check for a certain MC answer\r\n    condition = condition.replace( /qqMC(\\d+)/g, \"qq.queries[$1-1].user_answer_index\" );\r\n\r\n    // otherwise assume it's something about query.user_answer\r\n    condition = condition.replace( /qq(\\d+)/g, \"qq.queries[$1-1].user_answer\" );\r\n\r\n    // note that everything is going to be a string compare unless the condition includes \"*1\",\r\n    // i.e. qq1*1 < 4\r\n\r\n    //for update statements, get string value of a MC or DD\r\n    condition = condition.replace( /qqMCValue(\\d+)/g, \"qq.queries[$1-1].choices[qq.queries[$1-1].user_answer_index]\" );\r\n\r\n    // now conditions on the entire question -- just allow correct and incorrect\r\n    condition = condition.replace( /qq\\s*==\\s*true/g, \"qq.is_correct()\" );\r\n    condition = condition.replace( /qq\\s*==\\s*false/g, \"!qq.is_correct()\" );\r\n    return condition;\r\n  },\r\n\r\n  setModel: function( key, value, loadOnInit ) {\r\n    if ( key.match( /^userAvatar\\./ ) ) {\r\n      var newkey = key.substring( 11, key.length );\r\n      player.model.userAvatar[newkey] = value;\r\n    }\r\n    else if ( key.match( /^partnerAvatar\\./ ) ) {\r\n      var newkey = key.substring( 14, key.length );\r\n      player.model.partnerAvatar[newkey] = value;\r\n    }\r\n    else if ( key.match( /^avatar\\./ ) ) {\r\n      var newkey = key.substring( 7, key.length );\r\n      player.model.avatar[newkey] = value;\r\n    }\r\n    else {\r\n      player.model[key] = value;\r\n    }\r\n\r\n  },\r\n\r\n  lookup_section_index_by_sectionID: function( sectionID ) {\r\n    var index = -1;\r\n    for ( var i = 0; i < this.sections.length; i++ ) {\r\n      if ( this.sections[i].md !== undefined ) {\r\n        if ( this.sections[i].md[\"sectionid\"] !== undefined ) {\r\n          if ( this.sections[i].md[\"sectionid\"].toLowerCase() == sectionID.toLowerCase() ) {\r\n            index = i;\r\n            break;\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return index;\r\n  },\r\n\r\n  show_section_by_sectionID: function( sectionID ) {\r\n\r\n\r\n    var regex = new RegExp( \"{(.+?)}\", \"gmi\" );\r\n\r\n    if ( sectionID.indexOf( \"{\" ) != -1 ) {\r\n      sectionID = sectionID.replace( regex, function( a, b ) {\r\n        return eval( \"player.\" + b );\r\n      } );\r\n    }\r\n\r\n\r\n    var section_index = this.lookup_section_index_by_sectionID( sectionID );\r\n    player.show_section( section_index );\r\n  },\r\n\r\n  show_question_again: function( section_id, reset_question, not_show_message ) {\r\n    var section_index = player.lookup_section_index_by_sectionID( section_id );\r\n    var sectionjq = player.sections[section_index].jq;\r\n\r\n    //remove any previously added show question again messages\r\n    sectionjq.find( \".incorrect_message, .correct_message\" ).remove();\r\n\r\n    //loop over all questions in the section\r\n    var allCorrect = true;\r\n\r\n    sectionjq.find( \"[data-type=question]\" ).each( function( index, element ) {\r\n      //was it correct?\r\n\r\n      var question_index = $( element ).attr( \"data-question_index\" );\r\n\r\n      if ( !player.activity.questions[question_index].is_correct() || reset_question ) {\r\n        allCorrect = false;\r\n\r\n        //modify tries so that we can submit again?\r\n\r\n        player.activity.questions[question_index].tries = 0;\r\n\r\n        $( \"#question_submit_button_\" + question_index ).show();\r\n\r\n        //enable choices\r\n\r\n        $( \"[data-question_index=\" + question_index + \"]\" ).addClass( \"resubmission\" );\r\n        $( \"[data-question_index=\" + question_index + \"]\" ).find( \"input\" ).removeAttr( \"disabled\" );\r\n        $( \"[data-question_index=\" + question_index + \"]\" ).find( \"input\" ).removeAttr( \"checked\" );\r\n        $( \"[data-question_index=\" + question_index + \"]\" ).find( \"textarea\" ).removeAttr( \"disabled\" );\r\n        if ( !not_show_message ) {\r\n          $( \"[data-question_index=\" + question_index + \"]\" ).before( \"<div class='incorrect_message'>Try again.</div>\" );\r\n        }\r\n      }\r\n      else {\r\n        $( \"[data-question_index=\" + question_index + \"]\" ).before( \"<div class='correct_message'>You answered this question correctly.</div>\" );\r\n      }\r\n    } );\r\n\r\n    if ( !allCorrect ) {\r\n      player.sections[section_index].all_questions_answered = false;\r\n    }\r\n\r\n  },\r\n\r\n  initialize_nav_buttons: function() {\r\n    $( \"[data-block_type=nav_button]\" ).each( function( index, element ) {\r\n      var buttonTitle = $( element ).find( \"[data-type=title]\" ).html();\r\n      var newSectionID = $( element ).find( \"[key=sectionID]\" ).html();\r\n      var navButton = \"<button class='hint_button standard_button ui-button ui-state-default' \"\r\n        + \"style='display:inline-block;' onclick='player.show_section_by_sectionID(\\\"\" + newSectionID + \"\\\");'>\"\r\n        + buttonTitle + \"</button>\";\r\n\r\n      $( element ).before( navButton );\r\n    } );\r\n  },\r\n\r\n  initLiveFeedback: function() {\r\n    var live = platform.ie || platform.android ? 'assertive' : 'polite';\r\n    var role = platform.android ? '' : 'role=\"log\"';\r\n\r\n    this.liveFeedback = $('<div id=\"live-feedback\" class=\"visually-hidden\" ' + role + ' aria-live=\"' + live + '\"></div>');\r\n    $('body').prepend(this.liveFeedback);\r\n  },\r\n\r\n  initialize: function() {\r\n    jQuery.getScript( \"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\", function() {\r\n\r\n      //optional code to execute after mathjax library has been loaded can go here\r\n\r\n    } );\r\n    this._super();\r\n\r\n    this.interactions = new A11yInteractions();\r\n    this.figures = new A11yFigures();\r\n    this.activity = new A11yActivity();\r\n    this.glossary = new A11yGlossary();\r\n    this.local_glossary = new Local_A11yGlossary();\r\n    this.activity_title = $( \"h1\" ).find( \"[data-type=title]\" ).html();\r\n    document.title = \"Data Exercises \" + this.activity_title;\r\n    this.initialize_nav_buttons();\r\n\r\n    var glossaryItems = $('[data-type=termref]');\r\n\r\n    glossaryItems.attr({\r\n      'tabindex': '0',\r\n      'role': 'button'\r\n    });\r\n\r\n    player.glossary.set_click_event_for_terms_in_section = function( sectionjq ) {\r\n      $( sectionjq ).find( \"[data-type='termref']\" ).each( function( index, element ) {\r\n        var jq = $( element );\r\n        jq.attr({\r\n          'tabindex': '0',\r\n          'role': 'button'\r\n        });\r\n        jq.unbind( \"click\" );\r\n        jq.click( function() {\r\n          player.glossary.show_definition( this );\r\n        } );\r\n\r\n        jq.keyup(function (e) {\r\n          var key = e.keyCode || e.which;\r\n          if (key === 32) {\r\n            player.glossary.show_definition(this);\r\n          }\r\n        });\r\n        jq.keydown(function (e) {\r\n          var key = e.keyCode || e.which;\r\n          if (key === 32) {\r\n            e.preventDefault();\r\n          }\r\n          if (key === 13) {\r\n            e.preventDefault();\r\n            player.glossary.show_definition(this);\r\n          }\r\n        });\r\n      });\r\n    };\r\n    // Add live feedback for readers\r\n    if (!platform.mobile) {\r\n      this.initLiveFeedback();\r\n    }\r\n  },\r\n\r\n  initialize2: function() {\r\n    this._super();\r\n\r\n    $('#top_banner').attr('role', 'banner');\r\n    //add aria-expanded for references buttons\r\n    var referencesArray = $('[data-block_type=references] [data-onclick_trigger=true]');\r\n\r\n    referencesArray.attr({\r\n      role: 'button',\r\n      tabindex: '0',\r\n      'aria-expanded': 'false'\r\n    });\r\n\r\n    referencesArray.keydown(function(e) {\r\n      if (e.which === 13 || e.which === 32) {\r\n\r\n        e.target.click();\r\n      }\r\n\r\n    });\r\n\r\n    var nav_items = $('#nav_item_container').find('button');\r\n\r\n    nav_items.keydown(function(e) {\r\n      // arrow buttons in nav menu\r\n      if (e.which === 37 || e.which === 38) {\r\n        if (e.currentTarget === nav_items[0]) {\r\n          return;\r\n        }\r\n\r\n        $(e.currentTarget).prev().focus();\r\n        e.preventDefault();\r\n      }\r\n\r\n      if (e.which === 39 || e.which === 40) {\r\n        if (e.currentTarget === nav_items[nav_items.length - 1]) {\r\n          return;\r\n        }\r\n\r\n        $(e.currentTarget).next().focus();\r\n        e.preventDefault();\r\n      }\r\n\r\n      //end and home buttons\r\n      if (e.which === 35) {\r\n        nav_items.eq(nav_items.length - 1).focus();\r\n        e.preventDefault();\r\n      }\r\n\r\n      if (e.which === 36) {\r\n        nav_items.eq(0).focus();\r\n        e.preventDefault();\r\n      }\r\n    });\r\n\r\n    aria.makeTablesAccessible();\r\n    aria.makeFieldsInTableAccessible();\r\n\r\n    $('[data-type=section]').each(function(index, item) {\r\n      if (index === 0) {\r\n        $(item).attr('role', 'document');\r\n      } else {\r\n        $(item).attr('role', 'tabpanel').attr('tabindex', '0');\r\n      }\r\n    });\r\n\r\n    if (platform.android) {\r\n      $('img').attr('tabindex', '0');\r\n    }\r\n\r\n    $('[data-type=rawhtml]').find('a').parent().removeAttr('role');\r\n\r\n    $('[data-block_type=quiz_title]').find('p').replaceWith(\r\n      '<h2>' + $('[data-block_type=quiz_title]').find('p').text() + '</h2>');\r\n\r\n    //move transcripts to block with video\r\n    $('[data-type=\"rawhtml\"]').find('a').parent().each(function(index, item) {\r\n      $(item).appendTo($('[data-type=\"rawhtml\"]').find('a').parent().eq(index).prev('[data-type=\"figure\"]'));\r\n    });\r\n\r\n    $('[data-block_type=\"selected_term\"]').append('<span class=\"visually-hidden\"> highlighted</span>');\r\n\r\n    //fix for submit button style in CB question\r\n    $(\".cb_query_group\").parent().find('.question_action_div').prepend($(\".cb_query_group\").parent().next());\r\n\r\n    $('[data-block_type=\"cb-question\"]').attr('role', 'document');\r\n\r\n    //hide credits from screenreaders\r\n    $('[data-type=caption]').attr('aria-hidden', 'true');\r\n  },\r\n\r\n  message_to_live_feedback: function( message ) {\r\n    var liveFeedback = $('#live-feedback');\r\n    var text = message + '. Go through the page again to find out what the correct answers are.';\r\n\r\n    liveFeedback.html( ' ' );\r\n    liveFeedback.html( text );\r\n  },\r\n\r\n  on_last_page_message: function() {\r\n    var lastSection = $('#digfir_section_' + (this.sections.length - 1) );\r\n\r\n    if ( lastSection[0].style.display === 'block' ) {\r\n      $('.ui-dialog-buttonset button').click(function() {\r\n        function addFedback() {\r\n          var lastFeedback = lastSection.find('.essay_question_evaulation_feedback').text();\r\n\r\n          lastFeedback += lastSection.find('.question_feedback_part').text();\r\n          lastFeedback += $('.points_awarded_div').eq($('.points_awarded_div').length - 1).text();\r\n          player.message_to_live_feedback(lastFeedback);\r\n        }\r\n\r\n        platform.firefox || platform.mac ? setTimeout( addFedback, 0) : addFedback();\r\n      });\r\n    }\r\n  }\r\n});\r\n\r\nvar Local_A11yGlossary = Glossary.extend({\r\n  show_definition: function (el, addPrefix) {\r\n    var jq = $(el);\r\n    var index = jq.attr(\"data-term\");\r\n    if (index == \"\" || index == null) {\r\n      index = jq.html();\r\n    }\r\n    if (index != \"\" && index != null) {\r\n      index = index.toLowerCase();\r\n      var term = player.glossary.terms[index];\r\n      var html, label;\r\n      if (term == null) {\r\n        html = \"No definition found for \" + index;\r\n        label = \"No definition found for \" + index;\r\n      } else {\r\n        html = \"<strong>\" + term.term + \":</strong> \" + term.definition;\r\n        label = (term.term + ':' + term.definition).toLowerCase();\r\n      }\r\n      window.Local_Dialog.open(html, {\r\n        \"title\": \"Glossary\",\r\n        // \"modal\": false,\r\n        // \"draggable\": true,\r\n        \"buttons\": \"OK\",\r\n        from: jq,\r\n        addPrefix: addPrefix,\r\n      }, label);\r\n    }\r\n  }\r\n});\r\n\r\n// Dialog\r\nwindow.Local_Dialog = function() {\r\n  var $manuscript = $('#manuscript');\r\n  var $body = $('body');\r\n  var $dialog, $content;\r\n  var options = {};\r\n  var prefix = \"\";\r\n\r\n  return {\r\n    open: function(html, opt, label) {\r\n      // Extend default options\r\n      options = $.extend(true, (opt || {}), {\r\n        width: 450,\r\n        modal: true,\r\n        draggable: false,\r\n        resizable: false\r\n      });\r\n\r\n      // Set buttons\r\n      if (options.buttons === 'none') {\r\n        options.buttons = null;\r\n      }\r\n      else if (options.buttons === 'OK' || !options.buttons) {\r\n        options.buttons = [ { text: 'OK', click: window.Local_Dialog.close } ];\r\n      }\r\n\r\n      // Remove previous dialog\r\n      $('#standard_dialog_div').dialog('close').remove();\r\n\r\n      if (options.modal) {\r\n        $body.css('overflow', 'hidden');\r\n      }\r\n\r\n      // Hide other content from reader for mobile devices\r\n      $manuscript.attr('aria-hidden', 'true');\r\n\r\n      $dialog = $('<div id=\"standard_dialog_div\"></div>');\r\n      $content = $('<div class=\"dialog-div\">' + (html || '') + '</div>');\r\n\r\n      $dialog.append($content);\r\n      $dialog.dialog(options);\r\n\r\n      // If we open toc we use as description only instruction in the top of dialog and not links\r\n      var isMenu = $content.find('#toc_head').length;\r\n\r\n\r\n      if (options.addPrefix) {\r\n        prefix = \"Glossary dialog. \";\r\n      }\r\n\r\n      var $parentDialog = $dialog.parent().attr({\r\n        'tabindex': '0',\r\n        'role': 'dialog',\r\n        'aria-label': label\r\n      });\r\n\r\n      $parentDialog.find('#ui-dialog-title-standard_dialog_div').attr({\r\n        'role': 'heading',\r\n        'aria-level': '1'\r\n      });\r\n\r\n      // Remove close btn\r\n      $('.ui-dialog-titlebar-close').remove();\r\n\r\n      var $lastBtn = $parentDialog.find('button').last();\r\n      var $firstBtn = $parentDialog.find('button').first();\r\n\r\n      // Attach events\r\n      $parentDialog.bind('keydown', function(e) {\r\n        var code = e.keyCode || e.which;\r\n\r\n        if (code === KEY_CODES.ESC) {\r\n          window.Local_Dialog.close(true);\r\n        }\r\n\r\n        if (e.target === this && e.shiftKey && code === KEY_CODES.TAB) {\r\n          e.preventDefault();\r\n          $lastBtn.focus();\r\n        }\r\n      });\r\n      $lastBtn.bind('keydown', function(e) {\r\n        var code = e.keyCode || e.which;\r\n\r\n        if (!e.shiftKey && code === KEY_CODES.TAB) {\r\n          $parentDialog.focus();\r\n          e.preventDefault();\r\n        }\r\n      });\r\n\r\n      if (platform.android) {\r\n        // For android we set focus on dialog in any cases\r\n        $parentDialog.focus();\r\n      }\r\n      else if (isMenu) {\r\n        // If it is menu put focus on first link\r\n        $parentDialog.find('a').first().focus();\r\n      }\r\n      else {\r\n        // For other platform we set focus on first button\r\n        $firstBtn.focus();\r\n      }\r\n      $('#live-feedback').html('');\r\n      $('#live-feedback').html(prefix + label);\r\n    },\r\n\r\n    // for now alert is just like any other dialog; we could change that later.\r\n    wait: function(html, opt) {\r\n      options = opt || {};\r\n      options.buttons = 'none';\r\n      window.Local_Dialog.open(html, options);\r\n    },\r\n\r\n    alert: function(html, opt) {\r\n      window.Local_Dialog.open(html, opt);\r\n    },\r\n\r\n    close: function() {\r\n      // Show other content\r\n      $manuscript.removeAttr('aria-hidden');\r\n\r\n      if ($dialog) {\r\n        $dialog.dialog('close').remove();\r\n      }\r\n      else {\r\n        $(\"#standard_dialog_div\").remove();\r\n      }\r\n\r\n      if (options.from) {\r\n        options.from.focus();\r\n      }\r\n\r\n      if (options.modal) {\r\n        $body.css('overflow', 'auto');\r\n      }\r\n    }\r\n  };\r\n}();\r\n\r\nwindow.player = new A11y4myersPlayer();\r\n\r\ncommon.initForceNextSection();\r\n\r\nmodule.exports = {\r\n  A11y4myersPlayer: A11y4myersPlayer,\r\n  A11yActivity: A11yActivity\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.js\n// module id = 0\n// module chunks = 17","'use strict';\r\n\r\nvar platform = require('platform');\r\n\r\nvar run_on = {\r\n  get ie() {\r\n    return platform.name === 'IE';\r\n  },\r\n  get ios() {\r\n    return platform.os.family === 'iOS';\r\n  },\r\n  get android() {\r\n    return platform.os.family === 'Android';\r\n  },\r\n  get firefox() {\r\n    return platform.name === 'Firefox';\r\n  },\r\n  get chrome() {\r\n    return platform.name === 'Chrome';\r\n  },\r\n  get mac() {\r\n    return platform.os.family === 'OS X';\r\n  },\r\n  get mobile() {\r\n    return platform.name.match(/Mobile/);\r\n  }\r\n};\r\n\r\nmodule.exports = {\r\n  run_on: run_on\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-lib/utils/index.js\n// module id = 1\n// module chunks = 17","'use strict';\r\n\r\n// Common css\r\nrequire('./assets/css/common');\r\n\r\nrequire('./initialize');\r\n\r\nvar dom = require('lib/dom');\r\nvar jq_utils = require('lib/utils/jq_utils');\r\n\r\nvar KEYCODES = {\r\n  ENTER: 13,\r\n  TAB: 9,\r\n  ESC: 27,\r\n  SPACE: 32,\r\n  LEFT: 37,\r\n  RIGHT: 39\r\n};\r\n\r\nvar MATH_EXPRESSIONS_SEL = 'math mi';\r\nvar META_CLASS_SEL = '.meta-class-tag';\r\n\r\nvar MATH_EXPR_REGEXP = /^\\[MATH:\\s(.*)\\]\\((.*)\\)$/;\r\nvar MATH_TAG_EXIST_REGEXP = /<mi>(\\s+)?\\[MATH/;\r\n\r\nfunction _disableDefaultDrag(e) {\r\n  e.preventDefault();\r\n}\r\n\r\n//-----{ Public: }------------------------------------------------------------->\r\n\r\nfunction disableDefaultDrag() {\r\n  var images = dom.qa('img'),\r\n    size = images.length;\r\n\r\n  while (size--) {\r\n    images[size].addEventListener('dragstart', _disableDefaultDrag, false);\r\n  }\r\n}\r\n\r\nfunction addAriaForDDFields(_box) {\r\n  $('.query_dd_select_span').each(function(i, el) {\r\n    $(el).parent().attr('aria-label', $(el).attr('aria-label'));\r\n  });\r\n}\r\n\r\nfunction findTabableElements(context) {\r\n  var tabableElements = [],\r\n    $elements = $(context).find('button, input, a, [data-type=figure]');\r\n\r\n  $elements.each(function() {\r\n    if (this.getAttribute('tabindex') !== '-1' && this.style.display !== 'none') {\r\n      tabableElements.push(this);\r\n    }\r\n  });\r\n\r\n  return tabableElements;\r\n}\r\n\r\nfunction resetFocusOnStartPoint() {\r\n  jq_utils.defer(200).then(function() {\r\n    dom.q('#content_button').focus();\r\n  });\r\n}\r\n\r\nfunction parseMathString(str) {\r\n  var result;\r\n\r\n  result = str.match(MATH_EXPR_REGEXP);\r\n\r\n  if (result instanceof Array) {\r\n    return result.slice(1, 3);\r\n  }\r\n  else {\r\n    return false;\r\n  }\r\n}\r\n\r\nfunction buildMathSpeechHtml(data) {\r\n  var expr_html, math_html, expr;\r\n\r\n  if (typeof katex == 'undefined') {\r\n    throw new Error('For parse math expressions you must require \"katex\" & export it global');\r\n  }\r\n\r\n  try {\r\n    // Fuc..ing DIGFIR need this magick:\r\n    expr = data[0].replace('&gt;', '>').replace('&lt;', '<');\r\n\r\n    math_html = katex.renderToString(expr, { displayMode: true })\r\n        // Rermove MathML special for dummy IE\r\n        .replace(/<span class=\"katex-mathml\">.+?<\\/span>/g, '');\r\n  }\r\n  catch (e) {\r\n    // eslint-disable-next-line no-console\r\n    console.error('Error while parse katex expression: [' + expr + ']');\r\n  }\r\n\r\n  expr_html = '<span class=\"math-speech\">\\\r\n    <span class=\"hidden-equation-text\">' + data[1] + '</span>\\\r\n    <span class=\"katex-expression\" aria-hidden=\"true\" data-tex=\"' + expr + '\">' + math_html + '</span>\\\r\n  </span>';\r\n\r\n  return expr_html;\r\n}\r\n\r\nfunction parseMathExpresions(box) {\r\n  var nodes, size, node, math_data;\r\n\r\n  box = box || document;\r\n  nodes = dom.qa(MATH_EXPRESSIONS_SEL, box);\r\n  size = nodes.length;\r\n\r\n  while (size--) {\r\n    node = nodes[size];\r\n    math_data = parseMathString(node.textContent);\r\n    if (math_data) {\r\n      node.parentNode.parentNode.replaceChild(dom.createHTML(buildMathSpeechHtml(math_data)), node.parentNode);\r\n    }\r\n    else {\r\n      // eslint-disable-next-line no-console\r\n      console.log('Unable parse MATH: [' + node.textContent + ']');\r\n    }\r\n  }\r\n}\r\n\r\nfunction activateAriaCheckUncheck(box) {\r\n  var $box = box ? $(box) : $(document),\r\n    selector = 'input[type=checkbox], input[type=radio]';\r\n\r\n  function check(el) {\r\n    var name = el.getAttribute('name'),\r\n      type = el.getAttribute('type');\r\n\r\n    if (!el.hasAttribute('aria-checked')) {\r\n      el.setAttribute('aria-checked', '');\r\n    }\r\n\r\n    switch (type) {\r\n      case 'radio':\r\n        $('[name=' + name + ']').attr('aria-checked', 'false');\r\n        el.setAttribute('aria-checked', 'true');\r\n        break;\r\n      default:\r\n        if (el.checked) {\r\n          el.setAttribute('aria-checked', 'true');\r\n        }\r\n        else {\r\n          el.setAttribute('aria-checked', 'false');\r\n        }\r\n        break;\r\n    }\r\n    // console.log(el);\r\n  }\r\n\r\n  /*\r\n  $(selector).each(function(idx, el) {\r\n    check(el);\r\n  });\r\n  */\r\n\r\n  //$box.on('change', selector, function(e) {\r\n  // NOTE: For jQuery > 1.4.3 && jQuery < 1.7\r\n  $box.delegate(selector, 'change', function() {\r\n    check(this);\r\n  });\r\n}\r\n\r\nfunction initForceNextSection() {\r\n  function forceNextSection(e) {\r\n    window.__force_next_section = e.shiftKey;\r\n  }\r\n\r\n  document.addEventListener('keydown', forceNextSection);\r\n  document.addEventListener('keyup', forceNextSection);\r\n}\r\n\r\nfunction parseMetaClasses(box, remove_tag) {\r\n  box = box || document;\r\n  remove_tag = (typeof remove_tag == 'undefined') ? false : true;\r\n\r\n  function _metaClassSplitter(el) {\r\n    // FIXME: Нужно разрешить использование пробелов внутри значения атрибута\r\n    var META_CLASS_REGEX = /^\\[([^[^\\s]*)=([^[^\\s]*)\\]$/i;\r\n    var meta_classes = [],\r\n      meta_class, attr, attr_value;\r\n\r\n    Array.prototype.forEach.call(el.classList, function(klass) {\r\n      meta_class = klass.match(META_CLASS_REGEX);\r\n\r\n      if (meta_class) {\r\n        attr = meta_class[1];\r\n        attr_value = meta_class[2];\r\n\r\n        el.setAttribute(attr, attr_value);\r\n        meta_classes.push(meta_class[0]);\r\n      }\r\n    });\r\n    meta_classes.forEach(function(klass) {\r\n      el.classList.remove(klass);\r\n    });\r\n  }\r\n\r\n  var elements, elements_size, element;\r\n\r\n  elements = dom.qa(META_CLASS_SEL, box);\r\n  elements_size = elements.length;\r\n\r\n  while (elements_size--) {\r\n    element = elements.item(elements_size);\r\n    _metaClassSplitter(element);\r\n    if (remove_tag) {\r\n      element.classList.remove(META_CLASS_SEL.slice(1));\r\n    }\r\n  }\r\n}\r\n\r\nfunction extractMetadataAttrs(metadata) {\r\n  var attrs = {},\r\n    key, value;\r\n\r\n  for (key in metadata) {\r\n    if (metadata.hasOwnProperty(key)) {\r\n      value = metadata[key];\r\n      key = key.match(/^attr_(.*)$/);\r\n\r\n      if (key && key[1]) {\r\n        key = key[1].replace('_', '-');\r\n        attrs[key] = value;\r\n      }\r\n    }\r\n  }\r\n\r\n  return attrs;\r\n}\r\n\r\nfunction setAdditionalAttrs(attrs, selector, box, cb) {\r\n  var elements = dom.qa(selector, box),\r\n    elements_size = elements.length,\r\n    el;\r\n\r\n  while (elements_size--) {\r\n    el = elements[elements_size];\r\n    for (var key in attrs) {\r\n      if (typeof cb == 'function') {\r\n        cb.call(el, attrs);\r\n      }\r\n      else {\r\n        el.setAttribute(key, attrs[key]);\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nmodule.exports = {\r\n  KEYCODES: KEYCODES,\r\n  disableDefaultDrag: disableDefaultDrag,\r\n  addAriaForDDFields: addAriaForDDFields,\r\n  findTabableElements: findTabableElements,\r\n  resetFocusOnStartPoint: resetFocusOnStartPoint,\r\n  parseMathExpresions: parseMathExpresions,\r\n  activateAriaCheckUncheck: activateAriaCheckUncheck,\r\n  initForceNextSection: initForceNextSection,\r\n  parseMetaClasses: parseMetaClasses,\r\n  extractMetadataAttrs: extractMetadataAttrs,\r\n  setAdditionalAttrs: setAdditionalAttrs,\r\n  MATH_TAG_EXIST_REGEXP: MATH_TAG_EXIST_REGEXP\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/common/index.js\n// module id = 2\n// module chunks = 17","'use strict';\r\n\r\n//-----{ Private }------------------------------------------------------------->\r\n\r\nvar IS_IE = !!document.documentMode;\r\nvar HIDDEN_CLASS = 'element-hidden';\r\n\r\nvar dom_parser = new DOMParser();\r\nvar tmp_wrapper = ce('div');\r\n\r\nfunction _elementClassRegExp(klass) {\r\n  return new RegExp(\"\\\\b\" + klass + \"\\\\b\", \"g\");\r\n}\r\n\r\nfunction _trimClass(klass) {\r\n  return klass.replace(/\\s+/g, \" \")\r\n    .replace(/(^\\s|\\s$)/g, \"\");\r\n}\r\n\r\n//-----{ Public }-------------------------------------------------------------->\r\n\r\nfunction byId(id, context) {\r\n  context = context || document;\r\n\r\n  return context.getElementById(id);\r\n}\r\n\r\nfunction byName(name, context) {\r\n  context = context || document;\r\n\r\n  return context.getElementsByTagName(name);\r\n}\r\n\r\nfunction oneByName(name, context) {\r\n  var collection = byName(name, context);\r\n\r\n  if (collection.length) {\r\n    return collection[0];\r\n  }\r\n  else {\r\n    return null;\r\n  }\r\n}\r\n\r\nfunction q(selector, context) {\r\n  context = context || document;\r\n\r\n  return context.querySelector(selector);\r\n}\r\n\r\nfunction qa(selector, context) {\r\n  context = context || document;\r\n\r\n  return context.querySelectorAll(selector);\r\n}\r\n\r\nfunction xpath() {\r\n  var doc = document;\r\n\r\n  return doc.evaluate.apply(doc, arguments);\r\n}\r\n\r\nfunction hide(element) {\r\n  if (!isHidden(element)) {\r\n    return $(element).addClass(HIDDEN_CLASS);\r\n  }\r\n}\r\n\r\nfunction show(element) {\r\n  return $(element).removeClass(HIDDEN_CLASS);\r\n}\r\n\r\nfunction isHidden(element) {\r\n  return $(element).hasClass(HIDDEN_CLASS);\r\n}\r\n\r\nfunction hasClass(element, klass) {\r\n  if (element.hasAttribute('class')) {\r\n    return _elementClassRegExp(klass).test(element.className);\r\n  }\r\n  else {\r\n    return false;\r\n  }\r\n}\r\n\r\nfunction addClass(element, klass) {\r\n\r\n  if (hasClass(element, klass)) {\r\n    return false;\r\n  }\r\n\r\n  if (!(IS_IE && element.tagName.toLowerCase() === 'svg')) {\r\n    if (!element.hasAttribute('class')) {\r\n      element.setAttribute('class', klass);\r\n    }\r\n    else {\r\n      element.className = _trimClass(element.className + \" \" + klass);\r\n    }\r\n\r\n    return true;\r\n  }\r\n  else {\r\n    throw new Error('IE is a _BAD_ browser.');\r\n  }\r\n}\r\n\r\nfunction toggleClass(element, klass, condition) {\r\n  if (condition == undefined) {\r\n    if (hasClass(element, klass)) {\r\n      return removeClass(element, klass);\r\n    }\r\n    else {\r\n      return addClass(element, klass);\r\n    }\r\n  }\r\n  else {\r\n    if (typeof condition == 'function') {\r\n      condition = condition.call(element, klass);\r\n    }\r\n\r\n    if (condition) {\r\n      return addClass(element, klass);\r\n    }\r\n    else {\r\n      return removeClass(element, klass);\r\n    }\r\n  }\r\n}\r\n\r\nfunction removeClass(element, klass) {\r\n  var regexp = _elementClassRegExp(klass);\r\n\r\n  if (!(IS_IE && element.tagName.toLowerCase() === 'svg')) {\r\n    element.className = _trimClass(element.className.replace(regexp, \"\"));\r\n\r\n    return true;\r\n  }\r\n  else {\r\n    throw new Error('IE is a _BAD_ browser.');\r\n  }\r\n}\r\n\r\nfunction parseXML(xml) {\r\n  return dom_parser.parseFromString(xml, 'application/xml');\r\n}\r\n\r\nfunction parseHTML(html, full) {\r\n  full = full || false;\r\n\r\n  var dom = dom_parser.parseFromString(html, 'text/html');\r\n\r\n  return full ? dom : dom.body.childNodes;\r\n}\r\n\r\nfunction createHTML(html) {\r\n  var fragment, dom, node;\r\n\r\n  if (html instanceof DocumentFragment) {\r\n    fragment = html;\r\n  }\r\n  else if (html instanceof Node) {\r\n    fragment = cf();\r\n    append(html, fragment);\r\n  }\r\n  else {\r\n    fragment = cf();\r\n    dom = parseHTML(html);\r\n    node = dom.item(0);\r\n\r\n    while (node) {\r\n      append(node, fragment);\r\n      node = dom.item(0);\r\n    }\r\n  }\r\n\r\n  return fragment;\r\n}\r\n\r\nfunction getHTMLOf(frag) {\r\n  var html = '';\r\n\r\n  append(frag, tmp_wrapper);\r\n  html = tmp_wrapper.innerHTML;\r\n  clear(tmp_wrapper);\r\n\r\n  return html;\r\n}\r\n\r\n/**\r\n * Remove Node (special for dummy IE)\r\n */\r\nfunction remove(node) {\r\n  node.parentNode.removeChild(node);\r\n}\r\n\r\nfunction append(element, context) {\r\n  return context.appendChild(element);\r\n}\r\n\r\nfunction ce(name) {\r\n  return document.createElement(name);\r\n}\r\n\r\nfunction cf() {\r\n  return document.createDocumentFragment();\r\n}\r\n\r\nfunction disable(element) {\r\n  if (!isDisabled(element)) {\r\n    return element.setAttribute('disabled', 'disabled');\r\n  }\r\n}\r\n\r\nfunction enable(element) {\r\n  return element.removeAttribute('disabled');\r\n}\r\n\r\nfunction isDisabled(element) {\r\n  return element.hasAttribute('disabled');\r\n}\r\n\r\nfunction insertAfter(parent, node, target_node) {\r\n  var target = target_node.nextSibling;\r\n\r\n  if (target) {\r\n    return parent.insertBefore(node, target);\r\n  }\r\n  else {\r\n    return append(node, parent);\r\n  }\r\n}\r\n\r\nfunction insertBefore(parent, node, target_node) {\r\n  if (target_node) {\r\n    return parent.insertBefore(node, target_node);\r\n  }\r\n  else {\r\n    return append(node, parent);\r\n  }\r\n}\r\n\r\nfunction clear(element) {\r\n  return element.innerHTML = '';\r\n}\r\n\r\nfunction setHtml(html, element) {\r\n  if (html instanceof Node) {\r\n    clear(element);\r\n    return append(html, element);\r\n  }\r\n  else {\r\n    return element.innerHTML = html;\r\n  }\r\n}\r\n\r\nmodule.exports = {\r\n  byId: byId,\r\n  qa: qa,\r\n  hide: hide,\r\n  show: show,\r\n  createHTML: createHTML,\r\n  parseXML: parseXML,\r\n  getHTMLOf: getHTMLOf,\r\n  xpath: xpath,\r\n  append: append,\r\n  q: q,\r\n  ce: ce,\r\n  cf: cf,\r\n  isDisabled: isDisabled,\r\n  disable: disable,\r\n  enable: enable,\r\n  insertAfter: insertAfter,\r\n  insertBefore: insertBefore,\r\n  clear: clear,\r\n  setHtml: setHtml,\r\n  remove: remove,\r\n  byName: byName,\r\n  oneByName: oneByName,\r\n  toggleClass: toggleClass,\r\n  addClass: addClass,\r\n  removeClass: removeClass,\r\n  hasClass: hasClass\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-lib/dom/index.js\n// module id = 3\n// module chunks = 17","'use strict';\r\n\r\nvar common = require( 'common' );\r\nvar dom = require( 'lib/dom' );\r\nvar UtilsShuffle = require( 'shared/UtilsShuffle' );\r\nvar platform = require('lib/utils').run_on;\r\n\r\nvar Query = MC_Query.extend( {\r\n  parseSource: function() {\r\n    this._super.apply( this, arguments );\r\n    if ( UtilsShuffle.currentQuestionIsRandomize() ) {\r\n      var shuffleArr = UtilsShuffle.shuffleArrays( this.choices, this.choices_fb, function( choices, choices_fb ) {\r\n        this.choices = choices;\r\n        this.choices_fb = choices_fb;\r\n      }.bind( this ) );\r\n\r\n      this.correct_answer_index = shuffleArr.indexOf( this.correct_answer_index );\r\n    }\r\n  },\r\n\r\n  /**\r\n   * Get correct HTML for query text and set id for following use\r\n   * @returns {string} Html for query text\r\n   */\r\n  query_text_html: function() {\r\n    if ( this.query_text != '' && this.md._hide_query_text !== 'true' ) {\r\n      // Replace newlines with <br />\r\n      var text = jQuery.trim( this.query_text ).replace( /\\n/g, '<br>' );\r\n\r\n      // Set id for use it to associate query text with input radios\r\n      if ( platform.ios ) {\r\n        // iOS doesn't see legend\r\n        return '<div class=\"query_text\">' + text + '</div>';\r\n      }\r\n      else {\r\n        return '<legend class=\"query_text\">' + text + '</legend>';\r\n      }\r\n    }\r\n    else {\r\n      return '';\r\n    }\r\n  },\r\n  getHTML: function( mode ) {\r\n    // Initialize image map elements\r\n    if ( this.imagemap_initialized === false ) {\r\n      var question_jq = this.jq.parent();\r\n      this.im_init( question_jq );\r\n      this.imagemap_initialized = true;\r\n    }\r\n\r\n    // Wrap answers in radio group\r\n    var html = '<fieldset class=\"mc_query_group\">';\r\n\r\n    // Add the query text\r\n    html += this.query_text_html();\r\n\r\n    for ( var i = 0; i < this.choices.length; i++ ) {\r\n      var index = this.choice_order[ i ];\r\n\r\n      // If this is review mode\r\n      var checked = '';\r\n      var disabled = '';\r\n      var className = '';\r\n      var mark = '';\r\n\r\n      if ( mode === 'review' || mode === 'review_correct_incorrect' || mode === 'preview' ) {\r\n        // If it is correct answer\r\n        if ( index === this.correct_answer_index ) {\r\n          // Mark it in green\r\n          if ( mode !== 'review_correct_incorrect' || index === this.user_answer_index ) {\r\n            className = 'mc_correct_choice';\r\n            html += '<span class=\"query_correct_feedback_span\" aria-hidden=\"true\">&nbsp;</span>';\r\n            mark = '<span class=\"visually-hidden\">Correct</span>';\r\n          }\r\n\r\n          // Mark it in red\r\n        } else if ( index === this.user_answer_index && this.md.no_correct_answer !== 'true' ) {\r\n          className = 'mc_incorrect_choice';\r\n          html += '<span class=\"query_incorrect_feedback_span\" aria-hidden=\"true\">&nbsp;</span>';\r\n          mark = '<span class=\"visually-hidden\">Incorrect</span>';\r\n        }\r\n\r\n        // And the input should be disabled, unless we're in review_correct_incorrect mode\r\n        disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';\r\n      }\r\n\r\n      // If this is the choice the user clicked, it's checked (regardless of mode)\r\n      checked = (index === this.user_answer_index) ? 'checked' : '';\r\n\r\n      var id = 'query_answer_' + this.query_index + '_' + index;\r\n      var labelId = 'query_answer_label_' + this.query_index + '_' + index;\r\n\r\n      // Hide label to avoid twice reading, but not for FF, otherwise FF doesn't read\r\n      var labelHidden = platform.mobile ? 'aria-hidden=\"true\"' : '';\r\n\r\n      html +=\r\n        '<input class=\"query_mc_choice_radio ' + className + '\" type=\"radio\" name=\"query_answer_' + this.query_index + '\" id=\"' + id + '\" ' +\r\n        ' value=\"' + index + '\" ' + checked + ' ' + disabled + ' aria-labelledby=\"' + labelId + '\"/>' +\r\n        '<label ' + labelHidden + ' id=\"' + labelId + '\" for=\"' + id + '\">' + this.choices[ index ] + ' ' + mark + '</label><br>';\r\n    }\r\n\r\n    // Get a possible feedback string for each option\r\n    html += this.correct_incorrect_feedback();\r\n\r\n    html += \"</fieldset>\";\r\n\r\n    html = dom.createHTML( html );\r\n    common.parseMathExpresions( html );\r\n\r\n    return html;\r\n  },\r\n  /**\r\n   * If we have individual feedback for each mc option\r\n   * @returns {string} Html for the feedback\r\n   */\r\n  correct_incorrect_feedback: function() {\r\n    // Try get individual feedback for option\r\n    var index = this.choice_order[this.user_answer_index]; // Get correct index, if choices are scrambled\r\n    var html = this.choices_fb[index] || '';\r\n\r\n    // If we got any feedback, enclose it in a div\r\n    if (html) {\r\n      html = '<div class=\"query_mc_feedback_correct_incorrect\">' + html + '</div>';\r\n    }\r\n\r\n    return html;\r\n  }\r\n} );\r\n\r\nmodule.exports = Query;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/MC_Query.js\n// module id = 4\n// module chunks = 17","'use strict';\r\n\r\nfunction defer(timeout, arg) {\r\n  var deffered = $.Deferred();\r\n\r\n  timeout = timeout || 1000;\r\n\r\n  setTimeout(function() {\r\n    if (typeof arg == 'function') {\r\n      deffered.resolve(arg());\r\n    }\r\n    else {\r\n      deffered.resolve(arg);\r\n    }\r\n  }, timeout);\r\n\r\n  return deffered.promise();\r\n}\r\n\r\nmodule.exports = {\r\n  defer: defer\r\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-lib/utils/jq_utils/index.js\n// module id = 5\n// module chunks = 17","'use strict';\r\n\r\nvar UtilsShuffle = {};\r\n\r\nUtilsShuffle.currentQuestionIsRandomize = function() {\r\n  return Boolean(player.activity.question_being_initialized.md[\"randomize-choices\"]);\r\n};\r\n\r\nUtilsShuffle.getFilledArr = function(maxValue) {\r\n  var arr = [];\r\n\r\n  for (var i = 0; i < maxValue; i++) {\r\n    arr[i] = i;\r\n  }\r\n  arr.shuffle();\r\n\r\n  return arr;\r\n};\r\n\r\nUtilsShuffle.shuffleArrays = function() {\r\n  var arrs = [];\r\n  var length = arguments[0].length;\r\n  var shuffleArr = UtilsShuffle.getFilledArr(length);\r\n  var lengthArguments = arguments.length;\r\n  var callBackFunctions = null;\r\n\r\n  if (typeof arguments[lengthArguments - 1] === 'function') {\r\n    lengthArguments--;\r\n    callBackFunctions = arguments[lengthArguments];\r\n  }\r\n\r\n  // create new example of arrays\r\n  for (var i = 0; i < lengthArguments; i++) {\r\n    arrs[i] = [];\r\n  }\r\n\r\n  // shuffle of this arrays\r\n  for (var index = 0; index < length; index++) {\r\n    var el = shuffleArr[index];\r\n\r\n    for (var countArrFirst = 0; countArrFirst < lengthArguments; countArrFirst++) {\r\n      arrs[countArrFirst].push(arguments[countArrFirst][el]);\r\n    }\r\n  }\r\n\r\n  // return this arrays example\r\n  if (callBackFunctions) {\r\n    callBackFunctions.apply(null, arrs);\r\n  }\r\n  else {\r\n    for (var countArrSecond = 0; countArrSecond < lengthArguments; countArrSecond++) {\r\n      arguments[countArrSecond] = arrs[countArrSecond];\r\n    }\r\n  }\r\n\r\n  // return array of shuffle index\r\n  return shuffleArr;\r\n};\r\n\r\nmodule.exports = UtilsShuffle;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/UtilsShuffle.js\n// module id = 6\n// module chunks = 17","'use strict';\r\n\r\nvar AYS_Figures = Figures.extend({\r\n  process_media: function() {\r\n    // we're not currently using this (jwplayer is not being included)\r\n    $(\"[data-mmtype='mp3']\").each(function(index, element) {\r\n      var jq = $(element);\r\n      var id = jq.attr(\"data-figure-id\");\r\n      var mmsrc = jq.attr(\"data-mmsrc\");\r\n      // http://www.longtailvideo.com/jw/upload/bunny.mp3\r\n      // http://www.youtube.com/embed/CsGYh8AacgY\r\n      var src = jq.attr(\"src\");\r\n      var attr = jq.attr(\"data-attr\");\r\n\r\n      if (attr == null) {\r\n        attr = \"\";\r\n      }\r\n      attr = attr.split(/\\s*,\\s*/);\r\n\r\n      var params = new Object();\r\n\r\n      params.width = jq.width();\r\n      params.height = jq.height() + 24;\t// 24 is for the controler at the bottom\r\n      params.file = mmsrc;\r\n      params.image = src;\r\n      params.controlbar = \"bottom\";\r\n      params.screencolor = \"ffffff\";\r\n      params[\"viral.allowmenu\"] = \"false\";\r\n      params[\"viral.onpause\"] = \"false\";\r\n      params[\"viral.oncomplete\"] = \"false\";\r\n      // determine url of flashplayer based on whether we're published or not\r\n      if (UI_Elements.in_preview_mode()) {\r\n        params.flashplayer = \"/js/preview/player.swf\";\r\n      }\r\n      else {\r\n        params.flashplayer = \"js/player.swf\";\r\n      }\r\n      safe_log(params.flashplayer);\r\n      for (var i = 0; i < attr.length; ++i) {\r\n        var a = attr[i].split(/\\s*=\\s*/);\r\n\r\n        params[a[0]] = a[1];\r\n      }\r\n\r\n      jwplayer(id).setup(params);\r\n    });\r\n    //AF: this is less than ideal, but i had to make this a global variable so it can be accessed by the video players when they fire the templateloaded event.\r\n    //\t\twe should look into changing it.\r\n    videos.templateReady = function(figureObjectID) {\r\n      var KEY_CODES = {\r\n        SPACE: 32,\r\n        ENTER: 13\r\n      };\r\n\r\n      var vidplayer = brightcove.api.getExperience(figureObjectID);\r\n      // var experienceModule = vidplayer.getModule(brightcove.api.modules.APIModules.EXPERIENCE);\r\n      var playerModule = vidplayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);\r\n\r\n      var el = document.querySelector(\"[data-figure-id=\" + figureObjectID + \"]\");\r\n\r\n      $(el).find('object').attr('aria-hidden', true);\r\n      $(el).find('iframe.BrightcoveExperience').attr('aria-hidden', true); // Fix for android\r\n      el.setAttribute(\"tabindex\", \"0\");\r\n      el.setAttribute(\"role\", \"application\");\r\n      el.setAttribute('aria-label',\r\n        'Press enter to start or pause video. Press the transcript button to see the content of the video');\r\n      el.addEventListener(\"keydown\", (function(isPlay) {\r\n        return function(evt) {\r\n          var keyCode = evt.keyCode || evt.which;\r\n\r\n          if (keyCode === KEY_CODES.SPACE || keyCode === KEY_CODES.ENTER) {\r\n            if (isPlay) {\r\n              playerModule.pause();\r\n              isPlay = false;\r\n              return;\r\n            }\r\n\r\n            playerModule.play();\r\n            isPlay = true;\r\n          }\r\n        };\r\n      })(false));\r\n\r\n      var questionSequence = $(\"#\" + figureObjectID).closest('[data-type=\"figure\"]').nextAll(\r\n        '[data-block_type=\"question_sequence\"], [data-block_type=\"question_sequence_one_at_a_time\"]');\r\n\r\n      questionSequence.each(function(index, element) {\r\n        if ($(element).attr(\"data-block_type\") == \"figure\") {\r\n          if ($(element).find(\".BrightcoveExperience\").size() > 0) {  //we have found another video following the current one, so stop\r\n            return false;\r\n          }\r\n        }\r\n\r\n        var questionSequenceIndex = $(element).attr(\"question_sequence_index\");\r\n\r\n        var questionSequenceMetaData = $(element).find('[data-type=\"box_inner\"]').children(\r\n          '[data-type=\"metadata\"]').find('[key=\"cuepoint\"]').html();\r\n\r\n        $(element).hide();\r\n\r\n        if (questionSequenceMetaData != null) {\r\n          var cuePointsModule = vidplayer.getModule(brightcove.api.modules.APIModules.CUE_POINTS);\r\n\r\n          var CuePointType = brightcove.api.modules.CuePointsModule.CuePointType;\r\n          var cuePoints = [ {\r\n            name: figureObjectID,\r\n            metadata: questionSequenceIndex,\r\n            time: questionSequenceMetaData,\r\n            type: CuePointType.CODE\r\n          } ];\r\n\r\n          cuePointsModule.addCuePoints(videos[figureObjectID], cuePoints);\r\n\r\n          videos.question_sequence_to_video_map[questionSequenceIndex] = figureObjectID;\r\n        }\r\n\r\n      });\r\n      playerModule.addEventListener(brightcove.api.events.CuePointEvent.CUE, videos.cuePointEvent);\r\n    };\r\n    videos.cuePointEvent = function(e) {\r\n      //get the player - the name property of the cuePoint is set to the ID of the Brightcove experience\r\n      //so we can find the player here.\r\n\r\n      var vidplayer = brightcove.api.getExperience(e.cuePoint.name);\r\n\r\n      //var globalPlayer = brightcove.api.getExperience(e.cuePoint.name);\r\n\r\n      safe_log(\"got vid player\");\r\n      var playerModule = vidplayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);\r\n\r\n      safe_log(\"got module\");\r\n      playerModule.pause(true);\r\n      safe_log(\"paused\");\r\n\r\n      player.show_question_sequence(e.cuePoint.metadata, false);\r\n\r\n    };\r\n\r\n    $(\"[data-mmtype='mov']\").each(function(index, element) {\r\n      var jq = $(element);\r\n      var id = jq.attr(\"data-figure-id\");\r\n      var mmsrc = jq.attr(\"data-mmsrc\");\r\n      // var src = jq.attr(\"src\");\r\n      var attr = jq.attr(\"data-attr\");\r\n\r\n      if (attr == null) {\r\n        attr = \"\";\r\n      }\r\n      attr = attr.split(/\\s*,\\s*/);\r\n      var params = new Object();\r\n\r\n      for (var i = 0; i < attr.length; ++i) {\r\n        var a = attr[i].split(/\\s*=\\s*/);\r\n\r\n        params[a[0]] = a[1];\r\n        safe_log(\"added param \" + a[0] + \": \" + a[1]);\r\n      }\r\n      params.autoStart = jq.attr(\"data-autoplay\");\r\n      var videoPlayerID = \"\";\r\n      var videoPlayerKey = \"\";\r\n      //if(params.showVideoControls == 'true'){\r\n      //AF: This is the video player with playback controls. We are only using this one for right now.\r\n\r\n      videoPlayerID = \"1513003547001\";\r\n\r\n      if (jq.attr(\"data-playerid\")) {\r\n        videoPlayerID = jq.attr(\"data-playerid\");\r\n      }\r\n\r\n      videoPlayerKey = \"AQ~~,AAABXVHBMdE~,bnY9CM55Z1MLPZuidy4KYEC_16wi-U8Q\";\r\n      //}else{\r\n      //\tvideoPlayerID = \"1504927982001\";\r\n      //\tvideoPlayerKey = \"AQ~~,AAABXVHBMdE~,bnY9CM55Z1PiqOYprq-NHmUPG2yKZ4U-\";\r\n      //}\r\n      videos[id] = mmsrc;\r\n      var BCL = {};\r\n\r\n      BCL.markup = function(html, data) {\r\n        var m;\r\n        var i = 0;\r\n        var match = html.match(data instanceof Array ? /{{\\d+}}/g : /{{\\w+}}/g) || [];\r\n\r\n        // eslint-disable-next-line no-cond-assign\r\n        while (m = match[i++]) {\r\n          html = html.replace(m, data[m.substr(2, m.length - 4)]);\r\n        }\r\n        return html;\r\n      };\r\n\r\n      videos.templateLoad = function(e) {\r\n        //AF: For now, we are not using captions.\r\n        var vidplayer = brightcove.api.getExperience(e);\r\n        // var CuePointType = brightcove.api.modules.CuePointsModule.CuePointType;\r\n        var modExp = vidplayer.getModule(brightcove.api.modules.APIModules.EXPERIENCE);\r\n\r\n        modExp.addEventListener(brightcove.api.events.ExperienceEvent.TEMPLATE_READY,\r\n          function(_evt) {\r\n            videos.templateReady(e);\r\n          });\r\n\r\n        //captionsModule.loadDFXP(player.md.video_caption_url + videos[e] + \".xml\", videos[e]);\r\n        //if needed, we can use these events to trigger code upon the success or error of loading captions.\r\n        //if there is an error, it fails silently and just doesn't show captions.\r\n        //captionsModule.addEventListener(brightcove.api.events.CaptionsEvent.DFXP_LOAD_SUCCESS, onDFXPLoadSuccess);\r\n        //captionsModule.addEventListener(brightcove.api.events.CaptionsEvent.DFXP_LOAD_ERROR, onDFXPLoadError);\r\n      };\r\n\r\n      BCL.playerData = {\r\n        \"playerID\": videoPlayerID,\r\n        \"playerKey\": videoPlayerKey,\r\n        \"width\": jq.width(),\r\n        \"height\": jq.height(),\r\n        \"videoID\": mmsrc,\r\n        \"autoStart\": params.autoStart\r\n      };\r\n      BCL.playerTemplate =\r\n        \"<div style=\\\"display:none\\\"></div><object id=\\\"\" + id\r\n        + \"\\\" class=\\\"BrightcoveExperience\\\"><param name=\\\"bgcolor\\\" value=\\\"#64AAB2\\\" /><param name=\\\"width\\\" value=\\\"{{width}}\\\" /><param name=\\\"height\\\" value=\\\"{{height}}\\\" /><param name=\\\"playerID\\\" value=\\\"{{playerID}}\\\" /><param name=\\\"playerKey\\\" value=\\\"{{playerKey}}\\\" /><param name=\\\"isVid\\\" value=\\\"true\\\" /><param name=\\\"isUI\\\" value=\\\"true\\\" /><param name=\\\"dynamicStreaming\\\" value=\\\"true\\\" /><param name=\\\"@videoPlayer\\\" value=\\\"{{videoID}}\\\"; /><param name=\\\"templateLoadHandler\\\" value=\\\"videos.templateLoad\\\" /> <param name=\\\"autoStart\\\" value=\\\"{{autoStart}}\\\" /><param name=\\\"includeAPI\\\" value=\\\"true\\\" /> </object>\";\r\n      // console.log(BCL.playerTemplate);\r\n      var playerHTML = \"\";\r\n\r\n      playerHTML = BCL.markup(BCL.playerTemplate, BCL.playerData);  //replaces placeholders with values\r\n      jq.replaceWith(playerHTML);\r\n      brightcove.createExperiences();\r\n\r\n    });\r\n  }\r\n});\r\n\r\nmodule.exports = AYS_Figures;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/digfir/AYS_Figures.js\n// module id = 7\n// module chunks = 17","'use strict';\r\n\r\nvar common = require('common');\r\nvar dom = require('lib/dom');\r\nvar jq_utils = require('lib/utils/jq_utils');\r\n\r\nvar Activity_work_it_out = Activity.extend({\r\n  submit_question: function(question_index) {\r\n    this._super(question_index);\r\n\r\n    player.initImageDescriptions();\r\n\r\n    var section = player.get_current_section();\r\n    var qID = section.jq.find(\"[data-type=question]\").attr(\"data-question_index\");\r\n\r\n    player.activity.qID = qID;\r\n\r\n    player.show_video(section);\r\n\r\n    var $figure_text = section.jq.find(\"data-type=figure_text\");\r\n\r\n    if ($figure_text.text().trim() == '') {\r\n      $figure_text.hide();\r\n    }\r\n\r\n    if (section.hasVideo) {\r\n      setTimeout(function() {\r\n        var videoPlayer = brightcove.api && brightcove.api.getExperience(section.video.id);\r\n\r\n        if (videoPlayer) {\r\n          var playerModule = videoPlayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);\r\n\r\n          playerModule.seek(0);\r\n\r\n          playerModule.addEventListener(brightcove.api.events.MediaEvent.COMPLETE, function() {\r\n            section.video.isViewed = true;\r\n            player.update_section_status();\r\n            player.showing_last_section() && player.show_completion_dialog();\r\n          });\r\n        }\r\n      }, 5000);\r\n    }\r\n  },\r\n  update_question_action_div: function(question_index) {\r\n    var question = this.questions[question_index];\r\n\r\n    // Calculate points_awarded and points_possible\r\n    var points_awarded = 0;\r\n    var points_possible = 0;\r\n    var points_provisional = false;\r\n\r\n    for (var i = 0; i < question.queries.length; ++i) {\r\n      var query = question.queries[i];\r\n      points_awarded += query.getPointsAwarded();\r\n      points_possible += query.getPointsPossible();\r\n      if (query.pointsAreProvisional()) {\r\n        points_provisional = true;\r\n      }\r\n    }\r\n\r\n    // Round to at most two decimal places\r\n    points_awarded = Math.round(points_awarded * 100) / 100;\r\n    points_possible = Math.round(points_possible * 100) / 100;\r\n\r\n    // Hide submit button (and any other similar buttons that might be added by subtypes), but show points earned\r\n    // we need to be able to focus on the feedback container, so add tabindex\r\n    var $questionAction = question.jq.find('#question_action_div_' + question.index);\r\n\r\n    // Add information about points\r\n    var pointsAwarded = '<div class=\"points_awarded_div\">Points awarded: ' + points_awarded + ' out of ' + points_possible;\r\n    if (points_provisional) {\r\n      pointsAwarded += ' (provisional)';\r\n    }\r\n    pointsAwarded += '</div>';\r\n\r\n    if (query.answer_was_just_entered && points_provisional) {\r\n      pointsAwarded +=\r\n        '<div class=\"essay_question_evaluation_feedback\">Your answer has been provisionally accepted. You\\'ll get full credit for now,' +\r\n        ' but your instructor may update your grade later after evaluating it.</div>';\r\n    }\r\n\r\n    var $button = $questionAction.find('.question_submit_button');\r\n\r\n    $button.attr({\r\n      'tabindex': '-1',\r\n      'aria-disabled': 'true'\r\n    }).addClass('disabled');\r\n\r\n    // Add points awarded\r\n    var $questionFeedback = $questionAction.find('.question_feedback');\r\n    $questionAction.find('.points_awarded_div').remove();\r\n    if ($questionFeedback.length > 0) {\r\n      $questionFeedback.append(pointsAwarded);\r\n    } else {\r\n      $questionAction.append(pointsAwarded);\r\n    }\r\n\r\n    $questionFeedback.show();\r\n\r\n    // Add space after period\r\n    var feedbackText = $questionAction.text().replace(/\\./g, '. ');\r\n\r\n    // FF + NVDA doesn't read text in focused div automatically\r\n    player.shadow_speech.talk('');\r\n    player.shadow_speech.talk(feedbackText.replace('Feedback', 'Feedback. '));\r\n  },\r\n  show_question_feedback: function(question, is_correct, try_again) {\r\n    // Remove previous feedback if there\r\n    $('#question_feedback_' + question.index).remove();\r\n\r\n    // Get individual feedback for each choice, and add it after general feedback\r\n    var feedback_correct_incorrect = question.jq.find('.query_mc_feedback_correct_incorrect').text();\r\n\r\n    var html = '<div class=\"question_feedback\" id=\"question_feedback_' + question.index + '\">' +\r\n      '<div class=\"question_feedback_head\">' + this.feedbackTitle + '</div>';\r\n\r\n    var feedback = '';\r\n\r\n    // GENERAL feedback if there\r\n    if (question.md.feedback) {\r\n      feedback += '<div class=\"question_feedback_part\">' + question.md.feedback + '</div>';\r\n    }\r\n\r\n    // CORRECT feedback if there and the answer is correct\r\n    if (is_correct && question.md.feedback_correct) {\r\n      feedback += '<div class=\"question_feedback_part\">' + question.md.feedback_correct + '<br/>' + feedback_correct_incorrect + '</div>';\r\n    }\r\n\r\n    // INCORRECT or HINT feedback if there and the answer is incorrect\r\n    if (!is_correct) {\r\n      var found_feedback_string = false;\r\n\r\n      // If user gets to try again\r\n      if (try_again) {\r\n        // Check for feedback_conditional's\r\n        if (question.md.feedback_conditional.length > 0) {\r\n          for (var i in question.md.feedback_conditional) {\r\n            var fbc = question.check_conditional(question.md.feedback_conditional[i]);\r\n            if (fbc) {\r\n              feedback += '<div class=\"question_feedback_part\" aria-hidden=\"true\">' + fbc + '</div>';\r\n              found_feedback_string = true;\r\n              break;\r\n            }\r\n          }\r\n        }\r\n\r\n        // Check for feedback HINT\r\n        if (!found_feedback_string && question.md.feedback_hint) {\r\n          feedback += '<div class=\"question_feedback_part\">' + question.md.feedback_hint + '</div>';\r\n          found_feedback_string = true;\r\n        }\r\n      }\r\n\r\n      // Check for feedback INCORRECT\r\n      if (!found_feedback_string && question.md.feedback_incorrect) {\r\n        feedback += '<div class=\"question_feedback_part\">' + question.md.feedback_incorrect + '<br/>' + feedback_correct_incorrect + '</div>';\r\n      }\r\n    }\r\n\r\n    if (!feedback && feedback_correct_incorrect) {\r\n      feedback += '<div class=\"question_feedback_part\">' + feedback_correct_incorrect + '</div>';\r\n    }\r\n\r\n    html += feedback + '</div>';\r\n\r\n    html = dom.createHTML(html);\r\n    common.parseMathExpresions(html);\r\n\r\n        // append the div, then fade it in\r\n    $(\"#question_action_div_\" + question.index).prepend(html);\r\n  }\r\n});\r\n\r\nmodule.exports = Activity_work_it_out;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/Activity.js\n// module id = 8\n// module chunks = 17","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./assets/css/main.less\n// module id = 9\n// module chunks = 17","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/assets/css/main.less\n// module id = 10\n// module chunks = 17","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/common/assets/css/common.sass\n// module id = 27\n// module chunks = 17","module.exports = {\"global\":{\"inline_fitb\":{\"label\":\"answer input text field\"},\"inline_dd\":{\"label\":\"answer drop down select field\"}}}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/aria/texts.yml\n// module id = 44\n// module chunks = 17","/*!\n * Platform.js <https://mths.be/platform>\n * Copyright 2014-2016 Benjamin Tan <https://demoneaux.github.io/>\n * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>\n * Available under MIT license <https://mths.be/mit>\n */\n;(function() {\n  'use strict';\n\n  /** Used to determine if values are of the language type `Object`. */\n  var objectTypes = {\n    'function': true,\n    'object': true\n  };\n\n  /** Used as a reference to the global object. */\n  var root = (objectTypes[typeof window] && window) || this;\n\n  /** Backup possible global object. */\n  var oldRoot = root;\n\n  /** Detect free variable `exports`. */\n  var freeExports = objectTypes[typeof exports] && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;\n\n  /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */\n  var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;\n  if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {\n    root = freeGlobal;\n  }\n\n  /**\n   * Used as the maximum length of an array-like object.\n   * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)\n   * for more details.\n   */\n  var maxSafeInteger = Math.pow(2, 53) - 1;\n\n  /** Regular expression to detect Opera. */\n  var reOpera = /\\bOpera/;\n\n  /** Possible global object. */\n  var thisBinding = this;\n\n  /** Used for native method references. */\n  var objectProto = Object.prototype;\n\n  /** Used to check for own properties of an object. */\n  var hasOwnProperty = objectProto.hasOwnProperty;\n\n  /** Used to resolve the internal `[[Class]]` of values. */\n  var toString = objectProto.toString;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Capitalizes a string value.\n   *\n   * @private\n   * @param {string} string The string to capitalize.\n   * @returns {string} The capitalized string.\n   */\n  function capitalize(string) {\n    string = String(string);\n    return string.charAt(0).toUpperCase() + string.slice(1);\n  }\n\n  /**\n   * A utility function to clean up the OS name.\n   *\n   * @private\n   * @param {string} os The OS name to clean up.\n   * @param {string} [pattern] A `RegExp` pattern matching the OS name.\n   * @param {string} [label] A label for the OS.\n   */\n  function cleanupOS(os, pattern, label) {\n    // Platform tokens are defined at:\n    // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n    // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx\n    var data = {\n      '10.0': '10',\n      '6.4':  '10 Technical Preview',\n      '6.3':  '8.1',\n      '6.2':  '8',\n      '6.1':  'Server 2008 R2 / 7',\n      '6.0':  'Server 2008 / Vista',\n      '5.2':  'Server 2003 / XP 64-bit',\n      '5.1':  'XP',\n      '5.01': '2000 SP1',\n      '5.0':  '2000',\n      '4.0':  'NT',\n      '4.90': 'ME'\n    };\n    // Detect Windows version from platform tokens.\n    if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) &&\n        (data = data[/[\\d.]+$/.exec(os)])) {\n      os = 'Windows ' + data;\n    }\n    // Correct character case and cleanup string.\n    os = String(os);\n\n    if (pattern && label) {\n      os = os.replace(RegExp(pattern, 'i'), label);\n    }\n\n    os = format(\n      os.replace(/ ce$/i, ' CE')\n        .replace(/\\bhpw/i, 'web')\n        .replace(/\\bMacintosh\\b/, 'Mac OS')\n        .replace(/_PowerPC\\b/i, ' OS')\n        .replace(/\\b(OS X) [^ \\d]+/i, '$1')\n        .replace(/\\bMac (OS X)\\b/, '$1')\n        .replace(/\\/(\\d)/, ' $1')\n        .replace(/_/g, '.')\n        .replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i, '')\n        .replace(/\\bx86\\.64\\b/gi, 'x86_64')\n        .replace(/\\b(Windows Phone) OS\\b/, '$1')\n        .replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/, '$1')\n        .split(' on ')[0]\n    );\n\n    return os;\n  }\n\n  /**\n   * An iteration utility for arrays and objects.\n   *\n   * @private\n   * @param {Array|Object} object The object to iterate over.\n   * @param {Function} callback The function called per iteration.\n   */\n  function each(object, callback) {\n    var index = -1,\n        length = object ? object.length : 0;\n\n    if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) {\n      while (++index < length) {\n        callback(object[index], index, object);\n      }\n    } else {\n      forOwn(object, callback);\n    }\n  }\n\n  /**\n   * Trim and conditionally capitalize string values.\n   *\n   * @private\n   * @param {string} string The string to format.\n   * @returns {string} The formatted string.\n   */\n  function format(string) {\n    string = trim(string);\n    return /^(?:webOS|i(?:OS|P))/.test(string)\n      ? string\n      : capitalize(string);\n  }\n\n  /**\n   * Iterates over an object's own properties, executing the `callback` for each.\n   *\n   * @private\n   * @param {Object} object The object to iterate over.\n   * @param {Function} callback The function executed per own property.\n   */\n  function forOwn(object, callback) {\n    for (var key in object) {\n      if (hasOwnProperty.call(object, key)) {\n        callback(object[key], key, object);\n      }\n    }\n  }\n\n  /**\n   * Gets the internal `[[Class]]` of a value.\n   *\n   * @private\n   * @param {*} value The value.\n   * @returns {string} The `[[Class]]`.\n   */\n  function getClassOf(value) {\n    return value == null\n      ? capitalize(value)\n      : toString.call(value).slice(8, -1);\n  }\n\n  /**\n   * Host objects can return type values that are different from their actual\n   * data type. The objects we are concerned with usually return non-primitive\n   * types of \"object\", \"function\", or \"unknown\".\n   *\n   * @private\n   * @param {*} object The owner of the property.\n   * @param {string} property The property to check.\n   * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.\n   */\n  function isHostType(object, property) {\n    var type = object != null ? typeof object[property] : 'number';\n    return !/^(?:boolean|number|string|undefined)$/.test(type) &&\n      (type == 'object' ? !!object[property] : true);\n  }\n\n  /**\n   * Prepares a string for use in a `RegExp` by making hyphens and spaces optional.\n   *\n   * @private\n   * @param {string} string The string to qualify.\n   * @returns {string} The qualified string.\n   */\n  function qualify(string) {\n    return String(string).replace(/([ -])(?!$)/g, '$1?');\n  }\n\n  /**\n   * A bare-bones `Array#reduce` like utility function.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} callback The function called per iteration.\n   * @returns {*} The accumulated result.\n   */\n  function reduce(array, callback) {\n    var accumulator = null;\n    each(array, function(value, index) {\n      accumulator = callback(accumulator, value, index, array);\n    });\n    return accumulator;\n  }\n\n  /**\n   * Removes leading and trailing whitespace from a string.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} The trimmed string.\n   */\n  function trim(string) {\n    return String(string).replace(/^ +| +$/g, '');\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Creates a new platform object.\n   *\n   * @memberOf platform\n   * @param {Object|string} [ua=navigator.userAgent] The user agent string or\n   *  context object.\n   * @returns {Object} A platform object.\n   */\n  function parse(ua) {\n\n    /** The environment context object. */\n    var context = root;\n\n    /** Used to flag when a custom context is provided. */\n    var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String';\n\n    // Juggle arguments.\n    if (isCustomContext) {\n      context = ua;\n      ua = null;\n    }\n\n    /** Browser navigator object. */\n    var nav = context.navigator || {};\n\n    /** Browser user agent string. */\n    var userAgent = nav.userAgent || '';\n\n    ua || (ua = userAgent);\n\n    /** Used to flag when `thisBinding` is the [ModuleScope]. */\n    var isModuleScope = isCustomContext || thisBinding == oldRoot;\n\n    /** Used to detect if browser is like Chrome. */\n    var likeChrome = isCustomContext\n      ? !!nav.likeChrome\n      : /\\bChrome\\b/.test(ua) && !/internal|\\n/i.test(toString.toString());\n\n    /** Internal `[[Class]]` value shortcuts. */\n    var objectClass = 'Object',\n        airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject',\n        enviroClass = isCustomContext ? objectClass : 'Environment',\n        javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java),\n        phantomClass = isCustomContext ? objectClass : 'RuntimeObject';\n\n    /** Detect Java environments. */\n    var java = /\\bJava/.test(javaClass) && context.java;\n\n    /** Detect Rhino. */\n    var rhino = java && getClassOf(context.environment) == enviroClass;\n\n    /** A character to represent alpha. */\n    var alpha = java ? 'a' : '\\u03b1';\n\n    /** A character to represent beta. */\n    var beta = java ? 'b' : '\\u03b2';\n\n    /** Browser document object. */\n    var doc = context.document || {};\n\n    /**\n     * Detect Opera browser (Presto-based).\n     * http://www.howtocreate.co.uk/operaStuff/operaObject.html\n     * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini\n     */\n    var opera = context.operamini || context.opera;\n\n    /** Opera `[[Class]]`. */\n    var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera))\n      ? operaClass\n      : (opera = null);\n\n    /*------------------------------------------------------------------------*/\n\n    /** Temporary variable used over the script's lifetime. */\n    var data;\n\n    /** The CPU architecture. */\n    var arch = ua;\n\n    /** Platform description array. */\n    var description = [];\n\n    /** Platform alpha/beta indicator. */\n    var prerelease = null;\n\n    /** A flag to indicate that environment features should be used to resolve the platform. */\n    var useFeatures = ua == userAgent;\n\n    /** The browser/environment version. */\n    var version = useFeatures && opera && typeof opera.version == 'function' && opera.version();\n\n    /** A flag to indicate if the OS ends with \"/ Version\" */\n    var isSpecialCasedOS;\n\n    /* Detectable layout engines (order is important). */\n    var layout = getLayout([\n      { 'label': 'EdgeHTML', 'pattern': 'Edge' },\n      'Trident',\n      { 'label': 'WebKit', 'pattern': 'AppleWebKit' },\n      'iCab',\n      'Presto',\n      'NetFront',\n      'Tasman',\n      'KHTML',\n      'Gecko'\n    ]);\n\n    /* Detectable browser names (order is important). */\n    var name = getName([\n      'Adobe AIR',\n      'Arora',\n      'Avant Browser',\n      'Breach',\n      'Camino',\n      'Electron',\n      'Epiphany',\n      'Fennec',\n      'Flock',\n      'Galeon',\n      'GreenBrowser',\n      'iCab',\n      'Iceweasel',\n      'K-Meleon',\n      'Konqueror',\n      'Lunascape',\n      'Maxthon',\n      { 'label': 'Microsoft Edge', 'pattern': 'Edge' },\n      'Midori',\n      'Nook Browser',\n      'PaleMoon',\n      'PhantomJS',\n      'Raven',\n      'Rekonq',\n      'RockMelt',\n      { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' },\n      'SeaMonkey',\n      { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n      'Sleipnir',\n      'SlimBrowser',\n      { 'label': 'SRWare Iron', 'pattern': 'Iron' },\n      'Sunrise',\n      'Swiftfox',\n      'Waterfox',\n      'WebPositive',\n      'Opera Mini',\n      { 'label': 'Opera Mini', 'pattern': 'OPiOS' },\n      'Opera',\n      { 'label': 'Opera', 'pattern': 'OPR' },\n      'Chrome',\n      { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },\n      { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },\n      { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },\n      { 'label': 'IE', 'pattern': 'IEMobile' },\n      { 'label': 'IE', 'pattern': 'MSIE' },\n      'Safari'\n    ]);\n\n    /* Detectable products (order is important). */\n    var product = getProduct([\n      { 'label': 'BlackBerry', 'pattern': 'BB10' },\n      'BlackBerry',\n      { 'label': 'Galaxy S', 'pattern': 'GT-I9000' },\n      { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' },\n      { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' },\n      { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' },\n      { 'label': 'Galaxy S5', 'pattern': 'SM-G900' },\n      { 'label': 'Galaxy S6', 'pattern': 'SM-G920' },\n      { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' },\n      { 'label': 'Galaxy S7', 'pattern': 'SM-G930' },\n      { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' },\n      'Google TV',\n      'Lumia',\n      'iPad',\n      'iPod',\n      'iPhone',\n      'Kindle',\n      { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' },\n      'Nexus',\n      'Nook',\n      'PlayBook',\n      'PlayStation Vita',\n      'PlayStation',\n      'TouchPad',\n      'Transformer',\n      { 'label': 'Wii U', 'pattern': 'WiiU' },\n      'Wii',\n      'Xbox One',\n      { 'label': 'Xbox 360', 'pattern': 'Xbox' },\n      'Xoom'\n    ]);\n\n    /* Detectable manufacturers. */\n    var manufacturer = getManufacturer({\n      'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },\n      'Archos': {},\n      'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },\n      'Asus': { 'Transformer': 1 },\n      'Barnes & Noble': { 'Nook': 1 },\n      'BlackBerry': { 'PlayBook': 1 },\n      'Google': { 'Google TV': 1, 'Nexus': 1 },\n      'HP': { 'TouchPad': 1 },\n      'HTC': {},\n      'LG': {},\n      'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },\n      'Motorola': { 'Xoom': 1 },\n      'Nintendo': { 'Wii U': 1,  'Wii': 1 },\n      'Nokia': { 'Lumia': 1 },\n      'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },\n      'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }\n    });\n\n    /* Detectable operating systems (order is important). */\n    var os = getOS([\n      'Windows Phone',\n      'Android',\n      'CentOS',\n      { 'label': 'Chrome OS', 'pattern': 'CrOS' },\n      'Debian',\n      'Fedora',\n      'FreeBSD',\n      'Gentoo',\n      'Haiku',\n      'Kubuntu',\n      'Linux Mint',\n      'OpenBSD',\n      'Red Hat',\n      'SuSE',\n      'Ubuntu',\n      'Xubuntu',\n      'Cygwin',\n      'Symbian OS',\n      'hpwOS',\n      'webOS ',\n      'webOS',\n      'Tablet OS',\n      'Tizen',\n      'Linux',\n      'Mac OS X',\n      'Macintosh',\n      'Mac',\n      'Windows 98;',\n      'Windows '\n    ]);\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Picks the layout engine from an array of guesses.\n     *\n     * @private\n     * @param {Array} guesses An array of guesses.\n     * @returns {null|string} The detected layout engine.\n     */\n    function getLayout(guesses) {\n      return reduce(guesses, function(result, guess) {\n        return result || RegExp('\\\\b' + (\n          guess.pattern || qualify(guess)\n        ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n      });\n    }\n\n    /**\n     * Picks the manufacturer from an array of guesses.\n     *\n     * @private\n     * @param {Array} guesses An object of guesses.\n     * @returns {null|string} The detected manufacturer.\n     */\n    function getManufacturer(guesses) {\n      return reduce(guesses, function(result, value, key) {\n        // Lookup the manufacturer by product or scan the UA for the manufacturer.\n        return result || (\n          value[product] ||\n          value[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(product)] ||\n          RegExp('\\\\b' + qualify(key) + '(?:\\\\b|\\\\w*\\\\d)', 'i').exec(ua)\n        ) && key;\n      });\n    }\n\n    /**\n     * Picks the browser name from an array of guesses.\n     *\n     * @private\n     * @param {Array} guesses An array of guesses.\n     * @returns {null|string} The detected browser name.\n     */\n    function getName(guesses) {\n      return reduce(guesses, function(result, guess) {\n        return result || RegExp('\\\\b' + (\n          guess.pattern || qualify(guess)\n        ) + '\\\\b', 'i').exec(ua) && (guess.label || guess);\n      });\n    }\n\n    /**\n     * Picks the OS name from an array of guesses.\n     *\n     * @private\n     * @param {Array} guesses An array of guesses.\n     * @returns {null|string} The detected OS name.\n     */\n    function getOS(guesses) {\n      return reduce(guesses, function(result, guess) {\n        var pattern = guess.pattern || qualify(guess);\n        if (!result && (result =\n              RegExp('\\\\b' + pattern + '(?:/[\\\\d.]+|[ \\\\w.]*)', 'i').exec(ua)\n            )) {\n          result = cleanupOS(result, pattern, guess.label || guess);\n        }\n        return result;\n      });\n    }\n\n    /**\n     * Picks the product name from an array of guesses.\n     *\n     * @private\n     * @param {Array} guesses An array of guesses.\n     * @returns {null|string} The detected product name.\n     */\n    function getProduct(guesses) {\n      return reduce(guesses, function(result, guess) {\n        var pattern = guess.pattern || qualify(guess);\n        if (!result && (result =\n              RegExp('\\\\b' + pattern + ' *\\\\d+[.\\\\w_]*', 'i').exec(ua) ||\n              RegExp('\\\\b' + pattern + ' *\\\\w+-[\\\\w]*', 'i').exec(ua) ||\n              RegExp('\\\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)', 'i').exec(ua)\n            )) {\n          // Split by forward slash and append product version if needed.\n          if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\\d.]+/.test(result[0])) {\n            result[0] += ' ' + result[1];\n          }\n          // Correct character case and cleanup string.\n          guess = guess.label || guess;\n          result = format(result[0]\n            .replace(RegExp(pattern, 'i'), guess)\n            .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ')\n            .replace(RegExp('(' + guess + ')[-_.]?(\\\\w)', 'i'), '$1 $2'));\n        }\n        return result;\n      });\n    }\n\n    /**\n     * Resolves the version using an array of UA patterns.\n     *\n     * @private\n     * @param {Array} patterns An array of UA patterns.\n     * @returns {null|string} The detected version.\n     */\n    function getVersion(patterns) {\n      return reduce(patterns, function(result, pattern) {\n        return result || (RegExp(pattern +\n          '(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;\n      });\n    }\n\n    /**\n     * Returns `platform.description` when the platform object is coerced to a string.\n     *\n     * @name toString\n     * @memberOf platform\n     * @returns {string} Returns `platform.description` if available, else an empty string.\n     */\n    function toStringPlatform() {\n      return this.description || '';\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Convert layout to an array so we can add extra details.\n    layout && (layout = [layout]);\n\n    // Detect product names that contain their manufacturer's name.\n    if (manufacturer && !product) {\n      product = getProduct([manufacturer]);\n    }\n    // Clean up Google TV.\n    if ((data = /\\bGoogle TV\\b/.exec(product))) {\n      product = data[0];\n    }\n    // Detect simulators.\n    if (/\\bSimulator\\b/i.test(ua)) {\n      product = (product ? product + ' ' : '') + 'Simulator';\n    }\n    // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS.\n    if (name == 'Opera Mini' && /\\bOPiOS\\b/.test(ua)) {\n      description.push('running in Turbo/Uncompressed mode');\n    }\n    // Detect IE Mobile 11.\n    if (name == 'IE' && /\\blike iPhone OS\\b/.test(ua)) {\n      data = parse(ua.replace(/like iPhone OS/, ''));\n      manufacturer = data.manufacturer;\n      product = data.product;\n    }\n    // Detect iOS.\n    else if (/^iP/.test(product)) {\n      name || (name = 'Safari');\n      os = 'iOS' + ((data = / OS ([\\d_]+)/i.exec(ua))\n        ? ' ' + data[1].replace(/_/g, '.')\n        : '');\n    }\n    // Detect Kubuntu.\n    else if (name == 'Konqueror' && !/buntu/i.test(os)) {\n      os = 'Kubuntu';\n    }\n    // Detect Android browsers.\n    else if ((manufacturer && manufacturer != 'Google' &&\n        ((/Chrome/.test(name) && !/\\bMobile Safari\\b/i.test(ua)) || /\\bVita\\b/.test(product))) ||\n        (/\\bAndroid\\b/.test(os) && /^Chrome/.test(name) && /\\bVersion\\//i.test(ua))) {\n      name = 'Android Browser';\n      os = /\\bAndroid\\b/.test(os) ? os : 'Android';\n    }\n    // Detect Silk desktop/accelerated modes.\n    else if (name == 'Silk') {\n      if (!/\\bMobi/i.test(ua)) {\n        os = 'Android';\n        description.unshift('desktop mode');\n      }\n      if (/Accelerated *= *true/i.test(ua)) {\n        description.unshift('accelerated');\n      }\n    }\n    // Detect PaleMoon identifying as Firefox.\n    else if (name == 'PaleMoon' && (data = /\\bFirefox\\/([\\d.]+)\\b/.exec(ua))) {\n      description.push('identifying as Firefox ' + data[1]);\n    }\n    // Detect Firefox OS and products running Firefox.\n    else if (name == 'Firefox' && (data = /\\b(Mobile|Tablet|TV)\\b/i.exec(ua))) {\n      os || (os = 'Firefox OS');\n      product || (product = data[1]);\n    }\n    // Detect false positives for Firefox/Safari.\n    else if (!name || (data = !/\\bMinefield\\b/i.test(ua) && /\\b(?:Firefox|Safari)\\b/.exec(name))) {\n      // Escape the `/` for Firefox 1.\n      if (name && !product && /[\\/,]|^[^(]+?\\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) {\n        // Clear name of false positives.\n        name = null;\n      }\n      // Reassign a generic name.\n      if ((data = product || manufacturer || os) &&\n          (product || manufacturer || /\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(os))) {\n        name = /[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(os) ? os : data) + ' Browser';\n      }\n    }\n    // Add Chrome version to description for Electron.\n    else if (name == 'Electron' && (data = (/\\bChrome\\/([\\d.]+)\\b/.exec(ua) || 0)[1])) {\n      description.push('Chromium ' + data);\n    }\n    // Detect non-Opera (Presto-based) versions (order is important).\n    if (!version) {\n      version = getVersion([\n        '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$))',\n        'Version',\n        qualify(name),\n        '(?:Firefox|Minefield|NetFront)'\n      ]);\n    }\n    // Detect stubborn layout engines.\n    if ((data =\n          layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' ||\n          /\\bOpera\\b/.test(name) && (/\\bOPR\\b/.test(ua) ? 'Blink' : 'Presto') ||\n          /\\b(?:Midori|Nook|Safari)\\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' ||\n          !layout && /\\bMSIE\\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') ||\n          layout == 'WebKit' && /\\bPlayStation\\b(?! Vita\\b)/i.test(name) && 'NetFront'\n        )) {\n      layout = [data];\n    }\n    // Detect Windows Phone 7 desktop mode.\n    if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n      name += ' Mobile';\n      os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n      description.unshift('desktop mode');\n    }\n    // Detect Windows Phone 8.x desktop mode.\n    else if (/\\bWPDesktop\\b/i.test(ua)) {\n      name = 'IE Mobile';\n      os = 'Windows Phone 8.x';\n      description.unshift('desktop mode');\n      version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n    }\n    // Detect IE 11 identifying as other browsers.\n    else if (name != 'IE' && layout == 'Trident' && (data = /\\brv:([\\d.]+)/.exec(ua))) {\n      if (name) {\n        description.push('identifying as ' + name + (version ? ' ' + version : ''));\n      }\n      name = 'IE';\n      version = data[1];\n    }\n    // Leverage environment features.\n    if (useFeatures) {\n      // Detect server-side environments.\n      // Rhino has a global function while others have a global object.\n      if (isHostType(context, 'global')) {\n        if (java) {\n          data = java.lang.System;\n          arch = data.getProperty('os.arch');\n          os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version');\n        }\n        if (isModuleScope && isHostType(context, 'system') && (data = [context.system])[0]) {\n          os || (os = data[0].os || null);\n          try {\n            data[1] = context.require('ringo/engine').version;\n            version = data[1].join('.');\n            name = 'RingoJS';\n          } catch(e) {\n            if (data[0].global.system == context.system) {\n              name = 'Narwhal';\n            }\n          }\n        }\n        else if (\n          typeof context.process == 'object' && !context.process.browser &&\n          (data = context.process)\n        ) {\n          if (typeof data.versions == 'object') {\n            if (typeof data.versions.electron == 'string') {\n              description.push('Node ' + data.versions.node);\n              name = 'Electron';\n              version = data.versions.electron;\n            } else if (typeof data.versions.nw == 'string') {\n              description.push('Chromium ' + version, 'Node ' + data.versions.node);\n              name = 'NW.js';\n              version = data.versions.nw;\n            }\n          } else {\n            name = 'Node.js';\n            arch = data.arch;\n            os = data.platform;\n            version = /[\\d.]+/.exec(data.version)\n            version = version ? version[0] : 'unknown';\n          }\n        }\n        else if (rhino) {\n          name = 'Rhino';\n        }\n      }\n      // Detect Adobe AIR.\n      else if (getClassOf((data = context.runtime)) == airRuntimeClass) {\n        name = 'Adobe AIR';\n        os = data.flash.system.Capabilities.os;\n      }\n      // Detect PhantomJS.\n      else if (getClassOf((data = context.phantom)) == phantomClass) {\n        name = 'PhantomJS';\n        version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch);\n      }\n      // Detect IE compatibility modes.\n      else if (typeof doc.documentMode == 'number' && (data = /\\bTrident\\/(\\d+)/i.exec(ua))) {\n        // We're in compatibility mode when the Trident version + 4 doesn't\n        // equal the document mode.\n        version = [version, doc.documentMode];\n        if ((data = +data[1] + 4) != version[1]) {\n          description.push('IE ' + version[1] + ' mode');\n          layout && (layout[1] = '');\n          version[1] = data;\n        }\n        version = name == 'IE' ? String(version[1].toFixed(1)) : version[0];\n      }\n      // Detect IE 11 masking as other browsers.\n      else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\\b/.test(name)) {\n        description.push('masking as ' + name + ' ' + version);\n        name = 'IE';\n        version = '11.0';\n        layout = ['Trident'];\n        os = 'Windows';\n      }\n      os = os && format(os);\n    }\n    // Detect prerelease phases.\n    if (version && (data =\n          /(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(version) ||\n          /(?:alpha|beta)(?: ?\\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) ||\n          /\\bMinefield\\b/i.test(ua) && 'a'\n        )) {\n      prerelease = /b/i.test(data) ? 'beta' : 'alpha';\n      version = version.replace(RegExp(data + '\\\\+?$'), '') +\n        (prerelease == 'beta' ? beta : alpha) + (/\\d+\\+?/.exec(data) || '');\n    }\n    // Detect Firefox Mobile.\n    if (name == 'Fennec' || name == 'Firefox' && /\\b(?:Android|Firefox OS)\\b/.test(os)) {\n      name = 'Firefox Mobile';\n    }\n    // Obscure Maxthon's unreliable version.\n    else if (name == 'Maxthon' && version) {\n      version = version.replace(/\\.[\\d.]+/, '.x');\n    }\n    // Detect Xbox 360 and Xbox One.\n    else if (/\\bXbox\\b/i.test(product)) {\n      if (product == 'Xbox 360') {\n        os = null;\n      }\n      if (product == 'Xbox 360' && /\\bIEMobile\\b/.test(ua)) {\n        description.unshift('mobile mode');\n      }\n    }\n    // Add mobile postfix.\n    else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) &&\n        (os == 'Windows CE' || /Mobi/i.test(ua))) {\n      name += ' Mobile';\n    }\n    // Detect IE platform preview.\n    else if (name == 'IE' && useFeatures) {\n      try {\n        if (context.external === null) {\n          description.unshift('platform preview');\n        }\n      } catch(e) {\n        description.unshift('embedded');\n      }\n    }\n    // Detect BlackBerry OS version.\n    // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp\n    else if ((/\\bBlackBerry\\b/.test(product) || /\\bBB10\\b/.test(ua)) && (data =\n          (RegExp(product.replace(/ +/g, ' *') + '/([.\\\\d]+)', 'i').exec(ua) || 0)[1] ||\n          version\n        )) {\n      data = [data, /BB10/.test(ua)];\n      os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0];\n      version = null;\n    }\n    // Detect Opera identifying/masking itself as another browser.\n    // http://www.opera.com/support/kb/view/843/\n    else if (this != forOwn && product != 'Wii' && (\n          (useFeatures && opera) ||\n          (/Opera/.test(name) && /\\b(?:MSIE|Firefox)\\b/i.test(ua)) ||\n          (name == 'Firefox' && /\\bOS X (?:\\d+\\.){2,}/.test(os)) ||\n          (name == 'IE' && (\n            (os && !/^Win/.test(os) && version > 5.5) ||\n            /\\bWindows XP\\b/.test(os) && version > 8 ||\n            version == 8 && !/\\bTrident\\b/.test(ua)\n          ))\n        ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) {\n      // When \"identifying\", the UA contains both Opera and the other browser's name.\n      data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : '');\n      if (reOpera.test(name)) {\n        if (/\\bIE\\b/.test(data) && os == 'Mac OS') {\n          os = null;\n        }\n        data = 'identify' + data;\n      }\n      // When \"masking\", the UA contains only the other browser's name.\n      else {\n        data = 'mask' + data;\n        if (operaClass) {\n          name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2'));\n        } else {\n          name = 'Opera';\n        }\n        if (/\\bIE\\b/.test(data)) {\n          os = null;\n        }\n        if (!useFeatures) {\n          version = null;\n        }\n      }\n      layout = ['Presto'];\n      description.push(data);\n    }\n    // Detect WebKit Nightly and approximate Chrome/Safari versions.\n    if ((data = (/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n      // Correct build number for numeric comparison.\n      // (e.g. \"532.5\" becomes \"532.05\")\n      data = [parseFloat(data.replace(/\\.(\\d)$/, '.0$1')), data];\n      // Nightly builds are postfixed with a \"+\".\n      if (name == 'Safari' && data[1].slice(-1) == '+') {\n        name = 'WebKit Nightly';\n        prerelease = 'alpha';\n        version = data[1].slice(0, -1);\n      }\n      // Clear incorrect browser versions.\n      else if (version == data[1] ||\n          version == (data[2] = (/\\bSafari\\/([\\d.]+\\+?)/i.exec(ua) || 0)[1])) {\n        version = null;\n      }\n      // Use the full Chrome version when available.\n      data[1] = (/\\bChrome\\/([\\d.]+)/i.exec(ua) || 0)[1];\n      // Detect Blink layout engine.\n      if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {\n        layout = ['Blink'];\n      }\n      // Detect JavaScriptCore.\n      // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi\n      if (!useFeatures || (!likeChrome && !data[1])) {\n        layout && (layout[1] = 'like Safari');\n        data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8');\n      } else {\n        layout && (layout[1] = 'like Chrome');\n        data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');\n      }\n      // Add the postfix of \".x\" or \"+\" for approximate versions.\n      layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+'));\n      // Obscure version for some Safari 1-2 releases.\n      if (name == 'Safari' && (!version || parseInt(version) > 45)) {\n        version = data;\n      }\n    }\n    // Detect Opera desktop modes.\n    if (name == 'Opera' &&  (data = /\\bzbov|zvav$/.exec(os))) {\n      name += ' ';\n      description.unshift('desktop mode');\n      if (data == 'zvav') {\n        name += 'Mini';\n        version = null;\n      } else {\n        name += 'Mobile';\n      }\n      os = os.replace(RegExp(' *' + data + '$'), '');\n    }\n    // Detect Chrome desktop mode.\n    else if (name == 'Safari' && /\\bChrome\\b/.exec(layout && layout[1])) {\n      description.unshift('desktop mode');\n      name = 'Chrome Mobile';\n      version = null;\n\n      if (/\\bOS X\\b/.test(os)) {\n        manufacturer = 'Apple';\n        os = 'iOS 4.3+';\n      } else {\n        os = null;\n      }\n    }\n    // Strip incorrect OS versions.\n    if (version && version.indexOf((data = /[\\d.]+$/.exec(os))) == 0 &&\n        ua.indexOf('/' + data + '-') > -1) {\n      os = trim(os.replace(data, ''));\n    }\n    // Add layout engine.\n    if (layout && !/\\b(?:Avant|Nook)\\b/.test(name) && (\n        /Browser|Lunascape|Maxthon/.test(name) ||\n        name != 'Safari' && /^iOS/.test(os) && /\\bSafari\\b/.test(layout[1]) ||\n        /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) {\n      // Don't add layout details to description if they are falsey.\n      (data = layout[layout.length - 1]) && description.push(data);\n    }\n    // Combine contextual information.\n    if (description.length) {\n      description = ['(' + description.join('; ') + ')'];\n    }\n    // Append manufacturer to description.\n    if (manufacturer && product && product.indexOf(manufacturer) < 0) {\n      description.push('on ' + manufacturer);\n    }\n    // Append product to description.\n    if (product) {\n      description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product);\n    }\n    // Parse the OS into an object.\n    if (os) {\n      data = / ([\\d.+]+)$/.exec(os);\n      isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/';\n      os = {\n        'architecture': 32,\n        'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os,\n        'version': data ? data[1] : null,\n        'toString': function() {\n          var version = this.version;\n          return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : '');\n        }\n      };\n    }\n    // Add browser/OS architecture.\n    if ((data = /\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(arch)) && !/\\bi686\\b/i.test(arch)) {\n      if (os) {\n        os.architecture = 64;\n        os.family = os.family.replace(RegExp(' *' + data), '');\n      }\n      if (\n          name && (/\\bWOW64\\b/i.test(ua) ||\n          (useFeatures && /\\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\\bWin64; x64\\b/i.test(ua)))\n      ) {\n        description.unshift('32-bit');\n      }\n    }\n    // Chrome 39 and above on OS X is always 64-bit.\n    else if (\n        os && /^OS X/.test(os.family) &&\n        name == 'Chrome' && parseFloat(version) >= 39\n    ) {\n      os.architecture = 64;\n    }\n\n    ua || (ua = null);\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The platform object.\n     *\n     * @name platform\n     * @type Object\n     */\n    var platform = {};\n\n    /**\n     * The platform description.\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.description = ua;\n\n    /**\n     * The name of the browser's layout engine.\n     *\n     * The list of common layout engines include:\n     * \"Blink\", \"EdgeHTML\", \"Gecko\", \"Trident\" and \"WebKit\"\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.layout = layout && layout[0];\n\n    /**\n     * The name of the product's manufacturer.\n     *\n     * The list of manufacturers include:\n     * \"Apple\", \"Archos\", \"Amazon\", \"Asus\", \"Barnes & Noble\", \"BlackBerry\",\n     * \"Google\", \"HP\", \"HTC\", \"LG\", \"Microsoft\", \"Motorola\", \"Nintendo\",\n     * \"Nokia\", \"Samsung\" and \"Sony\"\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.manufacturer = manufacturer;\n\n    /**\n     * The name of the browser/environment.\n     *\n     * The list of common browser names include:\n     * \"Chrome\", \"Electron\", \"Firefox\", \"Firefox for iOS\", \"IE\",\n     * \"Microsoft Edge\", \"PhantomJS\", \"Safari\", \"SeaMonkey\", \"Silk\",\n     * \"Opera Mini\" and \"Opera\"\n     *\n     * Mobile versions of some browsers have \"Mobile\" appended to their name:\n     * eg. \"Chrome Mobile\", \"Firefox Mobile\", \"IE Mobile\" and \"Opera Mobile\"\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.name = name;\n\n    /**\n     * The alpha/beta release indicator.\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.prerelease = prerelease;\n\n    /**\n     * The name of the product hosting the browser.\n     *\n     * The list of common products include:\n     *\n     * \"BlackBerry\", \"Galaxy S4\", \"Lumia\", \"iPad\", \"iPod\", \"iPhone\", \"Kindle\",\n     * \"Kindle Fire\", \"Nexus\", \"Nook\", \"PlayBook\", \"TouchPad\" and \"Transformer\"\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.product = product;\n\n    /**\n     * The browser's user agent string.\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.ua = ua;\n\n    /**\n     * The browser/environment version.\n     *\n     * @memberOf platform\n     * @type string|null\n     */\n    platform.version = name && version;\n\n    /**\n     * The name of the operating system.\n     *\n     * @memberOf platform\n     * @type Object\n     */\n    platform.os = os || {\n\n      /**\n       * The CPU architecture the OS is built for.\n       *\n       * @memberOf platform.os\n       * @type number|null\n       */\n      'architecture': null,\n\n      /**\n       * The family of the OS.\n       *\n       * Common values include:\n       * \"Windows\", \"Windows Server 2008 R2 / 7\", \"Windows Server 2008 / Vista\",\n       * \"Windows XP\", \"OS X\", \"Ubuntu\", \"Debian\", \"Fedora\", \"Red Hat\", \"SuSE\",\n       * \"Android\", \"iOS\" and \"Windows Phone\"\n       *\n       * @memberOf platform.os\n       * @type string|null\n       */\n      'family': null,\n\n      /**\n       * The version of the OS.\n       *\n       * @memberOf platform.os\n       * @type string|null\n       */\n      'version': null,\n\n      /**\n       * Returns the OS string.\n       *\n       * @memberOf platform.os\n       * @returns {string} The OS string.\n       */\n      'toString': function() { return 'null'; }\n    };\n\n    platform.parse = parse;\n    platform.toString = toStringPlatform;\n\n    if (platform.version) {\n      description.unshift(version);\n    }\n    if (platform.name) {\n      description.unshift(name);\n    }\n    if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) {\n      description.push(product ? '(' + os + ')' : 'on ' + os);\n    }\n    if (description.length) {\n      platform.description = description.join(' ');\n    }\n    return platform;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export platform.\n  var platform = parse();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like the following:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose platform on the global object to prevent errors when platform is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    root.platform = platform;\n\n    // Define as an anonymous module so platform can be aliased through path mapping.\n    define(function() {\n      return platform;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n  else if (freeExports && freeModule) {\n    // Export for CommonJS support.\n    forOwn(platform, function(value, key) {\n      freeExports[key] = value;\n    });\n  }\n  else {\n    // Export to the global object.\n    root.platform = platform;\n  }\n}.call(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/platform/platform.js\n// module id = 45\n// module chunks = 17","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/webpack/buildin/global.js\n// module id = 46\n// module chunks = 17","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/webpack/buildin/module.js\n// module id = 47\n// module chunks = 17","'use strict';\r\n\r\nvar object_methods = require('lib/core/object');\r\n\r\n(function() {\r\n\r\n  Object.getOwnPropertyNames(object_methods).forEach(function(method) {\r\n    if (!Object.prototype.hasOwnProperty(method)) {\r\n      Object.defineProperty(Object.prototype, method, {\r\n        enumerable: false,\r\n        configurable: false,\r\n        writable: true,\r\n        value: object_methods[method]\r\n      });\r\n    }\r\n  });\r\n\r\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/common/initialize.js\n// module id = 48\n// module chunks = 17","'use strict';\r\n\r\nvar UtilsShuffle = require('./UtilsShuffle');\r\n\r\nvar CB_Shuffle = {};\r\n\r\nCB_Shuffle._getCBContainer = function(jq) {\r\n  var cbContainer = jq.find('[data-block_type=\"cb-question\"]');\r\n\r\n  if (cbContainer.length > 0) {\r\n    return cbContainer;\r\n  }\r\n  return null;\r\n};\r\n\r\nCB_Shuffle._shuffleChoices = function($container) {\r\n  var labels = $container.find('label').remove();\r\n\r\n  UtilsShuffle.shuffleArrays(labels, function(shuffArr) {\r\n    labels = shuffArr;\r\n  });\r\n  $container.find('fieldset').append(labels);\r\n};\r\n\r\nCB_Shuffle.shuffle = function(jq) {\r\n  if (!jq) {\r\n    return false;\r\n  }\r\n  var containerCB = this._getCBContainer(jq);\r\n\r\n  if (containerCB) {\r\n    this._shuffleChoices(containerCB);\r\n  }\r\n};\r\n\r\nmodule.exports = CB_Shuffle;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/CB_Shuffle.js\n// module id = 49\n// module chunks = 17","'use strict';\r\n\r\nvar dom = require('lib/dom');\r\n\r\nfunction makeTablesAccessible(fragment) {\r\n  var tables, table, rows, new_table_fragment;\r\n\r\n  fragment = fragment || document;\r\n\r\n  tables = dom.qa('table', fragment);\r\n\r\n  Array.prototype.forEach.call(tables, function makeTableAccessible(orig_table, table_idx) {\r\n    new_table_fragment = dom.cf();\r\n    dom.append(orig_table.cloneNode(true), new_table_fragment);\r\n    table = dom.q('table', new_table_fragment);\r\n\r\n    // Each rows in TBODY\r\n    rows = dom.qa('tr', table);\r\n\r\n    Array.prototype.forEach.call(rows, function processTableRow(row, row_idx) {\r\n      Array.prototype.forEach.call(row.children, function(cell, cell_idx) {\r\n        // Only for <th>\r\n        if (cell.nodeName.toLowerCase() === 'th') {\r\n          if (row_idx == 0) {\r\n            cell.setAttribute('scope', 'col');\r\n            if (cell.getAttribute('id') == null) {\r\n              cell.setAttribute('id', 'table-' + table_idx + '-col-' + cell_idx + '-header');\r\n            }\r\n          }\r\n          else if (cell_idx == 0 && row_idx > 0) {\r\n            cell.setAttribute('scope', 'row');\r\n            if (cell.getAttribute('id') == null) {\r\n              cell.setAttribute('id', 'table-' + table_idx + '-row-' + row_idx + '-header');\r\n            }\r\n          }\r\n        }\r\n      });\r\n    });\r\n\r\n    orig_table.parentNode.replaceChild(new_table_fragment, orig_table);\r\n  });\r\n}\r\n\r\nfunction _makeFieldInTableAccessible(el) {\r\n  var labelledby = '';\r\n\r\n  // Remove native labels\r\n  Array.prototype.forEach.call(el.labels, function(label) {\r\n    dom.remove(label);\r\n  });\r\n\r\n  var $row, $cell, row_header, col_header, row_position;\r\n\r\n  $cell = $(el).parents('td');\r\n  $row = $(el).parents('tr');\r\n\r\n  row_header = $row.find('th').get(0);\r\n\r\n  row_position = Array.prototype.indexOf.call($row.find('th, td'), $cell.get(0));\r\n  col_header = $(el).parents('table').find('th').get(row_position);\r\n\r\n\r\n  if (col_header && col_header.getAttribute('id')) {\r\n    labelledby += col_header.getAttribute('id');\r\n  }\r\n\r\n  if (row_header && row_header.getAttribute('id')) {\r\n    labelledby +=  ' ' + row_header.getAttribute('id');\r\n  }\r\n\r\n  if (labelledby.length > 0) {\r\n    el.removeAttribute('aria-label');\r\n    el.setAttribute('aria-labelledby', labelledby);\r\n  }\r\n}\r\n\r\nfunction makeFieldsInTableAccessible(box) {\r\n  var fields;\r\n\r\n  box = box | document;\r\n\r\n  fields = dom.qa('input, select', box);\r\n  Array.prototype.forEach.call(fields, function(f) {\r\n    if ($(f).parents('td').get(0)) {\r\n      _makeFieldInTableAccessible(f);\r\n    }\r\n  });\r\n}\r\n\r\nmodule.exports = {\r\n  makeTablesAccessible: makeTablesAccessible,\r\n  makeFieldsInTableAccessible: makeFieldsInTableAccessible\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/aria/index.js\n// module id = 50\n// module chunks = 17","'use strict';\r\n\r\nfunction QueryMixin() {}\r\n\r\nQueryMixin.prototype.finish_inline_query = function(correct_answer, mode) {\r\n  // if mode is \"delivery\" (default) or this.md.no_correct_answer is true,\r\n  // don't show this at all\r\n  if (mode == 'delivery' || mode == '' || mode == null || this.md.no_correct_answer == \"true\") {\r\n    return \"\";\r\n  }\r\n\r\n  var s = \"\";\r\n\r\n    // image that indicates if the query is correct or incorrect\r\n  if (mode == 'review' || mode == 'review_correct_incorrect') {\r\n    var fbclass, alt;\r\n\r\n    if (this.isCorrect()) {\r\n      fbclass = 'query_correct_feedback_span';\r\n      alt = 'Correct';\r\n\r\n    }\r\n    else {\r\n      fbclass = 'query_incorrect_feedback_span';\r\n      alt = 'Incorrect';\r\n    }\r\n\r\n    s += \"<span class='\" + fbclass + \"'>&nbsp;</span><span class='hidden-equation-text'>\" + alt + \" </span>\";\r\n      //s += \"<img class='query_correct_incorrect_icon' src='\" + UI_Elements.relative_file_url(img_src) + \"' alt='\" + alt + \"'>\";\r\n  }\r\n\r\n    // correct answer -- we show this in both review and preview mode,\r\n    // but not in review_correct_incorrect mode\r\n    // also don't show it if there *is* no correct answer\r\n  if (mode != 'review_correct_incorrect' && this.md.no_correct_answer != \"true\") {\r\n    s += '<span class=\"query_correct_answer_span\">' + correct_answer + '</span>';\r\n  }\r\n\r\n  s += \"</span>\";\r\n\r\n  return s;\r\n};\r\n\r\nmodule.exports = QueryMixin;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/shared/digfir/mixins/QueryMixin.js\n// module id = 51\n// module chunks = 17","'use strict';\r\n\r\nvar common = require('common');\r\nvar dom = require('lib/dom');\r\nvar UtilsShuffle = require( 'shared/UtilsShuffle' );\r\nvar aria = require('shared/aria/texts.yml');\r\n\r\nvar QueryMixin = require('shared/digfir/mixins/QueryMixin'),\r\n  Query;\r\n\r\n// NOTE: Replace methods of parent Query object\r\nDD_Query.mixin([ QueryMixin ]);\r\n\r\nQuery = DD_Query.extend({\r\n  parseSource: function() {\r\n    this._super.apply(this, arguments);\r\n\r\n    if (UtilsShuffle.currentQuestionIsRandomize()) {\r\n      var shuffleArr = UtilsShuffle.shuffleArrays(this.choices, function(choices) {\r\n        this.choices = choices;\r\n      }.bind(this));\r\n\r\n      this.correct_answer_index = shuffleArr.indexOf(this.correct_answer_index);\r\n    }\r\n  },\r\n  getHTML: function(mode) {\r\n    var html = \"\", attrs;\r\n\r\n\t\t// DD's never have query text\r\n\t\t// Start a nobr tag for the item\r\n    // html = '<span class=\"query_dd_select_span\" aria-label=\"' + aria.global.inline_dd.label + '\">';\r\n\r\n\t\t// if we're in preview mode or\r\n\t\t// (a student answer has been given and we're not in review_correct_incorrect mode),\r\n\t\t// or the student got it correct\r\n\t\t// disable the select\r\n    var disabled = \"\";\r\n\r\n    if (mode == 'preview' || (mode != 'review_correct_incorrect' && this.user_answer_index != null) || this.isCorrect()) {\r\n      disabled = \"disabled\";\r\n    }\r\n\r\n    // If we are in the table make different label\r\n    var $parent = this.jq.parent();\r\n    var labelledBy = '';\r\n    var label_id;\r\n    var question_index = this.parent_question.index;\r\n\r\n    if ( $parent.get( 0 ).nodeName.toLowerCase() === 'td' ) {\r\n      labelledBy = ' aria-labelledby=\"fb_' + question_index + '_header_label_' + $parent.index() +\r\n                   ' fb_' + question_index + '_label_' + this.jq.parents( 'tr' ).index() + '\"';\r\n    }\r\n    else {\r\n      label_id = 'query_label_' + question_index + '_' + this.query_index;\r\n\r\n      if (this.query_text.length == 0) {\r\n        html += '<label id=\"' + label_id + '\" class=\"hidden-equation-text\" for=\"query_answer_' + this.query_index + '\">' + aria.global.inline_dd.label + '</label>';\r\n      }\r\n      else {\r\n        html += '<label id=\"' + label_id + '\" class=\"\" for=\"query_answer_' + this.query_index + '\">' + this.query_text + '</label> ';\r\n      }\r\n\r\n      if (this.parent_question.md.question_text_idx) {\r\n        labelledBy = ' aria-labelledby=\"' + this.parent_question.md.question_text_idx + ' ' + label_id + '\"';\r\n      }\r\n      else {\r\n        labelledBy = ' aria-labelledby=\"' + label_id + '\"';\r\n      }\r\n    }\r\n\r\n    html += '<select class=\"query_dd_select\" id=\"query_answer_' + this.query_index + '\" ' + disabled + labelledBy + '>'\r\n\r\n\t\t\t+ '<option value=\"-1\">Choose your answer</option>';\r\n\r\n    for (var j = 0; j < this.choices.length; ++j) {\r\n      var index = this.choice_order[j];\r\n      var selected = \"\";\r\n\t\t\t// select the student answer, unless we're in preview mode\r\n\r\n      if (this.user_answer_index == index && mode != 'preview') {\r\n        selected = \"selected\";\r\n      }\r\n      html += '<option value=\"' + index + '\" ' + selected + '>' + this.choices[index] + '</option>';\r\n    }\r\n    html += '</select>';\r\n    html += this.finish_inline_query(this.choices[this.correct_answer_index], mode);\r\n\r\n\t\t// Close off the nobr tag for the item\r\n    // html += '</span>';\r\n\r\n    attrs = common.extractMetadataAttrs(this.md);\r\n    html = dom.createHTML(html);\r\n    common.setAdditionalAttrs(attrs, 'select', html);\r\n\r\n    return html;\r\n  },\r\n  /**\r\n   * It is used only if we are in the table, rare case\r\n   */\r\n  postInit: function() {\r\n    // If we are in the table make correct structure\r\n    var $parent = this.jq.parent();\r\n    var question_index = this.parent_question.index;\r\n\r\n    if ( $parent.get( 0 ).nodeName.toLowerCase() === 'td' ) {\r\n      var tr = $parent.parent();\r\n\r\n      var firstChild = tr.children().eq(0);\r\n      if ( firstChild[ 0 ] !== $parent[ 0 ] ) {\r\n        firstChild.attr( {\r\n          id: 'fb_' + question_index + '_label_' + this.jq.parents( 'tr' ).index()\r\n        } );\r\n      }\r\n\r\n      var th = this.jq.parents( 'table' ).find( 'tr' ).eq( 0 ).find( 'th' );\r\n      th.each( function( i ) {\r\n        $( this ).attr( {\r\n          id: 'fb_' + question_index + '_header_label_' + i,\r\n          scope: 'col'\r\n        } );\r\n      } );\r\n    }\r\n  }\r\n});\r\n\r\nmodule.exports = Query;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/DD_Query.js\n// module id = 52\n// module chunks = 17","/**\r\n * Created by Abdulnasyrova on 20.04.2017.\r\n */\r\n\r\nvar platform = require('lib/utils').run_on;\r\n\r\nvar Query = Essay_Query.extend({\r\n  /**\r\n   * Get correct HTML for query text and set id for following use\r\n   * @returns {string} Html for query text\r\n   */\r\n  query_text_html: function() {\r\n    if (this.query_text !== '' && this.md._hide_query_text !== 'true') {\r\n      // Replace newlines with <br />\r\n      var text = jQuery.trim(this.query_text).replace(/\\n/g, '<br>');\r\n      var id = 'query_text_' + this.query_index;\r\n\r\n      return '<div class=\"query_text\" id=\"' + id + '\">' + text + '</div>';\r\n    } else {\r\n      return '';\r\n    }\r\n  },\r\n  /**\r\n   * Add aria-labelledby for textarea\r\n   * @param {string} mode\r\n   * @returns {string} Html for the question\r\n   */\r\n  getHTML: function(mode) {\r\n    // Start with the query text, if there\r\n    var html = this.query_text_html();\r\n    var val = '';\r\n    var disabled = '';\r\n\r\n    if (this.userHasAnswered() && mode !== 'preview') {\r\n      // Make sure we convert double quotes to &#34; for placement in 'value=\"xxx\"' attributes\r\n      // Convert breaks to newlines\r\n      val = this.user_answer.replace(/<br *(\\/)?>/g, '\\n');\r\n\r\n      // Also disable the input if we're not in review_correct_incorrect mode\r\n      disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';\r\n    }\r\n\r\n    var queryTextId = 'query_text_' + this.query_index;\r\n    var feedbackId = 'essay_question_evaluation_feedback_' + this.query_index;\r\n\r\n    // Add short label for mobile devices\r\n    var labelledBy = platform.mobile ? ' aria-label=\"Enter your answer for the question\" aria-labelledby=\"' + feedbackId + '\"' :\r\n    ' aria-labelledby=\"' + feedbackId + ' ' + queryTextId + '\"';\r\n\r\n    html += '<textarea id=\"query_answer_' + this.query_index + '\" class=\"query_essay_ta\" ' + disabled + labelledBy + '>' + val + '</textarea>';\r\n\r\n    return html;\r\n  },\r\n  /**\r\n   * Fix typo evaluation\r\n   * @param {string} html\r\n   */\r\n  set_evaluation_feedback: function(html) {\r\n    // Set message below the textarea\r\n    html = '<div class=\"essay_question_evaluation_feedback\" id=\"essay_question_evaluation_feedback_' + this.query_index + '\">' + html + '</div>';\r\n    $('#essay_question_evaluation_feedback_' + this.query_index).remove();\r\n    $('#query_answer_' + this.query_index).after(html);\r\n\r\n    if (platform.ios) {\r\n      player.shadow_speech.talk('');\r\n      player.shadow_speech.talk($(html).text());\r\n    }\r\n  }\r\n});\r\n\r\nmodule.exports = Query;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/Essay_Query.js\n// module id = 53\n// module chunks = 17","'use strict';\r\n\r\nvar platform = require( 'lib/utils' ).run_on;\r\nvar dom = require('lib/dom');\r\nvar common = require('common');\r\n\r\n/**\r\n * Created by Abdulnasyrova on 21.04.2017.\r\n */\r\nvar Query = FB_Query.extend( {\r\n  /**\r\n   * Get correct HTML for query text and set id for following use\r\n   * @returns {string} Html for query text\r\n   */\r\n  query_text_html: function() {\r\n    if ( this.query_text != '' && this.md._hide_query_text !== 'true' ) {\r\n      // Replace newlines with <br />\r\n      var text = jQuery.trim( this.query_text ).replace( /\\n/g, '<br>' );\r\n      var id = 'query_text_' + this.query_index;\r\n\r\n      // Set id for use it to associate query text with input radios\r\n      return '<div id=\"' + id + '\" class=\"query_text\">' + text + '</div>';\r\n    }\r\n    else {\r\n      return '';\r\n    }\r\n  },\r\n  getHTML: function( mode ) {\r\n    // Add the query text, if there is any\r\n    var html = this.query_text_html(),\r\n      attrs;\r\n\r\n    // Determine how big the response blank should be, unless one was specified\r\n    var blank_size = this.md.blank_size;\r\n\r\n    if ( !blank_size || isNaN( blank_size * 1 ) ) {\r\n      blank_size = (('' + this.correct_answer).length + 2);\r\n    }\r\n\r\n    // If student hasn't answered or we're in preview mode, use an empty string for the input value\r\n    var val, disabled;\r\n\r\n    if ( !this.userHasAnswered() || mode == 'preview' ) {\r\n      val = '';\r\n      disabled = '';\r\n    }\r\n    else {\r\n      // Convert double quotes to &#34;\r\n      val = this.user_answer.replace( /\\\"/g, '&#34;' );\r\n\r\n      // Disable the input in this case, if we're not in review_correct_incorrect mode or if the user got it right\r\n      if ( mode !== 'review_correct_incorrect' || this.isCorrect() ) {\r\n        disabled = 'disabled';\r\n      }\r\n    }\r\n\r\n    var textId = 'query_text_' + this.query_index;\r\n    var labelledBy = '';\r\n\r\n    // If we are in the table make different label\r\n    var $parent = this.jq.parent();\r\n\r\n    if ( $parent.get( 0 ).nodeName.toLowerCase() === 'td' ) {\r\n      var question_index = this.parent_question.index;\r\n\r\n      labelledBy = ' aria-labelledby=\"fb_' + question_index + '_header_label_' + $parent.index() +\r\n                   ' fb_' + question_index + '_label_' + this.jq.parents( 'tr' ).index() + '\"';\r\n    }\r\n    else {\r\n      // Add short label for mobile devices\r\n      labelledBy = platform.mobile ? ' aria-label=\"Enter your answer for the question\"' : ' aria-labelledby=\"' + textId + '\"';\r\n    }\r\n\r\n    html += '<span style=\"white-space:nowrap\">' +\r\n      '<input type=\"text\" class=\"query_fb_input\" id=\"query_answer_' + this.query_index + '\" size=\"' + blank_size + '\" value=\"' + val + '\" ' +\r\n      disabled + labelledBy + '/>';\r\n    html += this.finish_inline_query( this.correct_answer, mode );\r\n    html += '</span>';\r\n\r\n    attrs = common.extractMetadataAttrs(this.md);\r\n    html = dom.createHTML(html);\r\n    common.setAdditionalAttrs(attrs, 'input', html);\r\n\r\n    return html;\r\n  },\r\n  /**\r\n   * It is used only if we are in the table, rare case\r\n   */\r\n  postInit: function() {\r\n    // If we are in the table make correct structure\r\n    var $parent = this.jq.parent();\r\n    var question_index = this.parent_question.index;\r\n\r\n    if ( $parent.get( 0 ).nodeName.toLowerCase() === 'td' ) {\r\n      var tr = $parent.parent();\r\n\r\n      var firstChild = tr.children().eq(0);\r\n\r\n      if ( firstChild[ 0 ] !== $parent[ 0 ] ) {\r\n        firstChild.attr( {\r\n          id: 'fb_' + question_index + '_label_' + this.jq.parents( 'tr' ).index()\r\n        } );\r\n      }\r\n\r\n      var th = this.jq.parents( 'table' ).find( 'tr' ).eq( 0 ).find( 'th' );\r\n\r\n      th.each( function( i ) {\r\n        $( this ).attr( {\r\n          id: 'fb_' + question_index + '_header_label_' + i,\r\n          scope: 'col'\r\n        } );\r\n      } );\r\n    }\r\n  }\r\n} );\r\n\r\nmodule.exports = Query;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/FB_Query.js\n// module id = 54\n// module chunks = 17","'use strict';\r\n\r\nvar common = require( 'common' );\r\nvar ConcreteActivity = require( 'subtype/digfir/Activity' );\r\nvar ConcreteFigures = require( 'shared/digfir/AYS_Figures' );\r\nvar KEY_CODES = require( 'mhe_base/common' ).KEYCODES;\r\nvar ShadowSpeech = require('lib/ada_utils/ShadowSpeech');\r\n\r\nvar Player_work_it_out = Player.extend( {\r\n  activity_title: null,\r\n  activity_type: null,\r\n\r\n  // it is supposed to be only one video for section\r\n  init_video: function( section ) {\r\n    var video = section.jq[ 0 ].querySelector( \"[data-class=video]\" );\r\n\r\n    if ( video ) {\r\n      section.hasVideo = true;\r\n      section.video = {\r\n        jq: $( video ),\r\n        id: $( video ).data( 'figure-id' ),\r\n        isViewed: false,\r\n        hasTranscription: false\r\n      };\r\n\r\n      $( video ).attr( 'tabindex', '0' );\r\n      $( video ).find( 'object' ).attr( 'tabindex', '-1' );\r\n\r\n      this.init_video_transcription( section );\r\n      this.video_add_events( section.video );\r\n      this.hide_video( section );\r\n    }\r\n  },\r\n\r\n  init_video_transcription: function( section ) {\r\n    var video_transcription = section.jq[ 0 ].querySelector( \"[data-block_type=video_transcription]\" );\r\n\r\n    if ( video_transcription ) {\r\n      section.video.hasTranscription = true;\r\n      section.video.transcription = {\r\n        jq: $( video_transcription ),\r\n        text: '<!DOCTYPE html>\\n<html lang=\"en\">' + $( video_transcription ).find( '.transcript-text' ).html() + '</html>'\r\n      };\r\n    }\r\n  },\r\n\r\n  video_add_events: function( video ) {\r\n    if ( video.hasTranscription ) {\r\n      video.transcription.jq.find( '.transcript-button' ).click( function() {\r\n        var transcriptWindow = window.open( \"\", \"_blank\" );\r\n\r\n        transcriptWindow.document.write( video.transcription.text );\r\n      } );\r\n    }\r\n  },\r\n\r\n  show_video: function( section ) {\r\n    if ( section.hasVideo ) {\r\n      section.video.jq.show();\r\n      section.video.hasTranscription && section.video.transcription.jq.show();\r\n    }\r\n  },\r\n\r\n  hide_video: function( section ) {\r\n    if ( section.hasVideo ) {\r\n      section.video.jq.hide();\r\n      section.video.hasTranscription && section.video.transcription.jq.hide();\r\n    }\r\n  },\r\n\r\n  update_section_status: function() {\r\n    if ( this.section_currently_showing != null && this.last_available_section <= this.section_currently_showing ) {\r\n      var s = this.get_current_section();\r\n\r\n      s.all_questions_answered = true;\r\n\r\n      // if the current section has any questions, see if they've all been answered\r\n      var qs_to_check = [];\r\n\r\n      s.jq.find( \"[data-type=question]\" ).each( function( index, element ) {\r\n        var q_index = $( element ).attr( \"data-question_index\" );\r\n        var question = player.activity.questions[ q_index ];\r\n\r\n        s.all_questions_answered = s.all_questions_answered && question.is_complete();\r\n        if ( question.question_sequence != null ) {\r\n          for ( var i = 0; i < qs_to_check.length; ++i ) {\r\n            if ( qs_to_check[ i ] == question.question_sequence ) {\r\n              break;\r\n            }\r\n          }\r\n          if ( i == qs_to_check.length ) {\r\n            qs_to_check.push( question.question_sequence );\r\n          }\r\n        }\r\n      } );\r\n\r\n      // now check question sequences to make sure they're done too\r\n      s.all_question_sequences_completed = true;\r\n      for ( var i = 0; i < qs_to_check.length; ++i ) {\r\n        s.all_question_sequences_completed = s.all_question_sequences_completed && (qs_to_check[ i ].sequence_complete == \"complete\");\r\n      }\r\n\r\n      if ( s.all_questions_answered && s.all_question_sequences_completed ) {\r\n        this.last_available_section = this.section_currently_showing + 1;\r\n        s.isComplete = true;\r\n      }\r\n    }\r\n  },\r\n\r\n  show_completion_dialog: function() {\r\n    var html = \"Congratulations! You have completed this activity.\";\r\n\r\n    Standard_Dialog.alert( html, { title: \"\", width: 400 } );\r\n  },\r\n\r\n  show_video_dialog: function() {\r\n    var html = \"Please note: You must watch the video in order to move on to the next slide.\";\r\n\r\n    Standard_Dialog.alert( html, { title: \"\", width: 400 } );\r\n  },\r\n\r\n  show_incompleteness_dialog: function() {\r\n    var html = \"You must complete every question on the slide to move on to the next slide.\";\r\n\r\n    Standard_Dialog.alert( html, { title: \"Message\", width: 400 } );\r\n  },\r\n\r\n  show_next_section: function() {\r\n    var section = this.get_current_section();\r\n\r\n    if ( section.isComplete || window.__force_next_section ) {\r\n      this.show_section( this.section_currently_showing + 1 );\r\n    }\r\n    else {\r\n      var questionsIsAnswered = section.all_questions_answered && section.all_question_sequences_completed;\r\n\r\n      questionsIsAnswered ? this.show_video_dialog() : this.show_incompleteness_dialog();\r\n    }\r\n  },\r\n\r\n  show_prev_section: function() {\r\n    this.show_section( this.section_currently_showing - 1 );\r\n  },\r\n\r\n  show_section: function(section_to_show) {\r\n    if (this.section_currently_showing === section_to_show) {\r\n      return;\r\n    }\r\n    var direction = 'right';\r\n    if (section_to_show === 'previous') {\r\n      section_to_show = this.section_currently_showing - 1;\r\n      direction = 'left';\r\n    } else if (section_to_show == 'next') {\r\n      section_to_show = this.section_currently_showing + 1;\r\n    }\r\n\r\n    if (section_to_show == null || isNaN(section_to_show) || section_to_show < 0 || section_to_show >= this.sections.length) {\r\n      return;\r\n    }\r\n\r\n    if (this.md.sequenced_sections === 'true' && section_to_show > this.last_available_section) {\r\n      //var $tab = player.tabs.eq(section_to_show);\r\n\r\n      // Let instructors through\r\n      if (player.activity.is_instructor()) {\r\n        Standard_Dialog.alert('Please note: Students need to read and complete each section of the activity before moving on to the next section.  ' +\r\n          'Instructors, however, can skip around between sections as they choose.', { title: \"Warning\", width: 400 });\r\n      } else {\r\n        Standard_Dialog.alert(this.md.section_sequence_message, {});\r\n\r\n        return;\r\n      }\r\n    }\r\n\r\n    this.show_section_animate(section_to_show, direction);\r\n\r\n    // Process iframes for the section, unless all were preloaded\r\n    if (player.md.preload_all_iframes !== 'true') {\r\n      this.figures.process_iframes(this.get_current_section().jq);\r\n    }\r\n\r\n    this.update_section_status();\r\n    this.update_navigation();\r\n  },\r\n\r\n  show_section_from_toc: function( section_to_show ) {\r\n    // set focus on content button\r\n    window.Standard_Dialog.activeElement = $( '#content_button' );\r\n    window.Standard_Dialog.close( true );\r\n\r\n    if ( this.section_currently_showing != section_to_show ) {\r\n      this.show_section( section_to_show );\r\n    }\r\n  },\r\n\r\n  hide_section: function( section ) {\r\n    'use strict';\r\n\r\n    if ( section && section.md.section_type && window.mheContpract[ section.md.section_type ] ) {\r\n      if ( window.mheContpract[ section.md.section_type ].hide ) {\r\n        window.mheContpract[ section.md.section_type ].hide( section );\r\n      }\r\n    }\r\n  },\r\n\r\n  set_video: function( playerID, videoID, pauseAfterLoad ) {\r\n    //highlight the button\r\n    $( \".select_video_button\" ).removeClass( \"ui-state-focus\" );\r\n    $( \"#\" + playerID + \"_\" + videoID ).addClass( \"ui-state-focus\" );\r\n\r\n    if ( !player.videoIsReady[ playerID ] ) {\r\n      //safe_log(\"video not ready.. going to settimeout\");\r\n      setTimeout( function() {\r\n        player.set_video( playerID, videoID, pauseAfterLoad );\r\n      }, 100 );\r\n      return false;\r\n    }\r\n    //safe_log(\"inside load video\");\r\n    var vidplayer = brightcove.api.getExperience( playerID );\r\n    var playerModule = vidplayer.getModule( brightcove.api.modules.APIModules.VIDEO_PLAYER );\r\n    //safe_log(\"got player module\");\r\n\r\n    if ( pauseAfterLoad ) {\r\n      playerModule.cueVideoByID( videoID );\r\n    }\r\n    else {\r\n      playerModule.loadVideoByID( videoID );\r\n    }\r\n  },\r\n\r\n  show_section_animate: function( section_to_show ) {\r\n    if ( this.section_currently_showing != null ) {\r\n      this.get_current_section_jq().hide();\r\n    }\r\n\r\n    this.section_currently_showing = section_to_show;\r\n\r\n    var section = this.sections[ section_to_show ];\r\n\r\n    section.jq.fadeIn( 300 );\r\n\r\n    player.shadow_speech.talk('');\r\n    player.shadow_speech.talk(\"Page \" + (section_to_show + 1) + \" of \" + this.sections.length + \" \");\r\n\r\n    if ( this.section_currently_showing == 0 ) {\r\n      $( \"#previous_button\" ).hide();\r\n    }\r\n    else {\r\n      $( \"#previous_button\" ).show();\r\n    }\r\n\r\n    if ( this.section_currently_showing == (this.sections.length - 1) ) {\r\n      $( \"#next_button\" ).hide();\r\n    }\r\n    else {\r\n      $( \"#next_button\" ).show();\r\n    }\r\n\r\n    //apply click handler to termref items in the section - the global call done on init doesn't get the content in queries\r\n    player.glossary.set_click_event_for_terms_in_section( this.get_current_section_jq() );\r\n\r\n    // scroll to top\r\n    window.scrollTo( 0, 0 );\r\n  },\r\n\r\n  show_navigation: function() {\r\n    var toc_icon = \"<img aria-hidden='true' src='http://digfir.macmillanusa.com/asset/slide_activity_default/toc_icon.png'>\";\r\n    var $manuscriptNode = $( '#manuscript' );\r\n\r\n    // Header\r\n    var html = \"<header id='header'>\" +\r\n      \"<div class='header_title'>\" +\r\n      \"<div id='activity_type' role='heading' aria-level='1'>\" + this.activity_type + \"</div>\" +\r\n      \"<div id='activity_title' role='heading' aria-level='2'>\" + this.activity_title + \"</div>\" +\r\n      \"</div>\" +\r\n      \"<button id='content_button' onclick='player.show_toc();'>\" + toc_icon + \"TABLE OF CONTENTS</button>\" +\r\n      \"</header>\";\r\n\r\n    $manuscriptNode.prepend( html );\r\n\r\n    html = \"<nav id='navigation' role='navigation'>\" +\r\n      \"<button id='previous_button' aria-label='Previous Question' onclick='player.show_prev_section();'></button>\" +\r\n      \"<button id='next_button' aria-label='Next Question' onclick='player.show_next_section();'></button>\" +\r\n    \"</nav>\";\r\n\r\n    $manuscriptNode.append( html );\r\n  },\r\n\r\n  show_toc: function() {\r\n    var html = '';\r\n\r\n    for ( var i = 0; i < this.sections.length; i++ ) {\r\n      var title = this.sections[ i ].title;\r\n\r\n      // Check whether it is available\r\n      var disabled = (this.md.sequenced_sections === 'true' && i > this.last_available_section);\r\n      var className = disabled ? 'toc_section_not_available' : '';\r\n\r\n      // Check action on disabled only if it is instructor\r\n      var action = (!disabled || player.activity.is_instructor()) ? 'onclick=\"player.toc_show_section(' + i + ')\"' : '';\r\n\r\n      html += '<li class=\"' + className + '\">' +\r\n        '<a tabindex=\"0\" role=\"link\" class=\"toc_section_title\" ' + action + ' aria-disabled=\"' + (disabled ? 'true' : 'false') + '\">' + title +\r\n        '</a></li>';\r\n    }\r\n\r\n    // Wrap in list\r\n    html = '<div id=\"toc_dialog\">' +\r\n      '<p id=\"toc_head\">Click on a slide to view it. Note: Gray slides are not accessible until preceding slides have' +\r\n      ' been viewed or completed.</p>' +\r\n      '<ul>' + html + '</ul></div>';\r\n\r\n    Standard_Dialog.open( html, {\r\n      from: $( '.top-banner button' ),\r\n      title: 'Table of Contents'\r\n    } );\r\n\r\n    $( '.toc_section_title' ).each( function() {\r\n      // Add action on disabled only if it is instructor\r\n      if ( !disabled || player.activity.is_instructor() ) {\r\n        $( this ).keyup( function( e ) {\r\n          var key = e.keyCode || e.which;\r\n          if ( key === KEY_CODES.SPACE ) {\r\n            $( this ).click();\r\n          }\r\n        } );\r\n\r\n        $( this ).keydown( function( e ) {\r\n          var key = e.keyCode || e.which;\r\n          if ( key === KEY_CODES.SPACE ) {\r\n            e.preventDefault();\r\n          }\r\n          if ( key === KEY_CODES.ENTER ) {\r\n            e.preventDefault();\r\n            $( this ).click();\r\n          }\r\n        } );\r\n      }\r\n    } );\r\n  },\r\n  /**\r\n   * Hide menu after click on link\r\n   * @param {number} section_to_show\r\n   */\r\n  toc_show_section: function( section_to_show ) {\r\n    // Close dialog\r\n    Standard_Dialog.close();\r\n\r\n    // Show section\r\n    player.show_section( section_to_show );\r\n  },\r\n\r\n  initialize: function() {\r\n    this._super();\r\n\r\n    var fontHTML = '<link type=\"text/css\" rel=\"stylesheet\" href=\"http://fonts.googleapis.com/css?family=Open+Sans\">';\r\n\r\n    $( \"body\" ).append( fontHTML );\r\n\r\n    this.activity_type = $( \"[key=activity_type]\" ).html();\r\n    this.activity_title = $( \"[key=activity_title]\" ).html();\r\n\r\n    this.activity = new ConcreteActivity();\r\n    this.figures = new ConcreteFigures();\r\n\r\n    player.glossary.set_click_event_for_terms_in_section = function( sectionjq ) {\r\n      $( sectionjq ).find( \"[data-type='termref']\" ).each( function( index, element ) {\r\n        var jq = $( element );\r\n\r\n        jq.unbind( \"click\" );\r\n        jq.click( function() {\r\n          player.glossary.show_definition( this );\r\n        } );\r\n      } );\r\n    };\r\n\r\n    // brb: Accessibility - set document title\r\n    document.title = \"Data Exercises \" + this.activity_title;\r\n\r\n    $( '[data-type=question]' ).attr( 'role', 'document' );\r\n\r\n    /**\r\n     * adding role=application for all rawhtml after data-type=figure\r\n     * to prevent partially reading of the previous paragraph\r\n     */\r\n    $( '[data-type=figure]' ).each( function() {\r\n      $( this ).next( '[data-type=rawhtml]' ).attr( 'role', 'application' );\r\n    } );\r\n  },\r\n\r\n  initialize_questions: function() {\r\n    var questions = this.activity.questions;\r\n\r\n    questions.forEach( function( question, index ) {\r\n      if ( index > 0 ) {\r\n        var $questionTitleNode = $( question.jq ).find( 'h3' );\r\n\r\n        $questionTitleNode.remove();\r\n\r\n      }\r\n      common.addAriaForDDFields( question.jq );\r\n    } );\r\n  },\r\n\r\n  initImageDescriptions: function() {\r\n    $('[data-block_type=\"image_description\"]').each(function() {\r\n      var html = $(this).html();\r\n      var desc_selectors = html.split(\" \");\r\n      var description_html = \"\";\r\n      for (var i = 0; i < desc_selectors.length; i++) {\r\n        var desc = $('.' + desc_selectors[i]);\r\n        if (desc.attr(\"aria-hidden\") !== \"true\") {\r\n          desc.attr(\"aria-hidden\", \"true\");\r\n        }\r\n        if (desc.attr(\"class\").indexOf(\"hidden_description\") === -1) {\r\n          desc.attr(\"class\", desc.attr(\"class\") + \" hidden_description\");\r\n        }\r\n        description_html += desc.html();\r\n      }\r\n      $(this).parent().css('text-align', 'center');\r\n\r\n      var $btn = $('<button class=\"standard_button description_button\" value=\"Submit\">Image Description</button>');\r\n      $(this).replaceWith($btn);\r\n\r\n      $btn.click(function() {\r\n        Standard_Dialog.open(description_html, { title: 'Image Description', from: $btn });\r\n      });\r\n    });\r\n  },\r\n\r\n  initialize2: function() {\r\n    this.shadow_speech = new ShadowSpeech();\r\n\r\n    this._super();\r\n    this.initialize_questions();\r\n\r\n    this.initImageDescriptions();\r\n\r\n    // If ARGA is running, note here whether or not *any* data has been saved for the user\r\n    // that is, whether a submission has been initialized\r\n    if ( window.player.ARGA_running ) {\r\n      // We know something has been stored if \"complete\" is not an empty string\r\n      if ( window.Get_ARGA_Data( \"complete\" ) !== \"\" ) {\r\n        this.ARGA_submission_initialized = true;\r\n      }\r\n    }\r\n    common.parseMathExpresions();\r\n    common.parseMetaClasses();\r\n  },\r\n\r\n  initialize_sections: function() {\r\n    'use strict';\r\n\r\n    this._super();\r\n    var section;\r\n\r\n    // Extract metadata for section, for conditional steps\r\n    for ( var j = 0; j < this.sections.length; ++j ) {\r\n      section = this.sections[ j ];\r\n      section.isComplete = false;\r\n\r\n      var $sectionTitleNode = section.jq.find( 'h2.section-title' );\r\n\r\n      section.title = \"Question \" + (j + 1) + \" of \" + this.sections.length;\r\n      $sectionTitleNode.replaceWith( \"<div class='section-title' role='heading' aria-level='3'>\" + section.title + \"</div>\" );\r\n\r\n      section.hasVideo = false;\r\n      this.init_video( section );\r\n\r\n      section.md = new window.Metadata( { lowercase_keys: true } );\r\n      section.md.add_from_jq( section.jq.children( '[data-type=metadata]' ) );\r\n\r\n      section.jq.attr( 'role', 'main' );\r\n    }\r\n\r\n    // Disable default drag\r\n    common.disableDefaultDrag();\r\n    common.activateAriaCheckUncheck();\r\n  },\r\n} );\r\n\r\nmodule.exports = Player_work_it_out;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/Player.js\n// module id = 55\n// module chunks = 17","'use strict';\r\n\r\nvar CB_Shuffle = require('shared/CB_Shuffle');\r\n\r\nvar Q = Question.extend({\r\n  init: function() {\r\n    this._super.apply(this, arguments);\r\n\r\n    if (this.md[\"randomize-choices\"]) {\r\n      CB_Shuffle.shuffle(this.jq);\r\n    }\r\n  }\r\n});\r\n\r\nmodule.exports = Q;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-base/slide_activity/digfir/Question.js\n// module id = 56\n// module chunks = 17","'use strict';\r\n\r\nvar dom = require('../../dom');\r\nvar platform = require( 'lib/utils' ).run_on;\r\n\r\nfunction ShadowSpeech(aria_live, role, atomic, root) {\r\n  var frag;\r\n\r\n  root = root || document.body;\r\n  this.live = aria_live || (platform.ie ? 'assertive' : 'polite');\r\n  this.role = role ? 'role = \"' + role + '\"' : '';\r\n  this.atomic = atomic ? 'aria-atomic = \"' + atomic + '\"' : '';\r\n\r\n  frag = dom.createHTML('<div class=\"ada-shadow-speech\"' + this.role + 'aria-live=\"' + this.live + '\"' + this.atomic + '></div>');\r\n\r\n  this._el = frag.firstChild;\r\n\r\n  dom.append(frag, root);\r\n}\r\nShadowSpeech.prototype.talk = function(some, clone) {\r\n  if (clone && some instanceof Node) {\r\n    some = some.cloneNode(true);\r\n  }\r\n\r\n  dom.clear(this._el);\r\n  dom.setHtml(some, this._el);\r\n};\r\n\r\nmodule.exports = ShadowSpeech;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-lib/ada_utils/ShadowSpeech/main.js\n// module id = 57\n// module chunks = 17","'use strict';\r\n\r\nfunction extend(mixins, save_orig) {\r\n  save_orig = save_orig || false;\r\n\r\n  var self = this;\r\n\r\n  mixins.forEach(function(mixin) {\r\n    Object.getOwnPropertyNames(mixin.prototype).forEach(function(name) {\r\n      if (name != 'constructor') {\r\n        if (save_orig) {\r\n          self.prototype['__orig_' + name] = self.prototype[name];\r\n        }\r\n        self.prototype[name] = mixin.prototype[name];\r\n      }\r\n    });\r\n  });\r\n}\r\n\r\n\r\nfunction inherit(parent) {\r\n  this.prototype = Object.create(parent);\r\n}\r\n\r\nmodule.exports = {\r\n  mixin: extend,\r\n  inherit: inherit\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/MHE-lib/core/object.js\n// module id = 58\n// module chunks = 17"],"sourceRoot":""}