{"version":3,"file":"admin-gv_4Fgx3.js","sources":["../../../node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js","../../../app/assets/javascripts/admin/app_list.js","../../../app/assets/javascripts/admin/bxslider.js","../../../app/assets/javascripts/admin/call-list.js","../../../app/assets/javascripts/admin/cast-list-extras.js","../../../app/assets/javascripts/admin/cast-list-search.js","../../../app/assets/javascripts/admin/date-input.js","../../../app/assets/javascripts/admin/document.js","../../../app/assets/javascripts/admin/email-template.js","../../../app/assets/javascripts/admin/extra-approval.js","../../../app/assets/javascripts/admin/extra-removal.js","../../../app/assets/javascripts/admin/extra-card.js","../../../app/assets/javascripts/admin/extra-form.js","../../../app/assets/javascripts/admin/extra-message.js","../../../app/assets/javascripts/admin/extra-profile.js","../../../app/assets/javascripts/admin/extra-search.js","../../../app/assets/javascripts/admin/nested_form.js","../../../app/assets/javascripts/admin/notification.js","../../../app/assets/javascripts/admin/payment.js","../../../app/assets/javascripts/admin/photo.js","../../../app/assets/javascripts/admin/production-rates.js","../../../app/assets/javascripts/admin/sidebar-cast-list.js","../../../app/assets/javascripts/admin/sidebar-scratch.js","../../../app/assets/javascripts/admin/survey.js","../../../app/assets/javascripts/admin/live_search.js","../../../app/assets/javascripts/admin/private_upload.js","../../../app/assets/javascripts/message.js","../../../app/assets/javascripts/metronic/global/scripts/app.js","../../../app/assets/javascripts/metronic/layouts/layout3/scripts/layout.js","../../../app/assets/javascripts/metronic/layouts/global/scripts/quick-sidebar.js","../../../app/assets/entrypoints/admin.js"],"sourcesContent":["/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/javascript\nReleased under the MIT license\n */\nconst linkClickSelector = \"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]\";\n\nconst buttonClickSelector = {\n selector: \"button[data-remote]:not([form]), button[data-confirm]:not([form])\",\n exclude: \"form button\"\n};\n\nconst inputChangeSelector = \"select[data-remote], input[data-remote], textarea[data-remote]\";\n\nconst formSubmitSelector = \"form:not([data-turbo=true])\";\n\nconst formInputClickSelector = \"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])\";\n\nconst formDisableSelector = \"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled\";\n\nconst formEnableSelector = \"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled\";\n\nconst fileInputSelector = \"input[name][type=file]:not([disabled])\";\n\nconst linkDisableSelector = \"a[data-disable-with], a[data-disable]\";\n\nconst buttonDisableSelector = \"button[data-remote][data-disable-with], button[data-remote][data-disable]\";\n\nlet nonce = null;\n\nconst loadCSPNonce = () => {\n const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n if (selector.exclude) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n if (!element[EXPANDO]) {\n element[EXPANDO] = {};\n }\n return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n var isEditable = false;\n do {\n if (element.isContentEditable) {\n isEditable = true;\n break;\n }\n element = element.parentElement;\n } while (element);\n return isEditable;\n};\n\nconst csrfToken = () => {\n const meta = document.querySelector(\"meta[name=csrf-token]\");\n return meta && meta.content;\n};\n\nconst csrfParam = () => {\n const meta = document.querySelector(\"meta[name=csrf-param]\");\n return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n const token = csrfToken();\n if (token) {\n return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n }\n};\n\nconst refreshCSRFTokens = () => {\n const token = csrfToken();\n const param = csrfParam();\n if (token && param) {\n return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n }\n};\n\nconst AcceptHeaders = {\n \"*\": \"*/*\",\n text: \"text/plain\",\n html: \"text/html\",\n xml: \"application/xml, text/xml\",\n json: \"application/json, text/javascript\",\n script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n};\n\nconst ajax = options => {\n options = prepareOptions(options);\n var xhr = createXHR(options, (function() {\n const response = processResponse(xhr.response != null ? xhr.response : xhr.responseText, xhr.getResponseHeader(\"Content-Type\"));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : undefined;\n }));\n if (options.beforeSend && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n};\n\nvar prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === \"GET\" && options.data) {\n if (options.url.indexOf(\"?\") < 0) {\n options.url += \"?\" + options.data;\n } else {\n options.url += \"&\" + options.data;\n }\n }\n if (!(options.dataType in AcceptHeaders)) {\n options.dataType = \"*\";\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== \"*\") {\n options.accept += \", */*; q=0.01\";\n }\n return options;\n};\n\nvar createXHR = function(options, done) {\n const xhr = new XMLHttpRequest;\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader(\"Accept\", options.accept);\n if (typeof options.data === \"string\") {\n xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n CSRFProtection(xhr);\n }\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n};\n\nvar processResponse = function(response, type) {\n if (typeof response === \"string\" && typeof type === \"string\") {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n const script = document.createElement(\"script\");\n script.setAttribute(\"nonce\", cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n const parser = new DOMParser;\n type = type.replace(/;.+/, \"\");\n try {\n response = parser.parseFromString(response, type);\n } catch (error1) {}\n }\n }\n return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n const originAnchor = document.createElement(\"a\");\n originAnchor.href = location.href;\n const urlAnchor = document.createElement(\"a\");\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === \":\") && !urlAnchor.host || originAnchor.protocol + \"//\" + originAnchor.host === urlAnchor.protocol + \"//\" + urlAnchor.host);\n } catch (e) {\n return true;\n }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n CustomEvent = function(event, params) {\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n ({preventDefault: preventDefault} = CustomEvent.prototype);\n CustomEvent.prototype.preventDefault = function() {\n const result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, \"defaultPrevented\", {\n get() {\n return true;\n }\n });\n }\n return result;\n };\n}\n\nconst fire = (obj, name, data) => {\n const event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n fire(e.target, \"ujs:everythingStopped\");\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n let {target: target} = e;\n while (!!(target instanceof Element) && !matches(target, selector)) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n e.stopPropagation();\n }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n let inputs = [ element ];\n if (matches(element, \"form\")) {\n inputs = toArray(element.elements);\n }\n const params = [];\n inputs.forEach((function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, \"fieldset[disabled] *\")) {\n return;\n }\n if (matches(input, \"select\")) {\n toArray(input.options).forEach((function(option) {\n if (option.selected) {\n params.push({\n name: input.name,\n value: option.value\n });\n }\n }));\n } else if (input.checked || [ \"radio\", \"checkbox\", \"submit\" ].indexOf(input.type) === -1) {\n params.push({\n name: input.name,\n value: input.value\n });\n }\n }));\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map((function(param) {\n if (param.name) {\n return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n } else {\n return param;\n }\n })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n if (matches(form, \"form\")) {\n return toArray(form.elements).filter((el => matches(el, selector)));\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n if (!allowAction(this, rails)) {\n stopEverything(e);\n }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n let callback;\n const message = element.getAttribute(\"data-confirm\");\n if (!message) {\n return true;\n }\n let answer = false;\n if (fire(element, \"confirm\")) {\n try {\n answer = rails.confirm(message, element);\n } catch (error) {}\n callback = fire(element, \"confirm:complete\", [ answer ]);\n }\n return answer && callback;\n};\n\nconst handleDisabledElement = function(e) {\n const element = this;\n if (element.disabled) {\n stopEverything(e);\n }\n};\n\nconst enableElement = e => {\n let element;\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n element = e.target;\n } else {\n element = e;\n }\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return enableFormElements(element);\n }\n};\n\nconst disableElement = e => {\n const element = e instanceof Event ? e.target : e;\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return disableFormElements(element);\n }\n};\n\nvar disableLinkElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const replacement = element.getAttribute(\"data-disable-with\");\n if (replacement != null) {\n setData(element, \"ujs:enable-with\", element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener(\"click\", stopEverything);\n return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableLinkElement = function(element) {\n const originalText = getData(element, \"ujs:enable-with\");\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, \"ujs:enable-with\", null);\n }\n element.removeEventListener(\"click\", stopEverything);\n return setData(element, \"ujs:disabled\", null);\n};\n\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const replacement = element.getAttribute(\"data-disable-with\");\n if (replacement != null) {\n if (matches(element, \"button\")) {\n setData(element, \"ujs:enable-with\", element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, \"ujs:enable-with\", element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n const originalText = getData(element, \"ujs:enable-with\");\n if (originalText != null) {\n if (matches(element, \"button\")) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, \"ujs:enable-with\", null);\n }\n element.disabled = false;\n return setData(element, \"ujs:disabled\", null);\n};\n\nvar isXhrRedirect = function(event) {\n const xhr = event.detail ? event.detail[0] : undefined;\n return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n const link = this;\n const method = link.getAttribute(\"data-method\");\n if (!method) {\n return;\n }\n if (isContentEditable(this)) {\n return;\n }\n const href = rails.href(link);\n const csrfToken$1 = csrfToken();\n const csrfParam$1 = csrfParam();\n const form = document.createElement(\"form\");\n let formContent = ``;\n if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n formContent += ``;\n }\n formContent += '';\n form.method = \"post\";\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = \"none\";\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n stopEverything(e);\n};\n\nconst isRemote = function(element) {\n const value = element.getAttribute(\"data-remote\");\n return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n let data, method, url;\n const element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, \"ajax:before\")) {\n fire(element, \"ajax:stopped\");\n return false;\n }\n if (isContentEditable(element)) {\n fire(element, \"ajax:stopped\");\n return false;\n }\n const withCredentials = element.getAttribute(\"data-with-credentials\");\n const dataType = element.getAttribute(\"data-type\") || \"script\";\n if (matches(element, formSubmitSelector)) {\n const button = getData(element, \"ujs:submit-button\");\n method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\n url = getData(element, \"ujs:submit-button-formaction\") || element.getAttribute(\"action\") || location.href;\n if (method.toUpperCase() === \"GET\") {\n url = url.replace(/\\?.*$/, \"\");\n }\n if (element.enctype === \"multipart/form-data\") {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, \"ujs:submit-button\", null);\n setData(element, \"ujs:submit-button-formmethod\", null);\n setData(element, \"ujs:submit-button-formaction\", null);\n } else if (matches(element, buttonClickSelector) || matches(element, inputChangeSelector)) {\n method = element.getAttribute(\"data-method\");\n url = element.getAttribute(\"data-url\");\n data = serializeElement(element, element.getAttribute(\"data-params\"));\n } else {\n method = element.getAttribute(\"data-method\");\n url = rails.href(element);\n data = element.getAttribute(\"data-params\");\n }\n ajax({\n type: method || \"GET\",\n url: url,\n data: data,\n dataType: dataType,\n beforeSend(xhr, options) {\n if (fire(element, \"ajax:beforeSend\", [ xhr, options ])) {\n return fire(element, \"ajax:send\", [ xhr ]);\n } else {\n fire(element, \"ajax:stopped\");\n return false;\n }\n },\n success(...args) {\n return fire(element, \"ajax:success\", args);\n },\n error(...args) {\n return fire(element, \"ajax:error\", args);\n },\n complete(...args) {\n return fire(element, \"ajax:complete\", args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== \"false\"\n });\n stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n const button = this;\n const {form: form} = button;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, \"ujs:submit-button\", {\n name: button.name,\n value: button.value\n });\n }\n setData(form, \"ujs:formnovalidate-button\", button.formNoValidate);\n setData(form, \"ujs:submit-button-formaction\", button.getAttribute(\"formaction\"));\n return setData(form, \"ujs:submit-button-formmethod\", button.getAttribute(\"formmethod\"));\n};\n\nconst preventInsignificantClick = function(e) {\n const link = this;\n const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n const data = link.getAttribute(\"data-params\");\n const metaClick = e.metaKey || e.ctrlKey;\n const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n e.stopImmediatePropagation();\n }\n};\n\nconst Rails = {\n $: $,\n ajax: ajax,\n buttonClickSelector: buttonClickSelector,\n buttonDisableSelector: buttonDisableSelector,\n confirm: confirm,\n cspNonce: cspNonce,\n csrfToken: csrfToken,\n csrfParam: csrfParam,\n CSRFProtection: CSRFProtection,\n delegate: delegate,\n disableElement: disableElement,\n enableElement: enableElement,\n fileInputSelector: fileInputSelector,\n fire: fire,\n formElements: formElements,\n formEnableSelector: formEnableSelector,\n formDisableSelector: formDisableSelector,\n formInputClickSelector: formInputClickSelector,\n formSubmitButtonClick: formSubmitButtonClick,\n formSubmitSelector: formSubmitSelector,\n getData: getData,\n handleDisabledElement: handleDisabledElement,\n href: href,\n inputChangeSelector: inputChangeSelector,\n isCrossDomain: isCrossDomain,\n linkClickSelector: linkClickSelector,\n linkDisableSelector: linkDisableSelector,\n loadCSPNonce: loadCSPNonce,\n matches: matches,\n preventInsignificantClick: preventInsignificantClick,\n refreshCSRFTokens: refreshCSRFTokens,\n serializeElement: serializeElement,\n setData: setData,\n stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n if (window._rails_loaded) {\n throw new Error(\"rails-ujs has already been loaded!\");\n }\n window.addEventListener(\"pageshow\", (function() {\n $(formEnableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n $(linkDisableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n }));\n delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n delegate(document, linkClickSelector, \"click\", handleConfirm);\n delegate(document, linkClickSelector, \"click\", disableElement);\n delegate(document, linkClickSelector, \"click\", handleRemote);\n delegate(document, linkClickSelector, \"click\", handleMethod);\n delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n delegate(document, buttonClickSelector, \"click\", handleConfirm);\n delegate(document, buttonClickSelector, \"click\", disableElement);\n delegate(document, buttonClickSelector, \"click\", handleRemote);\n delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n delegate(document, inputChangeSelector, \"change\", handleConfirm);\n delegate(document, inputChangeSelector, \"change\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n delegate(document, formSubmitSelector, \"submit\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n delegate(document, formInputClickSelector, \"click\", handleConfirm);\n delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\n if (jQuery.rails) {\n throw new Error(\"If you load both jquery_ujs and rails-ujs, use rails-ujs only.\");\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter((function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n }));\n}\n\nexport { Rails as default };\n","(function() {\n window.AppList = (function() {\n function AppList() {}\n\n AppList.setup = function() {\n return AppList.decorate();\n };\n\n AppList.decorate = function() {\n return $(\"#app_list\").each(function() {\n var list;\n return list = App.cable.subscriptions.create({\n channel: \"ListChannel\",\n id: $(this).data(\"channel\")\n }, {\n connected: function() {},\n disconnected: function() {},\n received: function(data) {\n var $row;\n if (data.model === \"bookings\") {\n $row = $(\"#booking_\" + data.data.id);\n if (data.data.sign_in_at != null) {\n $row.find(\".js-sign-in\").text(moment(data.data.sign_in_at).format(\"hh:mm A\")).addClass(\"tick\");\n } else {\n $row.find(\".js-sign-in\").text(\"\").removeClass(\"tick\");\n }\n if (data.data.sign_out_at != null) {\n $row.find(\".js-sign-out\").text(moment(data.data.sign_out_at).format(\"hh:mm A\")).addClass(\"tick\");\n } else {\n $row.find(\".js-sign-out\").text(\"\").removeClass(\"tick\");\n }\n if (data.data.aasm_state === \"no_show\") {\n $row.addClass(\"-no-show\");\n return $row.find(\".js-sign-in\").text(\"No Show\");\n } else {\n return $row.removeClass(\"-no-show\");\n }\n }\n }\n });\n });\n };\n\n return AppList;\n\n })();\n\n}).call(this);","/**\n * bxSlider v4.2.5\n * Copyright 2013-2015 Steven Wanderski\n * Written while drinking Belgian ales and listening to jazz\n\n * Licensed under MIT (http://opensource.org/licenses/MIT)\n */\n\n;(function($) {\n\n var defaults = {\n\n // GENERAL\n mode: 'horizontal',\n slideSelector: '',\n infiniteLoop: true,\n hideControlOnEnd: false,\n speed: 500,\n easing: null,\n slideMargin: 0,\n startSlide: 0,\n randomStart: false,\n captions: false,\n ticker: false,\n tickerHover: false,\n adaptiveHeight: false,\n adaptiveHeightSpeed: 500,\n video: false,\n useCSS: true,\n preloadImages: 'visible',\n responsive: true,\n slideZIndex: 50,\n wrapperClass: 'bx-wrapper',\n\n // TOUCH\n touchEnabled: true,\n swipeThreshold: 50,\n oneToOneTouch: true,\n preventDefaultSwipeX: true,\n preventDefaultSwipeY: false,\n\n // ACCESSIBILITY\n ariaLive: true,\n ariaHidden: true,\n\n // KEYBOARD\n keyboardEnabled: false,\n\n // PAGER\n pager: true,\n pagerType: 'full',\n pagerShortSeparator: ' / ',\n pagerSelector: null,\n buildPager: null,\n pagerCustom: null,\n\n // CONTROLS\n controls: true,\n nextText: 'Next',\n prevText: 'Prev',\n nextSelector: null,\n prevSelector: null,\n autoControls: false,\n startText: 'Start',\n stopText: 'Stop',\n autoControlsCombine: false,\n autoControlsSelector: null,\n\n // AUTO\n auto: false,\n pause: 4000,\n autoStart: true,\n autoDirection: 'next',\n stopAutoOnClick: false,\n autoHover: false,\n autoDelay: 0,\n autoSlideForOnePage: false,\n\n // CAROUSEL\n minSlides: 1,\n maxSlides: 1,\n moveSlides: 0,\n slideWidth: 0,\n shrinkItems: false,\n\n // CALLBACKS\n onSliderLoad: function() { return true; },\n onSlideBefore: function() { return true; },\n onSlideAfter: function() { return true; },\n onSlideNext: function() { return true; },\n onSlidePrev: function() { return true; },\n onSliderResize: function() { return true; }\n };\n\n $.fn.bxSlider = function(options) {\n\n if (this.length === 0) {\n return this;\n }\n\n // support multiple elements\n if (this.length > 1) {\n this.each(function() {\n $(this).bxSlider(options);\n });\n return this;\n }\n\n // create a namespace to be used throughout the plugin\n var slider = {},\n // set a reference to our slider element\n el = this,\n // get the original window dimens (thanks a lot IE)\n windowWidth = $(window).width(),\n windowHeight = $(window).height();\n\n // Return if slider is already initialized\n if ($(el).data('bxSlider')) { return; }\n\n /**\n * ===================================================================================\n * = PRIVATE FUNCTIONS\n * ===================================================================================\n */\n\n /**\n * Initializes namespace settings to be used throughout plugin\n */\n var init = function() {\n // Return if slider is already initialized\n if ($(el).data('bxSlider')) { return; }\n // merge user-supplied options with the defaults\n slider.settings = $.extend({}, defaults, options);\n // parse slideWidth setting\n slider.settings.slideWidth = parseInt(slider.settings.slideWidth);\n // store the original children\n slider.children = el.children(slider.settings.slideSelector);\n // check if actual number of slides is less than minSlides / maxSlides\n if (slider.children.length < slider.settings.minSlides) { slider.settings.minSlides = slider.children.length; }\n if (slider.children.length < slider.settings.maxSlides) { slider.settings.maxSlides = slider.children.length; }\n // if random start, set the startSlide setting to random number\n if (slider.settings.randomStart) { slider.settings.startSlide = Math.floor(Math.random() * slider.children.length); }\n // store active slide information\n slider.active = { index: slider.settings.startSlide };\n // store if the slider is in carousel mode (displaying / moving multiple slides)\n slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1 ? true : false;\n // if carousel, force preloadImages = 'all'\n if (slider.carousel) { slider.settings.preloadImages = 'all'; }\n // calculate the min / max width thresholds based on min / max number of slides\n // used to setup and update carousel slides dimensions\n slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);\n slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);\n // store the current state of the slider (if currently animating, working is true)\n slider.working = false;\n // initialize the controls object\n slider.controls = {};\n // initialize an auto interval\n slider.interval = null;\n // determine which property to use for transitions\n slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';\n // determine if hardware acceleration can be used\n slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function() {\n // create our test div element\n var div = document.createElement('div'),\n // css transition properties\n props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];\n // test for each property\n for (var i = 0; i < props.length; i++) {\n if (div.style[props[i]] !== undefined) {\n slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();\n slider.animProp = '-' + slider.cssPrefix + '-transform';\n return true;\n }\n }\n return false;\n }());\n // if vertical mode always make maxSlides and minSlides equal\n if (slider.settings.mode === 'vertical') { slider.settings.maxSlides = slider.settings.minSlides; }\n // save original style data\n el.data('origStyle', el.attr('style'));\n el.children(slider.settings.slideSelector).each(function() {\n $(this).data('origStyle', $(this).attr('style'));\n });\n\n // perform all DOM / CSS modifications\n setup();\n };\n\n /**\n * Performs all DOM and CSS modifications\n */\n var setup = function() {\n var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)\n\n // wrap el in a wrapper\n el.wrap('
');\n // store a namespace reference to .bx-viewport\n slider.viewport = el.parent();\n\n // add aria-live if the setting is enabled and ticker mode is disabled\n if (slider.settings.ariaLive && !slider.settings.ticker) {\n slider.viewport.attr('aria-live', 'polite');\n }\n console.log(slider)\n // add a loading div to display while images are loading\n slider.loader = $('
');\n slider.viewport.prepend(slider.loader);\n // set el to a massive width, to hold any needed slides\n // also strip any margin and padding from el\n el.css({\n width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',\n position: 'relative'\n });\n // if using CSS, add the easing property\n if (slider.usingCSS && slider.settings.easing) {\n el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);\n // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)\n } else if (!slider.settings.easing) {\n slider.settings.easing = 'swing';\n }\n // make modifications to the viewport (.bx-viewport)\n slider.viewport.css({\n width: '100%',\n overflow: 'hidden',\n position: 'relative'\n });\n slider.viewport.parent().css({\n maxWidth: getViewportMaxWidth()\n });\n // make modification to the wrapper (.bx-wrapper)\n if (!slider.settings.pager && !slider.settings.controls) {\n slider.viewport.parent().css({\n margin: '0 auto 0px'\n });\n }\n // apply css to all slider children\n slider.children.css({\n float: slider.settings.mode === 'horizontal' ? 'left' : 'none',\n listStyle: 'none',\n position: 'relative'\n });\n // apply the calculated width after the float is applied to prevent scrollbar interference\n slider.children.css('width', getSlideWidth());\n // if slideMargin is supplied, add the css\n if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) { slider.children.css('marginRight', slider.settings.slideMargin); }\n if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) { slider.children.css('marginBottom', slider.settings.slideMargin); }\n // if \"fade\" mode, add positioning and z-index CSS\n if (slider.settings.mode === 'fade') {\n slider.children.css({\n position: 'absolute',\n zIndex: 0,\n display: 'none'\n });\n // prepare the z-index on the showing element\n slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});\n }\n // create an element to contain all slider controls (pager, start / stop, etc)\n slider.controls.el = $('
');\n // if captions are requested, add them\n if (slider.settings.captions) { appendCaptions(); }\n // check if startSlide is last slide\n slider.active.last = slider.settings.startSlide === getPagerQty() - 1;\n // if video is true, set up the fitVids plugin\n if (slider.settings.video) { el.fitVids(); }\n if (slider.settings.preloadImages === 'all' || slider.settings.ticker) { preloadSelector = slider.children; }\n // only check for control addition if not in \"ticker\" mode\n if (!slider.settings.ticker) {\n // if controls are requested, add them\n if (slider.settings.controls) { appendControls(); }\n // if auto is true, and auto controls are requested, add them\n if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }\n // if pager is requested, add it\n if (slider.settings.pager) { appendPager(); }\n // if any control option is requested, add the controls wrapper\n if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }\n // if ticker mode, do not allow a pager\n } else {\n slider.settings.pager = false;\n }\n loadElements(preloadSelector, start);\n };\n\n var loadElements = function(selector, callback) {\n var total = selector.find('img:not([src=\"\"]), iframe').length,\n count = 0;\n if (total === 0) {\n callback();\n return;\n }\n selector.find('img:not([src=\"\"]), iframe').each(function() {\n $(this).one('load error', function() {\n if (++count === total) { callback(); }\n }).each(function() {\n if (this.complete) { $(this).trigger('load'); }\n });\n });\n };\n\n /**\n * Start the slider\n */\n var start = function() {\n // if infinite loop, prepare additional slides\n if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade' && !slider.settings.ticker) {\n var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,\n sliceAppend = slider.children.slice(0, slice).clone(true).addClass('bx-clone'),\n slicePrepend = slider.children.slice(-slice).clone(true).addClass('bx-clone');\n if (slider.settings.ariaHidden) {\n sliceAppend.attr('aria-hidden', true);\n slicePrepend.attr('aria-hidden', true);\n }\n el.append(sliceAppend).prepend(slicePrepend);\n }\n // remove the loading DOM element\n console.log(\"-----\")\n console.log(slider)\n slider.loader.remove();\n // set the left / top position of \"el\"\n setSlidePosition();\n // if \"vertical\" mode, always use adaptiveHeight to prevent odd behavior\n if (slider.settings.mode === 'vertical') { slider.settings.adaptiveHeight = true; }\n // set the viewport height\n slider.viewport.height(getViewportHeight());\n // make sure everything is positioned just right (same as a window resize)\n el.redrawSlider();\n // onSliderLoad callback\n slider.settings.onSliderLoad.call(el, slider.active.index);\n // slider has been fully initialized\n slider.initialized = true;\n // bind the resize call to the window\n if (slider.settings.responsive) { $(window).bind('resize', resizeWindow); }\n // if auto is true and has more than 1 page, start the show\n if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }\n // if ticker is true, start the ticker\n if (slider.settings.ticker) { initTicker(); }\n // if pager is requested, make the appropriate pager link active\n if (slider.settings.pager) { updatePagerActive(slider.settings.startSlide); }\n // check for any updates to the controls (like hideControlOnEnd updates)\n if (slider.settings.controls) { updateDirectionControls(); }\n // if touchEnabled is true, setup the touch events\n if (slider.settings.touchEnabled && !slider.settings.ticker) { initTouch(); }\n // if keyboardEnabled is true, setup the keyboard events\n if (slider.settings.keyboardEnabled && !slider.settings.ticker) {\n $(document).keydown(keyPress);\n }\n };\n\n /**\n * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value\n */\n var getViewportHeight = function() {\n var height = 0;\n // first determine which children (slides) should be used in our height calculation\n var children = $();\n // if mode is not \"vertical\" and adaptiveHeight is false, include all children\n if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {\n children = slider.children;\n } else {\n // if not carousel, return the single active child\n if (!slider.carousel) {\n children = slider.children.eq(slider.active.index);\n // if carousel, return a slice of children\n } else {\n // get the individual slide index\n var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();\n // add the current slide to the children\n children = slider.children.eq(currentIndex);\n // cycle through the remaining \"showing\" slides\n for (i = 1; i <= slider.settings.maxSlides - 1; i++) {\n // if looped back to the start\n if (currentIndex + i >= slider.children.length) {\n children = children.add(slider.children.eq(i - 1));\n } else {\n children = children.add(slider.children.eq(currentIndex + i));\n }\n }\n }\n }\n // if \"vertical\" mode, calculate the sum of the heights of the children\n if (slider.settings.mode === 'vertical') {\n children.each(function(index) {\n height += $(this).outerHeight();\n });\n // add user-supplied margins\n if (slider.settings.slideMargin > 0) {\n height += slider.settings.slideMargin * (slider.settings.minSlides - 1);\n }\n // if not \"vertical\" mode, calculate the max height of the children\n } else {\n height = Math.max.apply(Math, children.map(function() {\n return $(this).outerHeight(false);\n }).get());\n }\n\n if (slider.viewport.css('box-sizing') === 'border-box') {\n height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +\n parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));\n } else if (slider.viewport.css('box-sizing') === 'padding-box') {\n height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));\n }\n\n return height;\n };\n\n /**\n * Returns the calculated width to be used for the outer wrapper / viewport\n */\n var getViewportMaxWidth = function() {\n var width = '100%';\n if (slider.settings.slideWidth > 0) {\n if (slider.settings.mode === 'horizontal') {\n width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);\n } else {\n width = slider.settings.slideWidth;\n }\n }\n return width;\n };\n\n /**\n * Returns the calculated width to be applied to each slide\n */\n var getSlideWidth = function() {\n var newElWidth = slider.settings.slideWidth, // start with any user-supplied slide width\n wrapWidth = slider.viewport.width(); // get the current viewport width\n // if slide width was not supplied, or is larger than the viewport use the viewport width\n if (slider.settings.slideWidth === 0 ||\n (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||\n slider.settings.mode === 'vertical') {\n newElWidth = wrapWidth;\n // if carousel, use the thresholds to determine the width\n } else if (slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal') {\n if (wrapWidth > slider.maxThreshold) {\n return newElWidth;\n } else if (wrapWidth < slider.minThreshold) {\n newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;\n } else if (slider.settings.shrinkItems) {\n newElWidth = Math.floor((wrapWidth + slider.settings.slideMargin) / (Math.ceil((wrapWidth + slider.settings.slideMargin) / (newElWidth + slider.settings.slideMargin))) - slider.settings.slideMargin);\n }\n }\n return newElWidth;\n };\n\n /**\n * Returns the number of slides currently visible in the viewport (includes partially visible slides)\n */\n var getNumberSlidesShowing = function() {\n var slidesShowing = 1,\n childWidth = null;\n if (slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0) {\n // if viewport is smaller than minThreshold, return minSlides\n if (slider.viewport.width() < slider.minThreshold) {\n slidesShowing = slider.settings.minSlides;\n // if viewport is larger than maxThreshold, return maxSlides\n } else if (slider.viewport.width() > slider.maxThreshold) {\n slidesShowing = slider.settings.maxSlides;\n // if viewport is between min / max thresholds, divide viewport width by first child width\n } else {\n childWidth = slider.children.first().width() + slider.settings.slideMargin;\n slidesShowing = Math.floor((slider.viewport.width() +\n slider.settings.slideMargin) / childWidth);\n }\n // if \"vertical\" mode, slides showing will always be minSlides\n } else if (slider.settings.mode === 'vertical') {\n slidesShowing = slider.settings.minSlides;\n }\n return slidesShowing;\n };\n\n /**\n * Returns the number of pages (one full viewport of slides is one \"page\")\n */\n var getPagerQty = function() {\n var pagerQty = 0,\n breakPoint = 0,\n counter = 0;\n // if moveSlides is specified by the user\n if (slider.settings.moveSlides > 0) {\n if (slider.settings.infiniteLoop) {\n pagerQty = Math.ceil(slider.children.length / getMoveBy());\n } else {\n // when breakpoint goes above children length, counter is the number of pages\n while (breakPoint < slider.children.length) {\n ++pagerQty;\n breakPoint = counter + getNumberSlidesShowing();\n counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();\n }\n }\n // if moveSlides is 0 (auto) divide children length by sides showing, then round up\n } else {\n pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());\n }\n return pagerQty;\n };\n\n /**\n * Returns the number of individual slides by which to shift the slider\n */\n var getMoveBy = function() {\n // if moveSlides was set by the user and moveSlides is less than number of slides showing\n if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()) {\n return slider.settings.moveSlides;\n }\n // if moveSlides is 0 (auto)\n return getNumberSlidesShowing();\n };\n\n /**\n * Sets the slider's (el) left or top position\n */\n var setSlidePosition = function() {\n var position, lastChild, lastShowingIndex;\n // if last slide, not infinite loop, and number of children is larger than specified maxSlides\n if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {\n if (slider.settings.mode === 'horizontal') {\n // get the last child's position\n lastChild = slider.children.last();\n position = lastChild.position();\n // set the left position\n setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);\n } else if (slider.settings.mode === 'vertical') {\n // get the last showing index's position\n lastShowingIndex = slider.children.length - slider.settings.minSlides;\n position = slider.children.eq(lastShowingIndex).position();\n // set the top position\n setPositionProperty(-position.top, 'reset', 0);\n }\n // if not last slide\n } else {\n // get the position of the first showing slide\n position = slider.children.eq(slider.active.index * getMoveBy()).position();\n // check for last slide\n if (slider.active.index === getPagerQty() - 1) { slider.active.last = true; }\n // set the respective position\n if (position !== undefined) {\n if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }\n else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }\n }\n }\n };\n\n /**\n * Sets the el's animating property position (which in turn will sometimes animate el).\n * If using CSS, sets the transform property. If not using CSS, sets the top / left property.\n *\n * @param value (int)\n * - the animating property's value\n *\n * @param type (string) 'slide', 'reset', 'ticker'\n * - the type of instance for which the function is being\n *\n * @param duration (int)\n * - the amount of time (in ms) the transition should occupy\n *\n * @param params (array) optional\n * - an optional parameter containing any variables that need to be passed in\n */\n var setPositionProperty = function(value, type, duration, params) {\n var animateObj, propValue;\n // use CSS transform\n if (slider.usingCSS) {\n // determine the translate3d value\n propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';\n // add the CSS transition-duration\n el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');\n if (type === 'slide') {\n // set the property value\n el.css(slider.animProp, propValue);\n if (duration !== 0) {\n // bind a callback method - executes when CSS transition completes\n el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {\n //make sure it's the correct one\n if (!$(e.target).is(el)) { return; }\n // unbind the callback\n el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');\n updateAfterSlideTransition();\n });\n } else { //duration = 0\n updateAfterSlideTransition();\n }\n } else if (type === 'reset') {\n el.css(slider.animProp, propValue);\n } else if (type === 'ticker') {\n // make the transition use 'linear'\n el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');\n el.css(slider.animProp, propValue);\n if (duration !== 0) {\n el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {\n //make sure it's the correct one\n if (!$(e.target).is(el)) { return; }\n // unbind the callback\n el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');\n // reset the position\n setPositionProperty(params.resetValue, 'reset', 0);\n // start the loop again\n tickerLoop();\n });\n } else { //duration = 0\n setPositionProperty(params.resetValue, 'reset', 0);\n tickerLoop();\n }\n }\n // use JS animate\n } else {\n animateObj = {};\n animateObj[slider.animProp] = value;\n if (type === 'slide') {\n el.animate(animateObj, duration, slider.settings.easing, function() {\n updateAfterSlideTransition();\n });\n } else if (type === 'reset') {\n el.css(slider.animProp, value);\n } else if (type === 'ticker') {\n el.animate(animateObj, duration, 'linear', function() {\n setPositionProperty(params.resetValue, 'reset', 0);\n // run the recursive loop after animation\n tickerLoop();\n });\n }\n }\n };\n\n /**\n * Populates the pager with proper amount of pages\n */\n var populatePager = function() {\n var pagerHtml = '',\n linkContent = '',\n pagerQty = getPagerQty();\n // loop through each pager item\n for (var i = 0; i < pagerQty; i++) {\n linkContent = '';\n // if a buildPager function is supplied, use it to get pager link value, else use index + 1\n if (slider.settings.buildPager && $.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {\n linkContent = slider.settings.buildPager(i);\n slider.pagerEl.addClass('bx-custom-pager');\n } else {\n linkContent = i + 1;\n slider.pagerEl.addClass('bx-default-pager');\n }\n // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;\n // add the markup to the string\n pagerHtml += '';\n }\n // populate the pager element with pager links\n slider.pagerEl.html(pagerHtml);\n };\n\n /**\n * Appends the pager to the controls element\n */\n var appendPager = function() {\n if (!slider.settings.pagerCustom) {\n // create the pager DOM element\n slider.pagerEl = $('
');\n // if a pager selector was supplied, populate it with the pager\n if (slider.settings.pagerSelector) {\n $(slider.settings.pagerSelector).html(slider.pagerEl);\n // if no pager selector was supplied, add it after the wrapper\n } else {\n slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);\n }\n // populate the pager\n populatePager();\n } else {\n slider.pagerEl = $(slider.settings.pagerCustom);\n }\n // assign the pager click binding\n slider.pagerEl.on('click touchend', 'a', clickPagerBind);\n };\n\n /**\n * Appends prev / next controls to the controls element\n */\n var appendControls = function() {\n slider.controls.next = $('' + slider.settings.nextText + '');\n slider.controls.prev = $('' + slider.settings.prevText + '');\n // bind click actions to the controls\n slider.controls.next.bind('click touchend', clickNextBind);\n slider.controls.prev.bind('click touchend', clickPrevBind);\n // if nextSelector was supplied, populate it\n if (slider.settings.nextSelector) {\n $(slider.settings.nextSelector).append(slider.controls.next);\n }\n // if prevSelector was supplied, populate it\n if (slider.settings.prevSelector) {\n $(slider.settings.prevSelector).append(slider.controls.prev);\n }\n // if no custom selectors were supplied\n if (!slider.settings.nextSelector && !slider.settings.prevSelector) {\n // add the controls to the DOM\n slider.controls.directionEl = $('
');\n // add the control elements to the directionEl\n slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);\n // slider.viewport.append(slider.controls.directionEl);\n slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);\n }\n };\n\n /**\n * Appends start / stop auto controls to the controls element\n */\n var appendControlsAuto = function() {\n slider.controls.start = $('');\n slider.controls.stop = $('');\n // add the controls to the DOM\n slider.controls.autoEl = $('
');\n // bind click actions to the controls\n slider.controls.autoEl.on('click', '.bx-start', clickStartBind);\n slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);\n // if autoControlsCombine, insert only the \"start\" control\n if (slider.settings.autoControlsCombine) {\n slider.controls.autoEl.append(slider.controls.start);\n // if autoControlsCombine is false, insert both controls\n } else {\n slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);\n }\n // if auto controls selector was supplied, populate it with the controls\n if (slider.settings.autoControlsSelector) {\n $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);\n // if auto controls selector was not supplied, add it after the wrapper\n } else {\n slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);\n }\n // update the auto controls\n updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');\n };\n\n /**\n * Appends image captions to the DOM\n */\n var appendCaptions = function() {\n // cycle through each child\n slider.children.each(function(index) {\n // get the image title attribute\n var title = $(this).find('img:first').attr('title');\n // append the caption\n if (title !== undefined && ('' + title).length) {\n $(this).append('
' + title + '
');\n }\n });\n };\n\n /**\n * Click next binding\n *\n * @param e (event)\n * - DOM event object\n */\n var clickNextBind = function(e) {\n e.preventDefault();\n if (slider.controls.el.hasClass('disabled')) { return; }\n // if auto show is running, stop it\n if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }\n el.goToNextSlide();\n };\n\n /**\n * Click prev binding\n *\n * @param e (event)\n * - DOM event object\n */\n var clickPrevBind = function(e) {\n e.preventDefault();\n if (slider.controls.el.hasClass('disabled')) { return; }\n // if auto show is running, stop it\n if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }\n el.goToPrevSlide();\n };\n\n /**\n * Click start binding\n *\n * @param e (event)\n * - DOM event object\n */\n var clickStartBind = function(e) {\n el.startAuto();\n e.preventDefault();\n };\n\n /**\n * Click stop binding\n *\n * @param e (event)\n * - DOM event object\n */\n var clickStopBind = function(e) {\n el.stopAuto();\n e.preventDefault();\n };\n\n /**\n * Click pager binding\n *\n * @param e (event)\n * - DOM event object\n */\n var clickPagerBind = function(e) {\n var pagerLink, pagerIndex;\n e.preventDefault();\n if (slider.controls.el.hasClass('disabled')) {\n return;\n }\n // if auto show is running, stop it\n if (slider.settings.auto && slider.settings.stopAutoOnClick) { el.stopAuto(); }\n pagerLink = $(e.currentTarget);\n if (pagerLink.attr('data-slide-index') !== undefined) {\n pagerIndex = parseInt(pagerLink.attr('data-slide-index'));\n // if clicked pager link is not active, continue with the goToSlide call\n if (pagerIndex !== slider.active.index) { el.goToSlide(pagerIndex); }\n }\n };\n\n /**\n * Updates the pager links with an active class\n *\n * @param slideIndex (int)\n * - index of slide to make active\n */\n var updatePagerActive = function(slideIndex) {\n // if \"short\" pager type\n var len = slider.children.length; // nb of children\n if (slider.settings.pagerType === 'short') {\n if (slider.settings.maxSlides > 1) {\n len = Math.ceil(slider.children.length / slider.settings.maxSlides);\n }\n slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + len);\n return;\n }\n // remove all pager active classes\n slider.pagerEl.find('a').removeClass('active');\n // apply the active class for all pagers\n slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });\n };\n\n /**\n * Performs needed actions after a slide transition\n */\n var updateAfterSlideTransition = function() {\n // if infinite loop is true\n if (slider.settings.infiniteLoop) {\n var position = '';\n // first slide\n if (slider.active.index === 0) {\n // set the new position\n position = slider.children.eq(0).position();\n // carousel, last slide\n } else if (slider.active.index === getPagerQty() - 1 && slider.carousel) {\n position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();\n // last slide\n } else if (slider.active.index === slider.children.length - 1) {\n position = slider.children.eq(slider.children.length - 1).position();\n }\n if (position) {\n if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }\n else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }\n }\n }\n // declare that the transition is complete\n slider.working = false;\n // onSlideAfter callback\n slider.settings.onSlideAfter.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);\n };\n\n /**\n * Updates the auto controls state (either active, or combined switch)\n *\n * @param state (string) \"start\", \"stop\"\n * - the new state of the auto show\n */\n var updateAutoControls = function(state) {\n // if autoControlsCombine is true, replace the current control with the new state\n if (slider.settings.autoControlsCombine) {\n slider.controls.autoEl.html(slider.controls[state]);\n // if autoControlsCombine is false, apply the \"active\" class to the appropriate control\n } else {\n slider.controls.autoEl.find('a').removeClass('active');\n slider.controls.autoEl.find('a:not(.bx-' + state + ')').addClass('active');\n }\n };\n\n /**\n * Updates the direction controls (checks if either should be hidden)\n */\n var updateDirectionControls = function() {\n if (getPagerQty() === 1) {\n slider.controls.prev.addClass('disabled');\n slider.controls.next.addClass('disabled');\n } else if (!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd) {\n // if first slide\n if (slider.active.index === 0) {\n slider.controls.prev.addClass('disabled');\n slider.controls.next.removeClass('disabled');\n // if last slide\n } else if (slider.active.index === getPagerQty() - 1) {\n slider.controls.next.addClass('disabled');\n slider.controls.prev.removeClass('disabled');\n // if any slide in the middle\n } else {\n slider.controls.prev.removeClass('disabled');\n slider.controls.next.removeClass('disabled');\n }\n }\n };\n\n /**\n * Initializes the auto process\n */\n var initAuto = function() {\n // if autoDelay was supplied, launch the auto show using a setTimeout() call\n if (slider.settings.autoDelay > 0) {\n var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);\n // if autoDelay was not supplied, start the auto show normally\n } else {\n el.startAuto();\n\n //add focus and blur events to ensure its running if timeout gets paused\n $(window).focus(function() {\n el.startAuto();\n }).blur(function() {\n el.stopAuto();\n });\n }\n // if autoHover is requested\n if (slider.settings.autoHover) {\n // on el hover\n el.hover(function() {\n // if the auto show is currently playing (has an active interval)\n if (slider.interval) {\n // stop the auto show and pass true argument which will prevent control update\n el.stopAuto(true);\n // create a new autoPaused value which will be used by the relative \"mouseout\" event\n slider.autoPaused = true;\n }\n }, function() {\n // if the autoPaused value was created be the prior \"mouseover\" event\n if (slider.autoPaused) {\n // start the auto show and pass true argument which will prevent control update\n el.startAuto(true);\n // reset the autoPaused value\n slider.autoPaused = null;\n }\n });\n }\n };\n\n /**\n * Initializes the ticker process\n */\n var initTicker = function() {\n var startPosition = 0,\n position, transform, value, idx, ratio, property, newSpeed, totalDimens;\n // if autoDirection is \"next\", append a clone of the entire slider\n if (slider.settings.autoDirection === 'next') {\n el.append(slider.children.clone().addClass('bx-clone'));\n // if autoDirection is \"prev\", prepend a clone of the entire slider, and set the left position\n } else {\n el.prepend(slider.children.clone().addClass('bx-clone'));\n position = slider.children.first().position();\n startPosition = slider.settings.mode === 'horizontal' ? -position.left : -position.top;\n }\n setPositionProperty(startPosition, 'reset', 0);\n // do not allow controls in ticker mode\n slider.settings.pager = false;\n slider.settings.controls = false;\n slider.settings.autoControls = false;\n // if autoHover is requested\n if (slider.settings.tickerHover) {\n if (slider.usingCSS) {\n idx = slider.settings.mode === 'horizontal' ? 4 : 5;\n slider.viewport.hover(function() {\n transform = el.css('-' + slider.cssPrefix + '-transform');\n value = parseFloat(transform.split(',')[idx]);\n setPositionProperty(value, 'reset', 0);\n }, function() {\n totalDimens = 0;\n slider.children.each(function(index) {\n totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);\n });\n // calculate the speed ratio (used to determine the new speed to finish the paused animation)\n ratio = slider.settings.speed / totalDimens;\n // determine which property to use\n property = slider.settings.mode === 'horizontal' ? 'left' : 'top';\n // calculate the new speed\n newSpeed = ratio * (totalDimens - (Math.abs(parseInt(value))));\n tickerLoop(newSpeed);\n });\n } else {\n // on el hover\n slider.viewport.hover(function() {\n el.stop();\n }, function() {\n // calculate the total width of children (used to calculate the speed ratio)\n totalDimens = 0;\n slider.children.each(function(index) {\n totalDimens += slider.settings.mode === 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);\n });\n // calculate the speed ratio (used to determine the new speed to finish the paused animation)\n ratio = slider.settings.speed / totalDimens;\n // determine which property to use\n property = slider.settings.mode === 'horizontal' ? 'left' : 'top';\n // calculate the new speed\n newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));\n tickerLoop(newSpeed);\n });\n }\n }\n // start the ticker loop\n tickerLoop();\n };\n\n /**\n * Runs a continuous loop, news ticker-style\n */\n var tickerLoop = function(resumeSpeed) {\n var speed = resumeSpeed ? resumeSpeed : slider.settings.speed,\n position = {left: 0, top: 0},\n reset = {left: 0, top: 0},\n animateProperty, resetValue, params;\n\n // if \"next\" animate left position to last child, then reset left to 0\n if (slider.settings.autoDirection === 'next') {\n position = el.find('.bx-clone').first().position();\n // if \"prev\" animate left position to 0, then reset left to first non-clone child\n } else {\n reset = slider.children.first().position();\n }\n animateProperty = slider.settings.mode === 'horizontal' ? -position.left : -position.top;\n resetValue = slider.settings.mode === 'horizontal' ? -reset.left : -reset.top;\n params = {resetValue: resetValue};\n setPositionProperty(animateProperty, 'ticker', speed, params);\n };\n\n /**\n * Check if el is on screen\n */\n var isOnScreen = function(el) {\n var win = $(window),\n viewport = {\n top: win.scrollTop(),\n left: win.scrollLeft()\n },\n bounds = el.offset();\n\n viewport.right = viewport.left + win.width();\n viewport.bottom = viewport.top + win.height();\n bounds.right = bounds.left + el.outerWidth();\n bounds.bottom = bounds.top + el.outerHeight();\n\n return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom));\n };\n\n /**\n * Initializes keyboard events\n */\n var keyPress = function(e) {\n var activeElementTag = document.activeElement.tagName.toLowerCase(),\n tagFilters = 'input|textarea',\n p = new RegExp(activeElementTag,['i']),\n result = p.exec(tagFilters);\n\n if (result == null && isOnScreen(el)) {\n if (e.keyCode === 39) {\n clickNextBind(e);\n return false;\n } else if (e.keyCode === 37) {\n clickPrevBind(e);\n return false;\n }\n }\n };\n\n /**\n * Initializes touch events\n */\n var initTouch = function() {\n // initialize object to contain all touch values\n slider.touch = {\n start: {x: 0, y: 0},\n end: {x: 0, y: 0}\n };\n slider.viewport.bind('touchstart MSPointerDown pointerdown', onTouchStart);\n\n //for browsers that have implemented pointer events and fire a click after\n //every pointerup regardless of whether pointerup is on same screen location as pointerdown or not\n slider.viewport.on('click', '.bxslider a', function(e) {\n if (slider.viewport.hasClass('click-disabled')) {\n e.preventDefault();\n slider.viewport.removeClass('click-disabled');\n }\n });\n };\n\n /**\n * Event handler for \"touchstart\"\n *\n * @param e (event)\n * - DOM event object\n */\n var onTouchStart = function(e) {\n //disable slider controls while user is interacting with slides to avoid slider freeze that happens on touch devices when a slide swipe happens immediately after interacting with slider controls\n slider.controls.el.addClass('disabled');\n\n if (slider.working) {\n e.preventDefault();\n slider.controls.el.removeClass('disabled');\n } else {\n // record the original position when touch starts\n slider.touch.originalPos = el.position();\n var orig = e.originalEvent,\n touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];\n // record the starting touch x, y coordinates\n slider.touch.start.x = touchPoints[0].pageX;\n slider.touch.start.y = touchPoints[0].pageY;\n\n if (slider.viewport.get(0).setPointerCapture) {\n slider.pointerId = orig.pointerId;\n slider.viewport.get(0).setPointerCapture(slider.pointerId);\n }\n // bind a \"touchmove\" event to the viewport\n slider.viewport.bind('touchmove MSPointerMove pointermove', onTouchMove);\n // bind a \"touchend\" event to the viewport\n slider.viewport.bind('touchend MSPointerUp pointerup', onTouchEnd);\n slider.viewport.bind('MSPointerCancel pointercancel', onPointerCancel);\n }\n };\n\n /**\n * Cancel Pointer for Windows Phone\n *\n * @param e (event)\n * - DOM event object\n */\n var onPointerCancel = function(e) {\n /* onPointerCancel handler is needed to deal with situations when a touchend\n doesn't fire after a touchstart (this happens on windows phones only) */\n setPositionProperty(slider.touch.originalPos.left, 'reset', 0);\n\n //remove handlers\n slider.controls.el.removeClass('disabled');\n slider.viewport.unbind('MSPointerCancel pointercancel', onPointerCancel);\n slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);\n slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);\n if (slider.viewport.get(0).releasePointerCapture) {\n slider.viewport.get(0).releasePointerCapture(slider.pointerId);\n }\n };\n\n /**\n * Event handler for \"touchmove\"\n *\n * @param e (event)\n * - DOM event object\n */\n var onTouchMove = function(e) {\n var orig = e.originalEvent,\n touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],\n // if scrolling on y axis, do not prevent default\n xMovement = Math.abs(touchPoints[0].pageX - slider.touch.start.x),\n yMovement = Math.abs(touchPoints[0].pageY - slider.touch.start.y),\n value = 0,\n change = 0;\n\n // x axis swipe\n if ((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX) {\n e.preventDefault();\n // y axis swipe\n } else if ((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY) {\n e.preventDefault();\n }\n if (slider.settings.mode !== 'fade' && slider.settings.oneToOneTouch) {\n // if horizontal, drag along x axis\n if (slider.settings.mode === 'horizontal') {\n change = touchPoints[0].pageX - slider.touch.start.x;\n value = slider.touch.originalPos.left + change;\n // if vertical, drag along y axis\n } else {\n change = touchPoints[0].pageY - slider.touch.start.y;\n value = slider.touch.originalPos.top + change;\n }\n setPositionProperty(value, 'reset', 0);\n }\n };\n\n /**\n * Event handler for \"touchend\"\n *\n * @param e (event)\n * - DOM event object\n */\n var onTouchEnd = function(e) {\n slider.viewport.unbind('touchmove MSPointerMove pointermove', onTouchMove);\n //enable slider controls as soon as user stops interacing with slides\n slider.controls.el.removeClass('disabled');\n var orig = e.originalEvent,\n touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],\n value = 0,\n distance = 0;\n // record end x, y positions\n slider.touch.end.x = touchPoints[0].pageX;\n slider.touch.end.y = touchPoints[0].pageY;\n // if fade mode, check if absolute x distance clears the threshold\n if (slider.settings.mode === 'fade') {\n distance = Math.abs(slider.touch.start.x - slider.touch.end.x);\n if (distance >= slider.settings.swipeThreshold) {\n if (slider.touch.start.x > slider.touch.end.x) {\n el.goToNextSlide();\n } else {\n el.goToPrevSlide();\n }\n el.stopAuto();\n }\n // not fade mode\n } else {\n // calculate distance and el's animate property\n if (slider.settings.mode === 'horizontal') {\n distance = slider.touch.end.x - slider.touch.start.x;\n value = slider.touch.originalPos.left;\n } else {\n distance = slider.touch.end.y - slider.touch.start.y;\n value = slider.touch.originalPos.top;\n }\n // if not infinite loop and first / last slide, do not attempt a slide transition\n if (!slider.settings.infiniteLoop && ((slider.active.index === 0 && distance > 0) || (slider.active.last && distance < 0))) {\n setPositionProperty(value, 'reset', 200);\n } else {\n // check if distance clears threshold\n if (Math.abs(distance) >= slider.settings.swipeThreshold) {\n if (distance < 0) {\n el.goToNextSlide();\n } else {\n el.goToPrevSlide();\n }\n el.stopAuto();\n } else {\n // el.animate(property, 200);\n setPositionProperty(value, 'reset', 200);\n }\n }\n }\n slider.viewport.unbind('touchend MSPointerUp pointerup', onTouchEnd);\n if (slider.viewport.get(0).releasePointerCapture) {\n slider.viewport.get(0).releasePointerCapture(slider.pointerId);\n }\n };\n\n /**\n * Window resize event callback\n */\n var resizeWindow = function(e) {\n // don't do anything if slider isn't initialized.\n if (!slider.initialized) { return; }\n // Delay if slider working.\n if (slider.working) {\n window.setTimeout(resizeWindow, 10);\n } else {\n // get the new window dimens (again, thank you IE)\n var windowWidthNew = $(window).width(),\n windowHeightNew = $(window).height();\n // make sure that it is a true window resize\n // *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements\n // are resized. Can you just die already?*\n if (windowWidth !== windowWidthNew || windowHeight !== windowHeightNew) {\n // set the new window dimens\n windowWidth = windowWidthNew;\n windowHeight = windowHeightNew;\n // update all dynamic elements\n el.redrawSlider();\n // Call user resize handler\n slider.settings.onSliderResize.call(el, slider.active.index);\n }\n }\n };\n\n /**\n * Adds an aria-hidden=true attribute to each element\n *\n * @param startVisibleIndex (int)\n * - the first visible element's index\n */\n var applyAriaHiddenAttributes = function(startVisibleIndex) {\n var numberOfSlidesShowing = getNumberSlidesShowing();\n // only apply attributes if the setting is enabled and not in ticker mode\n if (slider.settings.ariaHidden && !slider.settings.ticker) {\n // add aria-hidden=true to all elements\n slider.children.attr('aria-hidden', 'true');\n // get the visible elements and change to aria-hidden=false\n slider.children.slice(startVisibleIndex, startVisibleIndex + numberOfSlidesShowing).attr('aria-hidden', 'false');\n }\n };\n\n /**\n * Returns index according to present page range\n *\n * @param slideOndex (int)\n * - the desired slide index\n */\n var setSlideIndex = function(slideIndex) {\n if (slideIndex < 0) {\n if (slider.settings.infiniteLoop) {\n return getPagerQty() - 1;\n }else {\n //we don't go to undefined slides\n return slider.active.index;\n }\n // if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)\n } else if (slideIndex >= getPagerQty()) {\n if (slider.settings.infiniteLoop) {\n return 0;\n } else {\n //we don't move to undefined pages\n return slider.active.index;\n }\n // set active index to requested slide\n } else {\n return slideIndex;\n }\n };\n\n /**\n * ===================================================================================\n * = PUBLIC FUNCTIONS\n * ===================================================================================\n */\n\n /**\n * Performs slide transition to the specified slide\n *\n * @param slideIndex (int)\n * - the destination slide's index (zero-based)\n *\n * @param direction (string)\n * - INTERNAL USE ONLY - the direction of travel (\"prev\" / \"next\")\n */\n el.goToSlide = function(slideIndex, direction) {\n // onSlideBefore, onSlideNext, onSlidePrev callbacks\n // Allow transition canceling based on returned value\n var performTransition = true,\n moveBy = 0,\n position = {left: 0, top: 0},\n lastChild = null,\n lastShowingIndex, eq, value, requestEl;\n // store the old index\n slider.oldIndex = slider.active.index;\n //set new index\n slider.active.index = setSlideIndex(slideIndex);\n\n // if plugin is currently in motion, ignore request\n if (slider.working || slider.active.index === slider.oldIndex) { return; }\n // declare that plugin is in motion\n slider.working = true;\n\n performTransition = slider.settings.onSlideBefore.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);\n\n // If transitions canceled, reset and return\n if (typeof (performTransition) !== 'undefined' && !performTransition) {\n slider.active.index = slider.oldIndex; // restore old index\n slider.working = false; // is not in motion\n return;\n }\n\n if (direction === 'next') {\n // Prevent canceling in future functions or lack there-of from negating previous commands to cancel\n if (!slider.settings.onSlideNext.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {\n performTransition = false;\n }\n } else if (direction === 'prev') {\n // Prevent canceling in future functions or lack there-of from negating previous commands to cancel\n if (!slider.settings.onSlidePrev.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {\n performTransition = false;\n }\n }\n\n // check if last slide\n slider.active.last = slider.active.index >= getPagerQty() - 1;\n // update the pager with active class\n if (slider.settings.pager || slider.settings.pagerCustom) { updatePagerActive(slider.active.index); }\n // // check for direction control update\n if (slider.settings.controls) { updateDirectionControls(); }\n // if slider is set to mode: \"fade\"\n if (slider.settings.mode === 'fade') {\n // if adaptiveHeight is true and next height is different from current height, animate to the new height\n if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {\n slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);\n }\n // fade out the visible child and reset its z-index value\n slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});\n // fade in the newly requested slide\n slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex + 1).fadeIn(slider.settings.speed, function() {\n $(this).css('zIndex', slider.settings.slideZIndex);\n updateAfterSlideTransition();\n });\n // slider mode is not \"fade\"\n } else {\n // if adaptiveHeight is true and next height is different from current height, animate to the new height\n if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {\n slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);\n }\n // if carousel and not infinite loop\n if (!slider.settings.infiniteLoop && slider.carousel && slider.active.last) {\n if (slider.settings.mode === 'horizontal') {\n // get the last child position\n lastChild = slider.children.eq(slider.children.length - 1);\n position = lastChild.position();\n // calculate the position of the last slide\n moveBy = slider.viewport.width() - lastChild.outerWidth();\n } else {\n // get last showing index position\n lastShowingIndex = slider.children.length - slider.settings.minSlides;\n position = slider.children.eq(lastShowingIndex).position();\n }\n // horizontal carousel, going previous while on first slide (infiniteLoop mode)\n } else if (slider.carousel && slider.active.last && direction === 'prev') {\n // get the last child position\n eq = slider.settings.moveSlides === 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);\n lastChild = el.children('.bx-clone').eq(eq);\n position = lastChild.position();\n // if infinite loop and \"Next\" is clicked on the last slide\n } else if (direction === 'next' && slider.active.index === 0) {\n // get the last clone position\n position = el.find('> .bx-clone').eq(slider.settings.maxSlides).position();\n slider.active.last = false;\n // normal non-zero requests\n } else if (slideIndex >= 0) {\n //parseInt is applied to allow floats for slides/page\n requestEl = slideIndex * parseInt(getMoveBy());\n position = slider.children.eq(requestEl).position();\n }\n\n /* If the position doesn't exist\n * (e.g. if you destroy the slider on a next click),\n * it doesn't throw an error.\n */\n if (typeof (position) !== 'undefined') {\n value = slider.settings.mode === 'horizontal' ? -(position.left - moveBy) : -position.top;\n // plugin values to be animated\n setPositionProperty(value, 'slide', slider.settings.speed);\n } else {\n slider.working = false;\n }\n }\n if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }\n };\n\n /**\n * Transitions to the next slide in the show\n */\n el.goToNextSlide = function() {\n // if infiniteLoop is false and last page is showing, disregard call\n if (!slider.settings.infiniteLoop && slider.active.last) { return; }\n var pagerIndex = parseInt(slider.active.index) + 1;\n el.goToSlide(pagerIndex, 'next');\n };\n\n /**\n * Transitions to the prev slide in the show\n */\n el.goToPrevSlide = function() {\n // if infiniteLoop is false and last page is showing, disregard call\n if (!slider.settings.infiniteLoop && slider.active.index === 0) { return; }\n var pagerIndex = parseInt(slider.active.index) - 1;\n el.goToSlide(pagerIndex, 'prev');\n };\n\n /**\n * Starts the auto show\n *\n * @param preventControlUpdate (boolean)\n * - if true, auto controls state will not be updated\n */\n el.startAuto = function(preventControlUpdate) {\n // if an interval already exists, disregard call\n if (slider.interval) { return; }\n // create an interval\n slider.interval = setInterval(function() {\n if (slider.settings.autoDirection === 'next') {\n el.goToNextSlide();\n } else {\n el.goToPrevSlide();\n }\n }, slider.settings.pause);\n // if auto controls are displayed and preventControlUpdate is not true\n if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('stop'); }\n };\n\n /**\n * Stops the auto show\n *\n * @param preventControlUpdate (boolean)\n * - if true, auto controls state will not be updated\n */\n el.stopAuto = function(preventControlUpdate) {\n // if no interval exists, disregard call\n if (!slider.interval) { return; }\n // clear the interval\n clearInterval(slider.interval);\n slider.interval = null;\n // if auto controls are displayed and preventControlUpdate is not true\n if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('start'); }\n };\n\n /**\n * Returns current slide index (zero-based)\n */\n el.getCurrentSlide = function() {\n return slider.active.index;\n };\n\n /**\n * Returns current slide element\n */\n el.getCurrentSlideElement = function() {\n return slider.children.eq(slider.active.index);\n };\n\n /**\n * Returns a slide element\n * @param index (int)\n * - The index (zero-based) of the element you want returned.\n */\n el.getSlideElement = function(index) {\n return slider.children.eq(index);\n };\n\n /**\n * Returns number of slides in show\n */\n el.getSlideCount = function() {\n return slider.children.length;\n };\n\n /**\n * Return slider.working variable\n */\n el.isWorking = function() {\n return slider.working;\n };\n\n /**\n * Update all dynamic slider elements\n */\n el.redrawSlider = function() {\n // resize all children in ratio to new screen size\n slider.children.add(el.find('.bx-clone')).outerWidth(getSlideWidth());\n // adjust the height\n slider.viewport.css('height', getViewportHeight());\n // update the slide position\n if (!slider.settings.ticker) { setSlidePosition(); }\n // if active.last was true before the screen resize, we want\n // to keep it last no matter what screen size we end on\n if (slider.active.last) { slider.active.index = getPagerQty() - 1; }\n // if the active index (page) no longer exists due to the resize, simply set the index as last\n if (slider.active.index >= getPagerQty()) { slider.active.last = true; }\n // if a pager is being displayed and a custom pager is not being used, update it\n if (slider.settings.pager && !slider.settings.pagerCustom) {\n populatePager();\n updatePagerActive(slider.active.index);\n }\n if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }\n };\n\n /**\n * Destroy the current instance of the slider (revert everything back to original state)\n */\n el.destroySlider = function() {\n // don't do anything if slider has already been destroyed\n if (!slider.initialized) { return; }\n slider.initialized = false;\n $('.bx-clone', this).remove();\n slider.children.each(function() {\n if ($(this).data('origStyle') !== undefined) {\n $(this).attr('style', $(this).data('origStyle'));\n } else {\n $(this).removeAttr('style');\n }\n });\n if ($(this).data('origStyle') !== undefined) {\n this.attr('style', $(this).data('origStyle'));\n } else {\n $(this).removeAttr('style');\n }\n $(this).unwrap().unwrap();\n if (slider.controls.el) { slider.controls.el.remove(); }\n if (slider.controls.next) { slider.controls.next.remove(); }\n if (slider.controls.prev) { slider.controls.prev.remove(); }\n if (slider.pagerEl && slider.settings.controls && !slider.settings.pagerCustom) { slider.pagerEl.remove(); }\n $('.bx-caption', this).remove();\n if (slider.controls.autoEl) { slider.controls.autoEl.remove(); }\n clearInterval(slider.interval);\n if (slider.settings.responsive) { $(window).unbind('resize', resizeWindow); }\n if (slider.settings.keyboardEnabled) { $(document).unbind('keydown', keyPress); }\n //remove self reference in data\n $(this).removeData('bxSlider');\n };\n\n /**\n * Reload the slider (revert all DOM changes, and re-initialize)\n */\n el.reloadSlider = function(settings) {\n if (settings !== undefined) { options = settings; }\n el.destroySlider();\n init();\n //store reference to self in order to access public functions later\n $(el).data('bxSlider', this);\n };\n\n init();\n\n $(el).data('bxSlider', this);\n\n // returns the current jQuery object\n return this;\n };\n\n})(jQuery);\n","(function() {\n window.CallList = (function() {\n function CallList() {}\n\n CallList.setup = function() {\n return CallList.decorate();\n };\n\n CallList.decorate = function() {\n $(\".js-call-list-jump\").select2();\n $(document).on('change', '.js-call-list-jump', function(e) {\n return window.location = $(this).val();\n });\n $(document).on('click', '.js-call-list', function(e) {\n e.preventDefault();\n $(this).html(\"Working...\").removeClass(\"js-call-list\");\n return $.ajax({\n url: $(this).attr('href'),\n type: 'GET'\n });\n });\n return $(document).on('click', '.js-call-list-expand', function(e) {\n var id;\n e.preventDefault();\n id = $(this).data('id');\n if ($(\"#call_list_\" + id + \"_expand\").length > 0) {\n $(\"#call_list_\" + id + \"_expand\").remove();\n return $(\"#call_list_\" + id).removeClass(\"expanded\");\n } else {\n return $.ajax({\n url: $(this).attr('href'),\n type: 'GET',\n success: function(data) {\n $(\"#call_list_\" + id).after(data);\n $(\"#call_list_\" + id).addClass(\"expanded\");\n return ExtraMessage.scrollToBottom();\n }\n });\n }\n });\n };\n\n return CallList;\n\n })();\n\n}).call(this);","(function() {\n window.CastListExtras = (function() {\n function CastListExtras() {}\n\n CastListExtras.setup = function() {\n return CastListExtras.decorate();\n };\n\n CastListExtras.selectTab = function(tab) {\n $(\".js-cast-list-extras\").find(\".js-table\").attr('class', 'js-table table').addClass(\"on-\" + tab);\n $(\".js-cast-list-extras\").find(\".js-nav-tabs li\").removeClass(\"active\");\n $(\".js-cast-list-extras\").find(\".js-nav-tabs li.col-\" + tab).addClass(\"active\");\n return window.location.hash = \"#\" + tab;\n };\n\n CastListExtras.updateBookingCounts = function() {\n return $(\".js-cast-list-extras\").find(\"th.col-availability[data-type=shooting]\").each(function() {\n var $available, $booked, available, booked, date;\n available = 0;\n booked = 0;\n date = $(this).data('date');\n $available = $(this).find(\".available\");\n $booked = $(this).find(\".booked\");\n $(\".js-cast-list-extras\").find(\"td.col-availability[data-type=shooting]\").each(function() {\n if ($(this).data('date') === date) {\n if ($(this).data('booking') === \"available\") {\n return available += 1;\n } else if ($(this).data('booking') === \"booked\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"locked\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"paid\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"invoiced\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"released_for_payment\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"released_for_invoice\") {\n return booked += 1;\n } else if ($(this).data('booking') === \"payment_sent\") {\n return booked += 1;\n }\n }\n });\n $available.text(available);\n return $booked.text(booked);\n });\n };\n\n CastListExtras.toggleExtra = function(extra) {\n $(\".js-cast-list-extras\").find(\".js-extra[data-extra=\" + extra + \"]\").toggleClass(\"selected\");\n return CastListExtras.updateToolbar();\n };\n\n CastListExtras.updateToolbar = function() {\n var bookings, extras;\n extras = _.map($(\".js-cast-list-extras\").find(\".selected\"), function(e) {\n return $(e).data(\"extra\");\n });\n bookings = _.map($(\".js-cast-list-extras\").find(\".selected\"), function(e) {\n return $(e).data(\"booking\");\n });\n $(\".js-cast-list-extras\").find(\".js-bulk-extra-ids\").val(extras.join(\",\"));\n $(\".js-cast-list-extras\").find(\".js-bulk-booking-ids\").val(bookings.join(\",\"));\n $(\".js-cast-list-extras\").find(\".js-extra-count\").html(extras.length);\n if (extras.length > 0) {\n return $(\".js-cast-list-extras\").find(\".js-action\").removeClass(\"disabled\");\n } else {\n return $(\".js-cast-list-extras\").find(\".js-action\").addClass(\"disabled\");\n }\n };\n\n CastListExtras.toggleTag = function(tag) {\n return $(\".js-cast-list-extras\").find(\".js-tag[data-tag=\" + tag + \"]\").toggleClass(\"btn-primary\");\n };\n\n CastListExtras.updateBooking = function($link) {\n return $.ajax({\n method: \"GET\",\n url: $link.prop(\"href\"),\n dataType: \"html\",\n success: function(data) {\n var $data, $td, $tr, date, extra, type;\n $td = $link.closest(\".js-booking\");\n $data = $(data);\n extra = $data.data(\"extra\");\n type = $data.data(\"type\");\n date = $data.data(\"date\");\n $tr = $(\".js-extra[data-extra=\" + extra + \"]\");\n $tr.find(\".js-booking[data-date=\" + date + \"]\").each(function() {\n if ($(this).data('type') === type) {\n return $(this).replaceWith($(data));\n }\n });\n return CastListExtras.updateBookingCounts();\n }\n });\n };\n\n CastListExtras.replaceRow = function($tr, html) {\n $tr.html(html);\n $('.js-save-select').select2({\n theme: \"bootstrap\",\n width: \"100%\"\n });\n CastListExtras.updateBookingCounts();\n return CastListExtras.decorateTime();\n };\n\n CastListExtras.decorateTime = function() {\n return $('input.js-time').timepicker({\n timeFormat: \"HH:mm\",\n minTime: '00:00',\n maxTime: '23:59',\n startTime: '00:00',\n dynamic: false\n });\n };\n\n CastListExtras.decorate = function() {\n if ($(\".js-cast-list-extras\").length === 0) {\n return;\n }\n\n $(document).on('click', '#capture_ids a', function(e) {\n e.preventDefault();\n let extra_ids = [];\n $(\".js-extra.selected\").each(function() {\n extra_ids.push($(this).data(\"extra\"));\n });\n let url = new URL($(this).attr(\"href\"), window.location.origin);\n url.searchParams.delete(\"sids\");\n if (extra_ids.length > 0) {\n url.searchParams.append(\"sids\", extra_ids.join(\",\"));\n }\n window.location.href = url.toString();\n });\n\n CastListExtras.updateBookingCounts();\n $(\".js-cast-list-extras\").find(\".js-zoom\").zoom();\n $(document).on('click', \".js-fee-override\", function(e) {\n if ($(this).is(\":checked\")) {\n return $(this).closest(\"form\").find(\".js-fee-override-inputs\").show();\n } else {\n return $(this).closest(\"form\").find(\".js-fee-override-inputs\").hide();\n }\n });\n $(\".js-cast-list-extras\").on('click', \".js-existing-value\", function(e) {\n var $input, $sel, $td;\n e.preventDefault();\n $td = $(this).closest(\"td\");\n $input = $td.find(\"input\");\n $sel = $td.find(\"select\");\n if ($input.length > 0) {\n $input.val($(this).data(\"value\"));\n $td.find(\"button\").trigger('click');\n }\n if ($sel.length > 0) {\n $sel.val($(this).data(\"value\"));\n return $sel.trigger('change');\n }\n });\n $(document).on('submit', '.js-booking-paid-form form', function(e) {\n var $form, extra;\n e.preventDefault();\n $form = $(this);\n extra = $(this).closest(\".js-booking-paid-form\").data('extra');\n $.ajax({\n method: \"POST\",\n url: $form.prop(\"action\"),\n data: $form.serialize(),\n dataType: \"html\",\n success: function(data) {\n WebuiPopovers.hideAll();\n return CastListExtras.replaceRow($(\"tr[data-extra=\" + extra + \"]\"), data);\n }\n });\n return false;\n });\n $(\".js-cast-list-extras\").on('click', \".js-state-toggle\", function(e) {\n var $link, $tr;\n e.preventDefault();\n if ($(this).data('action') === \"mark_as_paid\") {\n $link = $(this);\n WebuiPopovers.hideAll();\n $(this).webuiPopover({\n width: 300,\n trigger: \"manual\",\n url: $link.prop('href'),\n type: \"async\",\n title: \"Details\",\n closeable: true,\n cache: false\n });\n return $(this).webuiPopover('show');\n } else {\n $tr = $(this).closest(\"tr\");\n $link = $(this);\n return $.ajax({\n url: $link.prop('href'),\n method: \"POST\",\n dataType: \"html\",\n success: function(data) {\n return CastListExtras.replaceRow($tr, data);\n }\n });\n }\n });\n $(\".js-cast-list-extras\").find(\".js-save-select\").select2({\n theme: \"bootstrap\",\n width: \"100%\"\n });\n $(\".js-cast-list-extras\").on('change', \".js-save-select\", function(e) {\n var $sel, $td, booking, value, subtab;\n booking = $(this).closest(\".js-extra\").data('booking');\n value = $(this).val();\n $sel = $(this);\n $td = $(this).closest(\"td\");\n subtab = $(this).data('subtab');\n return $.ajax({\n url: \"/admin/api/bookings/\" + booking + \"/inline_update\",\n method: \"POST\",\n data: {\n field: $sel.prop(\"name\"),\n value: value,\n subtab: subtab\n },\n dataType: \"html\",\n success: function(data) {\n CastListExtras.replaceRow($td.closest(\"tr\"), data);\n return toastr.success(\"Saved!\");\n },\n error: function() {\n return toastr.error(\"There was a problem saving that change.\");\n }\n });\n });\n $(\".js-cast-list-extras\").on('click', '.js-save-value', function(e) {\n var $input, $td, booking, subtab;\n e.preventDefault();\n $td = $(this).closest(\"td\");\n booking = $(this).closest(\".js-extra\").data('booking');\n $input = $td.find(\"input\");\n subtab = $(this).data('subtab');\n return $.ajax({\n url: \"/admin/api/bookings/\" + booking + \"/inline_update\",\n method: \"POST\",\n data: {\n field: $input.prop(\"name\"),\n value: $input.val(),\n subtab: subtab\n },\n dataType: \"html\",\n success: function(data) {\n CastListExtras.replaceRow($td.closest(\"tr\"), data);\n return toastr.success(\"Saved!\");\n },\n error: function() {\n return toastr.error(\"There was a problem saving that change.\");\n }\n });\n });\n $(\".js-cast-list-extras\").on(\"submit\", \".js-list-quick-search\", function(e) {\n var $form;\n e.preventDefault();\n $form = $(this);\n $.ajax({\n url: $form.prop('action'),\n method: \"GET\",\n data: $form.serialize(),\n dataType: \"html\",\n success: function(data) {\n return $(\".js-quick-search-results\").html(data);\n }\n });\n return false;\n });\n $(\".js-cast-list-extras\").on('submit', '.js-fee-form form', function(e) {\n var $form;\n e.preventDefault();\n $form = $(this);\n $.ajax({\n url: $form.prop('action'),\n method: \"POST\",\n data: $form.serialize(),\n dataType: \"html\",\n success: function(data) {\n return CastListExtras.replaceRow($form.closest(\"tr\"), data);\n }\n });\n return false;\n });\n $(\".js-cast-list-extras\").on('click', '.js-action', function(e) {\n var $reasons, ids, output;\n e.preventDefault();\n if ($(\".js-cast-list-extras\").find(\".selected\").length === 0) {\n alert(\"Please select one or more extras\");\n return;\n }\n if ($(this).hasClass(\"js-action-remove\")) {\n output = confirm($(this).data('confirm'));\n if (!output) {\n return;\n }\n }\n $(\".js-cast-list-extras\").find(\".js-commit\").val($(this).data('commit'));\n if ($(this).data('type') === \"pdf\") {\n $reasons = $(\"#pdf_options\");\n $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n } else if ($(this).data('type') === \"set\") {\n $reasons = $(\"#set_options\");\n ids = $(\".js-cast-list-extras\").find(\".js-bulk-booking-ids\").val();\n $(\".js-bulk-set-ids\").val(ids);\n $(\".js-bulk-set-title\").html(\"Update \" + (ids.split(',').length) + \" extras\");\n $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n } else {\n $(this).closest(\"form\").submit();\n }\n });\n $(document).on('click', \".js-generate-pdf\", function(e) {\n var fields;\n e.preventDefault();\n fields = [];\n $(this).closest(\".js-pdf-options\").find(\"input:checked\").each(function() {\n return fields.push($(this).val());\n });\n $(\".js-fields\").val(fields);\n $(\".js-fields\").get(0).closest(\"form\").submit();\n return $.magnificPopup.close();\n });\n $(document).on('click', '.js-booking-action-book-direct', function(e) {\n var $link;\n e.preventDefault();\n $link = $(this);\n WebuiPopovers.hideAll();\n $(this).webuiPopover({\n width: 300,\n trigger: \"manual\",\n url: $link.prop('href'),\n type: \"async\",\n title: \"Details\",\n closeable: true,\n cache: false,\n async: {\n success: function(data) {\n return CastListExtras.decorateTime();\n }\n }\n });\n $(this).webuiPopover('show');\n return e.preventPropagation();\n });\n $(document).on('click', '.js-booking-action-book', function(e) {\n var $link, $tr, date, extra, type;\n e.preventDefault();\n $link = $(this);\n extra = $link.closest(\".list-group\").data(\"extra\");\n type = $link.closest(\".list-group\").data(\"type\");\n date = $link.closest(\".list-group\").data(\"date\");\n $tr = $(\".js-extra[data-extra=\" + extra + \"]\");\n return $tr.find(\".js-booking[data-date=\" + date + \"]\").each(function() {\n if ($(this).data('type') === type) {\n WebuiPopovers.hideAll();\n $(this).webuiPopover({\n width: 300,\n trigger: \"manual\",\n url: $link.prop('href'),\n type: \"async\",\n title: \"Details\",\n closeable: true,\n cache: false,\n async: {\n success: function(data) {\n return CastListExtras.decorateTime();\n }\n }\n });\n return $(this).webuiPopover('show');\n }\n });\n });\n $(document).on('click', '.js-booking-action', function(e) {\n e.preventDefault();\n WebuiPopovers.hideAll();\n CastListExtras.updateBooking($(this));\n return e.stopPropagation();\n });\n $(document).on('click', '.js-booking-action-note', function(e) {\n var $link, $tr, date, extra, type;\n e.preventDefault();\n $link = $(this);\n extra = $link.closest(\".list-group\").data(\"extra\");\n type = $link.closest(\".list-group\").data(\"type\");\n date = $link.closest(\".list-group\").data(\"date\");\n $tr = $(\".js-extra[data-extra=\" + extra + \"]\");\n return $tr.find(\".js-booking[data-date=\" + date + \"]\").each(function() {\n if ($(this).data('type') === type) {\n WebuiPopovers.hideAll();\n $(this).webuiPopover({\n width: 300,\n trigger: \"manual\",\n url: $link.prop('href'),\n type: \"async\",\n title: \"Note\",\n closeable: true\n });\n return $(this).webuiPopover('show');\n }\n });\n });\n $(\".js-cast-list-extras\").on('click', '.js-action-bulk-set', function(e) {\n var $content;\n WebuiPopovers.hideAll();\n e.preventDefault();\n $content = $(this).closest(\".booking-cell\").find(\".hide-me .list-group\");\n $(this).webuiPopover({\n content: $content,\n padding: 0,\n width: 200,\n trigger: \"manual\",\n title: \"Status\",\n closeable: true,\n cache: false\n });\n return $(this).webuiPopover('show');\n });\n $(\".js-cast-list-extras\").on('click', '.js-booking-btn', function(e) {\n var $content;\n WebuiPopovers.hideAll();\n e.preventDefault();\n $content = $(this).closest(\".booking-cell\").find(\".hide-me .list-group\");\n $(this).webuiPopover({\n content: $content,\n padding: 0,\n width: 200,\n trigger: \"manual\",\n title: \"Status\",\n closeable: true,\n cache: false\n });\n $(this).webuiPopover('show');\n return e.stopPropagation();\n });\n $(document).on('submit', '.js-booking-note-form form', function(e) {\n var $form;\n e.preventDefault();\n $form = $(this);\n $.ajax({\n url: $form.attr(\"action\"),\n method: \"POST\",\n data: $form.serialize(),\n success: function(data) {\n var $tr, date, extra, type;\n WebuiPopovers.hideAll();\n extra = $form.closest(\".js-booking-note-form\").data(\"extra\");\n type = $form.closest(\".js-booking-note-form\").data(\"type\");\n date = $form.closest(\".js-booking-note-form\").data(\"date\");\n $tr = $(\".js-extra[data-extra=\" + extra + \"]\");\n $tr.find(\".js-booking[data-date=\" + date + \"]\").each(function() {\n if ($(this).data('type') === type) {\n return $(this).replaceWith($(data));\n }\n });\n return CastListExtras.updateBookingCounts();\n }\n });\n return false;\n });\n if ((window.location.hash != null) && window.location.hash.length > 3) {\n CastListExtras.selectTab(window.location.hash.replace(\"#\", \"\"));\n }\n $(\".js-cast-list-extras\").on('click', '.js-bulk-all', function(e) {\n e.preventDefault();\n $(\".js-extra\").addClass('selected');\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-bulk-none', function(e) {\n e.preventDefault();\n $(\".js-extra\").removeClass('selected');\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-bulk-shooting', function(e) {\n e.preventDefault();\n $(\".js-extra\").removeClass('selected');\n $(\".js-booking[data-booking=booked]\").each(function() {\n if ($(this).data(\"type\") === \"shooting\") {\n return $(this).closest(\".js-extra\").addClass(\"selected\");\n }\n });\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-bulk-fitting', function(e) {\n e.preventDefault();\n $(\".js-extra\").removeClass('selected');\n $(\".js-booking[data-booking=booked]\").each(function() {\n if ($(this).data(\"type\") === \"fitting\") {\n return $(this).closest(\".js-extra\").addClass(\"selected\");\n }\n });\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-bulk-other', function(e) {\n e.preventDefault();\n $(\".js-extra\").removeClass('selected');\n $(\".js-booking[data-booking=booked]\").each(function() {\n if ($(this).data(\"type\") === \"other\") {\n return $(this).closest(\".js-extra\").addClass(\"selected\");\n }\n });\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-bulk-quarantine', function(e) {\n e.preventDefault();\n $(\".js-extra\").removeClass('selected');\n $(\".js-booking[data-booking=booked]\").each(function() {\n if ($(this).data(\"type\") === \"quarantine\") {\n return $(this).closest(\".js-extra\").addClass(\"selected\");\n }\n });\n return CastListExtras.updateToolbar();\n });\n $(\".js-cast-list-extras\").on('click', '.js-nav-tabs a', function(e) {\n var tab;\n tab = $(this).data(\"tab\");\n if (tab != null) {\n e.preventDefault();\n return CastListExtras.selectTab(tab);\n }\n });\n $(\".js-cast-list-extras\").on('click', 'td.col-select', function(e) {\n var extra;\n extra = $(this).closest(\"tr\").data(\"extra\");\n return CastListExtras.toggleExtra(extra);\n });\n return $(\".js-cast-list-extras\").on('click', '.js-tag', function(e) {\n var tag;\n e.preventDefault();\n tag = $(this).data(\"tag\");\n CastListExtras.toggleTag(tag);\n return e.preventPropagation();\n });\n };\n\n return CastListExtras;\n\n })();\n\n}).call(this);","(function() {\n window.CastListSearch = (function() {\n function CastListSearch() {}\n\n CastListSearch.map = null;\n\n CastListSearch.dropMarker = null;\n\n CastListSearch.dropRadius = null;\n\n CastListSearch.setup = function() {\n return CastListSearch.decorate();\n };\n\n CastListSearch.toggleFilter = function(e) {\n e.preventDefault();\n return $(this).closest(\".filter\").toggleClass(\"active\");\n };\n\n CastListSearch.decorate = function() {\n return $(\".js-cast-list-search-filter\").on('click', '.js-toggle-filter', ExtraSearch.toggleFilter);\n };\n\n return CastListSearch;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraDateInput = (function() {\n function ExtraDateInput() {}\n\n ExtraDateInput.setup = function() {\n return ExtraDateInput.decorate();\n };\n\n ExtraDateInput.decorate = function() {\n $(\".js-set-time\").on('change', function(e) {\n var $target, date;\n e.preventDefault();\n $target = $(\"#\" + ($(this).data('target')));\n console.log($(this).data('target'));\n date = $(this).val();\n if (date === 'now') {\n return $target.val(moment().format(\"DD MMM YYYY hh:mmA\"));\n } else if (date === '0') {\n return $target.val('');\n } else {\n return $target.val(date);\n }\n });\n $(\".js-datetime-input-std\").each(function() {\n return $(this).datetimepicker({\n format: \"DD/MM/YYYY hh:mmA\",\n showClear: true,\n showClose: true,\n showTodayButton: true\n });\n });\n $(\".js-datetime-input-clear\").each(function() {\n return $(this).datetimepicker({\n format: \"DD MMM YYYY hh:mmA\",\n minDate: moment(),\n showClear: true,\n showClose: true,\n showTodayButton: true\n });\n });\n $(\".js-date-input-dob\").each(function() {\n return $(this).datepicker({\n format: \"dd M yyyy\",\n startView: 'decade',\n autoclose: true\n });\n });\n $(\".js-date-input-std\").each(function() {\n return $(this).datepicker({\n format: \"dd M yyyy\"\n });\n });\n $(\".js-date-input-embed\").each(function() {\n var $el, $target, target;\n target = $(this).data(\"target\");\n $target = $(\"#\" + target);\n $el = $(this);\n return $(this).datepicker({\n format: \"yyyy-mm-dd\",\n startDate: moment().format(\"YYYY-MM-DD\")\n }).on('changeDate', function() {\n $target.val($el.datepicker('getFormattedDate'));\n return $target.closest(\"form\").submit();\n });\n });\n $(\".js-date-input\").each(function() {\n var $field, $list, $picker;\n $picker = $(this).find(\".js-date-picker\");\n $field = $(this).find(\".js-date-field\");\n $list = $(this).find(\".js-date-list\");\n $picker.datepicker({\n format: 'yyyy-mm-dd',\n multidate: true\n }).on(\"changeDate\", function() {\n var dates, rawDates;\n dates = _.sortBy($picker.datepicker('getDates'), function(a) {\n return a;\n });\n rawDates = _.map(dates, function(date) {\n return moment(date).format('YYYY-MM-DD');\n });\n $field.val(rawDates);\n $list.html(\"\");\n return _.each(dates, function(date) {\n var $li;\n $li = $(\"\").addClass(\"list-group-item\").addClass(\"js-date-selected-date\").attr(\"data-date\", moment(date).format('YYYY-MM-DD')).html(\" \" + moment(date).format('dddd, Do MMMM YYYY'));\n return $list.append($li);\n });\n });\n return $picker.datepicker('setDates', $field.val().split(\",\"));\n });\n $(document).on('click', 'a.js-date-clear', function(e) {\n var $input, $picker;\n e.preventDefault();\n $input = $(this).closest(\".js-date-input\");\n $picker = $input.find(\".js-date-picker\");\n $picker.val('');\n return $picker.datepicker('clearDates');\n });\n return $(document).on('click', 'a.js-date-selected-date', function(e) {\n var $input, $picker, dates, rawDates, thisDate;\n e.preventDefault();\n thisDate = $(this).data('date');\n $input = $(this).closest(\".js-date-input\");\n $picker = $input.find(\".js-date-picker\");\n dates = $picker.datepicker('getDates');\n rawDates = _.filter(_.map(dates, function(date) {\n return moment(date).format('YYYY-MM-DD');\n }), function(date) {\n return date !== thisDate;\n });\n return $picker.datepicker('setDates', rawDates);\n });\n };\n\n return ExtraDateInput;\n\n })();\n\n}).call(this);","(function() {\n window.Document = (function() {\n function Document() {}\n\n Document.setup = function() {\n return Document.decorate();\n };\n\n Document.decorate = function() {\n $(\".js-document-form\").on('click', '.js-document-form-type', function(e) {\n if ($(this).val() === \"right_to_work\") {\n $(\".js-document-form\").find(\".js-document-form-expiry\").show();\n } else {\n $(\".js-document-form\").find(\".js-document-form-expiry\").hide();\n }\n if ($(this).val() === \"access_ni\") {\n $(\".js-document-form\").find(\".js-document-form-issued\").show();\n } else {\n $(\".js-document-form\").find(\".js-document-form-issued\").hide();\n }\n if ($(this).val() === \"release\" || $(this).val() === \"other\") {\n $(\".js-document-form\").find(\".js-document-form-production\").show();\n } else {\n $(\".js-document-form\").find(\".js-document-form-production\").hide();\n }\n if ($(this).val() === \"other\") {\n $(\".js-document-form\").find(\".js-document-form-visible\").show();\n return $(\".js-document-form\").find(\".js-document-form-name\").show();\n } else {\n $(\".js-document-form\").find(\".js-document-form-visible\").hide();\n return $(\".js-document-form\").find(\".js-document-form-name\").hide();\n }\n });\n $(\".js-documents\").on('click', '.js-document-reject', function(e) {\n var $link, $reasons;\n e.preventDefault();\n $link = $(this);\n if ($link.data(\"type\") === \"access_ni\") {\n $reasons = $(\"#cert_reasons\");\n } else {\n $reasons = $(\"#identification_reasons\");\n }\n $reasons.addClass(\"js-document-reasons\");\n $reasons.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n $reasons.find(\"input\").prop('checked', '');\n $reasons.find(\"input[type='submit']\").prop('disabled', '');\n return $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n });\n $(\".js-documents\").on('click', '.js-document-approve', function(e) {\n var $accessNi, $link;\n e.preventDefault();\n $link = $(this);\n if ($link.data(\"type\") === \"access_ni\") {\n e.preventDefault();\n $accessNi = $(\"#access_ni_cert\").addClass(\"js-document-reasons\");\n $accessNi.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n $accessNi.find(\"input.form-control\").val($link.data('issued'));\n return $.magnificPopup.open({\n items: {\n src: $accessNi,\n type: \"inline\"\n },\n cache: false\n });\n } else {\n return $.ajax({\n method: \"POST\",\n url: $link.attr('href'),\n dataType: \"json\",\n success: function(data) {\n return $(\".document-row[data-document=\" + data.id + \"]\").remove();\n }\n });\n }\n });\n return $(document).on('submit', '.js-document-reasons form', function(e) {\n var $form;\n $form = $(this);\n $.ajax({\n method: \"POST\",\n url: $form.attr('action'),\n dataType: \"json\",\n data: $form.serialize(),\n success: function(data) {\n $(\".document-row[data-document=\" + data.id + \"]\").remove();\n return $.magnificPopup.close();\n }\n });\n e.preventDefault();\n return false;\n });\n };\n\n return Document;\n\n })();\n\n}).call(this);","(function() {\n window.EmailTemplate = (function() {\n function EmailTemplate() {}\n\n EmailTemplate.setup = function() {\n return EmailTemplate.decorate();\n };\n\n EmailTemplate.decorate = function() {\n var fullbuttons;\n fullbuttons = [\"bold\", \"italic\", \"underline\", \"paragraphFormat\", \"|\", \"color\", \"formatOL\", \"formatUL\", \"|\", \"insertLink\", \"insertImage\", \"insertFile\", \"|\", \"undo\", \"redo\", \"clearFormatting\", \"html\"];\n return $(\".fr-standard\").froalaEditor({\n key: 'jemA-21vbzD-11yE4cJ-7i==',\n toolbarInline: false,\n heightMin: 100,\n toolbarButtons: fullbuttons,\n toolbarButtonsXS: fullbuttons,\n toolbarButtonsSM: fullbuttons,\n toolbarButtonsMD: fullbuttons,\n imageDefaultWidth: 0,\n imageEditButtons: ['imageReplace', 'imageRemove', 'imageAlt', '|', 'imageLink', 'linkOpen', 'linkEdit', 'linkRemove'],\n fileUploadURL: \"/admin/api/assets/file\",\n imageUploadURL: \"/admin/api/assets/image\",\n videoResize: false,\n videoEditButtons: ['videoDisplay', 'videoRemove'],\n paragraphFormat: {\n N: \"Normal\",\n H3: \"Heading\"\n }\n });\n };\n\n return EmailTemplate;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraApproval = (function() {\n function ExtraApproval() {}\n\n ExtraApproval.setup = function() {\n return ExtraApproval.decorate();\n };\n\n ExtraApproval.decorate = function() {\n $(\".js-extra-approval\").find(\".js-zoom\").zoom();\n return $(\".js-extra-approval\").on('click', '.js-extra-approve', function(e) {\n var $link;\n e.preventDefault();\n $link = $(this);\n return $.ajax({\n method: \"GET\",\n url: $link.attr('href'),\n dataType: \"json\",\n success: function(data) {\n return $(\".extra-card[data-extra=\" + data.id + \"]\").remove();\n }\n });\n });\n };\n\n return ExtraApproval;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraRemoval = (function() {\n function ExtraRemoval() {}\n\n ExtraRemoval.setup = function() {\n return ExtraRemoval.decorate();\n };\n\n ExtraRemoval.decorate = function() {\n $(\".js-extra-removal\").find(\".js-zoom\").zoom();\n $(document).on('click', '.js-extra-removal-action', function(e) {\n var $link = $(this);\n e.preventDefault();\n var action = $link.data('action');\n return $.ajax({\n method: \"POST\",\n url: $link.attr('href'),\n dataType: \"json\",\n data: {\n status: action\n },\n success: function(data) {\n console.log(data);\n return $(\".extra-row[data-extra=\" + data.id + \"]\")\n .removeClass(\"protected\")\n .removeClass(\"removed\")\n .removeClass(\"pending\")\n .addClass(data.status);\n }\n });\n });\n\n };\n\n return ExtraRemoval;\n\n })();\n\n}).call(this);","\n(function() {\n window.ExtraCard = (function() {\n function ExtraCard() {}\n\n ExtraCard.setup = function() {\n return ExtraCard.decorate();\n };\n\n ExtraCard.updateBadges = function() {\n return $(\".js-extra-card\").each(function() {\n var count;\n count = $(this).find(\".js-cast-lists\").find(\".active\").length;\n if (count === 0) {\n return $(this).find(\".js-badge\").hide();\n } else {\n return $(this).find(\".js-badge\").html(count).show();\n }\n });\n };\n\n ExtraCard.addToQuickList = function(list) {\n var $link;\n $link = $(\"\").addClass(\"js-cast-list\").addClass(\"list-group-item\").html(list.name).attr('data-cast-list', list.id);\n $(\".js-extra-card\").each(function() {\n var $temp, extra;\n extra = $(this).data('extra');\n $temp = $link.clone();\n $temp.prop('href', \"/admin/api/cast_lists/\" + list.id + \"/toggle_extra?extra_id=\" + extra);\n if (list.extra_ids.indexOf(parseInt(extra)) >= 0) {\n $temp.addClass(\"active\");\n }\n return $(this).find(\".js-cast-lists\").prepend($temp);\n });\n return ExtraCard.updateBadges();\n };\n\n ExtraCard.toggleQuickList = function(e) {\n var $list;\n e.preventDefault();\n $list = $(this);\n return $.ajax({\n method: \"POST\",\n url: $list.prop('href'),\n dataType: \"json\",\n success: function(data) {\n if (data.outcome === \"remove\") {\n $list.removeClass(\"active\");\n if (data.cast_list === \"scratch\") {\n ExtraSidebarScratch.remove(data.extra.id);\n }\n } else if (data.outcome === \"add\") {\n $list.addClass(\"active\");\n if (data.cast_list === \"scratch\") {\n ExtraSidebarScratch.add(data.extra);\n }\n }\n ExtraCard.updateBadges();\n $list.closest(\".js-extra-card\").removeClass(\"-list-mode\");\n $(\".js-sidebar-cast-lists\").find(\".js-list[data-cast-list=\" + data.cast_list + \"]\").find(\".js-badge\").html(data.extras);\n return $(\".js-sidebar-scratch-list\").remove();\n }\n });\n };\n\n ExtraCard.enablePopover = function() {\n\n\n\n $(\".js-extra-card\").find(\".js-popover-trigger\").each(function() {\n \n \n let $el = $(this);\n\n $el.webuiPopover({\n url: $el.data('url'),\n type: \"async\",\n trigger: \"manual\",\n placement: \"horizontal\"\n })\n\n let timeout;\n \n $el.on(\"mouseenter\", function() {\n timeout = setTimeout(function() {\n $el.webuiPopover(\"show\");\n }, 500);\n });\n\n $el.on(\"mouseleave\", function() {\n clearTimeout(timeout);\n $el.webuiPopover(\"hide\"); \n });\n\n\n });\n };\n\n ExtraCard.enableZoom = function() {\n return $(\".js-extra-card\").find(\".js-zoom\").zoom();\n };\n\n ExtraCard.showHideQuickList = function(e) {\n var $card;\n e.preventDefault();\n $card = $(this).closest(\".js-extra-card\");\n if (!$card.hasClass(\"-list-mode\")) {\n $(\".list-mode\").removeClass(\"-list-mode\");\n }\n $card.toggleClass(\"-list-mode\");\n if ($card.hasClass(\"-list-mode\")) {\n return $card.find(\".js-cast-list-wrapper\").animate({\n scrollTop: 1000\n }, 0);\n }\n };\n\n ExtraCard.decorate = function() {\n ExtraCard.enablePopover();\n ExtraCard.enableZoom();\n ExtraCard.updateBadges();\n $(document).on('click', '.js-extra-card .js-name', ExtraCard.showHideQuickList);\n $(document).on('click', '.js-extra-card .js-cast-list', ExtraCard.toggleQuickList);\n return $(document).on('click', '.js-sidebar-scratch-list', ExtraCard.toggleQuickList);\n };\n\n return ExtraCard;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraForm = (function() {\n function ExtraForm() {}\n\n ExtraForm.setup = function() {\n return ExtraForm.decorate();\n };\n\n ExtraForm.isAdult = function() {\n var birthday;\n birthday = moment($(\".js-extra-form\").find(\".js-dob\").datepicker('getDate'));\n return (birthday != null) && moment().diff(birthday, 'years') >= 18;\n };\n\n ExtraForm.isChild = function() {\n var birthday;\n birthday = moment($(\".js-extra-form\").find(\".js-dob\").datepicker('getDate'));\n return (birthday != null) && moment().diff(birthday, 'years') < 18;\n };\n\n ExtraForm.isMale = function() {\n return $(\".js-extra-form\").find(\".js-gender\").val() !== 'female';\n };\n\n ExtraForm.isFemale = function() {\n return $(\".js-extra-form\").find(\".js-gender\").val() !== 'male';\n };\n\n ExtraForm.updateProfile = function() {\n $(\".js-extra-form\").find(\".-adult\").hide();\n $(\".js-extra-form\").find(\".-man\").hide();\n $(\".js-extra-form\").find(\".-woman\").hide();\n $(\".js-extra-form\").find(\".-child\").hide();\n if (ExtraForm.isAdult()) {\n $(\".js-extra-form\").find(\".-adult\").show();\n if (ExtraForm.isMale()) {\n $(\".js-extra-form\").find(\".-man\").show();\n }\n if (ExtraForm.isFemale()) {\n return $(\".js-extra-form\").find(\".-woman\").show();\n }\n } else if (ExtraForm.isChild()) {\n return $(\".js-extra-form\").find(\".-child\").show();\n }\n };\n\n ExtraForm.decorate = function() {\n $(\".js-extra-form\").find(\"select\").each(function() {\n if ($(this).closest(\".js-simple-search\").length > 0) {\n return $(this).select2({\n theme: \"bootstrap\",\n placeholder: \"Select...\",\n allowClear: true,\n matcher: function(term, text) {\n if (term.term != null) {\n if (text.text.toUpperCase().indexOf(term.term.toUpperCase()) === 0) {\n return text;\n }\n return null;\n } else {\n return text;\n }\n }\n });\n } else {\n return $(this).select2({\n theme: \"bootstrap\",\n placeholder: \"Select...\",\n allowClear: true\n });\n }\n });\n $(\".js-extra-form\").find(\".js-dob\").datepicker().on('changeDate', function(e) {\n return ExtraForm.updateProfile();\n });\n return $(\".js-extra-form\").find(\".js-gender\").on('change', function(e) {\n return ExtraForm.updateProfile();\n });\n };\n\n return ExtraForm;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraMessage = (function() {\n function ExtraMessage() {}\n\n ExtraMessage.setup = function() {\n return ExtraMessage.decorate();\n };\n\n ExtraMessage.scrollToBottom = function() {\n return $(\".js-extra-message-list\").scrollTop(100000);\n };\n\n ExtraMessage.decorate = function() {\n ExtraMessage.scrollToBottom();\n $(document).on('click', \".js-extra-message-canned\", function(e) {\n var text;\n e.preventDefault();\n ExtraMessage.scrollToBottom();\n text = $(this).data(\"text\");\n return $(this).closest(\".message-block\").find(\"input[name='body']\").val(text);\n });\n return $(document).on('submit', \".js-extra-message-form\", function(e) {\n var $form, $list;\n e.preventDefault();\n $form = $(this).find(\"form\");\n $list = $(this).closest(\".js-extra-messages\").find(\".js-extra-message-list\");\n $.ajax({\n method: \"POST\",\n url: $form.attr('action'),\n data: $form.serialize(),\n dataType: \"json\",\n success: function(data) {\n var $meta, $msg, $wrap;\n $wrap = $(\"
\").addClass(\"message-wrapper\").addClass(\"outbound\");\n $msg = $(\"
\").addClass(\"message\").html(data.subject);\n $meta = $(\"
\").addClass(\"meta\").html(\"Sending...\");\n $wrap.append($msg).append($meta);\n $list.append($wrap);\n $form.find(\"input[type=text]\").val('');\n return ExtraMessage.scrollToBottom();\n }\n });\n return false;\n });\n };\n\n return ExtraMessage;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraProfile = (function() {\n function ExtraProfile() {}\n\n ExtraProfile.setup = function() {\n return ExtraProfile.decorate();\n };\n\n ExtraProfile.displayMap = function() {\n var $map, address, geocoder, lat, lng;\n if ($(\".js-extra-profile\").find(\".js-extra-map\").length > 0) {\n $map = $(\".js-extra-profile\").find(\".js-extra-map\");\n lat = parseFloat($map.data(\"lat\"));\n lng = parseFloat($map.data(\"lng\"));\n address = $map.data(\"address\");\n if (isNaN(lat)) {\n geocoder = new google.maps.Geocoder();\n return geocoder.geocode({\n address: address\n }, function(results, status) {\n var location;\n if (status === 'OK') {\n location = results[0].geometry.location;\n console.log(location.lat(), location.lng());\n return ExtraProfile.showMap(location.lat(), location.lng());\n }\n });\n } else {\n return ExtraProfile.showMap(lat, lng);\n }\n }\n };\n\n ExtraProfile.showMap = function(lat, lng) {\n var $map, marker, smallMap;\n if (!isNaN(lat)) {\n $map = $(\".js-extra-profile\").find(\".js-extra-map\");\n smallMap = new google.maps.Map($map.get(0), {\n zoom: 8,\n center: {\n lng: lng,\n lat: lat\n }\n });\n return marker = new google.maps.Marker({\n position: {\n lng: lng,\n lat: lat\n },\n map: smallMap\n });\n }\n };\n\n ExtraProfile.decorate = function() {\n ExtraProfile.displayMap();\n $(\".js-extra-profile\").find(\".js-zoom\").zoom();\n $(\".js-extra-profile-slider\").each(function() {\n return $(this).bxSlider({\n responsive: true,\n pager: false,\n auto: true\n });\n });\n $(\".js-things-to-do\").magnificPopup({\n type: \"image\",\n delegate: \"a.js-photo-view\",\n gallery: {\n enabled: true\n }\n });\n $(\".js-photos-lightbox\").magnificPopup({\n type: \"image\",\n delegate: \"a.photo-card-image\",\n gallery: {\n enabled: true\n }\n });\n $(document).on('click', '.js-extra-call', function(e) {\n var $this;\n e.preventDefault();\n $this = $(this);\n return $.ajax({\n url: $this.attr('href'),\n type: 'GET',\n dataType: 'json',\n success: function(data) {\n return $this.html(\"Dialing...\");\n }\n });\n });\n $(\".js-extra-profile\").on('click', '.js-photo-reject', function(e) {\n var $link, $reasons;\n e.preventDefault();\n $link = $(this);\n $reasons = $(\"#photo_reasons\");\n $reasons.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n return $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n });\n $(\".js-extra-profile\").on('click', \".js-document-reject\", function(e) {\n var $link, $reasons;\n e.preventDefault();\n $link = $(this);\n if ($link.data(\"type\") === \"access_ni\") {\n $reasons = $(\"#cert_reasons\");\n } else {\n $reasons = $(\"#identification_reasons\");\n }\n $reasons.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n return $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n });\n return $(\".js-extra-profile\").on('click', \".js-document-approve\", function(e) {\n var $accessNi, $link;\n $link = $(this);\n if ($link.data(\"type\") === \"access_ni\") {\n e.preventDefault();\n $accessNi = $(\"#access_ni_cert\");\n $accessNi.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n $accessNi.find(\"input.form-control\").val($link.data('issued'));\n return $.magnificPopup.open({\n items: {\n src: $accessNi,\n type: \"inline\"\n },\n cache: false\n });\n } else {\n\n }\n });\n };\n\n return ExtraProfile;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraSearch = (function() {\n function ExtraSearch() {}\n\n ExtraSearch.map = null;\n\n ExtraSearch.dropMarker = null;\n\n ExtraSearch.dropRadius = null;\n\n ExtraSearch.setup = function() {\n return ExtraSearch.decorate();\n };\n\n ExtraSearch.openGroups = function() {\n var $base;\n $base = $(\".js-extra-search-filter\");\n return $base.find(\".filter-group\").each(function() {\n if ($(this).find(\".filter-sub-group\").find(\".active\").length > 0) {\n $(this).find(\".filter-sub-group\").addClass(\"active\");\n return $(this).find(\".filter-heading\").addClass(\"active\");\n }\n });\n };\n\n ExtraSearch.toggleFilter = function(e) {\n e.preventDefault();\n return $(this).closest(\".filter\").toggleClass(\"active\");\n };\n\n ExtraSearch.toggleFilterHeading = function(e) {\n e.preventDefault();\n $(this).closest(\".filter\").toggleClass(\"active\");\n return $(this).closest(\".filter-group\").find(\".filter-sub-group\").toggleClass(\"active\");\n };\n\n ExtraSearch.setLocation = function(e) {\n var $base, lat, lng, radius;\n e.preventDefault();\n $base = $(\".js-extra-search-filter\");\n radius = ExtraSearch.dropRadius.getRadius();\n lat = ExtraSearch.dropRadius.getCenter().lat();\n lng = ExtraSearch.dropRadius.getCenter().lng();\n $base.find(\".js-lat\").val(lat);\n $base.find(\".js-radius\").val(radius);\n $base.find(\".js-lng\").val(lng);\n return $base.find(\".js-location-form\").submit();\n };\n\n ExtraSearch.searchLocation = function(e) {\n var geocoder, q;\n e.preventDefault();\n q = $(\".js-extra-search-location-input\").val();\n geocoder = new google.maps.Geocoder();\n return geocoder.geocode({\n address: q\n }, function(results, status) {\n if (status === 'OK') {\n ExtraSearch.map.setCenter(results[0].geometry.location);\n return ExtraSearch.dropRadius.setCenter(results[0].geometry.location);\n }\n });\n };\n\n ExtraSearch.locationFancyBox = function() {\n return $(\".js-extra-search-filter\").find(\".js-location-fancybox\").fancybox({\n width: \"90%\",\n afterShow: function() {\n var $base, lat, lng, radius;\n $base = $(\".js-extra-search-filter\");\n lat = parseFloat($base.find(\".js-lat\").val());\n lng = parseFloat($base.find(\".js-lng\").val());\n radius = parseFloat($base.find(\".js-radius\").val());\n if (isNaN(lat)) {\n lng = -5.930119999999988;\n }\n if (isNaN(lat)) {\n lat = 54.59728500000001;\n }\n if (isNaN(radius)) {\n radius = 10 * 1609.34;\n }\n if (ExtraSearch.map == null) {\n ExtraSearch.map = new google.maps.Map($(\".js-extra-search-map\").get(0), {\n zoom: 9,\n center: {\n lat: lat,\n lng: lng\n }\n });\n }\n if (ExtraSearch.dropRadius == null) {\n ExtraSearch.dropRadius = new google.maps.Circle({\n center: {\n lat: lat,\n lng: lng\n },\n map: ExtraSearch.map,\n radius: radius,\n strokeColor: \"#ff0000\",\n strokeWeight: 2,\n strokeOpacity: 0.6,\n fillColor: \"#ff0000\",\n fillOpacity: 0.2,\n zIndex: 1,\n editable: true\n });\n }\n ExtraSearch.map.setCenter({\n lat: lat,\n lng: lng\n });\n ExtraSearch.dropRadius.setCenter({\n lat: lat,\n lng: lng\n });\n return loadExtras(ExtraSearch.map);\n }\n });\n };\n\n ExtraSearch.displaySmallMap = function() {\n var $base, lat, lng, radius, smallMap, smallRadius;\n if ($(\".js-extra-search-filter\").find(\".js-small-map\").length > 0) {\n $base = $(\".js-extra-search-filter\");\n lat = parseFloat($base.find(\".js-lat\").val());\n lng = parseFloat($base.find(\".js-lng\").val());\n radius = parseFloat($base.find(\".js-radius\").val());\n if (!isNaN(lat)) {\n $(\".js-location-filter\").addClass(\"active\");\n $(\".js-small-map\").show();\n smallMap = new google.maps.Map($(\".js-small-map\").get(0), {\n zoom: 8,\n disableDefaultUI: true,\n draggable: false,\n panControl: false,\n mapTypeControl: false,\n rotateControl: false,\n scaleControl: false,\n zoomControl: false,\n center: {\n lng: lng,\n lat: lat\n }\n });\n smallMap.addListener('click', function(e) {\n return $(\".js-location-fancybox\").trigger('click');\n });\n smallRadius = new google.maps.Circle({\n center: {\n lng: lng,\n lat: lat\n },\n map: smallMap,\n radius: radius,\n strokeColor: \"#ff0000\",\n strokeWeight: 2,\n strokeOpacity: 0.6,\n fillColor: \"#ff0000\",\n fillOpacity: 0.2,\n zIndex: 1\n });\n return smallRadius.addListener('click', function(e) {\n return $(\".js-location-fancybox\").trigger('click');\n });\n }\n }\n };\n\n ExtraSearch.decorate = function() {\n $(\".js-extra-search-filter\").on('click', '.js-toggle-filter', ExtraSearch.toggleFilter);\n $(\".js-extra-search-filter\").on('click', '.js-toggle-filter-heading', ExtraSearch.toggleFilterHeading);\n $(document).on('click', '.js-extra-search-set-location', ExtraSearch.setLocation);\n $(document).on('submit', '.js-extra-search-search-location', ExtraSearch.searchLocation);\n ExtraSearch.displaySmallMap();\n ExtraSearch.locationFancyBox();\n return ExtraSearch.openGroups();\n };\n\n return ExtraSearch;\n\n })();\n\n}).call(this);","(function($) {\n window.NestedFormEvents = function() {\n this.addFields = $.proxy(this.addFields, this);\n this.removeFields = $.proxy(this.removeFields, this);\n };\n\n NestedFormEvents.prototype = {\n addFields: function(e) {\n // Setup\n var link = e.currentTarget;\n var assoc = $(link).data('association'); // Name of child\n var blueprint = $('#' + $(link).data('blueprint-id'));\n var content = blueprint.data('blueprint'); // Fields template\n\n var target = $(link).data('target');\n var limit = $(target).data('limit');\n var fields = 0\n $(target).find(\".fields\").each(function() {\n if($(this).css('display') != 'none') fields++\n })\n if(limit != 0 && fields >= limit) {\n alert(\"This module only allows \" + limit + \" element(s)\");\n return false;\n }\n\n // Make the context correct by replacing with the generated ID\n // of each of the parent objects\n var context = ($(link).closest('.fields').closestChild('input, textarea, select').eq(0).attr('name') || '').replace(/\\[[a-z_]+\\]$/, '');\n\n // If the parent has no inputs we need to strip off the last pair\n var current = content.match(new RegExp('\\\\[([a-z_]+)\\\\]\\\\[new_' + assoc + '\\\\]'));\n if (current) {\n context = context.replace(new RegExp('\\\\[' + current[1] + '\\\\]\\\\[(new_)?\\\\d+\\\\]$'), '');\n }\n\n // context will be something like this for a brand new form:\n // project[tasks_attributes][1255929127459][assignments_attributes][1255929128105]\n // or for an edit form:\n // project[tasks_attributes][0][assignments_attributes][1]\n if (context) {\n var parentNames = context.match(/[a-z_]+_attributes(?=\\]\\[(new_)?\\d+\\])/g) || [];\n var parentIds = context.match(/[0-9]+/g) || [];\n\n for(var i = 0; i < parentNames.length; i++) {\n if(parentIds[i]) {\n content = content.replace(\n new RegExp('(_' + parentNames[i] + ')_.+?_', 'g'),\n '$1_' + parentIds[i] + '_');\n\n content = content.replace(\n new RegExp('(\\\\[' + parentNames[i] + '\\\\])\\\\[.+?\\\\]', 'g'),\n '$1[' + parentIds[i] + ']');\n }\n }\n }\n\n // Make a unique ID for the new child\n var regexp = new RegExp('new_' + assoc, 'g');\n var new_id = this.newId();\n content = $.trim(content.replace(regexp, new_id));\n\n var field = this.insertFields(content, assoc, link);\n // bubble up event upto document (through form)\n field\n .trigger({ type: 'nested:fieldAdded', field: field, e: e })\n .trigger({ type: 'nested:fieldAdded:' + assoc, field: field, e: e });\n return false;\n },\n newId: function() {\n return new Date().getTime();\n },\n insertFields: function(content, assoc, link) {\n var target = $(link).data('target');\n if (target) {\n return $(content).appendTo($(target));\n } else {\n return $(content).insertBefore(link);\n }\n },\n removeFields: function(e) {\n var $link = $(e.currentTarget),\n assoc = $link.data('association'); // Name of child to be removed\n\n var hiddenField = $link.prev('input[type=hidden]');\n hiddenField.val('1');\n\n var field = $link.closest('.fields');\n field.hide();\n\n field\n .trigger({ type: 'nested:fieldRemoved', field: field })\n .trigger({ type: 'nested:fieldRemoved:' + assoc, field: field });\n return false;\n }\n };\n\n window.nestedFormEvents = new NestedFormEvents();\n $(document)\n .delegate('form a.add_nested_fields', 'click', nestedFormEvents.addFields)\n .delegate('form a.remove_nested_fields', 'click', nestedFormEvents.removeFields);\n})(jQuery);\n\n// http://plugins.jquery.com/project/closestChild\n/*\n * Copyright 2011, Tobias Lindig\n *\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n *\n */\n(function($) {\n $.fn.closestChild = function(selector) {\n // breadth first search for the first matched node\n if (selector && selector != '') {\n var queue = [];\n queue.push(this);\n while(queue.length > 0) {\n var node = queue.shift();\n var children = node.children();\n for(var i = 0; i < children.length; ++i) {\n var child = $(children[i]);\n if (child.is(selector)) {\n return child; //well, we found one\n }\n queue.push(child);\n }\n }\n }\n return $();//nothing found\n };\n})(jQuery);\n","(function() {\n window.Notification = (function() {\n function Notification() {}\n\n Notification.setup = function() {\n return Notification.decorate();\n };\n\n Notification.decorate = function() {\n $(\".js-header-notification-li\").on('show.bs.dropdown', function(e) {\n return $.ajax({\n url: \"/admin/notifications/popup\",\n method: \"get\",\n dataType: \"html\",\n success: function(data) {\n $(\".js-header-notification-menu\").html(data);\n return $(\".scroller\").slimScroll();\n }\n });\n });\n return $(\".js-notification-dismiss\").on('click', function(e) {\n e.preventDefault();\n return $.ajax({\n url: $(this).prop('href'),\n method: \"get\",\n dataType: \"json\",\n success: function(data) {\n $.each(data.ids, function(i, e) {\n return $(\".js-notification[data-notification=\" + e + \"]\").fadeOut();\n });\n return $(\".js-header-notification\").html(data.count);\n }\n });\n });\n };\n\n return Notification;\n\n })();\n\n}).call(this);","(function() {\n window.Payment = (function() {\n function Payment() {}\n\n Payment.setup = function() {\n return Payment.decorate();\n };\n\n Payment.decorate = function() {\n return $(\".js-payment-week\").on('click', function(e) {\n var $row;\n e.preventDefault();\n $row = $(this).closest(\"tr\");\n if ($row.next().hasClass(\"-week\")) {\n return;\n }\n return $.ajax({\n url: $(this).prop('href'),\n method: \"get\",\n dataType: \"html\",\n success: function(data) {\n return $row.after(data);\n }\n });\n });\n };\n\n return Payment;\n\n })();\n\n}).call(this);","(function() {\n window.Photo = (function() {\n function Photo() {}\n\n Photo.setup = function() {\n return Photo.decorate();\n };\n\n Photo.decorate = function() {\n $(\".js-photos\").find(\".js-zoom\").zoom();\n $(\".js-photos\").on('click', '.js-photo-reject', function(e) {\n var $link, $reasons;\n e.preventDefault();\n $link = $(this);\n $reasons = $(\"#photo_reasons\").addClass(\"js-photos-reasons\");\n $reasons.find(\"form\").prop(\"action\", $link.prop(\"href\"));\n $reasons.find(\"input\").prop('checked', '');\n $reasons.find(\"input[type='submit']\").prop('disabled', '');\n return $.magnificPopup.open({\n items: {\n src: $reasons,\n type: \"inline\"\n },\n cache: false\n });\n });\n $(\".js-photos\").on('click', '.js-photo-approve', function(e) {\n var $link;\n e.preventDefault();\n $link = $(this);\n return $.ajax({\n method: \"GET\",\n url: $link.attr('href'),\n dataType: \"json\",\n success: function(data) {\n return $(\".photo-card[data-photo=\" + data.id + \"]\").remove();\n }\n });\n });\n return $(document).on('submit', '.js-photos-reasons form', function(e) {\n var $form;\n $form = $(this);\n $.ajax({\n method: \"POST\",\n url: $form.attr('action'),\n dataType: \"json\",\n data: $form.serialize(),\n success: function(data) {\n $(\".photo-card[data-photo=\" + data.id + \"]\").remove();\n return $.magnificPopup.close();\n }\n });\n e.preventDefault();\n return false;\n });\n };\n\n return Photo;\n\n })();\n\n}).call(this);","(function() {\n window.ProductionRates = (function() {\n function ProductionRates() {}\n\n ProductionRates.setup = function() {\n return ProductionRates.decorate();\n };\n\n ProductionRates.decorate = function() {\n return $(document).on('click', '.js-production-rates-extra-rate-calc', function(e) {\n var $card, fee, pc, total;\n e.preventDefault();\n $card = $(this).closest(\".js-rate-card\");\n total = $card.find(\".js-production-rates-total-fee\").val();\n pc = $card.find(\".js-production-rates-agency-pc\").val();\n fee = parseFloat(total) * parseFloat(pc) / 100.0;\n return $card.find(\".js-production-rates-extra-rate\").val((parseFloat(total) - fee).toFixed(2));\n });\n };\n\n $(document).on('click', '.js-production-rates-holiday-calc', function(e) {\n var $card, fee, total;\n e.preventDefault();\n $card = $(this).closest(\".js-rate-card\");\n total = $card.find(\".js-production-rates-total-fee\").val();\n fee = parseFloat(total) / 1.1077;\n return $card.find(\".js-production-rates-holiday\").val((parseFloat(total) - fee).toFixed(2));\n });\n\n return ProductionRates;\n\n })();\n\n}).call(this);","(function() {\n window.ExtraSidebarCastList = (function() {\n function ExtraSidebarCastList() {}\n\n ExtraSidebarCastList.setup = function() {\n return ExtraSidebarCastList.decorate();\n };\n\n ExtraSidebarCastList.updateBadge = function() {\n var count;\n count = $(\".js-sidebar-cast-lists\").find(\".js-list\").length;\n if (count === 0) {\n return $(\"#sidebar-cast-lists-badge\").hide();\n } else {\n return $(\"#sidebar-cast-lists-badge\").html(count).show();\n }\n };\n\n ExtraSidebarCastList.toggleEditMode = function(e) {\n e.preventDefault();\n return $(\".js-sidebar-cast-lists\").toggleClass(\"-edit-mode\");\n };\n\n ExtraSidebarCastList.enableSort = function() {\n var $list;\n $list = $(\".js-sidebar-cast-lists\").find(\".js-lists\");\n if ($list.length > 0) {\n return Sortable.create($list.get(0), {\n handle: \".js-handle\",\n draggable: \".js-list\",\n onSort: function() {\n return ExtraSidebarCastList.saveSort();\n }\n });\n }\n };\n\n ExtraSidebarCastList.saveSort = function() {\n var order;\n order = _.map($(\".js-sidebar-cast-lists\").find(\".js-list\"), function(e) {\n return $(e).data('cast-list');\n });\n return $.ajax({\n method: \"post\",\n url: \"/admin/api/cast_lists/quick_list_order\",\n data: {\n ids: order\n },\n success: function(data) {\n return ExtraSidebarCastList.setOrder(data.order);\n }\n });\n };\n\n ExtraSidebarCastList.setOrder = function(order) {\n var $list, newList;\n $list = $(\".js-sidebar-cast-lists\").find(\".js-lists\");\n newList = _.map(order, function(id) {\n return $list.find(\"[data-cast-list=\" + id + \"]\").get(0);\n });\n $list.html(\"\");\n _.each(newList, function(item) {\n return $list.append(item);\n });\n return $(\".js-extra-card\").each(function() {\n $list = $(this).find(\".js-cast-lists\");\n newList = _.map(order, function(id) {\n return $list.find(\"[data-cast-list=\" + id + \"]\").get(0);\n });\n $list.html(\"\");\n return _.each(newList, function(item) {\n return $list.append(item);\n });\n });\n };\n\n ExtraSidebarCastList.destroy = function(e) {\n var $list, id;\n e.preventDefault();\n $list = $(this).closest(\".js-list\");\n id = $list.data('cast-list');\n return $.ajax({\n method: \"post\",\n url: \"/admin/api/cast_lists/\" + id + \"/remove_from_quick_list\",\n dataType: \"json\",\n success: function() {\n $list.remove();\n $(\".js-extra-card\").find(\"[data-cast-list=\" + id + \"]\").remove();\n ExtraSidebarCastList.updateBadge();\n return ExtraCard.updateBadges();\n }\n });\n };\n\n ExtraSidebarCastList.enableAddSelect = function() {\n return $(\".js-sidebar-cast-lists\").find(\".js-select\").select2({\n theme: \"bootstrap\",\n placeholder: \"Find a cast list...\",\n ajax: {\n url: \"/admin/api/cast_lists/search\",\n delay: 250,\n processResults: function(data, params) {\n return {\n results: data\n };\n }\n }\n }).on('select2:select', function(evt) {\n $(evt.target).val(0).trigger('change');\n return $.ajax({\n method: \"post\",\n url: \"/admin/api/cast_lists/\" + evt.params.data.id + \"/add_to_quick_list\",\n dataType: \"json\",\n success: function(data) {\n var $badge, $cast, $destroy, $li, $reorder, order;\n if ($(\".js-sidebar-cast-lists\").find(\".js-list[data-cast-list=\" + data.id + \"]\").length > 0) {\n $(\".js-sidebar-cast-lists\").find(\".js-list[data-cast-list=\" + data.id + \"]\").prependTo($(\".js-sidebar-cast-lists\").find(\".js-lists\"));\n order = _.map($(\".js-sidebar-cast-lists\").find(\".js-list\"), function(e) {\n return $(e).data('cast-list');\n });\n order.push('scratch');\n ExtraSidebarCastList.setOrder(order);\n return;\n }\n $li = $(\"
  • \").addClass(\"list-item\").addClass(\"js-list\").attr('data-cast-list', data.id);\n $destroy = $(\"
    \");\n $reorder = $(\"
    \");\n $badge = $(\"
  • \").addClass(\"list-item\").addClass(\"js-extra\").attr(\"data-extra\", extra.id);\n $destroy = $(\"
    \");\n $link = $(\"
    \").html(extra.name).prop('href', extra.url);\n $extra.append($destroy).append($link);\n $(\".js-sidebar-scratch\").find(\".js-extras\").prepend($extra);\n return ExtraSidebarScratch.updateBadge();\n };\n\n ExtraSidebarScratch.destroy = function(id) {\n return $.ajax({\n method: \"post\",\n url: \"/admin/api/cast_lists/scratch/toggle_extra?extra_id=\" + id,\n dataType: \"json\",\n success: function() {\n return ExtraSidebarScratch.remove(id);\n }\n });\n };\n\n ExtraSidebarScratch.remove = function(id) {\n $(\".js-sidebar-scratch\").find(\".js-extra[data-extra=\" + id + \"]\").remove();\n $(\".js-extra-card\").find(\"[data-cast-list=scratch]\").removeClass('active');\n ExtraSidebarScratch.updateBadge();\n return ExtraCard.updateBadges();\n };\n\n ExtraSidebarScratch.enableAddSelect = function() {\n $(\".js-sidebar-scratch\").find(\".js-select\").select2({\n theme: \"bootstrap\",\n width: \"100%\",\n placeholder: \"Add to a cast list...\",\n ajax: {\n url: \"/admin/api/cast_lists/search\",\n delay: 250,\n processResults: function(data, params) {\n return {\n results: data\n };\n }\n }\n });\n return $(\".js-sidebar-scratch\").find(\".js-select-go\").on('click', function(e) {\n var ids, val;\n e.preventDefault();\n val = $(\".js-sidebar-scratch\").find(\".js-select\").val();\n $(\".js-sidebar-scratch\").find(\".js-select\").val(0).trigger('change');\n ids = [];\n $(\".js-sidebar-scratch\").find(\"input:checked\").each(function() {\n return ids.push($(this).val());\n });\n return $.ajax({\n method: \"post\",\n url: \"/admin/api/cast_lists/\" + val + \"/add_scratch\",\n data: {\n extra_ids: ids\n },\n dataType: \"json\",\n success: function(data) {\n return window.location = data.url;\n }\n });\n });\n };\n\n ExtraSidebarScratch.decorate = function() {\n ExtraSidebarScratch.enableAddSelect();\n ExtraSidebarScratch.updateBadge();\n return $(\".js-sidebar-scratch\").on('click', '.js-destroy', function(e) {\n var id;\n e.preventDefault();\n id = $(this).closest(\".js-extra\").data('extra');\n return ExtraSidebarScratch.destroy(id);\n });\n };\n\n return ExtraSidebarScratch;\n\n })();\n\n}).call(this);","(function() {\n window.Message = (function() {\n function Message() {}\n\n Message.setup = function() {\n return Message.decorate();\n };\n\n Message.decorate = function() {\n return $(\".js-message-template-apply\").on('click', function(e) {\n var id;\n e.preventDefault();\n id = $(\".js-message-template-select\").val();\n return $.ajax({\n url: \"/admin/email_templates/\" + id,\n dataType: \"json\",\n method: \"get\",\n success: function(data) {\n $(\"#message_subject\").val(data.subject);\n return $(\"#message_body\").froalaEditor('html.set', data.body);\n }\n });\n });\n };\n\n return Message;\n\n })();\n\n}).call(this);","(function() {\n window.LiveSearch = (function() {\n function LiveSearch() {}\n\n LiveSearch.setup = function() {\n return LiveSearch.decorate();\n };\n\n LiveSearch.toggleFilter = function(e) {\n\n e.preventDefault();\n\n const url = $(this).attr(\"href\");\n\n const filter = $(this).closest(\".filter\");\n const group = filter.find(\".list-group\");\n\n if (filter.hasClass(\"active\")) {\n return filter.removeClass(\"active\");\n } else {\n\n $.ajax({\n url: url,\n dataType: \"html\",\n success: function(data) {\n group.html(data);\n }\n });\n\n return filter.addClass(\"active\");\n }\n };\n\n LiveSearch.decorate = function() {\n $(document).on('click', '.js-live-filter', LiveSearch.toggleFilter)\n\n $(\".js-live-filter-load\").each(function() {\n $(this).find(\".js-live-filter\").each(function() {\n $(this).trigger('click');\n })\n })\n\n return;\n };\n\n return LiveSearch;\n\n })();\n\n}).call(this);","(function() {\n window.PrivateUpload = (function() {\n function PrivateUpload() {}\n\n PrivateUpload.setup = function() {\n return PrivateUpload.decorate();\n };\n\n PrivateUpload.decorate = function() {\n console.log($(\".js-preview-media\").length)\n $(\".js-preview-media\").fancybox()\n };\n\n return PrivateUpload;\n\n })();\n\n}).call(this);","(function() {\n jQuery(function() {\n return $(function() {\n $(document).on('click', '.js-availability-confirm-modal', function(e) {\n e.preventDefault();\n return $(\"body\").addClass(\"show-confirm-modal\");\n });\n $(document).on('click', '.js-availability-not-available-modal', function(e) {\n e.preventDefault();\n return $(\"body\").addClass(\"show-not-available-modal\");\n });\n $(document).on('click', '.js-availability-close-modal', function(e) {\n e.preventDefault();\n $(\"body\").removeClass(\"show-confirm-modal\");\n $(\"body\").removeClass(\"show-not-available-modal\");\n return $(\"body\").removeClass(\"show-release-modal\");\n });\n return $(document).on('change', '.js-availability-callback', function(e) {\n if ($(this).is(\":checked\")) {\n $(\".js-accepted\").hide();\n return $(\".js-callback\").show();\n } else {\n $(\".js-accepted\").show();\n return $(\".js-callback\").hide();\n }\n });\n });\n });\n\n}).call(this);","/**\r\nCore script to handle the entire theme and core functions\r\n**/\r\nvar App = function() {\r\n\r\n // IE mode\r\n var isRTL = false;\r\n var isIE8 = false;\r\n var isIE9 = false;\r\n var isIE10 = false;\r\n\r\n var resizeHandlers = [];\r\n\r\n var assetsPath = '../assets/';\r\n\r\n var globalImgPath = 'global/img/';\r\n\r\n var globalPluginsPath = 'global/plugins/';\r\n\r\n var globalCssPath = 'global/css/';\r\n\r\n // theme layout color set\r\n\r\n var brandColors = {\r\n 'blue': '#89C4F4',\r\n 'red': '#F3565D',\r\n 'green': '#1bbc9b',\r\n 'purple': '#9b59b6',\r\n 'grey': '#95a5a6',\r\n 'yellow': '#F8CB00'\r\n };\r\n\r\n // initializes main settings\r\n var handleInit = function() {\r\n\r\n if ($('body').css('direction') === 'rtl') {\r\n isRTL = true;\r\n }\r\n\r\n isIE8 = !!navigator.userAgent.match(/MSIE 8.0/);\r\n isIE9 = !!navigator.userAgent.match(/MSIE 9.0/);\r\n isIE10 = !!navigator.userAgent.match(/MSIE 10.0/);\r\n\r\n if (isIE10) {\r\n $('html').addClass('ie10'); // detect IE10 version\r\n }\r\n\r\n if (isIE10 || isIE9 || isIE8) {\r\n $('html').addClass('ie'); // detect IE10 version\r\n }\r\n };\r\n\r\n // runs callback functions set by App.addResponsiveHandler().\r\n var _runResizeHandlers = function() {\r\n // reinitialize other subscribed elements\r\n for (var i = 0; i < resizeHandlers.length; i++) {\r\n var each = resizeHandlers[i];\r\n each.call();\r\n }\r\n };\r\n\r\n // handle the layout reinitialization on window resize\r\n var handleOnResize = function() {\r\n var resize;\r\n if (isIE8) {\r\n var currheight;\r\n $(window).resize(function() {\r\n if (currheight == document.documentElement.clientHeight) {\r\n return; //quite event since only body resized not window.\r\n }\r\n if (resize) {\r\n clearTimeout(resize);\r\n }\r\n resize = setTimeout(function() {\r\n _runResizeHandlers();\r\n }, 50); // wait 50ms until window resize finishes. \r\n currheight = document.documentElement.clientHeight; // store last body client height\r\n });\r\n } else {\r\n $(window).resize(function() {\r\n if (resize) {\r\n clearTimeout(resize);\r\n }\r\n resize = setTimeout(function() {\r\n _runResizeHandlers();\r\n }, 50); // wait 50ms until window resize finishes.\r\n });\r\n }\r\n };\r\n\r\n // Handles portlet tools & actions\r\n var handlePortletTools = function() {\r\n // handle portlet remove\r\n $('body').on('click', '.portlet > .portlet-title > .tools > a.remove', function(e) {\r\n e.preventDefault();\r\n var portlet = $(this).closest(\".portlet\");\r\n\r\n if ($('body').hasClass('page-portlet-fullscreen')) {\r\n $('body').removeClass('page-portlet-fullscreen');\r\n }\r\n\r\n portlet.find('.portlet-title .fullscreen').tooltip('destroy');\r\n portlet.find('.portlet-title > .tools > .reload').tooltip('destroy');\r\n portlet.find('.portlet-title > .tools > .remove').tooltip('destroy');\r\n portlet.find('.portlet-title > .tools > .config').tooltip('destroy');\r\n portlet.find('.portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand').tooltip('destroy');\r\n\r\n portlet.remove();\r\n });\r\n\r\n // handle portlet fullscreen\r\n $('body').on('click', '.portlet > .portlet-title .fullscreen', function(e) {\r\n e.preventDefault();\r\n var portlet = $(this).closest(\".portlet\");\r\n if (portlet.hasClass('portlet-fullscreen')) {\r\n $(this).removeClass('on');\r\n portlet.removeClass('portlet-fullscreen');\r\n $('body').removeClass('page-portlet-fullscreen');\r\n portlet.children('.portlet-body').css('height', 'auto');\r\n } else {\r\n var height = App.getViewPort().height -\r\n portlet.children('.portlet-title').outerHeight() -\r\n parseInt(portlet.children('.portlet-body').css('padding-top')) -\r\n parseInt(portlet.children('.portlet-body').css('padding-bottom'));\r\n\r\n $(this).addClass('on');\r\n portlet.addClass('portlet-fullscreen');\r\n $('body').addClass('page-portlet-fullscreen');\r\n portlet.children('.portlet-body').css('height', height);\r\n }\r\n });\r\n\r\n $('body').on('click', '.portlet > .portlet-title > .tools > a.reload', function(e) {\r\n e.preventDefault();\r\n var el = $(this).closest(\".portlet\").children(\".portlet-body\");\r\n var url = $(this).attr(\"data-url\");\r\n var error = $(this).attr(\"data-error-display\");\r\n if (url) {\r\n App.blockUI({\r\n target: el,\r\n animate: true,\r\n overlayColor: 'none'\r\n });\r\n $.ajax({\r\n type: \"GET\",\r\n cache: false,\r\n url: url,\r\n dataType: \"html\",\r\n success: function(res) {\r\n App.unblockUI(el);\r\n el.html(res);\r\n App.initAjax() // reinitialize elements & plugins for newly loaded content\r\n },\r\n error: function(xhr, ajaxOptions, thrownError) {\r\n App.unblockUI(el);\r\n var msg = 'Error on reloading the content. Please check your connection and try again.';\r\n if (error == \"toastr\" && toastr) {\r\n toastr.error(msg);\r\n } else if (error == \"notific8\" && $.notific8) {\r\n $.notific8('zindex', 11500);\r\n $.notific8(msg, {\r\n theme: 'ruby',\r\n life: 3000\r\n });\r\n } else {\r\n alert(msg);\r\n }\r\n }\r\n });\r\n } else {\r\n // for demo purpose\r\n App.blockUI({\r\n target: el,\r\n animate: true,\r\n overlayColor: 'none'\r\n });\r\n window.setTimeout(function() {\r\n App.unblockUI(el);\r\n }, 1000);\r\n }\r\n });\r\n\r\n // load ajax data on page init\r\n $('.portlet .portlet-title a.reload[data-load=\"true\"]').click();\r\n\r\n $('body').on('click', '.portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand', function(e) {\r\n e.preventDefault();\r\n var el = $(this).closest(\".portlet\").children(\".portlet-body\");\r\n if ($(this).hasClass(\"collapse\")) {\r\n $(this).removeClass(\"collapse\").addClass(\"expand\");\r\n el.slideUp(200);\r\n } else {\r\n $(this).removeClass(\"expand\").addClass(\"collapse\");\r\n el.slideDown(200);\r\n }\r\n });\r\n };\r\n \r\n // Handlesmaterial design checkboxes\r\n var handleMaterialDesign = function() {\r\n\r\n // Material design ckeckbox and radio effects\r\n $('body').on('click', '.md-checkbox > label, .md-radio > label', function() {\r\n var the = $(this);\r\n // find the first span which is our circle/bubble\r\n var el = $(this).children('span:first-child');\r\n \r\n // add the bubble class (we do this so it doesnt show on page load)\r\n el.addClass('inc');\r\n \r\n // clone it\r\n var newone = el.clone(true); \r\n \r\n // add the cloned version before our original\r\n el.before(newone); \r\n \r\n // remove the original so that it is ready to run on next click\r\n $(\".\" + el.attr(\"class\") + \":last\", the).remove();\r\n }); \r\n\r\n if ($('body').hasClass('page-md')) { \r\n // Material design click effect\r\n // credit where credit's due; http://thecodeplayer.com/walkthrough/ripple-click-effect-google-material-design \r\n var element, circle, d, x, y;\r\n $('body').on('click', 'a.btn, button.btn, input.btn, label.btn', function(e) { \r\n element = $(this);\r\n \r\n if(element.find(\".md-click-circle\").length == 0) {\r\n element.prepend(\"\");\r\n }\r\n \r\n circle = element.find(\".md-click-circle\");\r\n circle.removeClass(\"md-click-animate\");\r\n \r\n if(!circle.height() && !circle.width()) {\r\n d = Math.max(element.outerWidth(), element.outerHeight());\r\n circle.css({height: d, width: d});\r\n }\r\n \r\n x = e.pageX - element.offset().left - circle.width()/2;\r\n y = e.pageY - element.offset().top - circle.height()/2;\r\n \r\n circle.css({top: y+'px', left: x+'px'}).addClass(\"md-click-animate\");\r\n\r\n setTimeout(function() {\r\n circle.remove(); \r\n }, 1000);\r\n });\r\n }\r\n\r\n // Floating labels\r\n var handleInput = function(el) {\r\n if (el.val() != \"\") {\r\n el.addClass('edited');\r\n } else {\r\n el.removeClass('edited');\r\n }\r\n } \r\n\r\n $('body').on('keydown', '.form-md-floating-label .form-control', function(e) { \r\n handleInput($(this));\r\n });\r\n $('body').on('blur', '.form-md-floating-label .form-control', function(e) { \r\n handleInput($(this));\r\n }); \r\n\r\n $('.form-md-floating-label .form-control').each(function(){\r\n if ($(this).val().length > 0) {\r\n $(this).addClass('edited');\r\n }\r\n });\r\n }\r\n\r\n // Handles custom checkboxes & radios using jQuery iCheck plugin\r\n var handleiCheck = function() {\r\n if (!$().iCheck) {\r\n return;\r\n }\r\n\r\n $('.icheck').each(function() {\r\n var checkboxClass = $(this).attr('data-checkbox') ? $(this).attr('data-checkbox') : 'icheckbox_minimal-grey';\r\n var radioClass = $(this).attr('data-radio') ? $(this).attr('data-radio') : 'iradio_minimal-grey';\r\n\r\n if (checkboxClass.indexOf('_line') > -1 || radioClass.indexOf('_line') > -1) {\r\n $(this).iCheck({\r\n checkboxClass: checkboxClass,\r\n radioClass: radioClass,\r\n insert: '
    ' + $(this).attr(\"data-label\")\r\n });\r\n } else {\r\n $(this).iCheck({\r\n checkboxClass: checkboxClass,\r\n radioClass: radioClass\r\n });\r\n }\r\n });\r\n };\r\n\r\n // Handles Bootstrap switches\r\n var handleBootstrapSwitch = function() {\r\n if (!$().bootstrapSwitch) {\r\n return;\r\n }\r\n $('.make-switch').bootstrapSwitch();\r\n };\r\n\r\n // Handles Bootstrap confirmations\r\n var handleBootstrapConfirmation = function() {\r\n if (!$().confirmation) {\r\n return;\r\n }\r\n $('[data-toggle=confirmation]').confirmation({ btnOkClass: 'btn btn-sm btn-success', btnCancelClass: 'btn btn-sm btn-danger'});\r\n }\r\n \r\n // Handles Bootstrap Accordions.\r\n var handleAccordions = function() {\r\n $('body').on('shown.bs.collapse', '.accordion.scrollable', function(e) {\r\n App.scrollTo($(e.target));\r\n });\r\n };\r\n\r\n // Handles Bootstrap Tabs.\r\n var handleTabs = function() {\r\n //activate tab if tab id provided in the URL\r\n if (encodeURI(location.hash)) {\r\n var tabid = encodeURI(location.hash.substr(1));\r\n $('a[href=\"#' + tabid + '\"]').parents('.tab-pane:hidden').each(function() {\r\n var tabid = $(this).attr(\"id\");\r\n $('a[href=\"#' + tabid + '\"]').click();\r\n });\r\n $('a[href=\"#' + tabid + '\"]').click();\r\n }\r\n\r\n if ($().tabdrop) {\r\n $('.tabbable-tabdrop .nav-pills, .tabbable-tabdrop .nav-tabs').tabdrop({\r\n text: ' '\r\n });\r\n }\r\n };\r\n\r\n // Handles Bootstrap Modals.\r\n var handleModals = function() { \r\n // fix stackable modal issue: when 2 or more modals opened, closing one of modal will remove .modal-open class. \r\n $('body').on('hide.bs.modal', function() {\r\n if ($('.modal:visible').size() > 1 && $('html').hasClass('modal-open') === false) {\r\n $('html').addClass('modal-open');\r\n } else if ($('.modal:visible').size() <= 1) {\r\n $('html').removeClass('modal-open');\r\n }\r\n });\r\n\r\n // fix page scrollbars issue\r\n $('body').on('show.bs.modal', '.modal', function() {\r\n if ($(this).hasClass(\"modal-scroll\")) {\r\n $('body').addClass(\"modal-open-noscroll\");\r\n }\r\n });\r\n\r\n // fix page scrollbars issue\r\n $('body').on('hidden.bs.modal', '.modal', function() {\r\n $('body').removeClass(\"modal-open-noscroll\");\r\n });\r\n\r\n // remove ajax content and remove cache on modal closed \r\n $('body').on('hidden.bs.modal', '.modal:not(.modal-cached)', function () {\r\n $(this).removeData('bs.modal');\r\n });\r\n };\r\n\r\n // Handles Bootstrap Tooltips.\r\n var handleTooltips = function() {\r\n // global tooltips\r\n $('.tooltips').tooltip();\r\n\r\n // portlet tooltips\r\n $('.portlet > .portlet-title .fullscreen').tooltip({\r\n trigger: 'hover',\r\n container: 'body',\r\n title: 'Fullscreen'\r\n });\r\n $('.portlet > .portlet-title > .tools > .reload').tooltip({\r\n trigger: 'hover',\r\n container: 'body',\r\n title: 'Reload'\r\n });\r\n $('.portlet > .portlet-title > .tools > .remove').tooltip({\r\n trigger: 'hover',\r\n container: 'body',\r\n title: 'Remove'\r\n });\r\n $('.portlet > .portlet-title > .tools > .config').tooltip({\r\n trigger: 'hover',\r\n container: 'body',\r\n title: 'Settings'\r\n });\r\n $('.portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand').tooltip({\r\n trigger: 'hover',\r\n container: 'body',\r\n title: 'Collapse/Expand'\r\n });\r\n };\r\n\r\n // Handles Bootstrap Dropdowns\r\n var handleDropdowns = function() {\r\n /*\r\n Hold dropdown on click \r\n */\r\n $('body').on('click', '.dropdown-menu.hold-on-click', function(e) {\r\n e.stopPropagation();\r\n });\r\n };\r\n\r\n var handleAlerts = function() {\r\n $('body').on('click', '[data-close=\"alert\"]', function(e) {\r\n $(this).parent('.alert').hide();\r\n $(this).closest('.note').hide();\r\n e.preventDefault();\r\n });\r\n\r\n $('body').on('click', '[data-close=\"note\"]', function(e) {\r\n $(this).closest('.note').hide();\r\n e.preventDefault();\r\n });\r\n\r\n $('body').on('click', '[data-remove=\"note\"]', function(e) {\r\n $(this).closest('.note').remove();\r\n e.preventDefault();\r\n });\r\n };\r\n\r\n // Handle Hower Dropdowns\r\n var handleDropdownHover = function() {\r\n $('[data-hover=\"dropdown\"]').not('.hover-initialized').each(function() {\r\n $(this).dropdownHover();\r\n $(this).addClass('hover-initialized');\r\n });\r\n };\r\n\r\n // Handle textarea autosize \r\n var handleTextareaAutosize = function() {\r\n if (typeof(autosize) == \"function\") {\r\n autosize(document.querySelector('textarea.autosizeme'));\r\n }\r\n }\r\n\r\n // Handles Bootstrap Popovers\r\n\r\n // last popep popover\r\n var lastPopedPopover;\r\n\r\n var handlePopovers = function() {\r\n $('.popovers').popover();\r\n\r\n // close last displayed popover\r\n\r\n $(document).on('click.bs.popover.data-api', function(e) {\r\n if (lastPopedPopover) {\r\n lastPopedPopover.popover('hide');\r\n }\r\n });\r\n };\r\n\r\n // Handles scrollable contents using jQuery SlimScroll plugin.\r\n var handleScrollers = function() {\r\n App.initSlimScroll('.scroller');\r\n };\r\n\r\n // Handles Image Preview using jQuery Fancybox plugin\r\n var handleFancybox = function() {\r\n if (!jQuery.fancybox) {\r\n return;\r\n }\r\n\r\n if ($(\".fancybox-button\").length > 0) {\r\n $(\".fancybox-button\").fancybox({\r\n groupAttr: 'data-rel',\r\n prevEffect: 'none',\r\n nextEffect: 'none',\r\n closeBtn: true,\r\n helpers: {\r\n title: {\r\n type: 'inside'\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n // Handles counterup plugin wrapper\r\n var handleCounterup = function() {\r\n if (!$().counterUp) {\r\n return;\r\n }\r\n\r\n $(\"[data-counter='counterup']\").counterUp({\r\n delay: 10,\r\n time: 1000\r\n });\r\n };\r\n\r\n // Fix input placeholder issue for IE8 and IE9\r\n var handleFixInputPlaceholderForIE = function() {\r\n //fix html5 placeholder attribute for ie7 & ie8\r\n if (isIE8 || isIE9) { // ie8 & ie9\r\n // this is html5 placeholder fix for inputs, inputs with placeholder-no-fix class will be skipped(e.g: we need this for password fields)\r\n $('input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)').each(function() {\r\n var input = $(this);\r\n\r\n if (input.val() === '' && input.attr(\"placeholder\") !== '') {\r\n input.addClass(\"placeholder\").val(input.attr('placeholder'));\r\n }\r\n\r\n input.focus(function() {\r\n if (input.val() == input.attr('placeholder')) {\r\n input.val('');\r\n }\r\n });\r\n\r\n input.blur(function() {\r\n if (input.val() === '' || input.val() == input.attr('placeholder')) {\r\n input.val(input.attr('placeholder'));\r\n }\r\n });\r\n });\r\n }\r\n };\r\n\r\n // Handle Select2 Dropdowns\r\n var handleSelect2 = function() {\r\n if ($().select2) {\r\n $.fn.select2.defaults.set(\"theme\", \"bootstrap\");\r\n $('.select2me').select2({\r\n placeholder: \"Select\",\r\n width: 'auto', \r\n allowClear: true\r\n });\r\n }\r\n };\r\n\r\n // handle group element heights\r\n var handleHeight = function() {\r\n $('[data-auto-height]').each(function() {\r\n var parent = $(this);\r\n var items = $('[data-height]', parent);\r\n var height = 0;\r\n var mode = parent.attr('data-mode');\r\n var offset = parseInt(parent.attr('data-offset') ? parent.attr('data-offset') : 0);\r\n\r\n items.each(function() {\r\n if ($(this).attr('data-height') == \"height\") {\r\n $(this).css('height', '');\r\n } else {\r\n $(this).css('min-height', '');\r\n }\r\n\r\n var height_ = (mode == 'base-height' ? $(this).outerHeight() : $(this).outerHeight(true));\r\n if (height_ > height) {\r\n height = height_;\r\n }\r\n });\r\n\r\n height = height + offset;\r\n\r\n items.each(function() {\r\n if ($(this).attr('data-height') == \"height\") {\r\n $(this).css('height', height);\r\n } else {\r\n $(this).css('min-height', height);\r\n }\r\n });\r\n\r\n if(parent.attr('data-related')) {\r\n $(parent.attr('data-related')).css('height', parent.height());\r\n }\r\n }); \r\n }\r\n \r\n //* END:CORE HANDLERS *//\r\n\r\n return {\r\n\r\n //main function to initiate the theme\r\n init: function() {\r\n //IMPORTANT!!!: Do not modify the core handlers call order.\r\n\r\n //Core handlers\r\n handleInit(); // initialize core variables\r\n handleOnResize(); // set and handle responsive \r\n\r\n //UI Component handlers \r\n handleMaterialDesign(); // handle material design \r\n handleiCheck(); // handles custom icheck radio and checkboxes\r\n handleBootstrapSwitch(); // handle bootstrap switch plugin\r\n handleScrollers(); // handles slim scrolling contents \r\n handleFancybox(); // handle fancy box\r\n handleSelect2(); // handle custom Select2 dropdowns\r\n handlePortletTools(); // handles portlet action bar functionality(refresh, configure, toggle, remove)\r\n handleAlerts(); //handle closabled alerts\r\n handleDropdowns(); // handle dropdowns\r\n handleTabs(); // handle tabs\r\n handleTooltips(); // handle bootstrap tooltips\r\n handlePopovers(); // handles bootstrap popovers\r\n handleAccordions(); //handles accordions \r\n handleModals(); // handle modals\r\n handleBootstrapConfirmation(); // handle bootstrap confirmations\r\n handleTextareaAutosize(); // handle autosize textareas\r\n handleCounterup(); // handle counterup instances\r\n\r\n //Handle group element heights\r\n this.addResizeHandler(handleHeight); // handle auto calculating height on window resize\r\n\r\n // Hacks\r\n handleFixInputPlaceholderForIE(); //IE8 & IE9 input placeholder issue fix\r\n },\r\n\r\n //main function to initiate core javascript after ajax complete\r\n initAjax: function() {\r\n //handleUniform(); // handles custom radio & checkboxes \r\n handleiCheck(); // handles custom icheck radio and checkboxes\r\n handleBootstrapSwitch(); // handle bootstrap switch plugin\r\n handleDropdownHover(); // handles dropdown hover \r\n handleScrollers(); // handles slim scrolling contents \r\n handleSelect2(); // handle custom Select2 dropdowns\r\n handleFancybox(); // handle fancy box\r\n handleDropdowns(); // handle dropdowns\r\n handleTooltips(); // handle bootstrap tooltips\r\n handlePopovers(); // handles bootstrap popovers\r\n handleAccordions(); //handles accordions \r\n handleBootstrapConfirmation(); // handle bootstrap confirmations\r\n },\r\n\r\n //init main components \r\n initComponents: function() {\r\n this.initAjax();\r\n },\r\n\r\n //public function to remember last opened popover that needs to be closed on click\r\n setLastPopedPopover: function(el) {\r\n lastPopedPopover = el;\r\n },\r\n\r\n //public function to add callback a function which will be called on window resize\r\n addResizeHandler: function(func) {\r\n resizeHandlers.push(func);\r\n },\r\n\r\n //public functon to call _runresizeHandlers\r\n runResizeHandlers: function() {\r\n _runResizeHandlers();\r\n },\r\n\r\n // wrApper function to scroll(focus) to an element\r\n scrollTo: function(el, offeset) {\r\n var pos = (el && el.size() > 0) ? el.offset().top : 0;\r\n\r\n if (el) {\r\n if ($('body').hasClass('page-header-fixed')) {\r\n pos = pos - $('.page-header').height();\r\n } else if ($('body').hasClass('page-header-top-fixed')) {\r\n pos = pos - $('.page-header-top').height();\r\n } else if ($('body').hasClass('page-header-menu-fixed')) {\r\n pos = pos - $('.page-header-menu').height();\r\n }\r\n pos = pos + (offeset ? offeset : -1 * el.height());\r\n }\r\n\r\n $('html,body').animate({\r\n scrollTop: pos\r\n }, 'slow');\r\n },\r\n\r\n initSlimScroll: function(el) {\r\n if (!$().slimScroll) {\r\n return;\r\n }\r\n\r\n $(el).each(function() {\r\n if ($(this).attr(\"data-initialized\")) {\r\n return; // exit\r\n }\r\n\r\n var height;\r\n\r\n if ($(this).attr(\"data-height\")) {\r\n height = $(this).attr(\"data-height\");\r\n } else {\r\n height = $(this).css('height');\r\n }\r\n\r\n $(this).slimScroll({\r\n allowPageScroll: true, // allow page scroll when the element scroll is ended\r\n size: '7px',\r\n color: ($(this).attr(\"data-handle-color\") ? $(this).attr(\"data-handle-color\") : '#bbb'),\r\n wrapperClass: ($(this).attr(\"data-wrapper-class\") ? $(this).attr(\"data-wrapper-class\") : 'slimScrollDiv'),\r\n railColor: ($(this).attr(\"data-rail-color\") ? $(this).attr(\"data-rail-color\") : '#eaeaea'),\r\n position: isRTL ? 'left' : 'right',\r\n height: height,\r\n alwaysVisible: ($(this).attr(\"data-always-visible\") == \"1\" ? true : false),\r\n railVisible: ($(this).attr(\"data-rail-visible\") == \"1\" ? true : false),\r\n disableFadeOut: true\r\n });\r\n\r\n $(this).attr(\"data-initialized\", \"1\");\r\n });\r\n },\r\n\r\n destroySlimScroll: function(el) {\r\n if (!$().slimScroll) {\r\n return;\r\n }\r\n\r\n $(el).each(function() {\r\n if ($(this).attr(\"data-initialized\") === \"1\") { // destroy existing instance before updating the height\r\n $(this).removeAttr(\"data-initialized\");\r\n $(this).removeAttr(\"style\");\r\n\r\n var attrList = {};\r\n\r\n // store the custom attribures so later we will reassign.\r\n if ($(this).attr(\"data-handle-color\")) {\r\n attrList[\"data-handle-color\"] = $(this).attr(\"data-handle-color\");\r\n }\r\n if ($(this).attr(\"data-wrapper-class\")) {\r\n attrList[\"data-wrapper-class\"] = $(this).attr(\"data-wrapper-class\");\r\n }\r\n if ($(this).attr(\"data-rail-color\")) {\r\n attrList[\"data-rail-color\"] = $(this).attr(\"data-rail-color\");\r\n }\r\n if ($(this).attr(\"data-always-visible\")) {\r\n attrList[\"data-always-visible\"] = $(this).attr(\"data-always-visible\");\r\n }\r\n if ($(this).attr(\"data-rail-visible\")) {\r\n attrList[\"data-rail-visible\"] = $(this).attr(\"data-rail-visible\");\r\n }\r\n\r\n $(this).slimScroll({\r\n wrapperClass: ($(this).attr(\"data-wrapper-class\") ? $(this).attr(\"data-wrapper-class\") : 'slimScrollDiv'),\r\n destroy: true\r\n });\r\n\r\n var the = $(this);\r\n\r\n // reassign custom attributes\r\n $.each(attrList, function(key, value) {\r\n the.attr(key, value);\r\n });\r\n\r\n }\r\n });\r\n },\r\n\r\n // function to scroll to the top\r\n scrollTop: function() {\r\n App.scrollTo();\r\n },\r\n\r\n // wrApper function to block element(indicate loading)\r\n blockUI: function(options) {\r\n options = $.extend(true, {}, options);\r\n var html = '';\r\n if (options.animate) {\r\n html = '
    ' + '
    ' + '
    ';\r\n } else if (options.iconOnly) {\r\n html = '
    ';\r\n } else if (options.textOnly) {\r\n html = '
      ' + (options.message ? options.message : 'LOADING...') + '
    ';\r\n } else {\r\n html = '
      ' + (options.message ? options.message : 'LOADING...') + '
    ';\r\n }\r\n\r\n if (options.target) { // element blocking\r\n var el = $(options.target);\r\n if (el.height() <= ($(window).height())) {\r\n options.cenrerY = true;\r\n }\r\n el.block({\r\n message: html,\r\n baseZ: options.zIndex ? options.zIndex : 1000,\r\n centerY: options.cenrerY !== undefined ? options.cenrerY : false,\r\n css: {\r\n top: '10%',\r\n border: '0',\r\n padding: '0',\r\n backgroundColor: 'none'\r\n },\r\n overlayCSS: {\r\n backgroundColor: options.overlayColor ? options.overlayColor : '#555',\r\n opacity: options.boxed ? 0.05 : 0.1,\r\n cursor: 'wait'\r\n }\r\n });\r\n } else { // page blocking\r\n $.blockUI({\r\n message: html,\r\n baseZ: options.zIndex ? options.zIndex : 1000,\r\n css: {\r\n border: '0',\r\n padding: '0',\r\n backgroundColor: 'none'\r\n },\r\n overlayCSS: {\r\n backgroundColor: options.overlayColor ? options.overlayColor : '#555',\r\n opacity: options.boxed ? 0.05 : 0.1,\r\n cursor: 'wait'\r\n }\r\n });\r\n }\r\n },\r\n\r\n // wrApper function to un-block element(finish loading)\r\n unblockUI: function(target) {\r\n if (target) {\r\n $(target).unblock({\r\n onUnblock: function() {\r\n $(target).css('position', '');\r\n $(target).css('zoom', '');\r\n }\r\n });\r\n } else {\r\n $.unblockUI();\r\n }\r\n },\r\n\r\n startPageLoading: function(options) {\r\n if (options && options.animate) {\r\n $('.page-spinner-bar').remove();\r\n $('body').append('
    ');\r\n } else {\r\n $('.page-loading').remove();\r\n $('body').append('
      ' + (options && options.message ? options.message : 'Loading...') + '
    ');\r\n }\r\n },\r\n\r\n stopPageLoading: function() {\r\n $('.page-loading, .page-spinner-bar').remove();\r\n },\r\n\r\n alert: function(options) {\r\n\r\n options = $.extend(true, {\r\n container: \"\", // alerts parent container(by default placed after the page breadcrumbs)\r\n place: \"append\", // \"append\" or \"prepend\" in container \r\n type: 'success', // alert's type\r\n message: \"\", // alert's message\r\n close: true, // make alert closable\r\n reset: true, // close all previouse alerts first\r\n focus: true, // auto scroll to the alert after shown\r\n closeInSeconds: 0, // auto close after defined seconds\r\n icon: \"\" // put icon before the message\r\n }, options);\r\n\r\n var id = App.getUniqueID(\"App_alert\");\r\n\r\n var html = '
    ' + (options.close ? '' : '') + (options.icon !== \"\" ? ' ' : '') + options.message + '
    ';\r\n\r\n if (options.reset) {\r\n $('.custom-alerts').remove();\r\n }\r\n\r\n if (!options.container) {\r\n if ($('.page-fixed-main-content').size() === 1) {\r\n $('.page-fixed-main-content').prepend(html);\r\n } else if (($('body').hasClass(\"page-container-bg-solid\") || $('body').hasClass(\"page-content-white\")) && $('.page-head').size() === 0) {\r\n $('.page-title').after(html);\r\n } else {\r\n if ($('.page-bar').size() > 0) {\r\n $('.page-bar').after(html);\r\n } else {\r\n $('.page-breadcrumb, .breadcrumbs').after(html);\r\n }\r\n }\r\n } else {\r\n if (options.place == \"append\") {\r\n $(options.container).append(html);\r\n } else {\r\n $(options.container).prepend(html);\r\n }\r\n }\r\n\r\n if (options.focus) {\r\n App.scrollTo($('#' + id));\r\n }\r\n\r\n if (options.closeInSeconds > 0) {\r\n setTimeout(function() {\r\n $('#' + id).remove();\r\n }, options.closeInSeconds * 1000);\r\n }\r\n\r\n return id;\r\n },\r\n\r\n //public function to initialize the fancybox plugin\r\n initFancybox: function() {\r\n handleFancybox();\r\n },\r\n\r\n //public helper function to get actual input value(used in IE9 and IE8 due to placeholder attribute not supported)\r\n getActualVal: function(el) {\r\n el = $(el);\r\n if (el.val() === el.attr(\"placeholder\")) {\r\n return \"\";\r\n }\r\n return el.val();\r\n },\r\n\r\n //public function to get a paremeter by name from URL\r\n getURLParameter: function(paramName) {\r\n var searchString = window.location.search.substring(1),\r\n i, val, params = searchString.split(\"&\");\r\n\r\n for (i = 0; i < params.length; i++) {\r\n val = params[i].split(\"=\");\r\n if (val[0] == paramName) {\r\n return unescape(val[1]);\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n // check for device touch support\r\n isTouchDevice: function() {\r\n try {\r\n document.createEvent(\"TouchEvent\");\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n },\r\n\r\n // To get the correct viewport width based on http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\r\n getViewPort: function() {\r\n var e = window,\r\n a = 'inner';\r\n if (!('innerWidth' in window)) {\r\n a = 'client';\r\n e = document.documentElement || document.body;\r\n }\r\n\r\n return {\r\n width: e[a + 'Width'],\r\n height: e[a + 'Height']\r\n };\r\n },\r\n\r\n getUniqueID: function(prefix) {\r\n return 'prefix_' + Math.floor(Math.random() * (new Date()).getTime());\r\n },\r\n\r\n // check IE8 mode\r\n isIE8: function() {\r\n return isIE8;\r\n },\r\n\r\n // check IE9 mode\r\n isIE9: function() {\r\n return isIE9;\r\n },\r\n\r\n //check RTL mode\r\n isRTL: function() {\r\n return isRTL;\r\n },\r\n\r\n // check IE8 mode\r\n isAngularJsApp: function() {\r\n return (typeof angular == 'undefined') ? false : true;\r\n },\r\n\r\n getAssetsPath: function() {\r\n return assetsPath;\r\n },\r\n\r\n setAssetsPath: function(path) {\r\n assetsPath = path;\r\n },\r\n\r\n setGlobalImgPath: function(path) {\r\n globalImgPath = path;\r\n },\r\n\r\n getGlobalImgPath: function() {\r\n return assetsPath + globalImgPath;\r\n },\r\n\r\n setGlobalPluginsPath: function(path) {\r\n globalPluginsPath = path;\r\n },\r\n\r\n getGlobalPluginsPath: function() {\r\n return assetsPath + globalPluginsPath;\r\n },\r\n\r\n getGlobalCssPath: function() {\r\n return assetsPath + globalCssPath;\r\n },\r\n\r\n // get layout color code by color name\r\n getBrandColor: function(name) {\r\n if (brandColors[name]) {\r\n return brandColors[name];\r\n } else {\r\n return '';\r\n }\r\n },\r\n\r\n getResponsiveBreakpoint: function(size) {\r\n // bootstrap responsive breakpoints\r\n var sizes = {\r\n 'xs' : 480, // extra small\r\n 'sm' : 768, // small\r\n 'md' : 992, // medium\r\n 'lg' : 1200 // large\r\n };\r\n\r\n return sizes[size] ? sizes[size] : 0; \r\n }\r\n };\r\n\r\n}();\r\n\r\njQuery(document).ready(function() { \r\n window.App.init(); // init metronic core componets\r\n});\r\n\r\nwindow.App = App;\r\n\r\nexport default App;","/**\r\nCore script to handle the entire theme and core functions\r\n**/\r\n\r\nvar Layout = function () {\r\n\r\n var layoutImgPath = 'layouts/layout3/img/';\r\n\r\n var layoutCssPath = 'layouts/layout3/css/';\r\n\r\n var resBreakpointMd = window.App.getResponsiveBreakpoint('md');\r\n\r\n //* BEGIN:CORE HANDLERS *//\r\n // this function handles responsive layout on screen size resize or mobile device rotate.\r\n\r\n // Handles header\r\n var handleHeader = function () { \r\n // handle search box expand/collapse \r\n $('.page-header').on('click', '.search-form', function (e) {\r\n $(this).addClass(\"open\");\r\n $(this).find('.form-control').focus();\r\n\r\n $('.page-header .search-form .form-control').on('blur', function (e) {\r\n $(this).closest('.search-form').removeClass(\"open\");\r\n $(this).unbind(\"blur\");\r\n });\r\n });\r\n\r\n // handle hor menu search form on enter press\r\n $('.page-header').on('keypress', '.hor-menu .search-form .form-control', function (e) {\r\n if (e.which == 13) {\r\n $(this).closest('.search-form').submit();\r\n return false;\r\n }\r\n });\r\n\r\n // handle header search button click\r\n $('.page-header').on('mousedown', '.search-form.open .submit', function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n $(this).closest('.search-form').submit();\r\n });\r\n\r\n // handle scrolling to top on responsive menu toggler click when header is fixed for mobile view\r\n $('body').on('click', '.page-header-top-fixed .page-header-top .menu-toggler', function(){\r\n window.App.scrollTop();\r\n }); \r\n };\r\n\r\n // Handles main menu\r\n var handleMainMenu = function () {\r\n\r\n // handle menu toggler icon click\r\n $(\".page-header .menu-toggler\").on(\"click\", function(event) {\r\n if (window.App.getViewPort().width < resBreakpointMd) {\r\n var menu = $(\".page-header .page-header-menu\");\r\n if (menu.is(\":visible\")) {\r\n menu.slideUp(300);\r\n } else { \r\n menu.slideDown(300);\r\n }\r\n\r\n if ($('body').hasClass('page-header-top-fixed')) {\r\n window.App.scrollTop();\r\n }\r\n }\r\n });\r\n\r\n // handle sub dropdown menu click for mobile devices only\r\n $(\".hor-menu .menu-dropdown > a, .hor-menu .dropdown-submenu > a\").on(\"click\", function(e) { \r\n if (window.App.getViewPort().width < resBreakpointMd) {\r\n if ($(this).next().hasClass('dropdown-menu')) {\r\n e.stopPropagation();\r\n if ($(this).parent().hasClass(\"opened\")) {\r\n $(this).parent().removeClass(\"opened\");\r\n } else {\r\n $(this).parent().addClass(\"opened\");\r\n }\r\n }\r\n }\r\n });\r\n\r\n // close main menu on final link click for mobile mode\r\n $(\".hor-menu li > a\").on(\"click\", function(e) {\r\n if (window.App.getViewPort().width < resBreakpointMd) {\r\n if (!$(this).parent('li').hasClass('classic-menu-dropdown') && !$(this).parent('li').hasClass('mega-menu-dropdown')\r\n && !$(this).parent('li').hasClass('dropdown-submenu')) {\r\n $(\".page-header .page-header-menu\").slideUp(300);\r\n window.App.scrollTop();\r\n }\r\n }\r\n });\r\n\r\n // hold mega menu content open on click/tap. \r\n $(document).on('click', '.mega-menu-dropdown .dropdown-menu, .classic-menu-dropdown .dropdown-menu', function (e) {\r\n e.stopPropagation();\r\n });\r\n\r\n // handle fixed mega menu(minimized) \r\n $(window).scroll(function() { \r\n var offset = 75;\r\n if ($('body').hasClass('page-header-menu-fixed')) {\r\n if ($(window).scrollTop() > offset){\r\n $(\".page-header-menu\").addClass(\"fixed\");\r\n } else {\r\n $(\".page-header-menu\").removeClass(\"fixed\"); \r\n }\r\n }\r\n\r\n if ($('body').hasClass('page-header-top-fixed')) {\r\n if ($(window).scrollTop() > offset){\r\n $(\".page-header-top\").addClass(\"fixed\");\r\n } else {\r\n $(\".page-header-top\").removeClass(\"fixed\"); \r\n }\r\n }\r\n });\r\n };\r\n\r\n // Handle sidebar menu links\r\n var handleMainMenuActiveLink = function(mode, el) {\r\n var url = location.hash.toLowerCase(); \r\n\r\n var menu = $('.hor-menu');\r\n\r\n if (mode === 'click' || mode === 'set') {\r\n el = $(el);\r\n } else if (mode === 'match') {\r\n menu.find(\"li > a\").each(function() {\r\n var path = $(this).attr(\"href\").toLowerCase(); \r\n // url match condition \r\n if (path.length > 1 && url.substr(1, path.length - 1) == path.substr(1)) {\r\n el = $(this);\r\n return; \r\n }\r\n });\r\n }\r\n\r\n if (!el || el.size() == 0) {\r\n return;\r\n }\r\n\r\n if (el.attr('href').toLowerCase() === 'javascript:;' || el.attr('href').toLowerCase() === '#') {\r\n return;\r\n } \r\n\r\n // disable active states\r\n menu.find('li.active').removeClass('active');\r\n menu.find('li > a > .selected').remove();\r\n menu.find('li.open').removeClass('open');\r\n\r\n el.parents('li').each(function () {\r\n $(this).addClass('active');\r\n\r\n if ($(this).parent('ul.navbar-nav').size() === 1) {\r\n $(this).find('> a').append('');\r\n }\r\n });\r\n };\r\n\r\n // Handles main menu on window resize\r\n var handleMainMenuOnResize = function() {\r\n // handle hover dropdown menu for desktop devices only\r\n var width = window.App.getViewPort().width;\r\n var menu = $(\".page-header-menu\");\r\n \r\n if (width >= resBreakpointMd) { \r\n $(\".page-header-menu\").css(\"display\", \"block\");\r\n } else if (width < resBreakpointMd) {\r\n $(\".page-header-menu\").css(\"display\", \"none\"); \r\n } \r\n };\r\n\r\n var handleContentHeight = function() {\r\n return;\r\n var height;\r\n\r\n if ($('body').height() < window.App.getViewPort().height) { \r\n height = window.App.getViewPort().height -\r\n $('.page-header').outerHeight() - \r\n ($('.page-container').outerHeight() - $('.page-content').outerHeight()) -\r\n $('.page-prefooter').outerHeight() - \r\n $('.page-footer').outerHeight();\r\n\r\n $('.page-content').css('min-height', height);\r\n }\r\n };\r\n\r\n // Handles the go to top button at the footer\r\n var handleGoTop = function () {\r\n var offset = 100;\r\n var duration = 500;\r\n\r\n if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) { // ios supported\r\n $(window).bind(\"touchend touchcancel touchleave\", function(e){\r\n if ($(this).scrollTop() > offset) {\r\n $('.scroll-to-top').fadeIn(duration);\r\n } else {\r\n $('.scroll-to-top').fadeOut(duration);\r\n }\r\n });\r\n } else { // general \r\n $(window).scroll(function() {\r\n if ($(this).scrollTop() > offset) {\r\n $('.scroll-to-top').fadeIn(duration);\r\n } else {\r\n $('.scroll-to-top').fadeOut(duration);\r\n }\r\n });\r\n }\r\n \r\n $('.scroll-to-top').click(function(e) {\r\n e.preventDefault();\r\n $('html, body').animate({scrollTop: 0}, duration);\r\n return false;\r\n });\r\n };\r\n\r\n //* END:CORE HANDLERS *//\r\n\r\n return {\r\n \r\n // Main init methods to initialize the layout\r\n // IMPORTANT!!!: Do not modify the core handlers call order.\r\n\r\n initHeader: function() {\r\n handleHeader(); // handles horizontal menu \r\n handleMainMenu(); // handles menu toggle for mobile\r\n window.App.addResizeHandler(handleMainMenuOnResize); // handle main menu on window resize\r\n\r\n if (window.App.isAngularJsApp()) { \r\n handleMainMenuActiveLink('match'); // init sidebar active links \r\n }\r\n },\r\n\r\n initContent: function() {\r\n handleContentHeight(); // handles content height \r\n },\r\n\r\n initFooter: function() {\r\n handleGoTop(); //handles scroll to top functionality in the footer\r\n },\r\n\r\n init: function () { \r\n this.initHeader();\r\n this.initContent();\r\n this.initFooter();\r\n },\r\n\r\n setMainMenuActiveLink: function(mode, el) {\r\n handleMainMenuActiveLink(mode, el);\r\n },\r\n\r\n closeMainMenu: function() {\r\n $('.hor-menu').find('li.open').removeClass('open');\r\n\r\n if (window.App.getViewPort().width < resBreakpointMd && $('.page-header-menu').is(\":visible\")) { // close the menu on mobile view while laoding a page \r\n $('.page-header .menu-toggler').click();\r\n }\r\n },\r\n\r\n getLayoutImgPath: function() {\r\n return window.App.getAssetsPath() + layoutImgPath;\r\n },\r\n\r\n getLayoutCssPath: function() {\r\n return window.App.getAssetsPath() + layoutCssPath;\r\n }\r\n };\r\n\r\n}();\r\n\r\nif (window.App.isAngularJsApp() === false) {\r\n jQuery(document).ready(function() { \r\n Layout.init(); // init metronic core componets\r\n });\r\n}","/**\r\nCore script to handle the entire theme and core functions\r\n**/\r\nvar QuickSidebar = function () {\r\n\r\n // Handles quick sidebar toggler\r\n var handleQuickSidebarToggler = function () {\r\n\r\n console.log(\"handleQuickSidebarToggler\");\r\n // quick sidebar toggler\r\n $('.dropdown-quick-sidebar-toggler a, .page-quick-sidebar-toggler, .quick-sidebar-toggler').click(function (e) {\r\n $('body').toggleClass('page-quick-sidebar-open'); \r\n });\r\n };\r\n\r\n // Handles quick sidebar chats\r\n var handleQuickSidebarChat = function () {\r\n var wrapper = $('.page-quick-sidebar-wrapper');\r\n var wrapperChat = wrapper.find('.page-quick-sidebar-chat');\r\n\r\n var initChatSlimScroll = function () {\r\n var chatUsers = wrapper.find('.page-quick-sidebar-chat-users');\r\n var chatUsersHeight;\r\n\r\n chatUsersHeight = wrapper.height() - wrapper.find('.nav-tabs').outerHeight(true);\r\n\r\n // chat user list \r\n window.App.destroySlimScroll(chatUsers);\r\n chatUsers.attr(\"data-height\", chatUsersHeight);\r\n window.App.initSlimScroll(chatUsers);\r\n\r\n var chatMessages = wrapperChat.find('.page-quick-sidebar-chat-user-messages');\r\n var chatMessagesHeight = chatUsersHeight - wrapperChat.find('.page-quick-sidebar-chat-user-form').outerHeight(true);\r\n chatMessagesHeight = chatMessagesHeight - wrapperChat.find('.page-quick-sidebar-nav').outerHeight(true);\r\n\r\n // user chat messages \r\n window.App.destroySlimScroll(chatMessages);\r\n chatMessages.attr(\"data-height\", chatMessagesHeight);\r\n window.App.initSlimScroll(chatMessages);\r\n };\r\n\r\n initChatSlimScroll();\r\n window.App.addResizeHandler(initChatSlimScroll); // reinitialize on window resize\r\n\r\n wrapper.find('.page-quick-sidebar-chat-users .media-list > .media').click(function () {\r\n wrapperChat.addClass(\"page-quick-sidebar-content-item-shown\");\r\n });\r\n\r\n wrapper.find('.page-quick-sidebar-chat-user .page-quick-sidebar-back-to-list').click(function () {\r\n wrapperChat.removeClass(\"page-quick-sidebar-content-item-shown\");\r\n });\r\n\r\n var handleChatMessagePost = function (e) {\r\n e.preventDefault();\r\n\r\n var chatContainer = wrapperChat.find(\".page-quick-sidebar-chat-user-messages\");\r\n var input = wrapperChat.find('.page-quick-sidebar-chat-user-form .form-control');\r\n\r\n var text = input.val();\r\n if (text.length === 0) {\r\n return;\r\n }\r\n\r\n var preparePost = function(dir, time, name, avatar, message) {\r\n var tpl = '';\r\n tpl += '
    ';\r\n tpl += '\"\"';\r\n tpl += '
    ';\r\n tpl += '';\r\n tpl += 'Bob Nilson ';\r\n tpl += '' + time + '';\r\n tpl += '';\r\n tpl += message;\r\n tpl += '';\r\n tpl += '
    ';\r\n tpl += '
    ';\r\n\r\n return tpl;\r\n };\r\n\r\n // handle post\r\n var time = new Date();\r\n var message = preparePost('out', (time.getHours() + ':' + time.getMinutes()), \"Bob Nilson\", 'avatar3', text);\r\n message = $(message);\r\n chatContainer.append(message);\r\n\r\n chatContainer.slimScroll({\r\n scrollTo: '1000000px'\r\n });\r\n\r\n input.val(\"\");\r\n\r\n // simulate reply\r\n setTimeout(function(){\r\n var time = new Date();\r\n var message = preparePost('in', (time.getHours() + ':' + time.getMinutes()), \"Ella Wong\", 'avatar2', 'Lorem ipsum doloriam nibh...');\r\n message = $(message);\r\n chatContainer.append(message);\r\n\r\n chatContainer.slimScroll({\r\n scrollTo: '1000000px'\r\n });\r\n }, 3000);\r\n };\r\n\r\n wrapperChat.find('.page-quick-sidebar-chat-user-form .btn').click(handleChatMessagePost);\r\n wrapperChat.find('.page-quick-sidebar-chat-user-form .form-control').keypress(function (e) {\r\n if (e.which == 13) {\r\n handleChatMessagePost(e);\r\n return false;\r\n }\r\n });\r\n };\r\n\r\n // Handles quick sidebar tasks\r\n var handleQuickSidebarAlerts = function () {\r\n var wrapper = $('.page-quick-sidebar-wrapper');\r\n\r\n var initAlertsSlimScroll = function () {\r\n var alertList = wrapper.find('.page-quick-sidebar-alerts-list');\r\n var alertListHeight;\r\n\r\n alertListHeight = wrapper.height() - wrapper.find('.nav-justified > .nav-tabs').outerHeight();\r\n\r\n // alerts list \r\n window.App.destroySlimScroll(alertList);\r\n alertList.attr(\"data-height\", alertListHeight);\r\n window.App.initSlimScroll(alertList);\r\n };\r\n\r\n initAlertsSlimScroll();\r\n window.App.addResizeHandler(initAlertsSlimScroll); // reinitialize on window resize\r\n };\r\n\r\n // Handles quick sidebar settings\r\n var handleQuickSidebarSettings = function () {\r\n var wrapper = $('.page-quick-sidebar-wrapper');\r\n\r\n var initSettingsSlimScroll = function () {\r\n var settingsList = wrapper.find('.page-quick-sidebar-settings-list');\r\n var settingsListHeight;\r\n\r\n settingsListHeight = wrapper.height() - 80 - wrapper.find('.nav-justified > .nav-tabs').outerHeight();\r\n \r\n // alerts list \r\n window.App.destroySlimScroll(settingsList);\r\n settingsList.attr(\"data-height\", settingsListHeight);\r\n window.App.initSlimScroll(settingsList);\r\n };\r\n\r\n initSettingsSlimScroll();\r\n window.App.addResizeHandler(initSettingsSlimScroll); // reinitialize on window resize\r\n };\r\n\r\n return {\r\n\r\n init: function () {\r\n //layout handlers\r\n handleQuickSidebarToggler(); // handles quick sidebar's toggler\r\n handleQuickSidebarChat(); // handles quick sidebar's chats\r\n handleQuickSidebarAlerts(); // handles quick sidebar's alerts\r\n handleQuickSidebarSettings(); // handles quick sidebar's setting\r\n }\r\n };\r\n\r\n}();\r\n\r\n\r\nif (window.App.isAngularJsApp() === false) { \r\n jQuery(document).ready(function() { \r\n QuickSidebar.init(); // init metronic core componets\r\n });\r\n}","//= require jquery_ujs\n\nimport Rails from '@rails/ujs';\ntry {\n Rails.start();\n} catch (e) {\n console.log(e);\n}\n\nimport \"@/javascripts/admin/app_list\"\nimport \"@/javascripts/admin/bxslider\"\nimport \"@/javascripts/admin/call-list\"\nimport \"@/javascripts/admin/cast-list-extras\"\nimport \"@/javascripts/admin/cast-list-search\"\nimport \"@/javascripts/admin/date-input\"\nimport \"@/javascripts/admin/document\"\nimport \"@/javascripts/admin/email-template\"\nimport \"@/javascripts/admin/extra-approval\"\nimport \"@/javascripts/admin/extra-removal\"\nimport \"@/javascripts/admin/extra-card\"\nimport \"@/javascripts/admin/extra-form\"\nimport \"@/javascripts/admin/extra-message\"\nimport \"@/javascripts/admin/extra-profile\"\nimport \"@/javascripts/admin/extra-search\"\nimport \"@/javascripts/admin/nested_form\"\nimport \"@/javascripts/admin/notification\"\nimport \"@/javascripts/admin/payment\"\nimport \"@/javascripts/admin/photo\"\nimport \"@/javascripts/admin/production-rates\"\nimport \"@/javascripts/admin/sidebar-cast-list\"\nimport \"@/javascripts/admin/sidebar-scratch\"\nimport \"@/javascripts/admin/survey\"\nimport \"@/javascripts/admin/live_search\"\nimport \"@/javascripts/admin/private_upload\"\n\nimport \"@/javascripts/message\"\n\nimport \"@/javascripts/metronic/global/scripts/app\"\nimport \"@/javascripts/metronic/layouts/layout3/scripts/layout\"\nimport \"@/javascripts/metronic/layouts/global/scripts/quick-sidebar\"\n\n(function() {\n var dropMarker, dropRadius, map;\n\n map = null;\n\n dropMarker = null;\n\n dropRadius = null;\n\n jQuery(function() {\n return $(function() {\n window.ExtraCard.setup();\n window.ExtraSidebarCastList.setup();\n window.ExtraSidebarScratch.setup();\n window.ExtraSearch.setup(map, dropMarker, dropRadius);\n window.ExtraDateInput.setup();\n window.ExtraMessage.setup();\n window.ExtraProfile.setup();\n window.ExtraRemoval.setup();\n window.CastListExtras.setup();\n window.CastListSearch.setup();\n window.ExtraForm.setup();\n window.Photo.setup();\n window.Document.setup();\n window.ExtraApproval.setup();\n window.ProductionRates.setup();\n window.EmailTemplate.setup();\n window.Message.setup();\n window.Notification.setup();\n window.Payment.setup();\n window.AppList.setup();\n window.CallList.setup();\n window.LiveSearch.setup();\n window.PrivateUpload.setup();\n $('.cast-list-table table').stickyTableHeaders({\n fixedOffset: 51\n });\n $('.daily-lists-table table').stickyTableHeaders({\n fixedOffset: 51\n });\n $(\".js-sticky-alpha\").sticky({\n topSpacing: 50\n });\n $(\".alphabet\").on('click', 'a', function(e) {\n var id;\n e.preventDefault();\n id = $(this).attr(\"href\");\n return $(\"html,body\").animate({\n scrollTop: $(\"\" + id).offset().top - 100\n }, 500);\n });\n $(\".msg-tooltip\").webuiPopover({\n trigger: \"hover\"\n });\n $.ajaxSetup({\n headers: {\n 'X-CSRF-Token': $('meta[name=\"csrf-token\"]').attr('content')\n }\n });\n $(\".js-maxlength\").maxlength({\n threshold: 10,\n alwaysShow: true\n });\n $(\".js-select-2-std\").select2({\n theme: \"bootstrap\",\n selectOnClose: true\n });\n $(document).on(\"nested:fieldAdded\", function() {\n return $(this).find(\"select\").select2({\n theme: \"bootstrap\",\n placeholder: \"Select...\",\n allowClear: true\n });\n });\n $(document).on('change', '.js-message-question-select', function() {\n if ($(this).val() === \"multiple_choice\" || $(this).val() === \"single_choice\") {\n return $(this).closest(\".fields\").find(\".js-message-question-options\").show();\n } else {\n return $(this).closest(\".fields\").find(\".js-message-question-options\").hide();\n }\n });\n return $(document).on('click', '.js-recipient', function(e) {\n var extras;\n e.preventDefault();\n $(this).toggleClass(\"selected\");\n extras = _.map($(\".js-recipient.selected\"), function(v) {\n return $(v).data(\"extra\");\n });\n return $(\".js-message-extras\").val(extras.join(\",\"));\n });\n });\n });\n\n}).call(this);\n"],"names":["linkClickSelector","buttonClickSelector","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","nonce","loadCSPNonce","metaTag","cspNonce","m","matches","element","selector","EXPANDO","getData","key","setData","value","$","isContentEditable","isEditable","csrfToken","meta","csrfParam","CSRFProtection","xhr","token","refreshCSRFTokens","param","input","AcceptHeaders","ajax","options","prepareOptions","createXHR","response","processResponse","done","type","script","parser","href","isCrossDomain","url","originAnchor","urlAnchor","preventDefault","CustomEvent","event","params","evt","result","fire","obj","name","data","stopEverything","e","delegate","eventType","handler","target","toArray","serializeElement","additionalParam","inputs","option","formElements","form","el","handleConfirmWithRails","rails","allowAction","confirm","message","callback","answer","handleDisabledElement","enableElement","isXhrRedirect","enableLinkElement","enableFormElement","enableFormElements","disableElement","disableLinkElement","disableFormElement","disableFormElements","replacement","originalText","handleMethodWithRails","link","method","csrfToken$1","csrfParam$1","formContent","isRemote","handleRemoteWithRails","withCredentials","dataType","button","args","formSubmitButtonClick","preventInsignificantClick","insignificantMetaClick","Rails","handleConfirm","handleMethod","handleRemote","start","originalOptions","AppList","$row","this","defaults","slider","windowWidth","windowHeight","init","div","props","i","setup","preloadSelector","getViewportMaxWidth","getSlideWidth","appendCaptions","getPagerQty","appendControls","appendControlsAuto","appendPager","loadElements","total","count","slice","sliceAppend","slicePrepend","setSlidePosition","getViewportHeight","resizeWindow","initAuto","initTicker","updatePagerActive","updateDirectionControls","initTouch","keyPress","height","children","currentIndex","getMoveBy","index","width","newElWidth","wrapWidth","getNumberSlidesShowing","slidesShowing","childWidth","pagerQty","breakPoint","counter","position","lastChild","lastShowingIndex","setPositionProperty","duration","animateObj","propValue","updateAfterSlideTransition","tickerLoop","populatePager","pagerHtml","linkContent","clickPagerBind","clickNextBind","clickPrevBind","clickStartBind","clickStopBind","updateAutoControls","title","pagerLink","pagerIndex","slideIndex","len","state","startPosition","transform","idx","ratio","property","newSpeed","totalDimens","resumeSpeed","speed","reset","animateProperty","resetValue","isOnScreen","win","viewport","bounds","activeElementTag","tagFilters","p","onTouchStart","orig","touchPoints","onTouchMove","onTouchEnd","onPointerCancel","xMovement","yMovement","change","distance","windowWidthNew","windowHeightNew","applyAriaHiddenAttributes","startVisibleIndex","numberOfSlidesShowing","setSlideIndex","direction","performTransition","moveBy","eq","requestEl","preventControlUpdate","settings","CallList","id","CastListExtras","tab","$available","$booked","available","booked","date","extra","bookings","extras","tag","$link","$data","$tr","html","extra_ids","$input","$sel","$td","$form","booking","subtab","$reasons","ids","output","fields","$content","CastListSearch","ExtraDateInput","$target","$el","$field","$list","$picker","dates","rawDates","a","$li","thisDate","Document","$accessNi","EmailTemplate","fullbuttons","ExtraApproval","ExtraRemoval","action","ExtraCard","list","$temp","timeout","$card","ExtraForm","birthday","term","text","ExtraMessage","$meta","$msg","$wrap","ExtraProfile","$map","address","geocoder","lat","lng","results","status","location","smallMap","$this","ExtraSearch","$base","radius","q","smallRadius","assoc","blueprint","content","limit","context","current","parentNames","parentIds","regexp","new_id","field","hiddenField","queue","node","child","Notification","Payment","Photo","ProductionRates","fee","pc","ExtraSidebarCastList","order","newList","item","$badge","$cast","$destroy","$reorder","ExtraSidebarScratch","$extra","val","Message","LiveSearch","filter","group","PrivateUpload","App","isRTL","isIE8","isIE9","isIE10","resizeHandlers","assetsPath","globalImgPath","globalPluginsPath","globalCssPath","brandColors","handleInit","_runResizeHandlers","each","handleOnResize","resize","currheight","handlePortletTools","portlet","error","res","ajaxOptions","thrownError","msg","handleMaterialDesign","the","newone","circle","d","x","y","handleInput","handleiCheck","checkboxClass","radioClass","handleBootstrapSwitch","handleBootstrapConfirmation","handleAccordions","handleTabs","tabid","handleModals","handleTooltips","handleDropdowns","handleAlerts","handleDropdownHover","handleTextareaAutosize","lastPopedPopover","handlePopovers","handleScrollers","handleFancybox","handleCounterup","handleFixInputPlaceholderForIE","handleSelect2","handleHeight","parent","items","mode","offset","height_","func","offeset","pos","attrList","paramName","searchString","prefix","path","size","sizes","Layout","layoutImgPath","layoutCssPath","resBreakpointMd","handleHeader","handleMainMenu","menu","handleMainMenuActiveLink","handleMainMenuOnResize","handleGoTop","QuickSidebar","handleQuickSidebarToggler","handleQuickSidebarChat","wrapper","wrapperChat","initChatSlimScroll","chatUsers","chatUsersHeight","chatMessages","chatMessagesHeight","handleChatMessagePost","chatContainer","preparePost","dir","time","avatar","tpl","handleQuickSidebarAlerts","initAlertsSlimScroll","alertList","alertListHeight","handleQuickSidebarSettings","initSettingsSlimScroll","settingsList","settingsListHeight","dropMarker","dropRadius","map","v"],"mappings":"AAKA,MAAMA,EAAoB,yGAEpBC,EAAsB,CAC1B,SAAU,oEACV,QAAS,aACX,EAEMC,GAAsB,iEAEtBC,EAAqB,8BAErBC,GAAyB,ySAEzBC,GAAsB,sMAEtBC,GAAqB,4MAErBC,GAAoB,yCAEpBC,GAAsB,wCAEtBC,GAAwB,4EAE9B,IAAIC,GAAQ,KAEZ,MAAMC,GAAe,IAAM,CACzB,MAAMC,EAAU,SAAS,cAAc,sBAAsB,EAC7D,OAAOF,GAAQE,GAAWA,EAAQ,OACpC,EAEMC,GAAW,IAAMH,IAASC,KAE1BG,GAAI,QAAQ,UAAU,SAAW,QAAQ,UAAU,iBAAmB,QAAQ,UAAU,oBAAsB,QAAQ,UAAU,mBAAqB,QAAQ,UAAU,kBAAoB,QAAQ,UAAU,sBAE7MC,EAAU,SAASC,EAASC,EAAU,CAC1C,OAAIA,EAAS,QACJH,GAAE,KAAKE,EAASC,EAAS,QAAQ,GAAK,CAACH,GAAE,KAAKE,EAASC,EAAS,OAAO,EAEvEH,GAAE,KAAKE,EAASC,CAAQ,CAEnC,EAEMC,GAAU,WAEVC,EAAU,CAACH,EAASI,IAAQJ,EAAQE,EAAO,EAAIF,EAAQE,EAAO,E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