{"version":3,"sources":["../../src/js/toastr.js"],"names":["i","toastCount","$toastlast","getMessage","msgs","length","getMessageWithClearButton","msg","$","click","shortCutFunction","val","title","$showDuration","$hideDuration","$timeOut","$extendedTimeOut","$showEasing","$hideEasing","$showMethod","$hideMethod","toastIndex","addClear","prop","toastr","options","closeButton","debug","newestOnTop","progressBar","positionClass","preventDuplicates","onclick","alert","showDuration","hideDuration","timeOut","extendedTimeOut","showEasing","hideEasing","showMethod","hideMethod","tapToDismiss","text","JSON","stringify","$toast","find","delegate","remove","clear","force","getLastToast"],"mappings":"AAAA;;AAEA;;;;;;;AAOA;AACA,IAAIA,CAAC,GAAG,CAAC,CAAT;AACA,IAAIC,UAAU,GAAG,CAAjB;AACA,IAAIC,UAAJ;;AAEA,IAAMC,UAAU,GAAG,SAAbA,UAAa,GAAM;AACvB,MAAMC,IAAI,GAAG,CACX,iEADW,EAEX,4TAFW,EAGX,+BAHW,EAIX,gBAJW,EAKX,oDALW,EAMX,+BANW,CAAb;AAQAJ,EAAAA,CAAC;;AACD,MAAIA,CAAC,KAAKI,IAAI,CAACC,MAAf,EAAuB;AACrBL,IAAAA,CAAC,GAAG,CAAJ;AACD;AACF,CAbD;;AAeA,IAAMM,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,GAAD,EAAS;AACzCA,EAAAA,GAAG,GAAGA,GAAG,GAAGA,GAAH,GAAS,eAAlB;AACAA,EAAAA,GAAG,IAAI,kEAAP;AACA,SAAOA,GAAP;AACD,CAJD,C,CAMA;;;AACAC,CAAC,CAAC,YAAD,CAAD,CAAgBC,KAAhB,CAAsB,YAAM;AAC1B,MAAMC,gBAAgB,GAAGF,CAAC,CAAC,qCAAD,CAAD,CAAyCG,GAAzC,EAAzB;AACA,MAAIJ,GAAG,GAAGC,CAAC,CAAC,UAAD,CAAD,CAAcG,GAAd,EAAV;AACA,MAAMC,KAAK,GAAGJ,CAAC,CAAC,QAAD,CAAD,CAAYG,GAAZ,MAAqB,EAAnC;AACA,MAAME,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D,MAAIyB,MAAM,CAACC,IAAP,CAAY,QAAZ,EAAsB1C,MAA1B,EAAkC;AAChCyC,IAAAA,MAAM,CAACE,QAAP,CAAgB,QAAhB,EAA0B,OAA1B,EAAmC,YAAM;AACvCxB,MAAAA,MAAM,CAAC0B,KAAP,CAAaJ,MAAb,EAAqB;AACnBK,QAAAA,KAAK,EAAE;AADY,OAArB;AAGD,KAJD;AAKD;AACF,CAvGD;;AAyGA,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAMlD,UAAN;AAAA,CAArB;;AAEAM,CAAC,CAAC,iBAAD,CAAD,CAAqBC,KAArB,CAA2B,YAAM;AAC/Be,EAAAA,MAAM,CAAC0B,KAAP,CAAaE,YAAY,EAAzB;AACD,CAFD;AAIA5C,CAAC,CAAC,cAAD,CAAD,CAAkBC,KAAlB,CAAwB,YAAM;AAC5Be,EAAAA,MAAM,CAAC0B,KAAP;AACD,CAFD","sourcesContent":["/* global toastr */\n\n/**\n * --------------------------------------------------------------------------\n * CoreUI Pro Boostrap Admin Template (3.0.0-beta.1): toastr.js\n * Licensed under MIT (https://coreui.io/license)\n * --------------------------------------------------------------------------\n */\n\n/* eslint-disable no-magic-numbers, no-unused-vars */\nlet i = -1\nlet toastCount = 0\nlet $toastlast\n\nconst getMessage = () => {\n const msgs = [\n 'My name is Inigo Montoya. You killed my father. Prepare to die!',\n '
 This is a hyperlink
',\n 'Are you the six fingered man?',\n 'Inconceivable!',\n 'I do not think that means what you think it means.',\n 'Have fun storming the castle!'\n ]\n i++\n if (i === msgs.length) {\n i = 0\n }\n}\n\nconst getMessageWithClearButton = (msg) => {\n msg = msg ? msg : 'Clear itself?'\n msg += '

'\n return msg\n}\n\n// eslint-disable-next-line complexity\n$('#showtoast').click(() => {\n const shortCutFunction = $('#toastTypeGroup input:radio:checked').val()\n let msg = $('#message').val()\n const title = $('#title').val() || ''\n const $showDuration = $('#showDuration')\n const $hideDuration = $('#hideDuration')\n const $timeOut = $('#timeOut')\n const $extendedTimeOut = $('#extendedTimeOut')\n const $showEasing = $('#showEasing')\n const $hideEasing = $('#hideEasing')\n const $showMethod = $('#showMethod')\n const $hideMethod = $('#hideMethod')\n const toastIndex = toastCount++\n const addClear = $('#addClear').prop('checked')\n\n toastr.options = {\n closeButton: $('#closeButton').prop('checked'),\n debug: $('#debugInfo').prop('checked'),\n newestOnTop: $('#newestOnTop').prop('checked'),\n progressBar: $('#progressBar').prop('checked'),\n positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right',\n preventDuplicates: $('#preventDuplicates').prop('checked'),\n onclick: null\n }\n\n if ($('#addBehaviorOnToastClick').prop('checked')) {\n toastr.options.onclick = function () {\n // eslint-disable-next-line no-alert\n alert('You can perform some custom action after a toast goes away')\n }\n }\n\n if ($showDuration.val().length) {\n toastr.options.showDuration = $showDuration.val()\n }\n\n if ($hideDuration.val().length) {\n toastr.options.hideDuration = $hideDuration.val()\n }\n\n if ($timeOut.val().length) {\n toastr.options.timeOut = addClear ? 0 : $timeOut.val()\n }\n\n if ($extendedTimeOut.val().length) {\n toastr.options.extendedTimeOut = addClear ? 0 : $extendedTimeOut.val()\n }\n\n if ($showEasing.val().length) {\n toastr.options.showEasing = $showEasing.val()\n }\n\n if ($hideEasing.val().length) {\n toastr.options.hideEasing = $hideEasing.val()\n }\n\n if ($showMethod.val().length) {\n toastr.options.showMethod = $showMethod.val()\n }\n\n if ($hideMethod.val().length) {\n toastr.options.hideMethod = $hideMethod.val()\n }\n\n if (addClear) {\n msg = getMessageWithClearButton(msg)\n toastr.options.tapToDismiss = false\n }\n if (!msg) {\n msg = getMessage()\n }\n\n /* eslint-disable prefer-template, operator-linebreak */\n $('#toastrOptions').text('Command: toastr[\"' + shortCutFunction + '\"](\"' + msg + (title ? '\", \"' + title : '') + '\")\\n\\ntoastr.options = ' + JSON.stringify(toastr.options, null, 2))\n /* eslint-enable prefer-template, operator-linebreak */\n\n const $toast = toastr[shortCutFunction](msg, title) // Wire up an event handler to a button in the toast, if it exists\n $toastlast = $toast\n\n if (typeof $toast === 'undefined') {\n return\n }\n\n if ($toast.find('#okBtn').length) {\n $toast.delegate('#okBtn', 'click', () => {\n // eslint-disable-next-line no-alert\n alert(`you clicked me. i was toast #${toastIndex}. goodbye!`)\n $toast.remove()\n })\n }\n if ($toast.find('#surpriseBtn').length) {\n $toast.delegate('#surpriseBtn', 'click', () => {\n // eslint-disable-next-line no-alert\n alert(`Surprise! you clicked me. i was toast #${toastIndex}. You could perform an action here.`)\n })\n }\n if ($toast.find('.clear').length) {\n $toast.delegate('.clear', 'click', () => {\n toastr.clear($toast, {\n force: true\n })\n })\n }\n})\n\nconst getLastToast = () => $toastlast\n\n$('#clearlasttoast').click(() => {\n toastr.clear(getLastToast())\n})\n\n$('#cleartoasts').click(() => {\n toastr.clear()\n})\n"],"file":"toastr.js"}