/* wisebook | Copyright (c) 2015 Copyright © 2015 Kovec, Inc. All rights reserved. */

window.viewUtils=function(e){function g(c){var a;switch(c){case "start":a="mousedown";b.hasTouch?a="touchstart":b.hasPointer&&(a=window.PointerEvent?"pointerdown":"MSPointerDown");break;case "move":a="mousemove";b.hasTouch?a="touchmove":b.hasPointer&&(a=window.PointerEvent?"pointermove":"MSPointerMove");break;case "end":a="mouseup";b.hasTouch?a="touchend":b.hasPointer&&(a=window.PointerEvent?"pointerup":"MSPointerUp");break;case "cancel":a="mouseup",b.hasTouch?a="touchcancel":b.hasPointer&&(a=window.PointerEvent?
"pointercancel":"MSPointerCancel")}return a}function h(a,b,d){b=a.indexOf(b);d=a.indexOf(d,b);return a.substring(b,d)}var b={},a=e.userAgent.toLowerCase();b.extend=function(a,b){for(var d in b)a[d]=b[d]};b.extend(b,{orientchange:"onorientationchange"in window?!0:!1,retina:1<window.devicePixelRatio,hasTouch:"ontouchstart"in window,hasPointer:(e.pointerEnabled||e.msPointerEnabled)&&e.msMaxTouchPoints&&1<e.msMaxTouchPoints,iosInfo:{version:null,check:!1},androidInfo:{webkit:null,version:null,check:!1,
inch7:!1,isAndroidLowVersion:!1},msiever:null});b.extend(b,{Tablet:-1!=a.indexOf("windows")&&-1!=a.indexOf("touch")||-1!=a.indexOf("ipad")||-1!=a.indexOf("android")&&-1==a.indexOf("mobile")||-1!=a.indexOf("firefox")&&-1!=a.indexOf("tablet")||-1!=a.indexOf("kindle")||-1!=a.indexOf("silk")||-1!=a.indexOf("playbook"),Mobile:-1!=a.indexOf("windows")&&-1!=a.indexOf("phone")||-1!=a.indexOf("iphone")||-1!=a.indexOf("ipod")||-1!=a.indexOf("android")&&-1!=a.indexOf("mobile")||-1!=a.indexOf("firefox")&&-1!=
a.indexOf("mobile")||-1!=a.indexOf("blackberry")});(function(){var a,f="";a=navigator.userAgent;-1!=navigator.platform.indexOf("Win")?(a=a.match(/Win(dows )?NT 10/)?"Windows 10":a.match(/Win(dows )?NT 6\.3/)?"Windows 8.1":a.match(/Win(dows )?NT 6\.2/)?"Windows 8":a.match(/Win(dows )?NT 6\.1/)?"Windows 7":a.match(/Win(dows )?NT 6\.0/)?"Windows Vista":a.match(/Win(dows )?(NT 5\.1|XP)/)?"Windows XP":a.match(/Win(dows )?NT 5\.2/)?"Windows Server 2003":"Windows Other",f="windowsos"):-1!=navigator.platform.indexOf("Mac")?
(a=h(a,"Mac OS",")"),f="macos"):a=-1!=a.indexOf("iPhone")||-1!=a.indexOf("iPad")?"i"+a.match(/OS (\w+){1,3} /g):-1!=a.indexOf("Android")?h(a,"Android",";"):"N/A";b.osclass=f;b.os=a})();(function(){var c="pc";if(a.match(/ipad/i)||a.match(/iphone/i)){b.iosInfo.check=!0;a.match(/ipad/i)?c="ipad":a.match(/iphone/i)&&(c="iphone");var f=e.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);b.iosInfo.version=parseInt((f?f:7)[1],10)}else if(a.match(/android/i)){b.androidInfo.check=!0;f=a.match(/(android)\s[0-9]/g);
b.androidInfo.version=f[0].match(/[0-9]/);c=a.match(/mobile/i)?"android":"an_Tablet";b.Tablet&&(b.androidInfo.inch7="portrait"==(screen.width>screen.height?"landscape":"portrait")&&600<=window.innerWidth&&610>=window.innerWidth||960<=window.innerWidth&&970>=window.innerWidth);try{var d=a.match(/(applewebkit\/)\d*.\d*/);b.androidInfo.webkit=parseFloat(d[0].match(/\d.*/g));var g=a.match(/(android)\s\d*.\d/g);b.androidInfo.version=parseFloat(g[0].match(/\d.*/g))}catch(h){}appFlag&&4.2>=b.androidInfo.version&&
(b.androidInfo.isAndroidLowVersion=!0)}else a.match(/Tablet PC/i)?c="pc":b.hasPointer&&(c="wintouch");b.device=c})();(function(){var c;if(a.match(/msie/)||a.match(/trident/)){var f=a.match(/(msie\s|rv:)([\d]+)/)[2];c="msie";b.msiever=f}else-1!=a.indexOf("chrome")&&-1==a.indexOf("edge")?c="chrome":-1!=a.indexOf("safari")&&-1==a.indexOf("edge")?c="safari":-1!=a.indexOf("firefox")?c="firefox":-1!=a.indexOf("opera")?c="opera":-1!=a.indexOf("edge")?c="edge":b.iosInfo.check?c="safari":b.androidInfo.check&&
(c="chrome");b.browser=c})();b.vandor=function(){for(var a=document.createElement("div").style,b=prefix="",d=["Webkit","Moz","O","ms","Khtml"],e=0;e<d.length;e++)if(void 0!==a[d[e]+"AnimationName"]){prefix=d[e];animationString=prefix+"Animation";b="-"+prefix.toLowerCase()+"-";break}return b}();b.transition=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},
d;for(d in b)if(void 0!==a.style[d])return{end:b[d]};return!1}();var k="pc"!=b.device?g("start"):"mousedown",l="pc"!=b.device?g("move"):"mousemove",m="pc"!=b.device?g("end"):"mouseup",n="pc"!=b.device?g("cancel"):"mouseup";b.extend(b,{START_EV:k,MOVE_EV:l,END_EV:m,CANCEL_EV:n,CLICK_EV:"click",MOUSE_DW:"mousedown",MOUSE_MV:"mousemove",MOUSE_EN:"mouseup"});return b}(window.navigator);var waitForResizeEvent=function(){var e=0;return function(g,h){clearTimeout(e);e=setTimeout(g,h)}}();
