{"version":3,"sources":["webpack://angularjs-nouislider/webpack/universalModuleDefinition","webpack://angularjs-nouislider/webpack/bootstrap","webpack://angularjs-nouislider/./src/directive.js","webpack://angularjs-nouislider/./src/index.js","webpack://angularjs-nouislider/./src/module.js","webpack://angularjs-nouislider/external \"angular\"","webpack://angularjs-nouislider/external {\"commonjs\":\"nouislider\",\"commonjs2\":\"nouislider\",\"amd\":\"nouislider\",\"root\":\"noUiSlider\"}"],"names":["module","directive","$timeout","$q","$log","restrict","require","scope","created","options","link","element","attrs","ngModel","htmlElement","angular","copy","extendApi","api","$on","eventName","callback","wrappedCallback","get","on","off","setCreatedWatcher","$watch","newCallback","isFunction","setOptionsWatcher","newOptions","oldOptions","equals","updateOptions","bindNgModelControls","$render","set","$modelValue","positions","$setViewValue","initializeNgModel","resolve","isArray","isNumber","Error","createInstance","noUiSlider","create","then","start","error","moduleName"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEAA,8CAAM,CAACC,SAAP,CAAiB,YA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C,MAAX,CAAkBlC,WAAlB,EAA+BL,OAA/B,CAAD,CAArB;AAEAiB,yBAAiB,CAACR,GAAD,CAAjB;AACAY,yBAAiB,CAACZ,GAAD,CAAjB;;AAEA,YAAIL,OAAO,KAAK,IAAhB,EAAsB;AACpBsB,6BAAmB,CAACjB,GAAD,CAAnB;AACD;AACF,OAzHuC,CA2HxC;;;AACAuB,uBAAiB,GACdQ,IADH,CACQ,UAACX,WAAD,EAAiB;AACrB,YAAIA,WAAW,KAAK,IAApB,EAA0B;AACxB;AACA7B,iBAAO,CAACyC,KAAR,GAAgBZ,WAAhB;AACD,SAJoB,CAMrB;;;AACAQ,sBAAc;AACf,OATH,WAUS1C,IAAI,CAAC+C,KAVd;AAWD;AA9IqD,GAAzB;AAAA,CAA/B,G;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AACA;AAEeC,iHAAf,E;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAMA,UAAU,GAAG,YAAnB;AACA,IAAMpD,MAAM,GAAGe,8CAAO,CAACf,MAAR,CAAeoD,UAAf,EAA2B,EAA3B,CAAf,C;;;;;;;;;;;ACHP,qD;;;;;;;;;;;ACAA,wD","file":"angularjs-nouislider.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"), require(\"nouislider\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"angularjs-nouislider\", [\"angular\", \"nouislider\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angularjs-nouislider\"] = factory(require(\"angular\"), require(\"nouislider\"));\n\telse\n\t\troot[\"angularjs-nouislider\"] = factory(root[\"angular\"], root[\"noUiSlider\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE_angular__, __WEBPACK_EXTERNAL_MODULE_nouislider__) {\nreturn "," \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 = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","import angular from 'angular';\nimport noUiSlider from 'nouislider';\nimport { module } from './module';\n\nmodule.directive('noUiSlider', ($timeout, $q, $log) => ({\n restrict: 'AE',\n require: '?ngModel',\n scope: {\n created: '&?sliderCreated',\n options: '=?sliderOptions',\n },\n link: (scope, element, attrs, ngModel) => {\n const htmlElement = element[0];\n let options = angular.copy(scope.options);\n\n /**\n * Extends the API returned by noUiSlider with the `$on` function which wraps the `on` function\n * to use Angular.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n * @return {Object} The API instance with the added `$on` function\n */\n function extendApi(api) {\n api.$on = (eventName, callback) => {\n const wrappedCallback = () => {\n $timeout(() => {\n callback(api.get());\n });\n };\n\n api.on(eventName, wrappedCallback);\n\n return () => {\n api.off(eventName, wrappedCallback);\n };\n };\n\n return api;\n }\n\n /**\n * Creates a watcher that calls the function given by the `slider-created` directive attribute.\n * The watcher fires every time the `slider-created` function changes.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function setCreatedWatcher(api) {\n scope.$watch('created', (newCallback) => {\n if (!angular.isFunction(newCallback)) {\n return;\n }\n\n newCallback({ api });\n });\n }\n\n /**\n * Creates a watcher that looks for changes in the `slider-options` directive attribute. When a\n * change is detected the options for the noUiSlider instance are updated. Note that only the\n * 'margin', 'limit', 'step', 'range', 'animate' and 'snap' options can be updated this way (as\n * documented in https://refreshless.com/nouislider/more/#section-update). All other option\n * updates require you to destroy the current instance and create a new one.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function setOptionsWatcher(api) {\n scope.$watch('options', (newOptions, oldOptions) => {\n if (angular.equals(newOptions, oldOptions)) {\n return;\n }\n\n options = angular.copy(scope.options);\n\n api.updateOptions(options);\n });\n }\n\n /**\n * Add ngModel controls to the directive. This allows the use of ngModel to set and get the\n * value in the slider. It uses the noUiSlider API's get and set functions, so no custom\n * formatters need to be defined for ngModel. The ngModelOptions can be used.\n *\n * @param {Object} api The API instance returned by the `noUiSlider.create()` method\n */\n function bindNgModelControls(api) {\n ngModel.$render = () => {\n api.set(ngModel.$modelValue);\n };\n\n api.on('update', () => {\n const positions = api.get();\n ngModel.$setViewValue(positions);\n });\n }\n\n /**\n * A utility function that returns a promise which resolves when ngModel is correctly loaded,\n * using $timeout.\n *\n * @return {Promise} Returns a promise that resolves with `null` when ngModel is null and thus\n * not in use. If the value entered for ngModel is not an array or number, an error is thrown\n * and thus the promise rejects. If the value entered for ngModel is correct, the promise\n * resolves with this value.\n */\n function initializeNgModel() {\n if (ngModel === null) {\n return $q.resolve(null);\n }\n\n return $q((resolve) => {\n $timeout(() => {\n if (!(angular.isArray(ngModel.$modelValue) || angular.isNumber(ngModel.$modelValue))) {\n throw new Error(`Value provided in ngModel is not a valid noUislider start position. Expected a Number or an Array of Numbers, found: ${ ngModel.$modelValue }`);\n }\n\n resolve(ngModel.$modelValue);\n });\n });\n }\n\n /**\n * Creates a noUiSlider instance.\n */\n function createInstance() {\n const api = extendApi(noUiSlider.create(htmlElement, options));\n\n setCreatedWatcher(api);\n setOptionsWatcher(api);\n\n if (ngModel !== null) {\n bindNgModelControls(api);\n }\n }\n\n // Wait for ngModel to be initialized\n initializeNgModel()\n .then(($modelValue) => {\n if ($modelValue !== null) {\n // If ngModel is being used, (over)write the start option for the noUiSlider options\n options.start = $modelValue;\n }\n\n // Create a noUiSlider instance\n createInstance();\n })\n .catch($log.error);\n },\n}));\n","import { moduleName } from './module';\nimport './directive';\n\nexport default moduleName;\n","import angular from 'angular';\n\nexport const moduleName = 'noUiSlider';\nexport const module = angular.module(moduleName, []);\n","module.exports = __WEBPACK_EXTERNAL_MODULE_angular__;","module.exports = __WEBPACK_EXTERNAL_MODULE_nouislider__;"],"sourceRoot":""}