// source --> https://cleanaccent.com/wp-content/uploads/APP7-jaJP/contents/data/010220/index.hyperesources/sweetalert2.min.js 
!function(e,t){"use strict";function n(){function n(e,t){for(var n=0;n<x.length;n++)if(e+=t,e===x.length?e=0:-1===e&&(e=x.length-1),x[e].offsetWidth||x[e].offsetHeight||x[e].getClientRects().length)return void x[e].focus()}function i(t){var o=t||e.event,a=o.keyCode||o.which,l=C(y,"visible");if(-1!==[9,13,32,27].indexOf(a)){for(var r=o.target||o.srcElement,s=-1,i=0;i<x.length;i++)if(r===x[i]){s=i;break}if(9===a){if(!l)return;o.shiftKey?n(s,-1):n(s,1),H(o)}else 13===a||32===a?-1===s&&I(k,o):27===a&&u.allowEscapeKey===!0&&I(B,o)}}if(void 0===arguments[0])return e.console.error("sweetAlert expects at least 1 attribute!"),!1;var u=l({},w);switch(typeof arguments[0]){case"string":u.title=arguments[0],u.text=arguments[1]||"",u.type=arguments[2]||"";break;case"object":u.title=arguments[0].title||w.title,u.text=arguments[0].text||w.text,u.html=arguments[0].html||w.html,u.type=arguments[0].type||w.type,u.animation=void 0!==arguments[0].animation?arguments[0].animation:w.animation,u.customClass=arguments[0].customClass||u.customClass,u.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:w.allowOutsideClick,u.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:w.allowEscapeKey,u.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:w.showConfirmButton,u.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:w.showCancelButton,u.closeOnConfirm=void 0!==arguments[0].closeOnConfirm?arguments[0].closeOnConfirm:w.closeOnConfirm,u.closeOnCancel=void 0!==arguments[0].closeOnCancel?arguments[0].closeOnCancel:w.closeOnCancel,u.timer=parseInt(arguments[0].timer)||w.timer,u.width=parseInt(arguments[0].width)||w.width,u.padding=parseInt(arguments[0].padding)||w.padding,u.background=void 0!==arguments[0].background?arguments[0].background:w.background,u.confirmButtonText=arguments[0].confirmButtonText||w.confirmButtonText,u.confirmButtonColor=arguments[0].confirmButtonColor||w.confirmButtonColor,u.confirmButtonClass=arguments[0].confirmButtonClass||u.confirmButtonClass,u.cancelButtonText=arguments[0].cancelButtonText||w.cancelButtonText,u.cancelButtonColor=arguments[0].cancelButtonColor||w.cancelButtonColor,u.cancelButtonClass=arguments[0].cancelButtonClass||u.cancelButtonClass,u.imageUrl=arguments[0].imageUrl||w.imageUrl,u.imageSize=arguments[0].imageSize||w.imageSize,u.callback=arguments[1]||null,e.sweetAlert.callback=e.swal.callback=function(e){"function"==typeof u.callback&&u.callback(e)};break;default:return e.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}o(u),c(),r();var y=b();u.timer&&(y.timeout=setTimeout(function(){s(),"function"==typeof u.callback&&u.callback()},u.timer));var g,p=function(t){var n=t||e.event,o=n.target||n.srcElement,l=C(o,"sweet-confirm"),r=C(o,"sweet-cancel"),i=C(y,"visible");switch(n.type){case"mouseover":case"mouseup":case"focus":l?o.style.backgroundColor=a(u.confirmButtonColor,-.1):r&&(o.style.backgroundColor=a(u.cancelButtonColor,-.1));break;case"mouseout":case"blur":l?o.style.backgroundColor=u.confirmButtonColor:r&&(o.style.backgroundColor=u.cancelButtonColor);break;case"mousedown":l?o.style.backgroundColor=a(u.confirmButtonColor,-.2):r&&(o.style.backgroundColor=a(u.cancelButtonColor,-.2));break;case"click":l&&u.callback&&i?(u.callback(!0),u.closeOnConfirm&&s()):u.callback&&i?(u.callback.length>0&&u.callback(!1),u.closeOnCancel&&s()):s()}},v=y.querySelectorAll("button");for(g=0;g<v.length;g++)v[g].onclick=p,v[g].onmouseover=p,v[g].onmouseout=p,v[g].onmousedown=p;m=t.onclick,t.onclick=function(t){var n=t||e.event,o=n.target||n.srcElement;o===h()&&u.allowOutsideClick&&(s(),"function"==typeof u.callback&&u.callback())};var k=y.querySelector("button.sweet-confirm"),B=y.querySelector("button.sweet-cancel"),x=y.querySelectorAll("button, input:not([type=hidden]), textarea, select");for(g=0;g<x.length;g++)x[g].addEventListener("focus",p,!0),x[g].addEventListener("blur",p,!0);n(-1,1),d=e.onkeydown,e.onkeydown=i,k.style.borderLeftColor=u.confirmButtonColor,k.style.borderRightColor=u.confirmButtonColor,e.swal.toggleLoading=function(){k.disabled=!k.disabled,B.disabled=!B.disabled},e.swal.enableButtons=function(){k.disabled=!1,B.disabled=!1},e.swal.disableButtons=function(){k.disabled=!0,B.disabled=!0},swal.enableButtons(),e.onfocus=function(){e.setTimeout(function(){void 0!==f&&(f.focus(),f=void 0)},0)}}function o(n){var o=b();o.style.width=n.width+"px",o.style.padding=n.padding+"px",o.style.marginLeft=-n.width/2+"px",o.style.background=n.background;var a=t.getElementsByTagName("head")[0],l=t.createElement("style");l.type="text/css",l.id=p,l.innerHTML="@media screen and (max-width: "+n.width+"px) {.sweet-alert {max-width: 100%;left: 0 !important;margin-left: 0 !important;}}",a.appendChild(l);var r=o.querySelector("h2"),s=o.querySelector("div.sweet-content"),i=o.querySelector("button.sweet-cancel"),c=o.querySelector("button.sweet-confirm"),u=o.querySelector("hr.sweet-spacer");if(r.innerHTML=x(n.title).split("\n").join("<br>"),e.jQuery?s=$(s).html(n.html||"<p>"+x(n.text.split("\n").join("<br>"))+"</p>"):(s.innerHTML=n.html||"<p>"+x(n.text.split("\n").join("<br>"))+"</p>",s.innerHTML&&E(s)),n.customClass&&k(o,n.customClass),q(o.querySelectorAll(".icon")),n.type){for(var m=!1,d=0;d<v.length;d++)if(n.type===v[d]){m=!0;break}if(!m)return e.console.error("Unknown alert type: "+n.type),!1;var f=o.querySelector(".icon."+n.type);switch(E(f),n.type){case"success":k(f,"animate"),k(f.querySelector(".tip"),"animate-success-tip"),k(f.querySelector(".long"),"animate-success-long");break;case"error":k(f,"animate-error-icon"),k(f.querySelector(".x-mark"),"animate-x-mark");break;case"warning":k(f,"pulse-warning"),k(f.querySelector(".body"),"pulse-warning-ins"),k(f.querySelector(".dot"),"pulse-warning-ins")}}if(n.imageUrl){var y=o.querySelector(".icon.custom");if(y.style.backgroundImage="url("+n.imageUrl+")",E(y),n.imageSize){var g=n.imageSize.match(/(\d+)x(\d+)/);g?y.setAttribute("style",y.getAttribute("style")+"width:"+g[1]+"px; height:"+g[2]+"px"):e.console.error("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+n.imageSize)}}n.showCancelButton?i.style.display="inline-block":q(i),n.showConfirmButton?c.style.display="inline-block":q(c),n.showConfirmButton||n.showCancelButton?E(u):q(u),c.innerHTML=x(n.confirmButtonText),i.innerHTML=x(n.cancelButtonText),c.style.backgroundColor=n.confirmButtonColor,i.style.backgroundColor=n.cancelButtonColor,c.className="sweet-confirm",k(c,n.confirmButtonClass),i.className="sweet-cancel",k(i,n.cancelButtonClass),n.animation===!0?B(o,"no-animation"):k(o,"no-animation")}function a(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",o=0;3>o;o++){var a=parseInt(e.substr(2*o,2),16);a=Math.round(Math.min(Math.max(0,a+a*t),255)).toString(16),n+=("00"+a).substr(a.length)}return n}function l(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(){var e=b();L(h(),10),E(e),k(e,"show-sweet-alert"),B(e,"hide-sweet-alert"),u=t.activeElement,setTimeout(function(){k(e,"visible")},500)}function s(){var e=b();M(h(),5),M(e,5),B(e,"showSweetAlert"),k(e,"hideSweetAlert"),B(e,"visible");var n=e.querySelector(".icon.success");B(n,"animate"),B(n.querySelector(".tip"),"animate-success-tip"),B(n.querySelector(".long"),"animate-success-long");var o=e.querySelector(".icon.error");B(o,"animate-error-icon"),B(o.querySelector(".x-mark"),"animate-x-mark");var a=e.querySelector(".icon.warning");B(a,"pulse-warning"),B(a.querySelector(".body"),"pulse-warning-ins"),B(a.querySelector(".dot"),"pulse-warning-ins"),i();var l=t.getElementsByTagName("head")[0],r=t.getElementById(p);r&&l.removeChild(r)}function i(){var n=b();e.onkeydown=d,t.onclick=m,u&&u.focus(),f=void 0,clearTimeout(n.timeout)}function c(){var e=b();e.style.marginTop=O(b())}var u,m,d,f,y=".sweet-alert",g=".sweet-overlay",p="sweet-alert-mediaquery",v=["error","warning","info","success"],w={title:"",text:"",html:"",type:null,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,imageUrl:null,imageSize:null,timer:null,width:500,padding:20,background:"#fff"},b=function(){return t.querySelector(y)},h=function(){return t.querySelector(g)},C=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},k=function(e,t){t&&!C(e,t)&&(e.className+=" "+t)},B=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(C(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},x=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},S=function(e){e.style.opacity="",e.style.display="block"},E=function(e){if(e&&!e.length)return S(e);for(var t=0;t<e.length;++t)S(e[t])},T=function(e){e.style.opacity="",e.style.display="none"},q=function(e){if(e&&!e.length)return T(e);for(var t=0;t<e.length;++t)T(e[t])},O=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt(n/2+t)+"px"},L=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)};o()}e.style.display="block"},M=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(o,t):e.style.display="none"};o()},I=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},H=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};e.sweetAlert=e.swal=function(){var e=arguments,t=b();if(null!==t)C(t,"visible")&&i(),n.apply(this,e);else var o=setInterval(function(){null!==b()&&(clearInterval(o),n.apply(this,e))},100)},e.sweetAlert.closeModal=e.swal.closeModal=function(){s()},e.swal.init=function(){var e='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert" style="display: none" tabIndex="-1"><div class="icon error"><span class="x-mark"><span class="line left"></span><span class="line right"></span></span></div><div class="icon warning"> <span class="body"></span> <span class="dot"></span> </div> <div class="icon info"></div> <div class="icon success"> <span class="line tip"></span> <span class="line long"></span> <div class="placeholder"></div> <div class="fix"></div> </div> <div class="icon custom"></div> <h2>Title</h2><div class="sweet-content">Text</div><hr class="sweet-spacer"><button class="sweet-confirm">OK</button><button class="sweet-cancel">Cancel</button></div>',n=t.createElement("div");n.className="sweet-container",n.innerHTML=e,t.body.appendChild(n)},e.swal.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");l(w,e)},function(){"complete"===t.readyState||"interactive"===t.readyState&&t.body?swal.init():t.addEventListener?t.addEventListener("DOMContentLoaded",function e(){t.removeEventListener("DOMContentLoaded",e,!1),swal.init()},!1):t.attachEvent&&t.attachEvent("onreadystatechange",function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),swal.init())})}()}(window,document);
// source --> https://cleanaccent.com/wp-content/uploads/APP7-jaJP/contents/data/010220/index.hyperesources/gulpfile.js 
var gulp = require('gulp');

var glob       = require('glob');
var path       = require('path');
var jshint     = require('gulp-jshint');
var sass       = require('gulp-sass');
var concat     = require('gulp-concat');
var uglify     = require('gulp-uglify');
var rename     = require('gulp-rename');
var minifyCSS  = require('gulp-minify-css');
var babelify   = require('babelify');
var browserify = require('browserify');
var source     = require('vinyl-source-stream');
var buffer     = require('vinyl-buffer');
var wrap       = require('gulp-wrap');
var qunit      = require('gulp-qunit');
var babel      = require('gulp-babel');

// Lint Task
gulp.task('lint', function() {
  gulp.src('dev/sweetalert.es6.js')
    .pipe(jshint())
    .pipe(jshint.reporter('default'));

  return gulp.src('dev/*/*.js')
    .pipe(jshint())
    .pipe(jshint.reporter('default'));
});

// Compile Our Sass
gulp.task('sass', function() {

  gulp.src('example/example.scss')
    .pipe(sass())
    .pipe(rename('example.css'))
    .pipe(gulp.dest('example'));

  // (We don't use minifyCSS since it breaks the ie9 file for some reason)
  gulp.src(['dev/sweetalert.scss', 'dev/ie9.css', 'dev/loader-animation.css'])
    .pipe(sass())
    .pipe(concat('sweetalert.css'))
    .pipe(gulp.dest('dist'));
});


// Compile theme CSS
var themes = glob.sync('themes/*').map(function(themeDir) {
  return path.basename(themeDir);
});

themes.forEach(function(name) {
  gulp.task(name + '-theme', function() {
    return gulp.src('themes/' + name + '/' + name + '.scss')
      .pipe(sass()) // etc
      .pipe(rename(name + '.css'))
      .pipe(gulp.dest('themes/' + name))
  });
});

gulp.task('themes', themes.map(function(name){ return name + '-theme'; }));

// Compile ES5 CommonJS entry point
gulp.task('commonjs', function() {
  gulp.src('./dev/sweetalert.es6.js')
    .pipe(babel())
    .pipe(rename('sweetalert.js'))
    .pipe(gulp.dest('lib'));
  gulp.src('./dev/modules/*.js')
    .pipe(babel())
    .pipe(gulp.dest('lib/modules'));
});

// Concatenate & Minify JS
gulp.task('scripts', function() {
  return browserify({
      entries: './dev/sweetalert.es6.js',
      debug: true
    })
    .transform(babelify)
    .bundle()
    .pipe(source('sweetalert-dev.js'))
    .pipe(wrap({
      src: './dev/gulpfile-wrap-template.js'
    }))
    .pipe(gulp.dest('dist')) // Developer version

    .pipe(rename('sweetalert.min.js'))
    .pipe(buffer())
    .pipe(uglify())
    .pipe(gulp.dest('dist')); // User version
});

gulp.task('test', function() {
  return gulp.src('./test/index.html')
    .pipe(qunit({
      timeout: 20
    }));
});

// Watch Files For Changes
gulp.task('watch', function() {
  gulp.watch(['dev/*.js', 'dev/*/*.js'], ['lint', 'scripts']);
  gulp.watch(['dev/*.scss', 'dev/*.css'], ['sass']);
  gulp.watch('themes/*/*.scss', ['themes']);
});

// Default Task
gulp.task('default', ['lint', 'sass', 'scripts', 'commonjs', 'watch', 'test']);