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QD,EAAMC,GAE3B,OAAO7C,CACX,CAIA,SAAS+B,EAAStE,EAAOsF,GACrB,MAAuB,iBAATtF,EAAoBA,EAAQA,EAAMsF,EAAMtF,EAAMvB,OAChE,CA4EA,SAASiG,EAAgBxB,EAASgB,GAE9B,IADA,IAAIqB,EAAa,GACRlC,EAAK,EAAGmC,EAAYtC,EAASG,EAAKmC,EAAU/G,OAAQ4E,IAAM,CAC/D,IAAInB,EAASsD,EAAUnC,GACnBoC,EAAKC,EAAcxD,EAAOwB,EAAGxB,EAAOyB,EAAGO,GAC3CqB,EAAWzB,KAAK5B,EAAO6B,OAAS0B,EAAG,GAAKvD,EAAO0B,OAAS,IAAM6B,EAAG,GAAKvD,EAAO2B,OAAS3B,EAAO8B,IACjG,CACA,OAAOuB,EAAWI,KAAK,KAC3B,CACA,SAASD,EAAchC,EAAGC,EAAGO,GACzB,IAAI0B,EAAU1B,EAAUlB,KAAK6C,GAAK,IAC9BC,EAAM9C,KAAK8C,IAAIF,GACfG,EAAM/C,KAAK+C,IAAIH,GACnB,MAAO,CACH5C,KAAKC,MAA4B,KAArBS,EAAIqC,EAAMpC,EAAImC,IAAe,IACzC9C,KAAKC,MAA6B,MAArBS,EAAIoC,EAAMnC,EAAIoC,IAAe,IAElD,C","sources":["webpack://shipley-du-lib/./common/js/legacy/custPortal/cw/lib/cw.loadingIndicator.js","webpack://shipley-du-lib/./node_modules/spin.js/spin.js"],"sourcesContent":["import { Spinner } from \"spin.js\";\r\n\r\n(function (cw, $, undefined) {\r\n $.extend(true, cw, {\r\n loadingIndicator: {\r\n start: function () {\r\n if ($(\"#loading-veil\").length < 1) {\r\n this.spinObj._Start();\r\n }\r\n },\r\n stop: function () {\r\n this.spinObj._Stop();\r\n },\r\n spinObj: {\r\n spinObj: null,\r\n isShowingSpinner: false,\r\n hasMinimumSpin: false,\r\n //whoopsTimer: null,\r\n minSpinTimer: null,\r\n init: function (spinTarget) {},\r\n _Start: function (options) {\r\n var _self = this;\r\n _self.spinTarget = $(\"#spinTarget\")[0];\r\n //set some defaults\r\n if (typeof options === \"undefined\" || typeof options.timeout === \"undefined\") {\r\n options = options || {};\r\n options.mintimeout = options.mintimeout || 50; //50 MILLISECONDS to prevent a fast flash of the spinner\r\n options.maxtimeout = options.maxtimeout || 20; //20 SECONDS timeout for failing\r\n }\r\n\r\n if (typeof _self.spinObjJs === \"undefined\" || _self.spinObjJs === null) {\r\n _self.spinObjJs = new Spinner({\r\n lines: 15, // The number of lines to draw\r\n length: 0, // The length of each line\r\n width: 7, // The line thickness\r\n radius: 32, // The radius of the inner circle\r\n corners: 1, // Corner roundness (0..1)\r\n rotate: 0, // The rotation offset\r\n direction: 1, // 1: clockwise, -1: counterclockwise\r\n color: \"#FFFFFF\", // #rgb or #rrggbb or array of colors\r\n speed: 1.1, // Rounds per second\r\n trail: 42, // Afterglow percentage\r\n //shadow: false, // Whether to render a shadow\r\n hwaccel: true, // Whether to use hardware acceleration\r\n className: \"spinner\", // The CSS class to assign to the spinner\r\n zIndex: 2e9, // The z-index (defaults to 2000000000)\r\n top: \"auto\", // Top position relative to parent in px\r\n left: \"auto\", // Left position relative to parent in px\r\n }).spin(_self.spinTarget);\r\n } else {\r\n _self.spinObjJs.spin(_self.spinTarget);\r\n }\r\n\r\n $(_self.spinTarget).addClass(\"on\");\r\n _self.isShowingSpinner = true;\r\n\r\n var $veil = $('<div id=\"loading-veil\" />');\r\n $(\"body\").prepend($veil);\r\n $veil.addClass(\"on\");\r\n\r\n //set max and min spin times\r\n //this.SpinnerTimer(options);\r\n },\r\n SpinnerTimer: function (options) {\r\n var _self = this;\r\n\r\n _self.hasMinimumSpin = false;\r\n\r\n if (_self.minSpinTimer) {\r\n clearTimeout(_self.minSpinTimer);\r\n _self.minSpinTimer = null;\r\n }\r\n\r\n _self.minSpinTimer = setTimeout(function () {\r\n _self.hasMinimumSpin = true; //signal that stopSpinner can kill this\r\n }, options.mintimeout);\r\n },\r\n _Stop: function (options) {\r\n var _self = this;\r\n\r\n if (typeof options === \"undefined\" || typeof options.timeout === \"undefined\") {\r\n options = options || {};\r\n options.mintimeout = options.mintimeout || 50; //50 MILLISECONDS to prevent a fast flash of the spinner\r\n options.maxtimeout = options.maxtimeout || 20; //20 SECONDS timeout for failing\r\n }\r\n\r\n if (_self.hasMinimumSpin) {\r\n //can kill the spinner here\r\n //clearTimeout(_self.whoopsTimer);\r\n _self.isShowingSpinner = false;\r\n $(_self.spinTarget).removeClass(\"on\");\r\n var $veil = $(\"#loading-veil\");\r\n $veil.removeClass(\"on\");\r\n setTimeout(function () {\r\n $veil.remove();\r\n }, 205);\r\n\r\n if (typeof _self.spinObjJs !== \"undefined\") {\r\n _self.spinObjJs.stop();\r\n }\r\n } else {\r\n if (_self.minSpinTimer) {\r\n clearTimeout(_self.minSpinTimer);\r\n _self.minSpinTimer = null;\r\n }\r\n\r\n _self.minSpinTimer = setTimeout(function () {\r\n //enforce the min spinner time\r\n _self.hasMinimumSpin = true;\r\n _self._Stop();\r\n }, options.mintimeout);\r\n }\r\n },\r\n },\r\n },\r\n });\r\n})((window.cw = window.cw || {}), jQuery);\r\n","var __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar defaults = {\r\n lines: 12,\r\n length: 7,\r\n width: 5,\r\n radius: 10,\r\n scale: 1.0,\r\n corners: 1,\r\n color: '#000',\r\n fadeColor: 'transparent',\r\n animation: 'spinner-line-fade-default',\r\n rotate: 0,\r\n direction: 1,\r\n speed: 1,\r\n zIndex: 2e9,\r\n className: 'spinner',\r\n top: '50%',\r\n left: '50%',\r\n shadow: '0 0 1px transparent',\r\n position: 'absolute',\r\n};\r\nvar Spinner = /** @class */ (function () {\r\n function Spinner(opts) {\r\n if (opts === void 0) { opts = {}; }\r\n this.opts = __assign(__assign({}, defaults), opts);\r\n }\r\n /**\r\n * Adds the spinner to the given target element. If this instance is already\r\n * spinning, it is automatically removed from its previous target by calling\r\n * stop() internally.\r\n */\r\n Spinner.prototype.spin = function (target) {\r\n this.stop();\r\n this.el = document.createElement('div');\r\n this.el.className = this.opts.className;\r\n this.el.setAttribute('role', 'progressbar');\r\n css(this.el, {\r\n position: this.opts.position,\r\n width: 0,\r\n zIndex: this.opts.zIndex,\r\n left: this.opts.left,\r\n top: this.opts.top,\r\n transform: \"scale(\" + this.opts.scale + \")\",\r\n });\r\n if (target) {\r\n target.insertBefore(this.el, target.firstChild || null);\r\n }\r\n drawLines(this.el, this.opts);\r\n return this;\r\n };\r\n /**\r\n * Stops and removes the Spinner.\r\n * Stopped spinners may be reused by calling spin() again.\r\n */\r\n Spinner.prototype.stop = function () {\r\n if (this.el) {\r\n if (typeof requestAnimationFrame !== 'undefined') {\r\n cancelAnimationFrame(this.animateId);\r\n }\r\n else {\r\n clearTimeout(this.animateId);\r\n }\r\n if (this.el.parentNode) {\r\n this.el.parentNode.removeChild(this.el);\r\n }\r\n this.el = undefined;\r\n }\r\n return this;\r\n };\r\n return Spinner;\r\n}());\r\nexport { Spinner };\r\n/**\r\n * Sets multiple style properties at once.\r\n */\r\nfunction css(el, props) {\r\n for (var prop in props) {\r\n el.style[prop] = props[prop];\r\n }\r\n return el;\r\n}\r\n/**\r\n * Returns the line color from the given string or array.\r\n */\r\nfunction getColor(color, idx) {\r\n return typeof color == 'string' ? color : color[idx % color.length];\r\n}\r\n/**\r\n * Internal method that draws the individual lines.\r\n */\r\nfunction drawLines(el, opts) {\r\n var borderRadius = (Math.round(opts.corners * opts.width * 500) / 1000) + 'px';\r\n var shadow = 'none';\r\n if (opts.shadow === true) {\r\n shadow = '0 2px 4px #000'; // default shadow\r\n }\r\n else if (typeof opts.shadow === 'string') {\r\n shadow = opts.shadow;\r\n }\r\n var shadows = parseBoxShadow(shadow);\r\n for (var i = 0; i < opts.lines; i++) {\r\n var degrees = ~~(360 / opts.lines * i + opts.rotate);\r\n var backgroundLine = css(document.createElement('div'), {\r\n position: 'absolute',\r\n top: -opts.width / 2 + \"px\",\r\n width: (opts.length + opts.width) + 'px',\r\n height: opts.width + 'px',\r\n background: getColor(opts.fadeColor, i),\r\n borderRadius: borderRadius,\r\n transformOrigin: 'left',\r\n transform: \"rotate(\" + degrees + \"deg) translateX(\" + opts.radius + \"px)\",\r\n });\r\n var delay = i * opts.direction / opts.lines / opts.speed;\r\n delay -= 1 / opts.speed; // so initial animation state will include trail\r\n var line = css(document.createElement('div'), {\r\n width: '100%',\r\n height: '100%',\r\n background: getColor(opts.color, i),\r\n borderRadius: borderRadius,\r\n boxShadow: normalizeShadow(shadows, degrees),\r\n animation: 1 / opts.speed + \"s linear \" + delay + \"s infinite \" + opts.animation,\r\n });\r\n backgroundLine.appendChild(line);\r\n el.appendChild(backgroundLine);\r\n }\r\n}\r\nfunction parseBoxShadow(boxShadow) {\r\n var regex = /^\\s*([a-zA-Z]+\\s+)?(-?\\d+(\\.\\d+)?)([a-zA-Z]*)\\s+(-?\\d+(\\.\\d+)?)([a-zA-Z]*)(.*)$/;\r\n var shadows = [];\r\n for (var _i = 0, _a = boxShadow.split(','); _i < _a.length; _i++) {\r\n var shadow = _a[_i];\r\n var matches = shadow.match(regex);\r\n if (matches === null) {\r\n continue; // invalid syntax\r\n }\r\n var x = +matches[2];\r\n var y = +matches[5];\r\n var xUnits = matches[4];\r\n var yUnits = matches[7];\r\n if (x === 0 && !xUnits) {\r\n xUnits = yUnits;\r\n }\r\n if (y === 0 && !yUnits) {\r\n yUnits = xUnits;\r\n }\r\n if (xUnits !== yUnits) {\r\n continue; // units must match to use as coordinates\r\n }\r\n shadows.push({\r\n prefix: matches[1] || '',\r\n x: x,\r\n y: y,\r\n xUnits: xUnits,\r\n yUnits: yUnits,\r\n end: matches[8],\r\n });\r\n }\r\n return shadows;\r\n}\r\n/**\r\n * Modify box-shadow x/y offsets to counteract rotation\r\n */\r\nfunction normalizeShadow(shadows, degrees) {\r\n var normalized = [];\r\n for (var _i = 0, shadows_1 = shadows; _i < shadows_1.length; _i++) {\r\n var shadow = shadows_1[_i];\r\n var xy = convertOffset(shadow.x, shadow.y, degrees);\r\n normalized.push(shadow.prefix + xy[0] + shadow.xUnits + ' ' + xy[1] + shadow.yUnits + shadow.end);\r\n }\r\n return normalized.join(', ');\r\n}\r\nfunction convertOffset(x, y, degrees) {\r\n var radians = degrees * Math.PI / 180;\r\n var sin = Math.sin(radians);\r\n var cos = Math.cos(radians);\r\n return [\r\n Math.round((x * cos + y * sin) * 1000) / 1000,\r\n Math.round((-x * sin + y * cos) * 1000) / 1000,\r\n ];\r\n}\r\n"],"names":["cw","$","window","jQuery","extend","loadingIndicator","start","length","this","spinObj","_Start","stop","_Stop","isShowingSpinner","hasMinimumSpin","minSpinTimer","init","spinTarget","options","_self","timeout","mintimeout","maxtimeout","spinObjJs","lines","width","radius","corners","rotate","direction","color","speed","trail","hwaccel","className","zIndex","top","left","spin","addClass","$veil","prepend","SpinnerTimer","clearTimeout","setTimeout","removeClass","remove","__assign","Object","assign","t","s","i","n","arguments","p","prototype","hasOwnProperty","call","apply","defaults","scale","fadeColor","animation","shadow","position","Spinner","opts","target","el","document","createElement","setAttribute","css","transform","insertBefore","firstChild","borderRadius","Math","round","shadows","boxShadow","regex","_i","_a","split","matches","match","x","y","xUnits","yUnits","push","prefix","end","parseBoxShadow","degrees","backgroundLine","height","background","getColor","transformOrigin","delay","line","normalizeShadow","appendChild","drawLines","requestAnimationFrame","cancelAnimationFrame","animateId","parentNode","removeChild","undefined","props","prop","style","idx","normalized","shadows_1","xy","convertOffset","join","radians","PI","sin","cos"],"sourceRoot":""}