{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/_admissions-transparency.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.controller.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.directives.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.service.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","angular","controller","transparencyService","this","getLocationByCode","model","selectedProgram","codes","find","v","trim","selectedCode","programChanged","item","forEach","x","getDataForCode","noData","substring","then","resp","data","programCode","document","querySelector","dataset","institution","recentEd","rankOnly","additionalOnly","rankAdditional","programs","admissionsPeriod","length","directive","restrict","replace","scope","label","subLabel","hideLabel","total","link","$watch","newVal","valueAsPercentage","undefined","val","Math","round","template","width","loaded","lessThan","text","subtext","wasWere","el","attrs","naString","na","parsed","percentageInt","percentage","isOp","parseInt","isNaN","service","$http","id","filter","result"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,e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Mb,MAAO,CACHvF,IALQ,CAACwF,EAAIC,IACbF,EAAMvF,IAAI,yCAA2CwF,EAAK,WAAaC,IAAU,GAC5EnD,KAAKoD,GAAUA,EAAOlD,UAPtC,I","file":"admissionstransparency-bundle-8670e521721eb5dce6de.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 46);\n","import './transparency.controller.js';\r\nimport './transparency.directives';\r\nimport './transparency.service.js';\r\n\r\nimport 'Sass/views/admissions-transparency.scss';","(() => {\r\n 'use strict';\r\n\r\n function ctrl(transparencyService) {\r\n\r\n this.getLocationByCode = () => !this.model ? '' :\r\n this.selectedProgram.codes.find(v => v.value.trim() === this.selectedCode).key;\r\n\r\n this.programChanged = item => {\r\n this.model = null;\r\n this.selectedProgram = item;\r\n\r\n this.selectedProgram.codes.forEach(x => {\r\n if (x.key === 'Sippy Downs') {\r\n x.key = 'Sunshine Coast';\r\n }\r\n }); \r\n\r\n this.selectedCode = this.selectedProgram.codes[0].value.trim();\r\n\r\n if (this.selectedCode) {\r\n this.getDataForCode();\r\n } else {\r\n this.noData = true;\r\n }\r\n }\r\n\r\n this.getDataForCode = () => {\r\n transparencyService.get(this.selectedCode.trim().substring(0, 6), '')\r\n .then(resp => {\r\n if (resp.data) {\r\n this.noData = false;\r\n this.model = resp.data;\r\n } else {\r\n this.noData = true;\r\n this.model = null;\r\n }\r\n });\r\n }\r\n\r\n //const op = v => v && v.split('/')[0];\r\n\r\n //// minus one to correct indexing\r\n //this.opHigh = v => ((op(v) - 1) * 4) + '%';\r\n\r\n //this.opMedian = v => ((op(v) - 1) * (100 / 25)) + '%';\r\n\r\n //this.opLow = v => ((26 - op(v)) * 4) + '%';\r\n\r\n //// return true if any op field is '<5'\r\n //this.lessThanFive =\r\n // () => this.model && (this.model.highestRank === '<5' || this.model.lowestRank === '<5' || this.model.medianRank === '<5');\r\n\r\n const rootNode = document.querySelector('[ng-controller*=\"transparency.controller\"]');\r\n const programCode = rootNode.dataset.programCode;\r\n\r\n transparencyService.get('1', programCode || '')\r\n .then(resp => {\r\n this.institution = resp.data[0];\r\n\r\n this.institution.recentEd = +this.institution.rankOnly +\r\n +this.institution.additionalOnly +\r\n +this.institution.rankAdditional;\r\n\r\n this.programs = resp.programs;\r\n this.admissionsPeriod = resp.admissionsPeriod;\r\n\r\n // if only a single program, set it as selected - this happens on program pages\r\n if (this.programs.length === 1) {\r\n this.programChanged(this.programs[0]);\r\n }\r\n });\r\n }\r\n\r\n angular.module('Uscapp').controller('transparency.controller', ['transparencyService', ctrl]);\r\n})();","(() => {\r\n\r\n const row = () => {\r\n\r\n const dir = {\r\n restrict: 'A',\r\n replace: true,\r\n scope: {\r\n label: '@',\r\n subLabel: '@',\r\n hideLabel: '@',\r\n value: '=',\r\n total: '='\r\n },\r\n link: scope => {\r\n scope.$watch('value',\r\n newVal => {\r\n scope.valueAsPercentage = '';\r\n if (newVal !== undefined) {\r\n if (newVal === '<5') {\r\n scope.valueAsPercentage = 'N/P';\r\n } else if (newVal === '0') {\r\n scope.valueAsPercentage = '0';\r\n } else {\r\n let val = scope.value / scope.total * 100;\r\n val = +(Math.round(val + 'e+2') + 'e-2');\r\n\r\n scope.valueAsPercentage = val + '%';\r\n }\r\n }\r\n });\r\n },\r\n template: `\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n `\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atRow', row);\r\n\r\n const progress = () => {\r\n\r\n const link = scope => {\r\n scope.$watch('label', newVal => {\r\n if (newVal) {\r\n scope.lessThan = scope.label[0] === '<' ? 'less-than' : '';\r\n }\r\n });\r\n }\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n width: '@',\r\n loaded: '=',\r\n label: '='\r\n },\r\n link: link,\r\n template: '
'\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atProgress', progress);\r\n\r\n const pie = () => {\r\n\r\n const template = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n value: '=',\r\n total: '='\r\n },\r\n template: template,\r\n link: scope => {\r\n scope.$watch('value',\r\n newVal => {\r\n scope.valueAsPercentage = undefined;\r\n if (newVal !== undefined) {\r\n scope.valueAsPercentage = scope.value !== 0 ? scope.value + '%' : '<1%';\r\n }\r\n });\r\n }\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atPie', pie);\r\n\r\n\r\n const counter = () => {\r\n\r\n const link = (scope, el, attrs) => {\r\n scope.naString = 'To preserve individual privacy, no data is reported in this category';\r\n\r\n scope.$watch('text', newVal => {\r\n if (newVal) {\r\n scope.na = scope.text === 'NP';\r\n\r\n delete scope.parsed;\r\n delete scope.percentageInt;\r\n delete scope.percentage;\r\n\r\n if (attrs.hasOwnProperty('op')) {\r\n scope.isOp = true;\r\n }\r\n\r\n if (!scope.isOp) {\r\n const total = parseInt(scope.total, 10);\r\n scope.parsed = parseInt(scope.text, 10);\r\n\r\n if (!isNaN(scope.parsed) && !isNaN(total) && scope.parsed !== 0) {\r\n scope.percentageInt = Math.round(scope.parsed / total * 100);\r\n scope.percentage = scope.percentageInt === 0 ? '<1%' : scope.percentageInt + '%';\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n const template = `\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

{{ subtext }}

\r\n
\r\n
\r\n
\r\n `;\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n text: '=',\r\n subtext: '@',\r\n wasWere: '=',\r\n total: '='\r\n },\r\n link: link,\r\n template: template\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atCounter', counter);\r\n\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n function service($http) {\r\n\r\n const get = (id, filter) =>\r\n $http.get('/webapi/admissionstransparency/get?id=' + id + '&filter=' + filter || '')\r\n .then(result => result.data);\r\n\r\n return {\r\n get\r\n }\r\n }\r\n\r\n angular.module('Uscapp').service('transparencyService', ['$http', service]);\r\n}());"],"sourceRoot":""}