You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
2 lines
14 KiB
var Wheeparam={version:"0.0.1",init:function(){},onDocuemntReady:function(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)}};Wheeparam.Easing={easeInQuad:function(e,t,n,r){return n*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){return n*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){return n*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){return n*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t},easeOutSine:function(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){return 0==e?t:n*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){return e==r?t+n:n*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,n,r){return 0==e?t:e==r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,n,r){var o=1.70158,a=0,i=n;if(0==e)return t;if(1==(e/=r))return t+n;if(a||(a=.3*r),i<Math.abs(n)){i=n;o=a/4}else o=a/(2*Math.PI)*Math.asin(n/i);return-i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)+t},easeOutElastic:function(e,t,n,r){var o=1.70158,a=0,i=n;if(0==e)return t;if(1==(e/=r))return t+n;if(a||(a=.3*r),i<Math.abs(n)){i=n;o=a/4}else o=a/(2*Math.PI)*Math.asin(n/i);return i*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t},easeInOutElastic:function(e,t,n,r){var o=1.70158,a=0,i=n;if(0==e)return t;if(2==(e/=r/2))return t+n;if(a||(a=r*(.3*1.5)),i<Math.abs(n)){i=n;o=a/4}else o=a/(2*Math.PI)*Math.asin(n/i);return e<1?i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*-.5+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t},easeInBack:function(e,t,n,r,o){return null==o&&(o=1.70158),n*(e/=r)*e*((o+1)*e-o)+t},easeOutBack:function(e,t,n,r,o){return null==o&&(o=1.70158),n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},easeInOutBack:function(e,t,n,r,o){return null==o&&(o=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},easeInBounce:function(e,t,n,r){return n-Wheeparam.Easing.easeOutBounce(r-e,0,n,r)+t},easeOutBounce:function(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,t,n,r){return e<r/2?.5*Wheeparam.Easing.easeInBounce(2*e,0,n,r)+t:.5*Wheeparam.Easing.easeOutBounce(2*e-r,0,n,r)+.5*n+t}},function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),a=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){a=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,u=function(){e.clientWidth!==r&&h()},c=function(t){window.removeEventListener("resize",u,!1),e.removeEventListener("input",h,!1),e.removeEventListener("keyup",h,!1),e.removeEventListener("autosize:destroy",c,!1),e.removeEventListener("autosize:update",h,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",c,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",h,!1),window.addEventListener("resize",u,!1),e.addEventListener("input",h,!1),e.addEventListener("autosize:update",h,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:c,update:h}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),h()}function l(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function h(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(l("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(l("hidden"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=a("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function u(e){var t=o.get(e);t&&t.destroy()}function c(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return i(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],u),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],c),e}),t.default=l,e.exports=t.default}),Number.prototype.numberFormat=function(){if(0==this)return 0;for(var e=/(^[+-]?\d+)(\d{3})/,t=this+"";e.test(t);)t=t.replace(e,"$1,$2");return t},String.prototype.numberFormat=function(){return isNaN(parseFloat(this))?"0":parseFloat(this).numberFormat()},String.prototype.unNumberFormat=function(){var e=this;if("number"==typeof e)return e;e=(e=(""+e).replace(/,/gi,"")).replace(/(^\s*)|(\s*$)/g,"");var t=new Number(e);return isNaN(t)?e:t},Number.prototype.unNumberFormat=function(){return this},Date.prototype.dateFormat=function(e){if(!this.valueOf())return" ";if(!e)return this;var t=["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],n=["일","월","화","수","목","금","토"],r=this;return e.replace(/(yyyy|yy|MM|dd|E|hh|mm|ss|a\/p)/gi,function(e){switch(e){case"yyyy":return r.getFullYear();case"yy":return(r.getFullYear()%1e3).zf(2);case"MM":return(r.getMonth()+1).zf(2);case"dd":return r.getDate().zf(2);case"E":return t[r.getDay()];case"e":return n[r.getDay()];case"HH":return r.getHours().zf(2);case"hh":return((h=r.getHours()%12)?h:12).zf(2);case"mm":return r.getMinutes().zf(2);case"ss":return r.getSeconds().zf(2);case"a/p":return r.getHours()<12?"오전":"오후";default:return e}})},String.prototype.string=function(e){for(var t="",n=0;n++<e;)t+=this;return t},String.prototype.zf=function(e){return"0".string(e-this.length)+this},Number.prototype.zf=function(e){return this.toString().zf(e)},String.prototype.dateFormat=function(e){var t=new Date(this);return"Invalid Date"==t?"":t.dateFormat(e)},Number.prototype.toKorean=function(){for(var e=new Array("","일","이","삼","사","오","육","칠","팔","구","십"),t=new Array("","십","백","천","","십","백","천","","십","백","천","","십","백","천"),n=new String(this),r="",o=0;o<n.length;o++){var a="",i=e[n.charAt(n.length-(o+1))];""!=i&&(a+=i+t[o]),4==o&&(a+="만"),8==o&&(a+="억"),12==o&&(a+="조"),r=a+r}return r},String.prototype.toKorean=function(){return this.unNumberFormat().toKorean()},String.prototype.regex=function(e){switch(e){case"phone":return!(11!=(t=this.replace(/\s/gi,"").replace(/-/gi,"")).length&&10!=t.length||!/^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/.test(t))&&(t=t.replace(/^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?([0-9]{3,4})-?([0-9]{4})$/,"$1-$2-$3"));case"tel":var t;return t=(t=this.replace(/\s/gi,"").replace(/-/gi,"")).replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]{3,4})([0-9]{4})/,"$1-$2-$3"),!!/^\d{2,3}-\d{3,4}-\d{4}$/.test(t)&&t;case"email":return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this);case"biznum":var n,r,o,a=new Array(1,3,7,1,3,7,1,3,5,1),i=0,u=this.replace(/-/gi,"");for(n=0;n<=7;n++)i+=a[n]*u.charAt(n);return r=(r="0"+a[8]*u.charAt(8)).substring(r.length-2,r.length),o=(10-(i+=Math.floor(r.charAt(0))+Math.floor(r.charAt(1)))%10)%10,Math.floor(u.charAt(9))==o&&u.replace(/(\d{3})(\d{2})(\d{5})/,"$1-$2-$3")}},Wheeparam.ScrollTo=function(e,t,n){e=!(void 0===e||!e)&&e,t=!(void 0===t||!t)&&t,n=void 0!==n&&n&&t?n:0;var r=window.pageYOffset||document.body.scrollTop,o=(e?document.querySelector(e):document.body).offsetTop,a=o-r,i=0,u=function(){i+=20;var e=t?Wheeparam.Easing[t](i,r,a,n):o;window.scrollTo(0,e),i<n&&setTimeout(u,20)};u()},Wheeparam.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n)for(var r in n)n.hasOwnProperty(r)&&("object"==typeof n[r]?e[r]=Wheeparam.extend(e[r],n[r]):e[r]=n[r])}return e},Wheeparam.popup=function(e){var t={title:"_blank",width:800,height:600,url:"",onFailed:function(){alert("팝업 차단 기능이 설정되어있습니다.\n차단 기능을 해제(팝업허용) 한 후 다시 이용해 주십시오.")}},n=Wheeparam.extend({},t,e),r=screen.availWidth,o=screen.availHeight,a=n.width,i=n.height,u="width="+a+",height="+i+",top="+(o-i)/2+",left="+(r-a)/2+",scrollbars=yes,resizable=no",c=window.open(e.url,e.title,u);(null==c||void 0===c||null==c&&0==c.outerWidth||null!=c&&0==c.outerHeight)&&n.onFailed()},Wheeparam.shareSNS=function(e){var t={title:"",provider:"",url:"",imgSrc:"",width:800,height:600,onFailed:function(){alert("팝업 차단 기능이 설정되어있습니다.\n차단 기능을 해제(팝업허용) 한 후 다시 이용해 주십시오.")}},n=Wheeparam.extend({},t,e);n.title||(n.title=document.querySelector('meta[property="og:title"]')?document.querySelector('meta[property="og:title"]').getAttribute("content"):document.querySelector("title")?document.querySelector("title").innerText:""),n.url||(n.url=window.location.href),n.imgSrc||(n.imgSrc=document.querySelector('meta[property="og:image"]')?document.querySelector('meta[property="og:image"]').getAttribute("content"):document.querySelector('link[rel="image_src"]')?document.querySelector('link[rel="image_src"]').innerText:""),n.url=encodeURIComponent(n.url),n.title=encodeURIComponent(n.title);var r="";switch(n.provider){case"facebook":r="//www.facebook.com/sharer/sharer.php?u="+n.url;break;case"twitter":r="//twitter.com/home?status="+n.title+" "+n.url;break;case"google":r="//plus.google.com/share?url="+n.url;break;case"pinterest":r="//www.pinterest.com/pin/create/button/?url="+n.url+(n.imgSrc?"&media="+n.imgSrc:"")+"&description="+n.title;break;case"kakaostory":r="https://story.kakao.com/share?url="+n.url;break;case"band":r="http://www.band.us/plugin/share?body="+n.title+"%0A"+n.url;break;case"naver":r="http://share.naver.com/web/shareView.nhn?url="+n.url+"&title="+n.title;break;case"line":r="http://line.me/R/msg/text/?"+n.title+encodeURIComponent("\n")+n.url}return r&&Wheeparam.popup({url:r,width:n.width,height:n.height,onFailed:n.onFailed}),!1},Wheeparam.onDocuemntReady(function(){var e=document.querySelectorAll("[data-checkbox]");if(e.length>0)for(var t=0;t<e.length;t++)e[t].addEventListener("change",function(e){var t=null!=this.getAttribute("data-checkbox-all"),n=this.getAttribute("data-checkbox"),r=this.checked,o=t?this:document.querySelectorAll('[data-checkbox="'+n+'"][data-checkbox-all]').length>0?document.querySelectorAll('[data-checkbox="'+n+'"][data-checkbox-all]')[0]:null,a=document.querySelectorAll('[data-checkbox="'+n+'"]');if(o)if(t)for(var i=0;i<a.length;i++)a[i].checked=r;else{var u=!0;for(i=0;i<a.length;i++)if(null==a[i].getAttribute("data-checkbox-all")&&0==a[i].checked){u=!1;break}o.checked=u}})}),Wheeparam.onDocuemntReady(function(){var e=document.querySelectorAll("input[data-number-format]");if(e.length>0)for(var t=0;t<e.length;t++)e[t].addEventListener("keyup",function(){var e=this.value.unNumberFormat().numberFormat();this.value=e})}),Wheeparam.onDocuemntReady(function(){var e=document.querySelectorAll("[data-number-only]");if(!(e.length<=0))for(var t=0;t<e.length;t++)e[t].addEventListener("keypress",function(e){8!=e.which&&0!=e.which&&45!=e.which&&(e.which<48||e.which>57)&&e.preventDefault()})}),Wheeparam.onDocuemntReady(function(){var e=document.querySelectorAll("textarea[data-autosize]");if(e.length>0)for(var t=0;t<e.length;t++)e[t].addEventListener("keyup",function(){autosize(this)})}),Wheeparam.onDocuemntReady(function(){var e=document.querySelectorAll("[data-sns-share]");if(e.length>0)for(var t=0;t<e.length;t++)for(var n=e[t],r=n.getAttribute("data-title")?n.getAttribute("data-title"):"",o=n.getAttribute("data-url")?n.getAttribute("data-url"):"",a=n.getAttribute("data-img-src")?n.getAttribute("data-img-src"):"",i=n.getAttribute("data-width")?n.getAttribute("data-width"):800,u=n.getAttribute("data-height")?n.getAttribute("data-height"):600,c=n.querySelectorAll("[data-sns-provider]"),l=0;l<c.length;l++)c[l].addEventListener("click",function(){var e=this.getAttribute("data-sns-provider")?this.getAttribute("data-sns-provider"):"";if(!e)return!1;Wheeparam.shareSNS({title:r,provider:e,url:o,imgSrc:a,width:i,height:u})})}),$(function(){$('[data-button="toggle-menu"]').click(function(e){e.preventDefault(),$("#mobile-left-menu").toggleClass("opened")})});
|
|
//# sourceMappingURL=common.min.js.map
|