var SpeedBinb=function(H){!function(r,e,ut){"use strict";function s(t){if(h[t])return h[t].exports;var i=h[t]={i:t,l:!1,exports:{}};return n[t].call(i.exports,i,i.exports,s),i.l=!0,i.exports}var n,h;h={},s.m=n=[function(t,i){var n=t.exports=void 0!==H&&H.Math==Math?H:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof e&&(e=n)},function(t,i,n){var r=n(23)("wks"),e=n(18),s=n(0).Symbol,h="function"==typeof s;(t.exports=function(t){return r[t]||(r[t]=h&&s[t]||(h?s:e)("Symbol."+t))}).store=r},function(t,i){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,i,n){t.exports=!n(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,i,n){var r=n(5),e=n(34),s=n(21),h=Object.defineProperty;i.f=n(3)?Object.defineProperty:function(t,i,n){if(r(t),i=s(i,!0),r(n),e)try{return h(t,i,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[i]=n.value),t}},function(t,i,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,i){var n={}.hasOwnProperty;t.exports=function(t,i){return n.call(t,i)}},function(t,i,n){var r=n(4),e=n(17);t.exports=n(3)?function(t,i,n){return r.f(t,i,e(1,n))}:function(t,i,n){return t[i]=n,t}},function(t,i){var n=t.exports={version:"2.6.9"};"number"==typeof r&&(r=n)},function(t,i,n){var s=n(16);t.exports=function(r,e,t){if(s(r),e===ut)return r;switch(t){case 1:return function(t){return r.call(e,t)};case 2:return function(t,i){return r.call(e,t,i)};case 3:return function(t,i,n){return r.call(e,t,i,n)}}return function(){return r.apply(e,arguments)}}},function(t,i,n){var r=n(38),e=n(39);t.exports=function(t){return r(e(t))}},function(t,i){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,i){t.exports=!0},function(t,i,n){var r=n(4).f,e=n(6),s=n(1)("toStringTag");t.exports=function(t,i,n){t&&!e(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:i})}},function(t,i){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,i,n){var b=n(0),g=n(8),p=n(9),m=n(7),w=n(6),y="prototype",O=function(t,i,n){var r,e,s,h=t&O.F,u=t&O.G,o=t&O.S,a=t&O.P,f=t&O.B,c=t&O.W,l=u?g:g[i]||(g[i]={}),v=l[y],d=u?b:o?b[i]:(b[i]||{})[y];for(r in u&&(n=i),n)(e=!h&&d&&d[r]!==ut)&&w(l,r)||(s=e?d[r]:n[r],l[r]=u&&"function"!=typeof d[r]?n[r]:f&&e?p(s,b):c&&d[r]==s?function(r){function t(t,i,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,n)}return r.apply(this,arguments)}return t[y]=r[y],t}(s):a&&"function"==typeof s?p(Function.call,s):s,a&&((l.virtual||(l.virtual={}))[r]=s,t&O.R&&v&&!v[r]&&m(v,r,s)))};O.F=1,O.G=2,O.S=4,O.P=8,O.B=16,O.W=32,O.U=64,O.R=128,t.exports=O},function(t,i){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,i){t.exports=function(t,i){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:i}}},function(t,i){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(t===ut?"":t,")_",(++n+r).toString(36))}},function(t,i){t.exports={}},function(t,i,n){var r=n(2),e=n(0).document,s=r(e)&&r(e.createElement);t.exports=function(t){return s?e.createElement(t):{}}},function(t,i,n){var e=n(2);t.exports=function(t,i){if(!e(t))return t;var n,r;if(i&&"function"==typeof(n=t.toString)&&!e(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!e(r=n.call(t)))return r;if(!i&&"function"==typeof(n=t.toString)&&!e(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,i,n){function r(t){u(t,e,{value:{i:"O"+ ++o,w:{}}})}var e=n(18)("meta"),s=n(2),h=n(6),u=n(4).f,o=0,a=Object.isExtensible||function(){return!0},f=!n(11)(function(){return a(Object.preventExtensions({}))}),c=t.exports={KEY:e,NEED:!1,fastKey:function(t,i){if(!s(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!h(t,e)){if(!a(t))return"F";if(!i)return"E";r(t)}return t[e].i},getWeak:function(t,i){if(!h(t,e)){if(!a(t))return!0;if(!i)return!1;r(t)}return t[e].w},onFreeze:function(t){return f&&c.NEED&&a(t)&&!h(t,e)&&r(t),t}}},function(t,i,n){var r=n(8),e=n(0),s="__core-js_shared__",h=e[s]||(e[s]={});(t.exports=function(t,i){return h[t]||(h[t]=i!==ut?i:{})})("versions",[]).push({version:r.version,mode:n(12)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(t,i,n){var r=n(37),e=n(27);t.exports=Object.keys||function(t){return r(t,e)}},function(t,i,n){var r=n(40),e=Math.min;t.exports=function(t){return 0<t?e(r(t),9007199254740991):0}},function(t,i,n){var r=n(23)("keys"),e=n(18);t.exports=function(t){return r[t]||(r[t]=e(t))}},function(t,i){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,i){i.f={}.propertyIsEnumerable},function(t,i,n){var r=n(39);t.exports=function(t){return Object(r(t))}},function(t,i,r){function e(){}var s=r(5),h=r(58),u=r(27),o=r(26)("IE_PROTO"),a="prototype",f=function(){var t,i=r(20)("iframe"),n=u.length;for(i.style.display="none",r(43).appendChild(i),i.src="javascript:",(t=i.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;n--;)delete f[a][u[n]];return f()};t.exports=Object.create||function(t,i){var n;return null!==t?(e[a]=s(t),n=new e,e[a]=null,n[o]=t):n=f(),i===ut?n:h(n,i)}},function(t,i){t.exports=function(t,i,n,r){if(!(t instanceof i)||r!==ut&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,i,n){var l=n(9),v=n(66),d=n(67),b=n(5),g=n(25),p=n(68),m={},w={};(i=t.exports=function(t,i,n,r,e){var s,h,u,o,a=e?function(){return t}:p(t),f=l(n,r,i?2:1),c=0;if("function"!=typeof a)throw TypeError(t+" is not iterable!");if(d(a)){for(s=g(t.length);c<s;c++)if((o=i?f(b(h=t[c])[0],h[1]):f(t[c]))===m||o===w)return o}else for(u=a.call(t);!(h=u.next()).done;)if((o=v(u,f,h.value,i))===m||o===w)return o}).BREAK=m,i.RETURN=w},function(t,i,n){var e=n(7);t.exports=function(t,i,n){for(var r in i)n&&t[r]?t[r]=i[r]:e(t,r,i[r]);return t}},function(t,i,n){t.exports=!n(3)&&!n(11)(function(){return 7!=Object.defineProperty(n(20)("div"),"a",{get:function(){return 7}}).a})},function(t,i,n){t.exports=n(7)},function(t,i,n){i.f=n(1)},function(t,i,n){var h=n(6),u=n(10),o=n(56)(!1),a=n(26)("IE_PROTO");t.exports=function(t,i){var n,r=u(t),e=0,s=[];for(n in r)n!=a&&h(r,n)&&s.push(n);for(;i.length>e;)h(r,n=i[e++])&&(~o(s,n)||s.push(n));return s}},function(t,i,n){var r=n(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,i){t.exports=function(t){if(t==ut)throw TypeError("Can't call method on  "+t);return t}},function(t,i){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?r:n)(t)}},function(t,i){i.f=Object.getOwnPropertySymbols},function(t,i,n){var r=n(14);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,i,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,i,n){var r=n(37),e=n(27).concat("length","prototype");i.f=Object.getOwnPropertyNames||function(t){return r(t,e)}},function(t,i){t.exports=function(t,i){return{value:i,done:!!t}}},function(t,i,n){function w(){return this}var y=n(12),O=n(15),M=n(35),j=n(7),x=n(19),S=n(63),I=n(13),E=n(64),T=n(1)("iterator"),P=!([].keys&&"next"in[].keys()),C="values";t.exports=function(t,i,n,r,e,s,h){S(n,i,r);function u(t){if(!P&&t in d)return d[t];switch(t){case"keys":case C:return function(){return new n(this,t)}}return function(){return new n(this,t)}}var o,a,f,c=i+" Iterator",l=e==C,v=!1,d=t.prototype,b=d[T]||d["@@iterator"]||e&&d[e],g=b||u(e),p=e?l?u("entries"):g:ut,m="Array"==i&&d.entries||b;if(m&&(f=E(m.call(new t)))!==Object.prototype&&f.next&&(I(f,c,!0),y||"function"==typeof f[T]||j(f,T,w)),l&&b&&b.name!==C&&(v=!0,g=function(){return b.call(this)}),y&&!h||!P&&!v&&d[T]||j(d,T,g),x[i]=g,x[c]=w,e)if(o={values:l?g:u(C),keys:s?g:u("keys"),entries:p},h)for(a in o)a in d||M(d,a,o[a]);else O(O.P+O.F*(P||v),i,o);return o}},function(t,i,n){var e=n(14),s=n(1)("toStringTag"),h="Arguments"==e(function(){return arguments}());t.exports=function(t){var i,n,r;return t===ut?"Undefined":null===t?"Null":"string"==typeof(n=function(t,i){try{return t[i]}catch(t){}}(i=Object(t),s))?n:h?e(i):"Object"==(r=e(i))&&"function"==typeof i.callee?"Arguments":r}},function(t,i,n){function r(){var t=+this;if(w.hasOwnProperty(t)){var i=w[t];delete w[t],i()}}function e(t){r.call(t.data)}var s,h,u,o=n(9),a=n(70),f=n(43),c=n(20),l=n(0),v=l.process,d=l.setImmediate,b=l.clearImmediate,g=l.MessageChannel,p=l.Dispatch,m=0,w={},y="onreadystatechange";d&&b||(d=function(t){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);return w[++m]=function(){a("function"==typeof t?t:Function(t),i)},s(m),m},b=function(t){delete w[t]},"process"==n(14)(v)?s=function(t){v.nextTick(o(r,t,1))}:p&&p.now?s=function(t){p.now(o(r,t,1))}:g?(u=(h=new g).port2,h.port1.onmessage=e,s=o(u.postMessage,u,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(s=function(t){l.postMessage(t+"","*")},l.addEventListener("message",e,!1)):s=y in c("script")?function(t){f.appendChild(c("script"))[y]=function(){f.removeChild(this),r.call(t)}}:function(t){setTimeout(o(r,t,1),0)}),t.exports={set:d,clear:b}},function(t,i,n){var e=n(16);function r(t){var n,r;this.promise=new t(function(t,i){if(n!==ut||r!==ut)throw TypeError("Bad Promise constructor");n=t,r=i}),this.resolve=e(n),this.reject=e(r)}t.exports.f=function(t){return new r(t)}},function(t,i,n){var r=n(0),e=n(8),s=n(4),h=n(3),u=n(1)("species");t.exports=function(t){var i="function"==typeof e[t]?e[t]:r[t];h&&i&&!i[u]&&s.f(i,u,{configurable:!0,get:function(){return this}})}},function(t,i,n){var r=n(2);t.exports=function(t,i){if(!r(t)||t.u!==i)throw TypeError("Incompatible receiver, "+i+" required!");return t}},function(t,i,n){n(53),n(61),n(65),t.exports=n(76)},function(t,i,n){function r(t){var i=X[t]=C(B[$]);return i.b=t,i}function e(t,i){x(t);for(var n,r=M(i=E(i)),e=0,s=r.length;e<s;)it(t,n=r[e++],i[n]);return t}function s(t){var i=G.call(this,t=T(t,!0));return!(this===Y&&f(X,t)&&!f(q,t))&&(!(i||!f(this,t)||!f(X,t)||f(this,_)&&this[_][t])||i)}function h(t,i){if(t=E(t),i=T(i,!0),t!==Y||!f(X,i)||f(q,i)){var n=R(t,i);return!n||!f(X,i)||f(t,_)&&t[_][i]||(n.enumerable=!0),n}}function u(t){for(var i,n=J(E(t)),r=[],e=0;n.length>e;)f(X,i=n[e++])||i==_||i==d||r.push(i);return r}function o(t){for(var i,n=t===Y,r=J(n?q:E(t)),e=[],s=0;r.length>s;)!f(X,i=r[s++])||n&&!f(Y,i)||e.push(X[i]);return e}var a=n(0),f=n(6),c=n(3),l=n(15),v=n(35),d=n(22).KEY,b=n(11),g=n(23),p=n(13),m=n(18),w=n(1),y=n(36),O=n(54),M=n(55),j=n(42),x=n(5),S=n(2),I=n(29),E=n(10),T=n(21),P=n(17),C=n(30),A=n(59),k=n(60),D=n(41),N=n(4),L=n(24),R=k.f,F=N.f,J=A.f,B=a.Symbol,H=a.JSON,z=H&&H.stringify,$="prototype",_=w("_hidden"),V=w("toPrimitive"),G={}.propertyIsEnumerable,U=g("symbol-registry"),X=g("symbols"),q=g("op-symbols"),Y=Object[$],W="function"==typeof B&&!!D.f,Z=a.QObject,Q=!Z||!Z[$]||!Z[$].findChild,K=c&&b(function(){return 7!=C(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(t,i,n){var r=R(Y,i);r&&delete Y[i],F(t,i,n),r&&t!==Y&&F(Y,i,r)}:F,tt=W&&"symbol"==typeof B.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof B},it=function(t,i,n){return t===Y&&it(q,i,n),x(t),i=T(i,!0),x(n),f(X,i)?(n.enumerable?(f(t,_)&&t[_][i]&&(t[_][i]=!1),n=C(n,{enumerable:P(0,!1)})):(f(t,_)||F(t,_,P(1,{})),t[_][i]=!0),K(t,i,n)):F(t,i,n)};W||(v((B=function(t){if(this instanceof B)throw TypeError("Symbol is not a constructor!");var i=m(0<arguments.length?t:ut),n=function(t){this===Y&&n.call(q,t),f(this,_)&&f(this[_],i)&&(this[_][i]=!1),K(this,i,P(1,t))};return c&&Q&&K(Y,i,{configurable:!0,set:n}),r(i)})[$],"toString",function(){return this.b}),k.f=h,N.f=it,n(44).f=A.f=u,n(28).f=s,D.f=o,c&&!n(12)&&v(Y,"propertyIsEnumerable",s,!0),y.f=function(t){return r(w(t))}),l(l.G+l.W+l.F*!W,{Symbol:B});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)w(nt[rt++]);for(var et=L(w.store),st=0;et.length>st;)O(et[st++]);l(l.S+l.F*!W,"Symbol",{for:function(t){return f(U,t+="")?U[t]:U[t]=B(t)},keyFor:function(t){if(!tt(t))throw TypeError(t+" is not a symbol!");for(var i in U)if(U[i]===t)return i},useSetter:function(){Q=!0},useSimple:function(){Q=!1}}),l(l.S+l.F*!W,"Object",{create:function(t,i){return i===ut?C(t):e(C(t),i)},defineProperty:it,defineProperties:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:u,getOwnPropertySymbols:o});var ht=b(function(){D.f(1)});l(l.S+l.F*ht,"Object",{getOwnPropertySymbols:function(t){return D.f(I(t))}}),H&&l(l.S+l.F*(!W||b(function(){var t=B();return"[null]"!=z([t])||"{}"!=z({a:t})||"{}"!=z(Object(t))})),"JSON",{stringify:function(t){for(var i,n,r=[t],e=1;e<arguments.length;)r.push(arguments[e++]);if(n=i=r[1],(S(i)||t!==ut)&&!tt(t))return j(i)||(i=function(t,i){if("function"==typeof n&&(i=n.call(this,t,i)),!tt(i))return i}),r[1]=i,z.apply(H,r)}}),B[$][V]||n(7)(B[$],V,B[$].valueOf),p(B,"Symbol"),p(Math,"Math",!0),p(a.JSON,"JSON",!0)},function(t,i,n){var r=n(0),e=n(8),s=n(12),h=n(36),u=n(4).f;t.exports=function(t){var i=e.Symbol||(e.Symbol=s?{}:r.Symbol||{});"_"==t.charAt(0)||t in i||u(i,t,{value:h.f(t)})}},function(t,i,n){var u=n(24),o=n(41),a=n(28);t.exports=function(t){var i=u(t),n=o.f;if(n)for(var r,e=n(t),s=a.f,h=0;e.length>h;)s.call(t,r=e[h++])&&i.push(r);return i}},function(t,i,n){var o=n(10),a=n(25),f=n(57);t.exports=function(u){return function(t,i,n){var r,e=o(t),s=a(e.length),h=f(n,s);if(u&&i!=i){for(;h<s;)if((r=e[h++])!=r)return!0}else for(;h<s;h++)if((u||h in e)&&e[h]===i)return u||h||0;return!u&&-1}}},function(t,i,n){var r=n(40),e=Math.max,s=Math.min;t.exports=function(t,i){return(t=r(t))<0?e(t+i,0):s(t,i)}},function(t,i,n){var h=n(4),u=n(5),o=n(24);t.exports=n(3)?Object.defineProperties:function(t,i){u(t);for(var n,r=o(i),e=r.length,s=0;s<e;)h.f(t,n=r[s++],i[n]);return t}},function(t,i,n){var r=n(10),e=n(44).f,s={}.toString,h="object"==typeof H&&H&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(H):[];t.exports.f=function(t){return h&&"[object Window]"==s.call(t)?function(t){try{return e(t)}catch(t){return h.slice()}}(t):e(r(t))}},function(t,i,n){var r=n(28),e=n(17),s=n(10),h=n(21),u=n(6),o=n(34),a=Object.getOwnPropertyDescriptor;i.f=n(3)?a:function(t,i){if(t=s(t),i=h(i,!0),o)try{return a(t,i)}catch(t){}if(u(t,i))return e(!r.f.call(t,i),t[i])}},function(t,i,n){var r=n(62),e=n(45),s=n(19),h=n(10);t.exports=n(46)(Array,"Array",function(t,i){this.u=h(t),this.g=0,this.b=i},function(){var t=this.u,i=this.b,n=this.g++;return!t||n>=t.length?(this.u=ut,e(1)):e(0,"keys"==i?n:"values"==i?t[n]:[n,t[n]])},"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},function(t,i){t.exports=function(){}},function(t,i,n){var r=n(30),e=n(17),s=n(13),h={};n(7)(h,n(1)("iterator"),function(){return this}),t.exports=function(t,i,n){t.prototype=r(h,{next:e(1,n)}),s(t,i+" Iterator")}},function(t,i,n){var r=n(6),e=n(29),s=n(26)("IE_PROTO"),h=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=e(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},function(t,i,n){function r(){}function c(t){var i;return!(!g(t)||"function"!=typeof(i=t.then))&&i}function e(f,n){if(!f.O){f.O=!0;var r=f.M;M(function(){for(var o=f.j,a=1==f.I,t=0,i=function(t){var i,n,r,e=a?t.ok:t.fail,s=t.resolve,h=t.reject,u=t.domain;try{e?(a||(2==f.T&&J(f),f.T=1),!0===e?i=o:(u&&u.enter(),i=e(o),u&&(u.exit(),r=!0)),i===t.promise?h(T("Promise-chain cycle")):(n=c(i))?n.call(i,s,h):s(i)):h(o)}catch(t){u&&!r&&u.exit(),h(t)}};r.length>t;)i(r[t++]);f.M=[],f.O=!1,n&&!f.T&&R(f)})}}function s(t){var i=this;i.C||(i.C=!0,(i=i.A||i).j=t,i.I=2,i.D||(i.D=i.M.slice()),e(i,!0))}var h,u,o,a,f=n(12),l=n(0),v=n(9),d=n(47),b=n(15),g=n(2),p=n(16),m=n(31),w=n(32),y=n(69),O=n(48).set,M=n(71)(),j=n(49),x=n(72),S=n(73),I=n(74),E="Promise",T=l.TypeError,P=l.process,C=P&&P.versions,A=C&&C.v8||"",k=l[E],D="process"==d(P),N=u=j.f,L=!!function(){try{var t=k.resolve(1),i=(t.constructor={})[n(1)("species")]=function(t){t(r,r)};return(D||"function"==typeof PromiseRejectionEvent)&&t.then(r)instanceof i&&0!==A.indexOf("6.6")&&-1===S.indexOf("Chrome/66")}catch(t){}}(),R=function(s){O.call(l,function(){var t,i,n,r=s.j,e=F(s);if(e&&(t=x(function(){D?P.emit("unhandledRejection",r,s):(i=l.onunhandledrejection)?i({promise:s,reason:r}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",r)}),s.T=D||F(s)?2:1),s.D=ut,e&&t.e)throw t.v})},F=function(t){return 1!==t.T&&0===(t.D||t.M).length},J=function(i){O.call(l,function(){var t;D?P.emit("rejectionHandled",i):(t=l.onrejectionhandled)&&t({promise:i,reason:i.j})})},B=function(t){var n,r=this;if(!r.C){r.C=!0,r=r.A||r;try{if(r===t)throw T("Promise can't be resolved itself");(n=c(t))?M(function(){var i={A:r,C:!1};try{n.call(t,v(B,i,1),v(s,i,1))}catch(t){s.call(i,t)}}):(r.j=t,r.I=1,e(r,!1))}catch(t){s.call({A:r,C:!1},t)}}};L||(k=function(t){m(this,k,E,"_h"),p(t),h.call(this);try{t(v(B,this,1),v(s,this,1))}catch(t){s.call(this,t)}},(h=function(t){this.M=[],this.D=ut,this.I=0,this.C=!1,this.j=ut,this.T=0,this.O=!1}).prototype=n(33)(k.prototype,{then:function(t,i){var n=N(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof i&&i,n.domain=D?P.domain:ut,this.M.push(n),this.D&&this.D.push(n),this.I&&e(this,!1),n.promise},catch:function(t){return this.then(ut,t)}}),o=function(){var t=new h;this.promise=t,this.resolve=v(B,t,1),this.reject=v(s,t,1)},j.f=N=function(t){return t===k||t===a?new o(t):u(t)}),b(b.G+b.W+b.F*!L,{Promise:k}),n(13)(k,E),n(50)(E),a=n(8)[E],b(b.S+b.F*!L,E,{reject:function(t){var i=N(this);return(0,i.reject)(t),i.promise}}),b(b.S+b.F*(f||!L),E,{resolve:function(t){return I(f&&this===a?k:this,t)}}),b(b.S+b.F*!(L&&n(75)(function(t){k.all(t).catch(r)})),E,{all:function(t){var h=this,i=N(h),u=i.resolve,o=i.reject,n=x(function(){var r=[],e=0,s=1;w(t,!1,function(t){var i=e++,n=!1;r.push(ut),s++,h.resolve(t).then(function(t){n||(n=!0,r[i]=t,--s||u(r))},o)}),--s||u(r)});return n.e&&o(n.v),i.promise},race:function(t){var i=this,n=N(i),r=n.reject,e=x(function(){w(t,!1,function(t){i.resolve(t).then(n.resolve,r)})});return e.e&&r(e.v),n.promise}})},function(t,i,n){var s=n(5);t.exports=function(i,t,n,r){try{return r?t(s(n)[0],n[1]):t(n)}catch(t){var e=i.return;throw e!==ut&&s(e.call(i)),t}}},function(t,i,n){var r=n(19),e=n(1)("iterator"),s=Array.prototype;t.exports=function(t){return t!==ut&&(r.Array===t||s[e]===t)}},function(t,i,n){var r=n(47),e=n(1)("iterator"),s=n(19);t.exports=n(8).getIteratorMethod=function(t){if(t!=ut)return t[e]||t["@@iterator"]||s[r(t)]}},function(t,i,n){var e=n(5),s=n(16),h=n(1)("species");t.exports=function(t,i){var n,r=e(t).constructor;return r===ut||(n=e(r)[h])==ut?i:s(n)}},function(t,i){t.exports=function(t,i,n){var r=n===ut;switch(i.length){case 0:return r?t():t.call(n);case 1:return r?t(i[0]):t.call(n,i[0]);case 2:return r?t(i[0],i[1]):t.call(n,i[0],i[1]);case 3:return r?t(i[0],i[1],i[2]):t.call(n,i[0],i[1],i[2]);case 4:return r?t(i[0],i[1],i[2],i[3]):t.call(n,i[0],i[1],i[2],i[3])}return t.apply(n,i)}},function(t,i,n){var u=n(0),o=n(48).set,a=u.MutationObserver||u.WebKitMutationObserver,f=u.process,c=u.Promise,l="process"==n(14)(f);t.exports=function(){function t(){var t,i;for(l&&(t=f.domain)&&t.exit();n;){i=n.fn,n=n.next;try{i()}catch(t){throw n?e():r=ut,t}}r=ut,t&&t.enter()}var n,r,e;if(l)e=function(){f.nextTick(t)};else if(!a||u.navigator&&u.navigator.standalone)if(c&&c.resolve){var i=c.resolve(ut);e=function(){i.then(t)}}else e=function(){o.call(u,t)};else{var s=!0,h=document.createTextNode("");new a(t).observe(h,{characterData:!0}),e=function(){h.data=s=!s}}return function(t){var i={fn:t,next:ut};r&&(r.next=i),n||(n=i,e()),r=i}}},function(t,i){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,i,n){var r=n(0).navigator;t.exports=r&&r.userAgent||""},function(t,i,n){var r=n(5),e=n(2),s=n(49);t.exports=function(t,i){if(r(t),e(i)&&i.constructor===t)return i;var n=s.f(t);return(0,n.resolve)(i),n.promise}},function(t,i,n){var s=n(1)("iterator"),h=!1;try{var r=[7][s]();r.return=function(){h=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,i){if(!i&&!h)return!1;var n=!1;try{var r=[7],e=r[s]();e.next=function(){return{done:n=!0}},r[s]=function(){return e},t(r)}catch(t){}return n}},function(t,i,n){var r=n(77),e=n(51);t.exports=n(78)("Map",function(i){return function(t){return i(this,0<arguments.length?t:ut)}},{get:function(t){var i=r.getEntry(e(this,"Map"),t);return i&&i.v},set:function(t,i){return r.def(e(this,"Map"),0===t?0:t,i)}},r,!0)},function(t,i,n){function h(t,i){var n,r=d(i);if("F"!==r)return t.g[r];for(n=t.N;n;n=n.n)if(n.k==i)return n}var u=n(4).f,o=n(30),a=n(33),f=n(9),c=n(31),l=n(32),r=n(46),e=n(45),s=n(50),v=n(3),d=n(22).fastKey,b=n(51),g=v?"_s":"size";t.exports={getConstructor:function(t,s,n,r){var e=t(function(t,i){c(t,e,s,"_i"),t.u=s,t.g=o(null),t.N=ut,t.L=ut,t[g]=0,i!=ut&&l(i,n,t[r],t)});return a(e.prototype,{clear:function(){for(var t=b(this,s),i=t.g,n=t.N;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=ut),delete i[n.i];t.N=t.L=ut,t[g]=0},delete:function(t){var i=b(this,s),n=h(i,t);if(n){var r=n.n,e=n.p;delete i.g[n.i],n.r=!0,e&&(e.n=r),r&&(r.p=e),i.N==n&&(i.N=r),i.L==n&&(i.L=e),i[g]--}return!!n},forEach:function(t,i){b(this,s);for(var n,r=f(t,1<arguments.length?i:ut,3);n=n?n.n:this.N;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!h(b(this,s),t)}}),v&&u(e.prototype,"size",{get:function(){return b(this,s)[g]}}),e},def:function(t,i,n){var r,e,s=h(t,i);return s?s.v=n:(t.L=s={i:e=d(i,!0),k:i,v:n,p:r=t.L,n:ut,r:!1},t.N||(t.N=s),r&&(r.n=s),t[g]++,"F"!==e&&(t.g[e]=s)),t},getEntry:h,setStrong:function(t,n,i){r(t,n,function(t,i){this.u=b(t,n),this.b=i,this.L=ut},function(){for(var t=this,i=t.b,n=t.L;n&&n.r;)n=n.p;return t.u&&(t.L=n=n?n.n:t.u.N)?e(0,"keys"==i?n.k:"values"==i?n.v:[n.k,n.v]):(t.u=ut,e(1))},i?"entries":"values",!i,!0),s(n)}}},function(t,i,n){var c=n(0),l=n(15),v=n(22),d=n(11),b=n(7),g=n(33),p=n(32),m=n(31),w=n(2),y=n(13),O=n(4).f,M=n(79)(0),j=n(3);t.exports=function(n,t,i,r,e,s){var h=c[n],u=h,o=e?"set":"add",a=u&&u.prototype,f={};return j&&"function"==typeof u&&(s||a.forEach&&!d(function(){(new u).entries().next()}))?(u=t(function(t,i){m(t,u,n,"_c"),t.M=new h,i!=ut&&p(i,e,t[o],t)}),M("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(r){var e="add"==r||"set"==r;r in a&&(!s||"clear"!=r)&&b(u.prototype,r,function(t,i){if(m(this,u,r),!e&&s&&!w(t))return"get"==r&&ut;var n=this.M[r](0===t?0:t,i);return e?this:n})}),s||O(u.prototype,"size",{get:function(){return this.M.size}})):(u=r.getConstructor(t,n,e,o),g(u.prototype,i),v.NEED=!0),y(u,n),f[n]=u,l(l.G+l.W+l.F,f),s||r.setStrong(u,n,e),u}},function(t,i,n){var w=n(9),y=n(38),O=n(29),M=n(25),r=n(80);t.exports=function(c,t){var l=1==c,v=2==c,d=3==c,b=4==c,g=6==c,p=5==c||g,m=t||r;return function(t,i,n){for(var r,e,s=O(t),h=y(s),u=w(i,n,3),o=M(h.length),a=0,f=l?m(t,o):v?m(t,0):ut;a<o;a++)if((p||a in h)&&(e=u(r=h[a],a,s),c))if(l)f[a]=e;else if(e)switch(c){case 3:return!0;case 5:return r;case 6:return a;case 2:f.push(r)}else if(b)return!1;return g?-1:d||b?b:f}}},function(t,i,n){var r=n(81);t.exports=function(t,i){return new(r(t))(i)}},function(t,i,n){var r=n(2),e=n(42),s=n(1)("species");t.exports=function(t){var i;return e(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!e(i.prototype)||(i=ut),r(i)&&null===(i=i[s])&&(i=ut)),i===ut?Array:i}}],s.c=h,s.d=function(t,i,n){s.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},s.n=function(t){var i=t&&t.J?function(){return t.default}:function(){return t};return s.d(i,"a",i),i},s.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},s.p="",s(s.s=52),"undefined"!=typeof module&&module.exports?module.exports=r:"function"==typeof define&&define.amd?define(function(){return r}):e.core=r}(1,1);function b(){}b.prototype.getExtQueryAndCreateCookie=function(){if(null==H.Config||null===H.Config)return null;if(null==Config.cv01||null===Config.cv01||null==Config.cv02||null===Config.cv02||null==Config.cv03||null===Config.cv03||null==Config.cv04||null===Config.cv04)return null;var t=document.getElementsByName(Config.cv01),i=document.getElementsByName(Config.cv02),n=!1;if(null!==t&&null!==i&&0<t.length&&i.length&&(n=!0),n){var r,e=null,s=null,h=null,u=null,o=null,a=null,f=null,c=!0;try{localStorage.length}catch(t){c=!1}if(1==c)u=localStorage[Config.cv01],o=localStorage[Config.cv02];else for(var l=document.cookie.split("; "),v=0;v<l.length;v++){var d=l[v].split("=");"srhidden"==d[0]&&(0<(r=JSON.parse(unescape(d[1]))).length&&(u=r[0]),1<r.length&&(o=r[1]))}return f=o,""===(s=null===(a=u)||null==u?"":u)&&0<t.length&&(a=s=t[0].value),""===(h=null===o||null==o?"":o)&&0<i.length&&(f=h=i[0].value),1==c?(a!=u&&(localStorage[Config.cv01]=a),f!=o&&(localStorage[Config.cv02]=f)):a==u&&f==o||((r=new Array)[0]=a,r[1]=f,document.cookie="srhidden="+escape(JSON.stringify(r))+"; domain="+location.host+"; path=/; expires=Tue, 19-Jan-2038 00:00:00 GMT;",free(r),delete r),null!==s&&null!==h&&(document.cookie=Config.cv04+"="+escape("v=1&c="+h)+"; domain="+Config.cv03+"; path=/; expires=Tue, 19-Jan-2038 00:00:00 GMT;",(e=new Array)[Config.cv01]=s),e}return null};function d(t){this.useServer=!1,this.bibGetCntSettingPath="",this.bibUdtCntSettingPath="",this.cid=t,this.currentPageID=-1,this.currentAnchorID="",this.serverUpdateIntervalTime=5e3,this.serverUpdateTimerID=0,this.download=new e,this.lStorage=new n,this.oldSetAutoBookmarkDateTime=null,this.getAutoBookmarkSuccess=null,this.getAutoBookmarkError=null,this.setAutoBookmarkSuccess=null,this.setAutoBookmarkError=null,this.autoBookmarkObject=null}d.prototype.getAutoBookmark=function(t,i){var n=this;if(!1===this.useServer){var r=new Array;this.currentPageID=0,this.currentAnchorID="",-1!=this.lStorage.getAutoBookmark(this.cid,r)&&null!=r[0]&&null!=r[0].autoBookmark&&(null!=r[0].autoBookmark.pageID&&(this.currentPageID=r[0].autoBookmark.pageID),null!=r[0].autoBookmark.anchorID&&(this.currentAnchorID=r[0].autoBookmark.anchorID)),null!==t&&null!=t&&t()}else this.getAutoBookmarkSuccess=t,this.getAutoBookmarkError=i,this.download.onload=function(t){n.getAutoBookmarkAjaxOnload(t)},this.download.onerror=function(t){n.getAutoBookmarkAjaxOnerror(t)},this.download.open(this.bibGetCntSettingPath+(0<=this.bibGetCntSettingPath.indexOf("?")?"&":"?")+"cid="+encodeURI(this.cid),6e4)},d.prototype.getAutoBookmarkAjaxOnload=function(t){var i=new Array,n=null,r=null,e=null;if(-1!=this.lStorage.getAutoBookmark(this.cid,i)&&null!=i[0]&&null!=i[0].autoBookmark&&(null!=i[0].autoBookmark.pageID&&(n=i[0].autoBookmark.pageID),null!=i[0].autoBookmark.anchorID&&(r=i[0].autoBookmark.anchorID),null!=i[0].autoBookmark.datetime))try{e=this.lStorage.getYMD2Date(i[0].autoBookmark.datetime)}catch(t){e=null}var s=null;try{s=JSON.parse(this.download.responseText())}catch(t){s=null}if(null!==s){if(1==s.result)try{this.autoBookmarkObject=JSON.parse(s.Data)}catch(t){if(null!==this.getAutoBookmarkError)return void this.getAutoBookmarkError()}else if(null!==this.getAutoBookmarkError)return void this.getAutoBookmarkError()}else if(null!==this.getAutoBookmarkError)return void this.getAutoBookmarkError();var h=null,u=null,o=null;if(null!==this.autoBookmarkObject&&(null!=this.autoBookmarkObject.BookmarkAddress&&(h=this.autoBookmarkObject.BookmarkAddress),null!=this.autoBookmarkObject.AnchorID&&(u=this.autoBookmarkObject.AnchorID),null!=this.autoBookmarkObject.SettingDate))try{o=this.lStorage.getYMD2Date(this.autoBookmarkObject.SettingDate)}catch(t){o=null}this.currentPageID=0,null!==h&&null===n?(this.currentPageID=h,this.currentAnchorID=u):null===h&&null!==n?(this.currentPageID=n,this.currentAnchorID=r):null!==h&&null!==n&&(this.currentPageID=n,this.currentAnchorID=r,null!==o&&null!==e&&e<=o&&(this.currentPageID=h,this.currentAnchorID=u)),null!==this.getAutoBookmarkSuccess&&null!=this.getAutoBookmarkSuccess&&this.getAutoBookmarkSuccess()},d.prototype.getAutoBookmarkAjaxOnerror=function(t){var i=new Array;this.currentPageID=0,this.currentAnchorID="",-1!=this.lStorage.getAutoBookmark(this.cid,i)&&null!=i[0]&&null!==i[0].autoBookmark&&(null!=i[0].autoBookmark.pageID&&(this.currentPageID=i[0].autoBookmark.pageID),null!=i[0].autoBookmark.anchorID&&(this.currentAnchorID=i[0].autoBookmark.anchorID)),null!==this.getAutoBookmarkError&&null!=this.getAutoBookmarkError&&this.getAutoBookmarkError()},d.prototype.setAutoBookmark=function(t,i,n,r){var e=this,s=new Date;if(this.lStorage.setAutoBookmark(this.cid,t,this.lStorage.getDate2YMDHMSZ(s))?!1===this.useServer&&null!==i&&i():!1===this.useServer&&null!==n&&n(),this.useServer){0!==this.serverUpdateTimerID&&(clearTimeout(this.serverUpdateTimerID),this.serverUpdateTimerID=0);var h=this.serverUpdateIntervalTime;!0===r?h=0:null===this.oldSetAutoBookmarkDateTime?h=0:this.oldSetAutoBookmarkDateTime.getTime()+this.serverUpdateIntervalTime<s.getTime()&&(h=0);function u(){e.oldSetAutoBookmarkDateTime=new Date,e.setAutoBookmarkSuccess=i,e.setAutoBookmarkError=n,null===e.autoBookmarkObject&&(e.autoBookmarkObject=new Object),null!=e.autoBookmarkObject.SettingDate&&null!==e.autoBookmarkObject.SettingDate&&""!==e.autoBookmarkObject.SettingDate&&null!=e.autoBookmarkObject.BookmarkAddress&&null!==e.autoBookmarkObject.BookmarkAddress||(e.autoBookmarkObject.TateYoko=-1,e.autoBookmarkObject.LinkEnable=1),e.autoBookmarkObject.SettingDate=e.lStorage.getDate2YMDHMSZ(s),"object"==typeof t&&"pageID"in t?(e.autoBookmarkObject.BookmarkAddress=t.pageID,"anchorID"in t&&(e.autoBookmarkObject.AnchorID=t.anchorID)):e.autoBookmarkObject.BookmarkAddress=t,e.download.onload=function(t){e.setAutoBookmarkAjaxOnload(t)},e.download.onerror=function(t){e.setAutoBookmarkAjaxOnerror(t)},e.download.open(e.bibUdtCntSettingPath+(0<=e.bibUdtCntSettingPath.indexOf("?")?"&":"?")+"cid="+encodeURI(e.cid)+"&Data="+JSON.stringify(e.autoBookmarkObject),6e4)}0===h?u():this.serverUpdateTimerID=setTimeout(function(){e.serverUpdateTimerID=0,u()},h)}},d.prototype.setAutoBookmarkAjaxOnload=function(t){var i=null;try{i=JSON.parse(this.download.responseText())}catch(t){i=null}if(null!==i){if(1!=i.result&&null!==this.setAutoBookmarkError)return void this.setAutoBookmarkError()}else if(null!==this.setAutoBookmarkError)return void this.setAutoBookmarkError();null===this.setAutoBookmarkSuccess||this.setAutoBookmarkSuccess()},d.prototype.setAutoBookmarkAjaxOnerror=function(t){null===this.setAutoBookmarkError||this.setAutoBookmarkError()};var n=function(){this.maxLocalStorageCount=2,this.prefix="sr",this.cid="",H.Config&&H.Config.LocalStorageMax&&(this.maxLocalStorageCount=H.Config.LocalStorageMax)};n.prototype.getAutoBookmark=function(t,i,n){var r=!0;try{localStorage.length}catch(t){r=!1}var e,s=null;if(r?s=localStorage:null!=(e=this.getCookie())&&(null!=e.contents&&null!==e.contents&&(s=e.contents),null!==n&&null!=n&&(n=JSON.parse(JSON.stringify(e)))),null===s&&(s=new Array),e=null,""!==t)for(var h=0;h<this.maxLocalStorageCount;h++){var u=("00"+h).slice(-2),o=null;try{o=s[this.prefix+u]}catch(t){o=null}if(null!=o&&null!=o){try{e=JSON.parse(o)}catch(t){e=null}if(null!=e&&e.cid==t)return i[0]=JSON.parse(JSON.stringify(e)),i[0].cid=t,(i[0].autoBookmark=null)!==e.autoBookmark?(i[0].autoBookmark=new Object,i[0].autoBookmark.datetime=e.autoBookmark.datetime,i[0].autoBookmark.pageID=e.autoBookmark.pageID,i[0].autoBookmark.anchorID=e.autoBookmark.anchorID||"",h):-1}}return-1},n.prototype.setAutoBookmark=function(t,i,n){if(""===t)return!1;var r,e,s=!0;try{localStorage.length}catch(t){s=!1}var h=new Array,u=new Object,o=this.getAutoBookmark(t,h,u);if(-1==o){var a,f=s?localStorage:u.contents;null!==f&&null!=f||(f=new Array);var c=-1,l=null;for(a=0;a<this.maxLocalStorageCount;a++){var v=f[this.prefix+("00"+a).slice(-2)];if(null==(r=null===v||null==v||""===v?null:JSON.parse(v))||void 0===r){o=a;break}if(null!=r.updateTime)if(null==l)c=a,l=this.getYMD2Date(r.updateTime);else{var d=this.getYMD2Date(r.updateTime);d<=l&&(c=a,l=d)}}-1==o&&-1!=c&&(o=c)}return-1==o&&(o=0),e=("00"+o).slice(-2),null!=h[0]&&null!=h[0]||(h[0]=new Object),h[0].cid=t,h[0].updateTime=n,null!==h[0].autoBookmark&&null!=h[0].autoBookmark||(h[0].autoBookmark=new Object),"object"==typeof i&&"pageID"in i?(h[0].autoBookmark.pageID=i.pageID,"anchorID"in i&&(h[0].autoBookmark.anchorID=i.anchorID)):h[0].autoBookmark.pageID=i,h[0].autoBookmark.datetime=n,s?localStorage[this.prefix+e]=JSON.stringify(h[0]):(u.contents[this.prefix+e]=h[0],this.setCookie(u)),!0},n.prototype.getCookie=function(){var t=document.cookie.split("; ");for(i=0;i<t.length;i++){var n=t[i].split("=");if(n[0]==this.prefix+"setting"){var r=null;try{r=JSON.parse(unescape(n[1]))}catch(t){r=null}return delete n,r}}return delete n,null},n.prototype.setCookie=function(t){document.cookie=this.prefix+"setting="+escape(JSON.stringify(t))+"; domain="+location.host+"; path=/; expires=Tue, 19-Jan-2038 00:00:00 GMT;"},n.prototype.getDate2YMDHMSZ=function(t){try{var i=t.getFullYear(),n=t.getMonth()+1,r=t.getDate(),e=t.getHours(),s=t.getMinutes(),h=t.getSeconds(),u=t.getMilliseconds();return t=null,("0000"+i).slice(-4)+("00"+n).slice(-2)+("00"+r).slice(-2)+("00"+e).slice(-2)+("00"+s).slice(-2)+("00"+h).slice(-2)+("000"+u).slice(-3)}catch(t){return null}},n.prototype.getYMD2Date=function(t){if(null===t||null==t)return null;if(null!==t.setTime&&null!=t.setTime)return getYMD2Date(getDate2YMDHMSZ(t));try{var i=t.length;if(i<4)return null;var n=0,r=1,e=1,s=0,h=0,u=0,o=0;4<=i&&(n=parseInt(t.substring(0,4),10)),6<=i&&(r=parseInt(t.substring(4,6),10)),8<=i&&(e=parseInt(t.substring(6,8),10)),10<=i&&(s=parseInt(t.substring(8,10),10)),12<=i&&(h=parseInt(t.substring(10,12),10)),14<=i&&(u=parseInt(t.substring(12,14),10)),17<=i?o=parseInt(t.substring(14,17),10):16<=i&&(o=10*parseInt(t.substring(14,16),10)),t=null;var a=new Date(n,r-1,e,s,h,u);return isNaN(a.getTime())?(delete a,null):(a.setMilliseconds(o),a)}catch(t){return null}};var y,t,r,e=function(){this.ajaxSuccess=!1,this.IE=!1,this.onload=null,this.onreadystatechange=null,this.onerror=null,this.httpObj=null,this.ex=null,this.filepath=null,this.timeoutObj=new Object;try{this.httpObj=new XMLHttpRequest}catch(t){this.httpObj=null}if(null===this.httpObj){try{this.httpObj=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){this.httpObj=null}if(null===this.httpObj)try{this.httpObj=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){this.httpObj=null}null!==this.httpObj&&(this.IE=!0)}null!==this.httpObj&&(this.ajaxSuccess=!0)};function s(){}e.prototype.free=function(){delete this.onload,delete this.onreadystatechange,delete this.onerror,this.free_obj(this.httpObj),delete this.httpObj,this.free_obj(this.ex),delete this.ex,this.free_obj(this.filepath),delete this.filepath,null!==this.timeoutObj&&null!=this.timeoutObj&&(this.free_obj(this.timeoutObj),delete this.timeoutObj),delete this.ajaxSuccess,delete this.IE},e.prototype.clear=function(){this.onload=null,this.onreadystatechange=null,this.onerror=null,this.free_obj(this.ex),this.ex=null,this.free_obj(this.filepath),this.filepath=null;try{this.httpObj.abort()}catch(t){}},e.prototype.open=function(t,i,n,r,e){var s="GET",h=null;if(!0===n&&(s="POST",null!==r&&null!=r&&(h=r)),this.free_obj(this.ex),this.ex=null,this.free_obj(this.filepath),this.filepath=null,!1===this.ajaxSuccess||null===this.httpObj)return!1;try{var u=this.onreadystatechange,o=this.onload,a=this.onerror,f=this.httpObj;this.httpObj.onreadystatechange=null,(this.httpObj.onload=null)!==this.onreadystatechange&&(this.httpObj.onreadystatechange=function(){u(f)}),null!==this.onerror&&(this.httpObj.onerror=function(){0!==c.handle&&(clearTimeout(c.handle),c.handle=0),!1===c.isError&&(c.isError=!0,null!==a&&a(f))}),null!==this.onload&&(this.httpObj.onload=function(){0!==c.handle&&(clearTimeout(c.handle),c.handle=0),!1===c.isError&&o(f)}),this.filepath=t;var c=this.timeoutObj;return this.timeoutObj.isError=!1,null!==i&&null!=i?this.timeoutObj.handle=setTimeout(function(){0!==c.handle&&(clearTimeout(c.handle),c.handle=0),!1===c.isError&&(c.isError=!0,null!==a&&a(f))},i):c.handle=0,this.httpObj.open(s,this.filepath,!1!==e),!0===n&&this.httpObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.httpObj.send(h),!0}catch(t){return 0!==c.handle&&(clearTimeout(c.handle),c.handle=0),this.ex=t,!1===c.isError&&null!==a&&(c.isError=!0,a()),!1}},e.prototype.responseText=function(){if(this.free_obj(this.ex),this.ex=null,!1===this.ajaxSuccess||null===this.httpObj)return null;try{return this.httpObj.responseText}catch(t){return this.ex=t,null!==this.onerror&&this.onerror(),null}},e.prototype.free_obj=function(t){try{if(null===t||null==t)return;if(t instanceof Array){var i=t.length;if(0<i)for(var n=i-1;0<=n;n--)this.free_obj(t[n]),delete t[n];t.length=0}else if(t instanceof Object){if(null==t.free)return;for(var r in t.free(),t)t.hasOwnProperty(r)&&("function"!=typeof t[r]&&this.free_obj(t[r]),delete t[r])}}catch(t){}t=null},function(o){var g,t,p,i;(t=g=g||{})[t.Invalid=-1]="Invalid",t[t.Sbc=0]="Sbc",t[t.Direct=1]="Direct",t[t.Rest=2]="Rest",(i=p=p||{})[i.Invalid=-1]="Invalid",i[i.Commercial=1]="Commercial",i[i.NonMemberTrial=2]="NonMemberTrial",i[i.MemberTrial=3]="MemberTrial",o.toBinbTimestamp=function(t){var i=t instanceof Date?t:new Date(t);return("0000"+i.getFullYear().toString(10)).slice(-4)+("00"+(i.getMonth()+1).toString(10)).slice(-2)+("00"+i.getDay().toString(10)).slice(-2)+("00"+i.getHours().toString(10)).slice(-2)+("00"+i.getMinutes().toString(10)).slice(-2)+("00"+i.getSeconds().toString(10)).slice(-2)+("000"+i.getMilliseconds().toString(10)).slice(-3)},o.fromBinbTimestamp=function(t){var i=(t+"00000000000000000").substr(0,17),n=parseInt("0"+i.substr(0,4),10),r=parseInt("0"+i.substr(4,2),10),e=parseInt("0"+i.substr(6,2),10),s=parseInt("0"+i.substr(8,2),10),h=parseInt("0"+i.substr(10,2),10),u=parseInt("0"+i.substr(12,2),10),o=parseInt("0"+i.substr(14,3),10);return new Date(n,r-1,e,s,h,u,o)};var n=(w.load=function(t,u,o,a){var f=o&&o.k?o.k:this.H(u),c=o&&o.baseurl?o.baseurl:"",i=!!o&&o.useHighQualityImage,n=!!o&&o.forceQualityParameterRequest,r=!(!o||!o.iOSPixelCountLimit),e=new y.UrlParser(t,c),s={};["u0","u1","u2","u3","u4","u5","u6","u7","u8","u9"].forEach(function(t){var i=e.query.get(t);void 0!==i&&(s[t]=i)}),null===w.z&&(w.z=new b);var h=w.z.getExtQueryAndCreateCookie();if(h)for(var l in h)s[l]=h[l],e.query.set(l,h[l]);e.query.set("cid",u),e.query.set("k",f),e.query.set("dmytime",(new Date).getTime().toString()),e.query.sortByKey();var v=e.toString(),d=new w(u,s,i,n,r);return y.AjaxLoader.fromUrl(v).then(function(t){var i;try{i=JSON.parse(t),d.$=i}catch(t){return $.reject("Invalid JSON object.")}if(a&&a(d.$))return $.reject(new y.CanceledLoadContentError("Cancelled."));var n=w._(i,u,f,c);if(n instanceof Error)return $.reject(n);d.V=v,d.X=n,d.q(),d.Y();var r,e=!(!o||!o.memberTrialAsCommercial)&&o.memberTrialAsCommercial;d.Z(e);var s,h="";return d.X.servertype===g.Direct?(h="DataGet_Content",(r=new y.UrlParser("content.js",d.X.sbcurl)).query.set("dmytime",d.Q||(new Date).getTime().toString())):d.X.servertype===g.Rest?(r=new y.UrlParser("content",d.X.sbcurl),d.Q&&r.query.set("dmytime",d.Q)):((r=new y.UrlParser("sbcGetCntnt.php",d.X.sbcurl)).query.set("cid",u),d.X.token&&r.query.set("p",d.X.token),r.query.set("vm",d.X.viewmode.toString()),r.query.set("dmytime",d.Q||(new Date).getTime().toString())),Object.keys(d.K).forEach(function(t){r.query.set(t,d.K[t])}),d.X.servertype===g.Rest&&r.query.sortByKey(),s=r.toString(),y.AjaxLoader.fromUrl(s,h)}).then(function(t){var i=w.tt(t);return i instanceof Error?$.reject(i):(d.it=i,$.resolve(d))})},w.H=function(t){var n=y.getRandomString(16),i=Array(Math.ceil(16/t.length)+1).join(t),r=i.substr(0,16),e=i.substr(-16,16),s=0,h=0,u=0;return n.split("").map(function(t,i){return s^=n.charCodeAt(i),h^=r.charCodeAt(i),u^=e.charCodeAt(i),t+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"[s+h+u&63]}).join("")},Object.defineProperty(w.prototype,"direction",{get:function(){if(null===this.nt){if(null===this.it)return y.Direction.Unset;this.nt=y.Direction.Unset;var t=this.it.ttx.match(/<t-time\s+[^>]*pagedirection\s*=\s*"([^"]+)"[^>]*>/);if(t&&("left"===t[1].toLowerCase()?this.nt=y.Direction.RTL:"right"===t[1].toLowerCase()&&(this.nt=y.Direction.LTR)),this.nt===y.Direction.Unset&&"dotbook"===this.it.type){this.nt=y.Direction.RTL;var i=this.it.prop.match(/\bstroke\s*:\s*"([^"]+)"/);i&&"yoko"===i[1].toLowerCase()&&(this.nt=y.Direction.LTR)}}return this.nt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"timgsPortrait",{get:function(){if(null===this.rt){var t=this.it.ttx.replace(/<t-nocase\s+[^>]*screen\.portrait[^>]*>.*?<\/t-nocase>/gim,"");this.rt=w.et(t,this.it.searchXml,this.X.stbl,this.X.ttbl)}return this.rt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"timgsLandscape",{get:function(){if(null===this.st){var t=this.it.ttx.replace(/<t-case\s+[^>]*screen\.portrait[^>]*>(.*?)<\/t-case>/gim,"");this.st=w.et(t,this.it.searchXml,this.X.stbl,this.X.ttbl)}return this.st},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"mapInfo",{get:function(){return null===this.ht&&(this.ht=y.ContentTextParser.getMapInfoFromString(this.it.ttx)),this.ht},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"toc",{get:function(){return null===this.ut&&(this.ut=y.ContentTextParser.getTocFromString(this.it.ttx)),this.ut},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"textPositionLevel",{get:function(){if(-1===this.ot&&null!==this.it){var t=this.it.searchXml;if(t){var i=t.firstElementChild||t.firstChild||null,n=i?parseInt(i.getAttribute("version"),10):1;this.ot=n||1}else this.ot=0}return this.ot},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"permissions",{get:function(){return this.ft||{selection:y.ContentPermissionState.Unset,maxSelectionLength:0}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaginated",{get:function(){return!this.it||this.it.isPaginated},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"rawBibGetCntntInfoResponse",{get:function(){return this.$},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"rawTTX",{get:function(){return this.it.ttx},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cid",{get:function(){return this.ct},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"requestUrl",{get:function(){return this.V},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"saveBookmarkToServer",{get:function(){return this.lt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"useAutoBookmarkOutsideOfContent",{get:function(){if(this.$&&this.$.items&&this.$.items[0]){var t=this.$.items[0];if("OutOfRangeAutoBookmarkBehavior"in t&&"latest"===t.OutOfRangeAutoBookmarkBehavior)return!0}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"bibliography",{get:function(){return this.vt},enumerable:!1,configurable:!0}),w.prototype.getImageUrl=function(t,i){var n,r=this,e="singlequality"===this.it.imageClass;if(this.X.servertype===g.Direct){var s=e?"M.jpg":this.dt?"M_H.jpg":"M_L.jpg";n=new y.UrlParser(s,new y.UrlParser(t+"/",this.X.sbcurl)),this.Q&&n.query.set("dmytime",this.Q)}else this.X.servertype===g.Rest?(n=new y.UrlParser("img/"+t,this.X.sbcurl),e||this.dt||n.query.set("q","1"),y.UserAgent.os.iOS&&this.bt&&n.query.set("pmax","2000000"),this.Q&&n.query.set("dmytime",this.Q),Object.keys(this.K).forEach(function(t){n.query.set(t,r.K[t])},this)):((n=new y.UrlParser("sbcGetImg.php",this.X.sbcurl)).query.set("cid",this.ct),n.query.set("src",encodeURIComponent(t)),this.X.token&&n.query.set("p",this.X.token),e&&!this.gt||n.query.set("q",this.dt?"0":"1"),n.query.set("vm",this.X.viewmode.toString()),y.UserAgent.os.iOS&&this.bt&&n.query.set("pmax","2000000"),this.Q&&n.query.set("dmytime",this.Q),Object.keys(this.K).forEach(function(t){n.query.set(t,r.K[t])},this));return i&&Object.keys(i).forEach(function(t){n.query.set(t,i[t])}),this.X.servertype===g.Rest&&n.query.sortByKey(),n.toString()},w.prototype.getImageDescrambleCoords=function(t,i,n){var r=this.pt(t.src);if(!r||!r.mt())return null;var e=r.wt({width:i,height:n});return{width:e.width,height:e.height,transfers:[{index:0,coords:r.yt({width:i,height:n})}]}},w.prototype.createBookmarkObject=function(){var e=this;return this.Ot?new h(this.Ot,function(t){var i=-1;if(0<=t&&t<e.timgsLandscape.length){var n=e.timgsLandscape[t].id.replace(/^\D*/,"");n.match(/^\d+$/)&&(i=parseInt(n,10))}return i},function(t){for(var i=-1,n=0;n<e.timgsLandscape.length;n++){var r=e.timgsLandscape[n].id.replace(/^\D*/,"");if(r.match(/^\d+$/)&&t===parseInt(r,10)){i=n;break}}return i}):null},w.prototype.pt=function(t){var i=[0,0];if(t){for(var n=t.lastIndexOf("/")+1,r=t.length-n,e=0;e<r;e++)i[e%2]+=t.charCodeAt(e+n);i[0]%=8,i[1]%=8}var s=this.X.ptbl[i[0]],h=this.X.ctbl[i[1]];return"="===h.charAt(0)&&"="===s.charAt(0)?new f(h,s):h.match(/^[0-9]/)&&s.match(/^[0-9]/)?new a(h,s):""===h&&""===s?new u:null},w.prototype.q=function(){var t,i,n=this.$.items[0];if(this.ft={selection:y.ContentPermissionState.Unset},"Permissions"in n){var r=n.Permissions;if("Selection"in r&&(this.ft.selection=(t=r.Selection.toString(),"granted"===(i=t.toLowerCase())?y.ContentPermissionState.Granted:"denied"===i?y.ContentPermissionState.Denied:y.ContentPermissionState.Unset)),"MaxSelectionLength"in r){var e=parseInt(r.MaxSelectionLength,10);!isNaN(e)&&0<e&&(this.ft.maxSelectionLength=e)}}},w.prototype.Y=function(){var t={title:"",author:"",publisher:"",description:""},i=this.$.items[0];"Title"in i&&(t.title=i.Title);var n="";if("Authors"in i)for(var r=i.Authors,e=0;e<r.length;e++)0<n.length&&(n+=", "),"Name"in r[e]&&(n+=r[e].Name);t.author=n,"Publisher"in i&&(t.publisher=i.Publisher),"Description"in i&&""!=i.Description?t.description=i.Description:"Abstract"in i&&(t.description=i.Abstract),this.vt=t,this.Q="ContentDate"in i?i.ContentDate:""},w.prototype.Z=function(t){var i=this;if(this.X.viewmode===p.Commercial||t&&this.X.viewmode===p.MemberTrial){var n=new y.UrlParser(this.V),r=new y.UrlParser(this.V);r.query=new y.PairArray,r.fragment="";var e=n.path.match(/[^/]*$/)[0],s=e.lastIndexOf("."),h=s<=0?"":e.substr(s),u=new y.UrlParser("bibGetMemo"+h,r);u.query.set("cid",this.ct),Object.keys(this.K).forEach(function(t){u.query.set(t,i.K[t])},this);var o=new y.UrlParser("bibRegMemo"+h,r);o.query.set("cid",this.ct),Object.keys(this.K).forEach(function(t){o.query.set(t,i.K[t])},this);var a=new y.UrlParser("bibDelMemo"+h,r);a.query.set("cid",this.ct),Object.keys(this.K).forEach(function(t){a.query.set(t,i.K[t])},this),this.Ot={bibGetMemo:u,bibRegMemo:o,bibDelMemo:a,sortByKey:this.X.servertype===g.Rest},this.lt=!0}else this.Ot=null,this.lt=!1},w.Mt=function(t,i,n){for(var r=t+":"+i,e=0,s=0;s<r.length;s++)e+=r.charCodeAt(s)<<s%16;0==(e&=2147483647)&&(e=305419896);var h="",u=e;for(s=0;s<n.length;s++){u=u>>>1^1210056708&-(1&u);var o=(n.charCodeAt(s)-32+u)%94+32;h+=String.fromCharCode(o)}try{return JSON.parse(h)}catch(t){}return null},w._=function(t,i,n,r){if(!("result"in t))return new Error("Is not a return value of bibGetCntntInfo API.");if(1!==t.result)return new Error("Failed to execute bibGetCntntInfo API.");if(!("items"in t&&Array.isArray(t.items)))return new Error("There is no item.");var e=t.items[0];if(!("ContentsServer"in e&&e.ContentsServer))return new Error("Undefined ContentsServer.");if("string"!=typeof e.ContentsServer)return new Error("Invalid type of ContentsServer.");var s=e.ContentsServer.replace(/\/?$/,"/"),h=new y.UrlParser(s,r).toString();if(!("ViewMode"in e))return new Error("Missing ViewMode.");var u=g.Invalid,o="ServerType"in e?parseInt(e.ServerType,10):0;if(0===o)u=g.Sbc;else if(1===o)u=g.Direct;else{if(2!==o)return new Error("Invalid value of ServerType.");u=g.Rest}var a="p"in e?e.p:null;if(a){if(null!==a&&"string"!=typeof a)return new Error("Invalid type of request token.")}else a="null";var f=p.Invalid,c=parseInt(e.ViewMode,10);if(-1===c)return new Error("Can't read via ViewMode.");if(1===c)f=p.Commercial;else if(2===c)f=p.NonMemberTrial;else{if(3!==c)return new Error("Invalid value of ViewMode.");f=p.MemberTrial}if(!("stbl"in e&&"ttbl"in e&&"ctbl"in e&&"ptbl"in e))return new Error("Missing scramble table.");try{var l=y.toNumberArray(w.Mt(i,n,e.stbl)),v=y.toNumberArray(w.Mt(i,n,e.ttbl)),d=y.toStringArray(w.Mt(i,n,e.ctbl)),b=y.toStringArray(w.Mt(i,n,e.ptbl))}catch(t){return new Error("Invalid format of scramble table.")}return{sbcurl:h,servertype:u,viewmode:f,token:a,stbl:l,ttbl:v,ctbl:d,ptbl:b}},w.tt=function(t){var i;if("string"==typeof t){var n=t.replace(/^[A-Za-z0-9_-]+\((.*)\)$/m,"$1");try{i=JSON.parse(n)}catch(t){return new Error("Invalid JSON/JSONP object.")}}else i=t;if(!("result"in i))return new Error("Is not a return value of sbcGetCntnt API / content.js.");if(1!==i.result)return new Error("Failed to execute sbcGetCntnt API / content.js.");if(!("ttx"in i))return new Error("Missing TTX.");var r=i.ttx;if("string"!=typeof r)return new Error("Invalid type of ttx.");var e=(i.prop||"").toString(),s=null;if("SearchData"in i){var h=new DOMParser;try{s=h.parseFromString(i.SearchData,"text/xml")}catch(t){s=null}s&&"parsererror"!==s.documentElement.nodeName||(s=null)}var u=(i.ConverterType||"").toString(),o=(i.ImageClass||"").toString(),a=!0;return"IsTateyomi"in i&&(a=!i.IsTateyomi),{ttx:r,prop:e,searchXml:s,type:u,imageClass:o,isPaginated:a}},w.et=function(t,i,n,r){var e,s=/<(t-pb|t-img|img|a)(\s+([^>]*)|)>/gi,h=[],u=[],o=0;if(i){var a=i.firstElementChild||i.firstChild||null,f=a?parseInt(a.getAttribute("version"),10):1;o=f||1}for(;e=s.exec(t);){var c=e[1].toLowerCase(),l=y.getTagAttributes(e[2]);if("t-pb"===c)h=[];else if("t-img"===c||"img"===c){var v={id:"",src:"",orgwidth:0,orgheight:0,pagespread:y.PageSpread.Unset,anchors:h.concat(),texts:[],usemap:""};for(var d in l)if("id"===d)v.id=l[d];else if("src"===d)v.src=l[d];else if("orgwidth"===d)v.orgwidth=parseInt(l[d],10);else if("orgheight"===d)v.orgheight=parseInt(l[d],10);else if("a"===d){var b=parseInt(l[d],10);0<=b&&b<30&&(v.pagespread=[y.PageSpread.Center,y.PageSpread.Left,y.PageSpread.Right][Math.floor(b/10)])}else"usemap"===d&&(v.usemap=l[d]);if(v.src&&v.orgwidth&&v.orgheight){if(0<o){var g=i.querySelector('item[href="'+v.src+'"]');g&&(v.texts=2===o?w.jt(g,v.orgwidth,v.orgheight,n,r):w.xt(g,v.orgwidth,v.orgheight,n,r))}u.push(v)}h=[]}else if("a"===c)for(var d in l)"name"===d&&h.push(l[d])}return u},w.xt=function(t,i,n,r,e){var s=t.textContent;return s?[{text:s,codepoints:w.St(s,r,e),left:0,top:0,right:i,bottom:n}]:[]},w.jt=function(t,i,n,r,e){if(!t.hasChildNodes())return[];var s=parseFloat(t.getAttribute("width")),h=parseFloat(t.getAttribute("height"));if(y.isReallyNaN(s)||y.isReallyNaN(h))return[];for(var u=i/s,o=n/h,a=[],f=t.childNodes,c=0;c<f.length;c++){var l=f[c];if(l.nodeType===Node.ELEMENT_NODE&&"w"===l.nodeName){var v=l,d=parseFloat(v.getAttribute("l")),b=parseFloat(v.getAttribute("t")),g=parseFloat(v.getAttribute("r")),p=parseFloat(v.getAttribute("b"));(y.isReallyNaN(d)||y.isReallyNaN(b)||y.isReallyNaN(g)||y.isReallyNaN(p))&&(b=d=0,g=i,p=n);var m=v.textContent;m&&a.push({text:v.textContent,codepoints:w.St(m,r,e),left:d*u,top:b*o,right:g*u,bottom:p*o})}}return a},w.St=function(t,r,e){return y.buildSearchTextArray(t.replace(/&\$[0-9A-Za-z]+;/g,function(t){var i=parseInt(t.slice(2,-1),36),n=63&i;return"&#x"+Math.floor(((i-n>>6)-e[n])/r[n]).toString(16)+";"}))},w.z=null,w);function w(t,i,n,r,e){this.Ot=null,this.dt=!1,this.gt=!1,this.bt=!1,this.it=null,this.nt=null,this.rt=null,this.st=null,this.ht=null,this.vt=null,this.ut=null,this.ot=-1,this.ft=null,this.ct=t,this.K=i,this.dt=n,this.gt=r,this.bt=e}o.Reader=n;var u=(r.prototype.mt=function(){return!0},r.prototype.It=function(t){return!1},r.prototype.wt=function(t){return t},r.prototype.yt=function(t){return[{xsrc:0,ysrc:0,width:t.width,height:t.height,xdest:0,ydest:0}]},r);function r(){}var a=(e.prototype.mt=function(){return null!==this.Et&&null!==this.Tt},e.prototype.It=function(t){return 64<=t.width&&64<=t.height&&102400<=t.width*t.height},e.prototype.wt=function(t){return t},e.prototype.yt=function(t){if(!this.mt())return null;if(!this.It(t))return[{xsrc:0,ysrc:0,width:t.width,height:t.height,xdest:0,ydest:0}];for(var i=[],n=t.width-t.width%8,r=Math.floor((n-1)/7)-Math.floor((n-1)/7)%8,e=n-7*r,s=t.height-t.height%8,h=Math.floor((s-1)/7)-Math.floor((s-1)/7)%8,u=s-7*h,o=this.Et.piece.length,a=0;a<o;a++){var f=this.Et.piece[a],c=this.Tt.piece[a];i.push({xsrc:Math.floor(f.x/2)*r+f.x%2*e,ysrc:Math.floor(f.y/2)*h+f.y%2*u,width:Math.floor(f.w/2)*r+f.w%2*e,height:Math.floor(f.h/2)*h+f.h%2*u,xdest:Math.floor(c.x/2)*r+c.x%2*e,ydest:Math.floor(c.y/2)*h+c.y%2*u})}var l=r*(this.Et.ndx-1)+e,v=h*(this.Et.ndy-1)+u;return l<t.width&&i.push({xsrc:l,ysrc:0,width:t.width-l,height:v,xdest:l,ydest:0}),v<t.height&&i.push({xsrc:0,ysrc:v,width:t.width,height:t.height-v,xdest:0,ydest:v}),i},e.prototype.Pt=function(t){if(!t)return null;var i=t.split("-");if(3!=i.length)return null;var n=parseInt(i[0],10),r=parseInt(i[1],10),e=i[2];if(e.length!=n*r*2)return null;for(var s,h,u,o,a=(n-1)*(r-1)-1,f=n-1+a,c=r-1+f,l=1+c,v=[],d=0;d<n*r;d++)s=this.Ct(e.charAt(2*d)),h=this.Ct(e.charAt(2*d+1)),d<=a?o=u=2:d<=f?(u=2,o=1):d<=c?(u=1,o=2):d<=l&&(o=u=1),v.push({x:s,y:h,w:u,h:o});return{ndx:n,ndy:r,piece:v}},e.prototype.Ct=function(t){var i=0,n="ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(t);return n<0?n="abcdefghijklmnopqrstuvwxyz".indexOf(t):i=1,i+2*n},e);function e(t,i){this.Et=null,this.Tt=null;var n=this.Pt(t),r=this.Pt(i);n&&r&&n.ndx===r.ndx&&n.ndy===r.ndy&&(this.Et=n,this.Tt=r)}var f=(s.prototype.mt=function(){return null!==this.At},s.prototype.It=function(t){var i=2*this.T*this.kt,n=2*this.j*this.kt;return t.width>=64+i&&t.height>=64+n&&t.width*t.height>=(320+i)*(320+n)},s.prototype.wt=function(t){return this.It(t)?{width:t.width-2*this.T*this.kt,height:t.height-2*this.j*this.kt}:t},s.prototype.yt=function(t){if(!this.mt())return null;if(!this.It(t))return[{xsrc:0,ysrc:0,width:t.width,height:t.height,xdest:0,ydest:0}];for(var i=t.width-2*this.T*this.kt,n=t.height-2*this.j*this.kt,r=Math.floor((i+this.T-1)/this.T),e=i-(this.T-1)*r,s=Math.floor((n+this.j-1)/this.j),h=n-(this.j-1)*s,u=[],o=0;o<this.T*this.j;++o){var a=o%this.T,f=Math.floor(o/this.T),c=this.kt+a*(r+2*this.kt)+(this.Dt[f]<a?e-r:0),l=this.kt+f*(s+2*this.kt)+(this.Nt[a]<f?h-s:0),v=this.At[o]%this.T,d=Math.floor(this.At[o]/this.T),b=v*r+(this.Lt[d]<v?e-r:0),g=d*s+(this.Rt[v]<d?h-s:0),p=this.Dt[f]===a?e:r,m=this.Nt[a]===f?h:s;0<i&&0<n&&u.push({xsrc:c,ysrc:l,width:p,height:m,xdest:b,ydest:g})}return u},s.prototype.Pt=function(t){var i,n=[],r=[],e=[];for(i=0;i<this.T;i++)n.push(s.Ft[t.charCodeAt(i)]);for(i=0;i<this.j;i++)r.push(s.Ft[t.charCodeAt(this.T+i)]);for(i=0;i<this.T*this.j;i++)e.push(s.Ft[t.charCodeAt(this.T+this.j+i)]);return{t:n,n:r,p:e}},s.Ft=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],s);function s(t,i){this.At=null;var n=t.match(/^=([0-9]+)-([0-9]+)([-+])([0-9]+)-([-_0-9A-Za-z]+)$/),r=i.match(/^=([0-9]+)-([0-9]+)([-+])([0-9]+)-([-_0-9A-Za-z]+)$/);if(null!==n&&null!==r&&n[1]===r[1]&&n[2]===r[2]&&n[4]===r[4]&&"+"===n[3]&&"-"===r[3]&&(this.T=parseInt(n[1],10),this.j=parseInt(n[2],10),this.kt=parseInt(n[4],10),!(8<this.T||8<this.j||64<this.T*this.j))){var e=this.T+this.j+this.T*this.j;if(n[5].length===e&&r[5].length===e){var s=this.Pt(n[5]),h=this.Pt(r[5]);this.Lt=s.n,this.Rt=s.t,this.Dt=h.n,this.Nt=h.t,this.At=[];for(var u=0;u<this.T*this.j;u++)this.At.push(s.p[h.p[u]])}}}var h=(Object.defineProperty(c.prototype,"count",{get:function(){return this.Jt.size},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"limit",{get:function(){return this.Bt},enumerable:!1,configurable:!0}),c.prototype.clear=function(){return!this.Ht&&(this.Jt.clear(),!0)},c.prototype.add=function(t){return!(this.Ht||0<=this.Bt&&this.count>=this.Bt||(this.Jt.set(t,Date.now()),0))},c.prototype.delete=function(t){return!this.Ht&&this.Jt.delete(t)},c.prototype.has=function(t){return this.Jt.has(t)},c.prototype.toArray=function(){var n=[];return this.Jt.forEach(function(t,i){n.push(i)}),n},c.prototype.import=function(){var u=this;if(this.Ht)return $.reject(new Error("Couldn't import because exporting BinB Bookmark."));var t="";if(this.zt){var i=new y.UrlParser(this.zt.bibGetMemo);i.query.set("dmytime",(new Date).getTime().toString()),t=i.toString()}return(t?y.AjaxLoader.fromUrl(t).then(function(t){var i;try{i=JSON.parse(t)}catch(t){return $.reject(new Error("Response invalid JSON object from bibGetMemo API."))}if(!("result"in i))return $.reject(new Error("bibGetMemo API returned no result value."));if(1!==i.result&&-151!==i.result)return $.reject(new Error("bibGetMemo API failed with result value "+i.result.toString()+"."));var n="MaxCount"in i&&0<=i.MaxCount?i.MaxCount:-1,h=new _;return"items"in i&&i.items.forEach(function(t){if("ID"in t&&"Memo"in t){var i=void 0;try{i=JSON.parse(t.Memo)}catch(t){i={}}if("StartAddress"in i){var n=i.StartAddress,r=u.$t(n);if(0<=r){var e=t.ID,s="SettingDate"in i?o.fromBinbTimestamp(i.SettingDate).getTime():Date.now();h.set(r,{mid:e,createAt:s,contentpage:n})}}}}),$.resolve({limit:n,items:h})}):$.resolve({limit:-1,items:new _})).then(function(t){u.Bt=t.limit,u._t=t.items;var n=new _;return t.items.forEach(function(t,i){n.set(i,t.createAt)}),u.Jt=n,$.resolve()})},c.prototype.export=function(){var s=this;if(!this.zt)return $.resolve();var h=[],n=[];return this.Jt.forEach(function(t,i){var n=null;if(s._t.has(i)){var r=s._t.get(i);if(r.createAt===t)return;n=r.mid}var e=s.Vt(i);0<=e&&h.push({mid:n,page:i,contentpage:e,data:JSON.stringify({SettingDate:o.toBinbTimestamp(t),StartAddress:e})})}),this._t.forEach(function(t,i){s.Jt.has(i)||n.push({mid:t.mid,page:i})}),this.Ht=!0,$.all(n.map(function(r){var t=new y.UrlParser(s.zt.bibDelMemo);return t.query.set("mid",r.mid),t.query.set("dmytime",(new Date).getTime().toString()),y.AjaxLoader.fromUrl(t.toString()).then(function(t){var i,n=" [mid="+r.mid+"]";try{i=JSON.parse(t)}catch(t){return $.reject(new Error("Response invalid JSON object from bibDelMemo API"+n+"."))}return"result"in i?1!==i.result?$.reject(new Error("bibDelMemo API failed with result value"+n+".")):(s._t.delete(r.page),$.resolve()):$.reject(new Error("bibDelMemo API returned no result value"+n+"."))})})).then(function(){return $.all(h.map(function(e){var t=new y.UrlParser(s.zt.bibRegMemo);return t.query.set("data",e.data),e.mid&&t.query.set("mid",e.mid),t.query.set("dmytime",(new Date).getTime().toString()),s.zt.sortByKey&&t.query.sortByKey(),y.AjaxLoader.fromUrl(t.toString()).then(function(t){var i,n,r=e.mid?" [mid="+e.mid+"]":" [new mid]";try{i=JSON.parse(t)}catch(t){return $.reject(new Error("Response invalid JSON object from bibRegMemo API"+r+"."))}return"result"in i?1!==i.result?$.reject(new Error("bibRegMemo API failed with result value"+r+".")):"id"in i?(n=i.id,s._t.set(e.page,{mid:n,createAt:s.Jt.get(e.page),contentpage:e.contentpage}),$.resolve()):$.reject(new Error("bibRegMemo API returned no id value"+r+".")):$.reject(new Error("bibRegMemo API returned no result value"+r+"."))})}))}).then(function(){s._t.size,s.Jt.size,s.Ht=!1}).catch(function(t){return s.Ht=!1,$.reject(t)})},c);function c(t,i,n){this.zt=null,this.Vt=null,this.$t=null,this.Ht=!1,this.Bt=-1,this.Jt=new _,this._t=new _,this.zt=t,this.$t=n,this.Vt=i}o.BinbBookmark=h;var l=(v.prototype.load=function(){var o=this;return this.Gt?new $(function(h,u){o.Ut.getAutoBookmark(function(){var t=o.Ut.currentPageID+"",i=t.replace(/^\D*/,"");if(i.match(/^\d+$/)){for(var n=parseInt(i,10),r=0;r<o.Xt.page.length;r++)if(o.Xt.page[r].isContent){var e=o.Xt.page[r].image.id.replace(/^\D*/,"");if(e.match(/^\d+$/)&&n<=parseInt(e,10))return void h(r)}var s=o.Ut.currentAnchorID||"";if(o.qt&&s)for(r=0;r<o.Xt.page.length;r++)if(!o.Xt.page[r].isContent&&o.Xt.page[r].image.id===s)return void h(r);u(new Error("Out of Content PageID."))}else u(new Error("Invalid AutoBookmark PageID."))},null)}):$.resolve(0)},v.prototype.save=function(t,n){var r=this;if(this.Gt&&0<=t&&t<this.Xt.page.length){for(var i=t,e=!0;0<=i&&!this.Xt.page[i].isContent;)i--,e=!1;if(i<0)return $.resolve();var s=this.Xt.page[i].image.id.replace(/^\D*/,"");if(!s.match(/^\d+/))return $.reject(new Error("Invalid PageID"));var h=s;if(!e){var u=s.length;h={pageID:(Array(u+1).join("0")+(parseInt(s,10)+1).toString(10)).slice(-u),anchorID:this.Xt.page[t].image.id}}return new $(function(t,i){r.Ut.setAutoBookmark(h,function(){t()},function(){i(new Error("Failed to set AutoBookmark"))},n)})}return $.resolve()},v);function v(t,i){this.Xt=t,this.Gt=i.enabled;var n=t.reader.saveBookmarkToServer,r=new y.UrlParser(this.Xt.reader.requestUrl);r.query.remove("cid","Data");var e=new y.UrlParser(r);e.path=e.path.replace(/bibGetCntntInfo([^\/]*)$/,"bibGetCntSetting$1");var s=e.toString(),h=new y.UrlParser(r);h.path=h.path.replace(/bibGetCntntInfo([^\/]*)$/,"bibUdtCntSetting$1");var u=h.toString();this.Ut=new d(this.Xt.reader.cid),0<=i.externalSaveInterval?(this.Ut.useServer=n,this.Ut.serverUpdateIntervalTime=i.externalSaveInterval):this.Ut.useServer=!1,this.Ut.bibGetCntSettingPath=s,this.Ut.bibUdtCntSettingPath=u,this.qt=t.reader.useAutoBookmarkOutsideOfContent}o.BinbAutoBookmarkAccessor=l}((y=g=g||{}).Binb||(y.Binb={})),t=g=g||{},s.prototype.load=function(){return $.resolve(-1)},s.prototype.save=function(t,i){return $.resolve()},r=s,t.EmptyAutoBookmarkAccessor=r;var h,o,u,a,f,c,p,l,v,g,z=this&&this.Yt||(h=function(t,i){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}h(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),$=$||core.Promise,_=_||core.Map,V=V||core.Symbol;if(Object.setPrototypeOf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,i){return t.__proto__=i,t}:function(t,i){for(var n in i)t.hasOwnProperty(n)||(t[n]=i[n])}),"function"!=typeof Object.assign&&(Object.assign=function(t){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])}return i}),"function"!=typeof H.CustomEvent){function m(t,i){var n=i.bubbles||!1,r=i.cancelable||!1,e=i.detail||void 0,s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,r,e),s}m.prototype=H.Event.prototype,H.CustomEvent=m}function w(){}function O(t,i,n,r,e,s){this.parentid=t,this.cssleft=i,this.csstop=n,this.cssright=r,this.cssbottom=e,this.cssclass=s,this.Wt=O.Zt()}function M(t){this.Qt=null,this.Kt="",this.ti="",this.ii=null,this.ni=null,this.ri=l.ContentRenderer.defaultScrollMode,this.ei=!1,this.si="",this.tapArea=new l.SingleTapArea,this.onContentInfoLoaded=null,this.onLoad=null,this.onError=null,this.onPageChange=null,this.onPageScrollEnd=null,this.onScaleChange=null,this.onMenu=null,this.onSwipeToOutside=null,this.onTurnPageToOutside=null,this.onPageRendered=null,this.hi={},this.ui=t}return function(s){var t=Function("return this")();function h(){return t}s.getGlobal=h;var r,c=(r=Array,z(e,r),e.prototype.get=function(t){var i=this.length-1;for(i=0;i<this.length;i++)if(this[i].key===t)return this[i].value},e.prototype.set=function(t,i){return this.remove(t),this.push({key:t,value:i})},e.prototype.remove=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var n=this.length-1;0<=n;)n in this&&-1===t.indexOf(this[n].key)||this.splice(n,1),n--},e.prototype.sortByKey=function(t){void 0===t&&(t=!0),t?this.sort(function(t,i){return t.key<i.key?-1:t.key>i.key?1:0}):this.sort(function(t,i){return t.key<i.key?1:t.key>i.key?-1:0})},e);function e(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=r.apply(this,t)||this;return Object.setPrototypeOf(n,e.prototype),n}function i(t){for(var i=new S(0,0,H.innerWidth,H.innerHeight),n=[],r=t.length,e=0;e<r;e++){var s=t[e];if(s instanceof HTMLElement)if("none"!==getComputedStyle(s).display){var h=new S(s.getBoundingClientRect()),u=S.intersect(i,h);if(null!==u)n.push(-Math.min(u.width,u.height));else{var o=S.union(i,h);n.push(Math.max(o.width-(i.width+h.width),o.height-(i.height+h.height)))}}else n.push(1/0);else n.push(null)}return n}s.PairArray=c,s.getRandomString=function(t,i){for(var n=i||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",r=n.length,e="",s=0;s<t;s++)e+=n.charAt(Math.floor(Math.random()*r));return e},s.fromCodePoint=String.fromCodePoint||function(t){for(var i=[],n="",r=0,e=arguments.length;r!==e;++r){var s=+arguments[r];if(!(s<1114111&&s>>>0===s))throw RangeError("Invalid code point: "+s);16383<=(s<=65535?i.push(s):(s-=65536,i.push(55296+(s>>10),s%1024+56320)))&&(n+=String.fromCharCode.apply(null,i),i.length=0)}return n+String.fromCharCode.apply(null,i)},s.toStringArray=function(t){if(!Array.isArray(t))throw TypeError();if(t.some(function(t){return"string"!=typeof t}))throw TypeError();return t},s.toNumberArray=function(t){if(!Array.isArray(t))throw TypeError();if(t.some(function(t){return"number"!=typeof t}))throw TypeError();return t},s.addClass=function(t,i){t.classList?t.classList.contains(i)||t.classList.add(i):-1===(" "+t.className+" ").indexOf(" "+i+" ")&&(t.className+=" "+i)},s.removeClass=function(t,i){if(t.classList)t.classList.contains(i)&&t.classList.remove(i);else{var n=" "+t.className+" ";-1!==n.indexOf(" "+i+" ")&&(t.className=n.replace(" "+i+" "," ").trim())}},s.removeAllChildren=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},s.getWindowClientSize=function(){var t=0,i=0;return H.innerWidth?t=H.innerWidth:document.documentElement&&0!==document.documentElement.clientWidth?t=document.documentElement.clientWidth:document.body&&(t=document.body.clientWidth),H.innerHeight?i=H.innerHeight:document.documentElement&&0!==document.documentElement.clientHeight?i=document.documentElement.clientHeight:document.body&&(i=document.body.clientHeight),{width:t,height:i}},s.getDistanceFromWindow=function(t){return i([t])[0]},s.getDistancesFromWindow=i,s.UserAgent=function(t){var i,n,r,e,s,h,u,o,a,f=(i=t.userAgent.toLowerCase(),n=-1!==i.indexOf("ipad"),r=-1!==i.indexOf("iphone"),e=-1!==i.indexOf("ipod"),s=n||r||e,h=-1!==i.indexOf("mac")&&!s&&"ontouchend"in H.document,u=function(){if(s){var t=i.match(/os (\d+)_(\d+)_?(\d+)?/);if(t)return{major:parseInt(t[1],10),minor:parseInt(t[2],10),revision:parseInt(t[3]||"0",10)}}return{major:0,minor:0,revision:0}}(),o=-1!==i.indexOf("chrome")||-1!==i.indexOf("crios"),a=!o&&-1!==i.indexOf("safari"),{device:{iPad:n,iPhone:r,iPod:e},os:{iOS:s,iPadOS:h,version:u},browser:{chrome:o,safari:a}});if(void 0!==t.userAgentData)for(var c=t.userAgentData,l=0;l<c.brands.length;l++)"Google Chrome"==c.brands[l].brand&&(f.browser.chrome=!0,f.browser.safari=!1);return f}(H.navigator),s.timer=H.performance?function(){return H.performance.now()}:function(){return+new Date};var n=!(!H.requestAnimationFrame||!H.cancelAnimationFrame||s.UserAgent.os.iOS&&13<=s.UserAgent.os.version.major||s.UserAgent.os.iPadOS);s.requestAnimationFrame=n?function(t){return H.requestAnimationFrame(t)}:function(t){return H.setTimeout(t,16)},s.cancelAnimationFrame=n?function(t){H.cancelAnimationFrame(t)}:function(t){H.clearTimeout(t)},s.isReallyNaN=function(t){return t!=t};var o=function(t){for(var i=[],n=0;n<t.length;n++)i[t.charCodeAt(n)]=n;return i["=".charCodeAt(0)]=0,i}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function u(t){var i,n,r,e=t.length,s=t.slice(e-2).split("=").length-1,h=3*Math.floor((e+3)/4)-s,u=new Uint8Array(h);for(n=i=0;n<e;i+=3,n+=4)r=o[t[n].charCodeAt(0)]<<18|o[t[n+1].charCodeAt(0)]<<12|o[t[n+2].charCodeAt(0)]<<6|o[t[n+3].charCodeAt(0)],u[i]=r>>16&255,u[i+1]=r>>8&255,u[i+2]=255&r;return u}function a(t){var i=document.createElement("div");return i.innerHTML=t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ /g,"&nbsp;").replace(/\r/g,"&#13;").replace(/\n/g,"&#10;"),i.textContent||i.innerText}function f(t){if(t.codePointAt)return t.codePointAt(0);if(0!==t.length){var i=t.charCodeAt(0);if(55296<=i&&i<=56319&&1<t.length){var n=t.charCodeAt(1);if(56320<=n&&n<=57343)return 1024*(i-55296)+n-56320+65536}return i}}s.decodeBase64Direct=u,s.escapeEntity=function(t){return t?t.replace(/[<>&"'`]/g,function(t){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;","`":"&#x60;"}[t]}):""},s.unescapeEntity=a,s.toCodePoint=f;var l=[32,9,10,11,12,13,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288],v=[12316,732,8128,8275,8764,8767,12336],d={65377:12290,65378:12300,65379:12301,65380:12289,65381:12539,65382:12530,65383:12449,65384:12451,65385:12453,65386:12455,65387:12457,65388:12515,65389:12517,65390:12519,65391:12483,65392:12540,65393:12450,65394:12452,65395:12454,65396:12456,65397:12458,65398:12459,65399:12461,65400:12463,65401:12465,65402:12467,65403:12469,65404:12471,65405:12473,65406:12475,65407:12477,65408:12479,65409:12481,65410:12484,65411:12486,65412:12488,65413:12490,65414:12491,65415:12492,65416:12493,65417:12494,65418:12495,65419:12498,65420:12501,65421:12504,65422:12507,65423:12510,65424:12511,65425:12512,65426:12513,65427:12514,65428:12516,65429:12518,65430:12520,65431:12521,65432:12522,65433:12523,65434:12524,65435:12525,65436:12527,65437:12531},b={12363:12364,12365:12366,12367:12368,12369:12370,12371:12372,12373:12374,12375:12376,12377:12378,12379:12380,12381:12382,12383:12384,12385:12386,12388:12389,12390:12391,12392:12393,12399:12400,12402:12403,12405:12406,12408:12409,12411:12412,12459:12460,12461:12462,12463:12464,12465:12466,12467:12468,12469:12470,12471:12472,12473:12474,12475:12476,12477:12478,12479:12480,12481:12482,12484:12485,12486:12487,12488:12489,12495:12496,12498:12499,12501:12502,12504:12505,12507:12508,12454:12532},g={12399:12401,12402:12404,12405:12407,12408:12410,12411:12413,12495:12497,12498:12500,12501:12503,12504:12506,12507:12509},p={65040:44,65041:12289,65042:12290,65043:58,65044:59,65045:33,65046:63,65047:12310,65048:12311,65049:8230,65072:8229,65073:8212,65074:8211,65075:95,65076:95,65077:65288,65078:65289,65081:12308,65082:12309,65083:12304,65084:12305,65085:12298,65086:12299,65087:12296,65088:12297,65089:12300,65090:12301,65091:12302,65092:12303,65095:91,65096:93};function m(t){return 12353<=t&&t<=12438||12449<=t&&t<=12538||11904<=t&&t<=12255||12293===t||12295===t||12347===t||13312<=t&&t<=19903||19968<=t&&t<=40959||63744<=t&&t<=64255||131072<=t&&t<=196607}s.isLogographicOrSyllabicChar=m,s.buildSearchTextArray=function(t){for(var i,n=[],r=/&[#0-9A-Za-z]+;|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\s\S]/g,e=-1,s=!1,h=-1;null!==(i=r.exec(t));){var u=i[0].toString(),o=-1;55296<=(o="&"===u[0]?f(a(u)):f(i[0].toString()))&&o<=56319?e=o:0<=o&&(0<=e&&(56320<=o&&o<=57343&&(o=1024*(e-55296)+o-56320+65536),e=-1),65281<=o&&o<=65374&&(o-=65248),o in d&&(o=d[o]),12443===o||12441===o||65438===o?o=0<n.length&&h in b?(n.pop(),b[h]):12443:12444!==o&&12442!==o&&65439!==o||(o=0<n.length&&h in g?(n.pop(),g[h]):12444),-1!==v.indexOf(o)&&(o=126),o in p&&(o=p[o]),-1!==l.indexOf(o)?(o=-1,s||m(h)||(s=!0)):(s&&!m(o)&&n.push(32),s=!1),o<=31||127<=o&&o<=159||6155<=o&&o<=6157||8203<=o&&o<=8205||8232===o||8233===o||8288===o||8419===o||55296<=o&&o<=57343||65024<=o&&o<=65039||65279===o||127995<=o&&o<=127999||129456<=o&&o<=129459||917760<=o&&o<=917999||(n.push(o),h=o))}return s&&n.push(32),n};var w=[],y=!1;s.canvasToBlob=function(t,i,n,r){var e=n||"image/png";w.push({canvas:t,callback:i,type:e,qualityArgument:r}),function n(){if(0===w.length)return;if(y)return;y=!0;var r=w.shift();s.requestAnimationFrame(function(){var t;if("msToBlob"in r.canvas&&"image/png"===r.type)t=r.canvas.msToBlob();else{var i=r.canvas.toDataURL(r.type,r.qualityArgument).split(",")[1];t=new Blob([u(i)],{type:r.type})}y=!1,r.callback(t),n()})}()};var O=(M.prototype.then=function(t,i){return this.oi.then(t,i)},M.prototype.catch=function(t){return this.oi.catch(t)},Object.defineProperty(M.prototype,"isTriggered",{get:function(){return this.ai},enumerable:!1,configurable:!0}),M.prototype.trigger=function(t){this.ai||(this.fi(t),this.ai=!0)},M);function M(t){var e=this;this.oi=null,this.ai=!1;var i=this.fi=null;this.oi=new $(function(n,r){i=function(i){t(function(t){i&&i(e),n(t)},function(t){i&&i(e),r(t)})}}),this.fi=i}V.toStringTag,s.Task=O;var j=(x.prototype.register=function(t,i){void 0===i&&(i=0);var n=new O(t);return this.ci(n,0<i?Math.floor(i):0),this.li(),n},x.prototype.ci=function(t,i){return!t.isTriggered&&(this.vi.has(i)||this.vi.set(i,[]),this.vi.get(i).push(t),!0)},x.prototype.unregister=function(t){for(var i,n=this.vi.keys();!(i=n.next()).done;){var r=i.value,e=this.vi.get(r),s=e.indexOf(t);if(-1!==s)return!t.isTriggered&&(e.splice(s,1),0===e.length&&this.vi.delete(r),!0)}return!1},x.prototype.getPriority=function(t){for(var i,n=this.vi.keys();!(i=n.next()).done;)if(-1!==this.vi.get(i.value).indexOf(t))return i.value;return-1},x.prototype.setPriority=function(t,i){this.unregister(t)&&this.ci(t,i)},x.prototype.di=function(t){for(var i,n=-1/0;!(i=t.next()).done;)n=Math.max(i.value,n);return n},x.prototype.li=function(){for(var i=this;0<this.vi.size&&this.bi.size<this.gi;){var t=this.di(this.bi.values()),n=this.di(this.vi.keys());if(n<t)break;if(n<this.pi.length&&this.bi.size>=this.pi[n])break;var r=this.vi.get(n).shift();0===this.vi.get(n).length&&this.vi.delete(n),this.bi.set(r,n),r.trigger(function(t){i.bi.has(t)&&i.bi.delete(t),i.li()})}},x);function x(t){void 0===t&&(t=1),this.pi=[],this.gi=1,this.bi=new _,this.vi=new _,"number"==typeof t?this.pi=[1<=t?Math.floor(t):1]:0===t.length?this.pi=[1]:this.pi=t.map(function(t){return 1<=t?Math.floor(t):1}),this.gi=Math.max.apply(null,this.pi)}s.TaskRunner=j;var S=(Object.defineProperty(I.prototype,"right",{get:function(){return this.left+this.width},set:function(t){this.width=t-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"bottom",{get:function(){return this.top+this.height},set:function(t){this.height=t-this.top},enumerable:!1,configurable:!0}),I.intersect=function(t,i){var n=t.left,r=t.left+t.width,e=t.top,s=t.top+t.height,h=i.left,u=i.left+i.width,o=i.top,a=i.top+i.height;if(n<u&&h<r&&e<a&&o<s){var f=Math.max(n,h),c=Math.max(e,o);return new I(f,c,Math.min(r,u)-f,Math.min(s,a)-c)}return null},I.union=function(t,i){var n=t.left,r=t.left+t.width,e=t.top,s=t.top+t.height,h=i.left,u=i.left+i.width,o=i.top,a=i.top+i.height,f=Math.min(n,h),c=Math.min(e,o);return new I(f,c,Math.max(r,u)-f,Math.max(s,a)-c)},I.prototype.intersects=function(t){var i=this.left,n=this.right,r=this.top,e=this.bottom,s=t.left,h=t.right,u=t.top,o=t.bottom;return i<h&&s<n&&r<o&&u<e},I.prototype.contains=function(t){return this.left<=t.x&&t.x<this.right&&this.top<=t.y&&t.y<this.bottom},I.prototype.distance=function(t){if(this.contains(t))return 0;var i=Math.max(0,this.left-t.x,t.x-this.right),n=Math.max(0,this.top-t.y,t.y-this.bottom);return Math.sqrt(i*i+n*n)},I);function I(t,i,n,r){if(void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof t)this.left=t,this.top=i,this.width=n,this.height=r;else if(t instanceof I){var e=t;this.left=e.left,this.top=e.top,this.width=e.width,this.height=e.height}else{var s=t;this.left=s.left,this.top=s.top,this.width=s.width,this.height=s.height}}function E(t){for(var i,n={},r=/([a-zA-Z0-9-]+)\s*=\s*"([^"]*)"/gi;null!==(i=r.exec(t));){var e=i[1].toLowerCase(),s=i[2].toString();n[e]=s}return n}s.Rectangle=S,s.getTagAttributes=E,s.getAreasInfoFromString=function(t){for(var i,n=/<area(\s+([^>]*)|)>/gi,r=[];i=n.exec(t);){var e=E(i[1]);if("shape"in e&&"coords"in e&&"href"in e){var s=e.shape,h=e.coords.split(",").map(function(t){return parseInt(t.trim(),10)}),u=e.href;""!==u&&"rect"===s&&4===h.length&&r.push({href:u,left:h[0],top:h[1],right:h[2],bottom:h[3]})}}return r};var T=(Object.defineProperty(P.prototype,"fragment",{get:function(){return this.mi},set:function(t){""!==t&&"#"!==t[0]?this.mi="#"+t:this.mi=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"query",{get:function(){return this.wi},set:function(t){this.wi=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"scheme",{get:function(){return this.yi},set:function(t){if(""!==t){var i=t.match(/^([A-Za-z][0-9A-Za-z.+-]*):?$/);if(!i)throw new Error("Invalid scheme string: "+t);this.yi=i[1]}else this.yi=""},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"host",{get:function(){return this.Oi},set:function(t){this.Oi=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"port",{get:function(){return this.Mi},set:function(t){var i=t.match(/^([0-9]*)$/);if(!i)throw new Error("Invalid port string: "+t);this.Mi=i[1]},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"path",{get:function(){return this.ji},set:function(t){this.ji=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"source",{get:function(){return this.xi(),this.Si},set:function(t){this.Ii(t)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"origin",{get:function(){var t=""===this.scheme?H.location.protocol:this.scheme+":",i=""===this.host?H.location.hostname:this.host,n=""===this.host?H.location.port:this.port;return"http:"===t&&"80"===n?n="":"https:"===t&&"443"===n&&(n=""),""!==n&&(n=":"+n),t+"//"+i+n},enumerable:!1,configurable:!0}),P.prototype.Ei=function(t){this.mi=t.mi,this.wi=new c;for(var i=0;i<t.wi.length;i++)this.wi.push({key:t.wi[i].key,value:t.wi[i].value});this.yi=t.yi,this.Oi=t.Oi,this.Mi=t.Mi,this.ji=t.ji},P.prototype.resolveRelativePath=function(t){var i=new P(t);""===i.scheme&&(i.scheme=this.scheme,""===i.host&&(i.host=this.host,i.port=this.port));var n="";return n=i.scheme===this.scheme&&i.host===this.host?""===i.path?this.path:"/"===i.path[0]?i.path:".."===this.path?"../"+i.path:this.path.match(/\/\.\.$/)?this.path+"/"+i.path:-1===this.path.indexOf("/")?i.path:this.path.replace(/\/[^\/]*$/,"/")+i.path:i.path,i.path=this.Ti(n),i},P.prototype.Ti=function(t){if(""===t)return"";for(var i=t.split("/"),n=[],r=0;r<i.length;r++){var e=i[r];if(".."===e)if(0<n.length){var s=n.pop();""===s?n.push(""):".."===s&&n.push("..","..")}else n.push("..");else""===e?0!==r&&r!==i.length-1||n.push(""):"."===e||n.push(e)}if(0===n.length)return n=null,".";var h=n[0];for(r=1;r<n.length;r++)h+="/"+n[r];return n=null,h},P.prototype.Ii=function(t){this.Si=t,this.mi="",this.wi=new c,this.yi="",this.Oi="",this.Mi="",this.ji="";var i=t,n=i.indexOf("#");-1!==n&&(this.mi=i.substr(n),i=i.substr(0,n));var r=i.indexOf("?");if(-1!==r){for(var e=i.substr(r+1).split("&"),s=0;s<e.length;s++)if(""!==e[s]){var h=e[s].split("=");1===h.length&&h.push(null),this.wi.push({key:h[0],value:h[1]})}i=i.substr(0,r)}var u=i.match(/^([A-Za-z][0-9A-Za-z.+-]*):(.*)?/);if(u&&(this.yi=u[1],i=u[2]),"//"===i.substr(0,2)){var o="",a=(i=i.substr(2)).indexOf("/");if(i=-1===a?(o=i,""):(o=i.substr(0,a),i.substr(a)),""!==o){var f=o.match(/^(.*):([0-9]+)$/);f?(this.Oi=f[1],this.Mi=f[2]):this.Oi=o}}this.ji=i},P.prototype.xi=function(){var t="";this.yi&&(t+=this.yi+"://"),this.Oi&&(this.yi||(t+="//"),t+=this.Oi),this.Mi&&(t+=":"+this.Mi),t+=this.ji;for(var i="",n=0;n<this.wi.length;n++)i+=i?"&":"?",i+=this.wi[n].key,null!==this.wi[n].value&&(i+="="+this.wi[n].value);t+=i,t+=this.mi,this.Si=t},P);function P(t,i){var n=this;if(this.Si="",this.mi="",this.wi=new c,this.yi="",this.Oi="",this.Mi="",this.ji="",this.toString=function(){return n.source},i){var r=new P(i);this.Ei(r.resolveRelativePath(t))}else"string"==typeof t?this.Ii(t):this.Ei(t)}s.UrlParser=T;var C=(A.getOriginsUseCredentials=function(){return Object.keys(A.Pi)},A.setOriginsUseCredentials=function(t){A.Pi={},t.forEach(function(t){var i=new T(t).origin;A.Pi[i]=!0})},A.isSameOrigin=function(t){var i=new T(t).origin;return A.Ci===i},A.needsCredential=function(t){var i=new T(t).origin;return i in A.Pi&&A.Pi[i]},A.Ci=new T(H.location.href).origin,A.Pi={},A);function A(){}s.CorsOption=C;var k=(D.fromUrl=function(e,s){var t=e.replace(/#[^#]*$/,"");if(t in D.Ai)return D.Ai[t];var i=null;return i=new $(s?function(i,t){var n=setTimeout(function(){t(new J(500,"JSONP not returned."))},5e3);h()[s]=function(t){clearTimeout(n),i(t)};var r=document.createElement("script");r.type="text/javascript",r.src=e,document.body.appendChild(r)}:function(i,n){var r=new XMLHttpRequest;r.onload=function(t){r.onload=r.onerror=r.onabort=r.ontimeout=null,4===r.readyState&&(200===r.status?i(r.responseText):n(new J(r.status,r.responseText)))},r.onerror=r.onabort=r.ontimeout=function(t){r.onload=r.onerror=r.onabort=r.ontimeout=null,n(new J(r.status,r.responseText))},C.isSameOrigin(e)||(r.withCredentials=C.needsCredential(e)),r.open("GET",e),r.responseType="",r.send()}),D.Ai[t]=i},D.Ai={},D);function D(){}s.AjaxLoader=k,s.raiseCustomEvent=function(t,i,n,r,e){void 0===r&&(r=!1),void 0===e&&(e=!1);var s=new CustomEvent(i,{detail:n,bubbles:r,cancelable:e});t.dispatchEvent(s)};var N,L=(N=Error,z(R,N),R);function R(t,i){void 0===i&&(i="");var n=N.call(this,t)||this;return n.message=t,n.reason=i,Object.setPrototypeOf(n,R.prototype),n}s.CanceledLoadContentError=L;var F,J=(F=Error,z(B,F),B);function B(t,i){var n=F.call(this,i)||this;return n.status=t,n.message=i,n}s.HttpRequestError=J}(g=g||{}),function(f){var t,i,n;(t=f.Direction||(f.Direction={}))[t.Unset=-1]="Unset",t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",(i=f.PageSpread||(f.PageSpread={}))[i.Unset=-1]="Unset",i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.Center=2]="Center",(n=f.ContentPermissionState||(f.ContentPermissionState={}))[n.Unset=-1]="Unset",n[n.Denied=0]="Denied",n[n.Granted=1]="Granted";var r=(e.getMapInfoFromString=function(t){for(var i,n=/<map(\s+([^>]*)|)>(.*?)<\/map>/gi,r={};null!==(i=n.exec(t));){var e="",s=f.getTagAttributes(i[1]);for(var h in s)"name"===h&&(e=s[h]);var u=i[3];if(""!==e){var o=f.getAreasInfoFromString(u);0<o.length&&(r[e]=o)}}return r},e.getTocFromString=function(t){var i=/<t-contents(\s+([^>]*)|)>([\s\S]*?)<\/t-contents>/gi.exec(t);if(!i)return[];for(var n,r=!1,e=0,s=[],h=i[3],u=/<a(\s+([^>]*)|)>([\s\S]*?)<\/a>|<ul(\s+([^>]*)|)>|<\/ul>/gi;n=u.exec(h);){var o=n[0].substr(1,1).toLowerCase();if("a"===o){var a=f.getTagAttributes(n[1]);"href"in a&&s.push({depth:e,caption:n[3],href:a.href}),0===e&&(r=!0)}else if("u"===o)e++;else if("/"===o){if(0===e)return[];e--}}return r||s.forEach(function(t){t.depth--}),s},e);function e(){}f.ContentTextParser=r}(g=g||{}),function(k){var D,t,o,i,a,n,g="ptbinb-taparea-base";(t=D=k.NextTapDirection||(k.NextTapDirection={}))[t.Invalid=-1]="Invalid",t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.Top=2]="Top",t[t.Bottom=3]="Bottom",(i=o=o||{})[i.On=1]="On",i[i.Off=0]="Off",i[i.Auto=2]="Auto",(n=a=a||{})[n.ScreenEdge=0]="ScreenEdge",n[n.UpAndDownDistance=1]="UpAndDownDistance",n[n.SideDistance=2]="SideDistance";var r=(e.prototype.ki=function(t){this.Qt=t},Object.defineProperty(e.prototype,"width",{get:function(){return this.Di},set:function(t){this.Di=t,this.Qt&&this.Qt.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.Ni},set:function(t){this.Ni=t,this.Qt&&this.Qt.refresh()},enumerable:!1,configurable:!0}),e);function e(t,i){this.Qt=null,this.Ni=t,this.Di=i}var s=(h.prototype.ki=function(t){this.horizontalEdge.ki(t),this.verticalEdge.ki(t)},h.prototype.CalculationSideDistance=function(t){return t&&t.trim().match(/^(\d+|\d+\.\d+)(\%)?$/)?parseInt(t.trim().replace("%",""))<=50?100-parseInt(t.trim().replace("%","")):50:100},h.prototype.CalculationUpAndDownDistance=function(t){return t&&t.trim().match(/^(\d+|\d+\.\d+)(\%)?$/)?parseInt(t.trim().replace("%",""))<=100?(100-parseInt(t.trim().replace("%","")))/2:0:50},h.prototype.defineAreas=function(t,i,n,r,e){for(var s=[i,n,r,e],h="",u=0;u<s.length;u++)s[u]==a.ScreenEdge?h+="0%":"Vertical"==t&&s[u]==a.UpAndDownDistance?h+=String(this.CalculationUpAndDownDistance(this.verticalEdge.width))+"%":"Vertical"==t&&s[u]==a.SideDistance?h+=String(this.CalculationSideDistance(this.verticalEdge.height))+"%":"Horizontal"==t&&s[u]==a.UpAndDownDistance?h+=String(this.CalculationUpAndDownDistance(this.horizontalEdge.height))+"%":"Horizontal"==t&&s[u]==a.SideDistance&&(h+=String(this.CalculationSideDistance(this.horizontalEdge.width))+"%"),h+=" ";return h.trim()},h.prototype.verticalTapAreas=function(){return this.Li=[{action:"top",area:""},{action:"bottom",area:""}],this.Li[0].area=this.defineAreas("Vertical",0,1,2,1),this.Li[1].area=this.defineAreas("Vertical",2,1,0,1),this.Li},h.prototype.verticalFitWidthTapAreas=function(){return this.Li=[{action:"top",area:""},{action:"bottom",area:""}],this.Li[0].area=this.defineAreas("Vertical",0,1,2,1),this.Li[1].area=this.defineAreas("Vertical",2,1,0,1),this.Li},h.prototype.tateyomiTapAreas=function(){return this.Li=[{action:"scrollup",area:""},{action:"scrolldown",area:""}],this.Li[0].area=this.defineAreas("Vertical",0,1,2,1),this.Li[1].area=this.defineAreas("Vertical",2,1,0,1),this.Li},h.prototype.horizontalTapAreas=function(){return this.Li=[{action:"left",area:""},{action:"right",area:""}],this.Li[0].area=this.defineAreas("Horizontal",1,2,1,0),this.Li[1].area=this.defineAreas("Horizontal",1,0,1,2),this.Li},h.prototype.horizontalFitWidthTapAreas=function(t){return 0===t?(this.Li=[{action:"left",area:""},{action:"right",area:""}],this.Li[0].area=this.defineAreas("Horizontal",1,2,1,0),this.Li[1].area=this.defineAreas("Horizontal",1,0,1,2)):(this.Li=[{action:"previous",area:""},{action:"next",area:""}],this.Li[0].area=this.defineAreas("Vertical",0,1,2,1),this.Li[1].area=this.defineAreas("Vertical",2,1,0,1)),this.Li},h);function h(){this.Li=[],this.horizontalEdge=new r("80%","30%"),this.verticalEdge=new r("25%","100%")}k.SingleTapArea=s;var u=(Object.defineProperty(f,"defaultScrollMode",{get:function(){return"horizontal"},enumerable:!1,configurable:!0}),f.prototype.Ri=function(t){var i=this;if(0<this.Fi.length){var n=t.id,r=!0,e=this.Fi[0].page;this.Fi.forEach(function(t){!1===t.rendered&&(i.Xt.page[t.page].id===n?t.rendered=!0:r=!1,e>t.page&&(e=t.page))}),r&&(this.Fi=[],this.Ji.onPageRendered(e))}},f.prototype.Bi=function(t,h){for(var u=this,i="",n=document.getElementsByTagName("map"),r=0;r<n.length;r++)i+=n[r].outerHTML;var o=k.ContentTextParser.getMapInfoFromString(i.replace(/[\n\r]/g,"")),e=document.getElementsByTagName("t-contents"),s=0<e.length?e[0].outerHTML:"",a=k.ContentTextParser.getTocFromString(s),f=[],c=[];for(r=0;r<this.ui.children.length;r++){var l=this.ui.children.item(r);if(l instanceof HTMLElement&&l.hasAttribute("data-ptimg")){var v="";l.id?v=l.id:(v=t+r.toString(10),l.id=v);var d=(l.getAttribute("data-binbsp-spread")||"").toLowerCase(),b=k.PageSpread.Unset;"left"===d?b=k.PageSpread.Left:"right"===d?b=k.PageSpread.Right:"center"===d&&(b=k.PageSpread.Center);var g=(l.getAttribute("data-binbsp-usemap")||"").replace(/^#/,""),p=null;g in o?p=o[g]:g="";var m=(l.getAttribute("data-binbsp-anchors")||"").split(" ");c.push({id:v,spread:b,usemap:g,anchors:m}),f.push(k.PowerThumb.PtimgLoader.load(l.getAttribute("data-ptimg"),p))}}$.all(f).then(function(t){if(u.Hi={items:[{}]},u.Ji.onContentInfoLoaded("preload",u.Hi))return $.reject(new k.CanceledLoadContentError("Cancelled."));var e=[];t.forEach(function(t,i){var n=document.getElementById(c[i].id).getAttribute("data-ptimg"),r=t.getTemporaryViewSize();e.push({id:c[i].id,src:n,index:i,image:{id:c[i].id,src:"",orgwidth:r.width,orgheight:r.height,pagespread:c[i].spread,anchors:c[i].anchors,texts:[],usemap:c[i].usemap},isContent:!0,isFromHtml:!0})});var i=(u.ui.getAttribute("data-binbsp-direction")||"").toLowerCase(),n=k.Direction.Unset;"ltr"===i?n=k.Direction.LTR:"rtl"===i&&(n=k.Direction.RTL);var r=(u.ui.getAttribute("data-binbsp-toc")||"").toLowerCase();u.zi=u.$i(r,e);var s=u.ui.hasAttribute("data-binbsp-tateyomi");u._i({id:"",direction:n,page:e,mapInfo:o,bibliography:{title:"",author:"",publisher:"",description:""},toc:a,isPaginated:!s,textPositionLevel:0,permissions:{selection:k.ContentPermissionState.Unset}},new k.EmptyAutoBookmarkAccessor,h)}).catch(function(t){t instanceof k.CanceledLoadContentError||u.Ji.onError()})},f.prototype.$i=function(t,i){var n="",r="",e=document.getElementById(t);return e&&(n="<t-contents>"+e.innerHTML+"</t-contents>",r=i.map(function(t,i){return t.image.anchors.map(function(t){return t?'<a name="'+t.replace(/^L/,"P")+'"></a>':""}).join("")+'<t-img id="P'+i.toString(10)+'">'}).join("")),n+"<t-case screen.portrait>"+r+"</t-case>"},f.prototype.Vi=function(t,i){var n=this,r={useHighQualityImage:i.useHighQualityImage};"binb"in i&&("k"in i.binb&&(r.k=i.binb.k),"baseurl"in i.binb&&(r.baseurl=i.binb.baseurl),"memberTrialAsCommercial"in i.binb&&(r.memberTrialAsCommercial=!!i.binb.memberTrialAsCommercial),"forceQualityParameterRequest"in i.binb&&(r.forceQualityParameterRequest=!!i.binb.forceQualityParameterRequest),"iOSPixelCountLimit"in i.binb&&(r.iOSPixelCountLimit=!!i.binb.iOSPixelCountLimit));var e={idprefix:t,binb:r};k.PowerThumb.PtBinbLoader.activateElement(this.ui,e,function(t){return n.Hi=t,n.Ji.onContentInfoLoaded("binb",t)},function(t){t.page.forEach(function(t){n.Gi[t.id]={src:t.src,element:null}}),n.zi=t.reader.rawTTX,i.bookmark.enabled&&(n.Ui=t.reader.createBookmarkObject()),n._i(t,new k.Binb.BinbAutoBookmarkAccessor(t,i.autoBookmark),i)},function(t){t instanceof k.CanceledLoadContentError||n.Ji.onError()})},f.prototype._i=function(t,n,i){var r=this;this.Xt=t,this.Xi.setContent(this.Xt),this.qi={saveOnUnload:!0,saveOnPageChange:!0,save:function(t,i){return n.save(t,i)},load:function(){return n.load()}},this.Yi(),this.Wi(),this.Zi(function(){r.qi.saveOnUnload&&r.qi.save(r.currentPage,!0).catch(function(t){})}),this.Qi(i.scrollmode),this.Ki(i.maxcontentwidth),this.tn(i.verticalPageMargin),this.in=i.userActionEnabled,this.nn=i.scaleByDoubleTap,this.rn=i.selection.enabled;var e=i.selection.options;"maxSelectionLength"in e&&"number"==typeof e.maxSelectionLength&&(this.Xi.options.maxSelectionLength=e.maxSelectionLength),"selectionStartLatency"in e&&"number"==typeof e.selectionStartLatency&&(this.Xi.options.selectionStartLatency=e.selectionStartLatency),"selectionAcrossPages"in e&&"string"==typeof e.selectionAcrossPages&&(this.Xi.options.selectionAcrossPages=e.selectionAcrossPages),"maxSelectionColumns"in e&&"number"==typeof e.maxSelectionColumns&&(this.Xi.options.maxSelectionColumns=e.maxSelectionColumns),i.limitpage?this.en(i.limitpage.min,i.limitpage.max):this.en(0,this.totalPage-1),(this.Ui?this.Ui.import().catch(function(){}):$.resolve()).then(function(){r.Ji.onLoad(),r.sn(),function(t){if(t&&t.match(/^(0|[1-9][0-9]*)$/)){for(var i=parseInt(t,10),n=0;n<r.Xt.page.length;n++)if(r.Xt.page[n].index>=i)return $.resolve(n);return $.resolve(0)}return r.qi.load().then(function(t){return $.resolve(t)},function(){return $.resolve(0)})}(r.ui.getAttribute("data-ptbinb-adr")).then(function(t){var i=t;i<r.ii?i=r.ii:r.ni<i&&(i=r.ni),r.movePage(i,!1),i===r.ii&&(r.hn=r.ii,r.un=0,r.on(0),r.an(),k.PowerThumb.PtimgLoader.activate()),r.cn=!0})})},f.prototype.Wi=function(){var u=this;this.ui.addEventListener("click",function(t){if(t.target instanceof HTMLElement)for(var i=t.target;null!==i&&i!==u.ui;){if(i instanceof HTMLAnchorElement){var n=location.href.replace(location.hash,""),r=i.href;if(0===r.indexOf(n)&&(r=r.replace(n,"")),0===r.indexOf("#")){r=r.substr(1);for(var e=0;e<u.totalPage;e++)if(u.Xt.page[e].image.anchors)for(var s=u.Xt.page[e].image.anchors,h=0;h<s.length;h++)if(s[h]===r)return u.movePage(e,!0),void t.preventDefault()}break}i=i.parentElement}})},f.prototype.ln=function(){var s=this;this.vn={onTurnLeft:function(t){s.dn||t&&s.Ji.onTurnPageToOutside(0,s.Xt.direction===k.Direction.RTL?"tail":"head")},onTurnRight:function(t){s.dn||t&&s.Ji.onTurnPageToOutside(0,s.Xt.direction===k.Direction.RTL?"head":"tail")},onTurnTop:function(t){s.dn&&t&&s.Ji.onTurnPageToOutside(0,"head")},onTurnBottom:function(t){s.dn&&t&&s.Ji.onTurnPageToOutside(0,"tail")},onTurnNext:function(t){t&&s.Ji.onTurnPageToOutside(0,"tail")},onTurnPrevious:function(t){t&&s.Ji.onTurnPageToOutside(0,"head")},onScrollLeft:function(t){s.dn||t&&s.Ji.onTurnPageToOutside(0,s.Xt.direction===k.Direction.RTL?"tail":"head")},onScrollRight:function(t){s.dn||t&&s.Ji.onTurnPageToOutside(0,s.Xt.direction===k.Direction.RTL?"head":"tail")},onScrollUp:function(t){s.dn&&t&&s.Ji.onTurnPageToOutside(0,"head")},onScrollDown:function(t){s.dn&&t&&s.Ji.onTurnPageToOutside(0,"tail")},onMenu:function(){s.Ji.onMenu()},onChangeScale:function(t){s.Ji.onScaleChange(t)},onChangeAnchor:function(t){s.bn(t)},onScrollEndX:function(t,i){var n=s.gn[t].page,r=s.pn[n],e=s.gn[0<=r?r:t];s.mn(),s.Ji.onPageScrollEnd(n,Math.abs(i-e.x),s.totalPage)},onScrollEndY:function(t,i){var n=s.gn[t].page,r=s.pn[n],e=s.gn[0<=r?r:t];s.mn(),s.Ji.onPageScrollEnd(n,Math.abs(i-e.y),s.totalPage)},onMoveToOutsideX:function(t,i){if(s.dn)i||s.wn(s.ui.parentElement,t,0);else{var n="";0!==t&&(n=0<t==(s.Xt.direction===k.Direction.RTL)?"head":"tail"),s.Ji.onSwipeToOutside(Math.abs(t),n)}},onMoveToOutsideY:function(t,i){if(s.dn){var n="";0!==t&&(n=t<0?"head":"tail"),s.Ji.onSwipeToOutside(Math.abs(t),n)}else i||s.wn(s.ui.parentElement,0,t)},onTouchEndOutsideX:function(t){s.dn||0!==t&&s.Ji.onTurnPageToOutside(Math.abs(t),0<t==(s.Xt.direction===k.Direction.RTL)?"head":"tail")},onTouchEndOutsideY:function(t){s.dn&&0!==t&&s.Ji.onTurnPageToOutside(Math.abs(t),t<0?"head":"tail")},onStartFlip:function(){k.PowerThumb.PtimgLoader.suppressBackgroundLoading()},onStopFlip:function(){k.PowerThumb.PtimgLoader.resumeBackgroundLoading()},updateElementPosition:function(t,i,n){s.yn(t,i,n)},onClearSelection:function(){var t=null!==s.Xi.anchor&&null!==s.Xi.focus;return s.Xi.anchor=null,s.Xi.focus=null,s.Xi.refreshValidSelectionArea(),t},onStartSelection:function(t,i){return s.Xi.anchor=s.Mn({x:t,y:i}),null===s.Xi.anchor?(s.Xi.focus=null,!1):(s.Xi.focus=s.jn({x:t,y:i}),null===s.Xi.focus?(s.Xi.anchor=null,!1):(s.Xi.refreshValidSelectionArea(),s.Ji.onSelectionStart(),!0))},onMoveSelection:function(t,i){var n=s.jn({x:t,y:i});null!==n&&(s.Xi.focus.pageIndex===n.pageIndex&&s.Xi.focus.boundingBoxIndex===n.boundingBoxIndex||(s.Xi.focus.pageIndex=n.pageIndex,s.Xi.focus.boundingBoxIndex=n.boundingBoxIndex,s.Xi.refreshValidSelectionArea()))},onEndSelection:function(){s.Ji.onSelectionEnd()}}},f.prototype.bn=function(t){var i=this.gn[t].page,n=this.gn[t].section;this.currentPage!==i?(this.mn(),this.hn=i,this.un=n,this.cn&&0===this.resetPageError(this.currentPages)&&(this.an(),k.PowerThumb.PtimgLoader.activate(!0)),this.on(i),this.qi.saveOnPageChange&&this.qi.save(i,!1).catch(function(t){})):this.un!==n&&(this.un=n)},f.prototype.on=function(t){var r=this;this.Ji.onPageChange(t,this.totalPage);var i=this.currentPages,e=!0;this.Fi=[],i.forEach(function(t){if(t<r.totalContentPage){var i=r.Xt.page[t].id,n=k.PowerThumb.PtimgLoader.getState(document.getElementById(i))===k.PowerThumb.PtimgState.active;n||(e=!1),r.Fi.push({page:t,rendered:n})}}),e&&(this.Fi=[],this.Ji.onPageRendered(Math.min.apply(null,i)))},f.prototype.wn=function(t,i,n){for(var r=i,e=n,s=t.parentElement,h=[];(0!==r||0!==e)&&null!==s&&s!==document.body;){if(void 0!==s.scrollLeft&&void 0!==s.scrollTop){var u=this.xn(r,s.scrollLeft,s.scrollWidth-s.clientWidth),o=this.xn(e,s.scrollTop,s.scrollHeight-s.clientHeight);u.len===r&&o.len===e||h.push({element:s,left:u.pos,top:o.pos}),r=u.len,e=o.len}s=s.parentElement}var a=null;0===r&&0===e||(u=this.xn(r,H.pageXOffset,document.documentElement.scrollWidth-document.documentElement.clientWidth),o=this.xn(e,H.pageYOffset,document.documentElement.scrollHeight-document.documentElement.clientHeight),u.pos===H.pageXOffset&&o.pos===H.pageYOffset||(a={x:u.pos,y:o.pos}),r=u.len,e=o.len),0<h.length&&h.forEach(function(t){t.element.scrollLeft=t.left,t.element.scrollTop=t.top}),a&&H.scrollTo(a.x,a.y)},f.prototype.xn=function(t,i,n){var r=i,e=t;return 0!==t&&(t<0?0<i&&(e=0<i+t?(r=i+t,0):(r=0,t+i)):i<n&&(e=i+t<n?(r=i+t,0):i+t-(r=n))),{len:e,pos:r}},f.prototype.an=function(){var t=this.hn;if(!(t<0)){var i=this.Sn.getElementRect(),n=this.Sn.getScale(),r=new k.Rectangle(-i.left,-i.top,this.In.width/n,this.In.height/n);if(this.Xt){for(var e=k.PowerThumb.PtimgLoader.getBuildDomTime(),s=Math.floor(Math.max(Math.min(-3.2*e+(4-3*-3.2),12),4)),h=this.Xt.page.length-1,u=s,o=!0,a=t;a<=h;a++){var f=this.Xt.page[a].id;if(this.ni<a)o=!1,u=0;else if(o){var c=this.En[f];null===k.Rectangle.intersect(c,r)&&(o=!1)}else 0<u&&--u;var l=this.Xt.page[a].isFromHtml;this.Tn(f,o||0<u,l)}for(u=s,o=!0,a=t-1;0<=a;a--)f=this.Xt.page[a].id,a<this.ii?(o=!1,u=0):o?(c=this.En[f],null===k.Rectangle.intersect(c,r)&&(o=!1)):0<u&&--u,l=this.Xt.page[a].isFromHtml,this.Tn(f,o||0<u,l);var v=this.Xt.page[t].id,d=document.getElementById(v);!d||v in this.Pn||this.ui.appendChild(d);var b=document.getElementsByClassName(g);for(a=b.length-1;0<=a;a--)this.ui.appendChild(b[a])}}},f.prototype.Tn=function(t,i,n){var r=document.getElementById(t);if(r&&t in this.Pn)r.style.display=i?"":"none";else{if(r){if(!i){var e=this.ui.removeChild(r);n||k.PowerThumb.PtimgLoader.releaseElement(e);var s=e.getAttribute("data-ptimg"),h=n?e:null;this.Gi[t]={src:s,element:h}}}else if(i&&t in this.Gi){var u=this.Gi[t];if(null!==u.element)this.ui.appendChild(u.element);else{var o=this.En[t],a=document.createElement("div");a.id=t,a.style.width=o.width+"px",a.style.height=o.height+"px",this.Cn(a,o,this.Sn.getScale()),a.setAttribute("data-ptimg",u.src),this.ui.appendChild(a)}this.Gi[t].element=null,delete this.Gi[t]}k.Indicator.refreshElement(t)}},f.prototype.refresh=function(){this.Xt&&(this.sn(),this.cn&&(this.an(),k.PowerThumb.PtimgLoader.activate()))},Object.defineProperty(f.prototype,"content",{get:function(){var i=this;if(!this.An){var t=this.Xt.page.map(function(t){return{id:t.id,src:t.src,index:t.index,image:{anchors:t.image.anchors.concat(),id:t.image.id,orgheight:t.image.orgheight,orgwidth:t.image.orgwidth,pagespread:t.image.pagespread,src:t.image.src,texts:t.image.texts,usemap:t.image.usemap},isContent:t.isContent,isFromHtml:t.isFromHtml}}),n={};Object.keys(this.Xt.mapInfo).forEach(function(t){n[t]=i.Xt.mapInfo[t].map(function(t){return{href:t.href,left:t.left,top:t.top,right:t.right,bottom:t.bottom}})});var r={title:this.Xt.bibliography.title,author:this.Xt.bibliography.author,publisher:this.Xt.bibliography.publisher,description:this.Xt.bibliography.description},e=[];this.Xt.toc.forEach(function(t){e.push({caption:t.caption,depth:t.depth,href:t.href})});var s={selection:this.Xt.permissions.selection};this.An={id:this.Xt.id,direction:this.Xt.direction,page:t,mapInfo:n,bibliography:r,toc:e,isPaginated:this.Xt.isPaginated,textPositionLevel:this.Xt.textPositionLevel,permissions:s}}return this.An},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isContentLoaded",{get:function(){return null!==this.Xt},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"totalPage",{get:function(){return this.Xt.page.length},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"totalContentPage",{get:function(){return this.recommendPageIndex||this.totalPage},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"recommendPageIndex",{get:function(){return this.kn&&0<this.kn.length?this.kn[0].index:null},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentPage",{get:function(){return this.hn},set:function(t){this.movePage(t)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentPosition",{get:function(){return this.hn.toString(10)+":"+this.un.toString(10)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"currentPages",{get:function(){var t=this.currentPage;if(-1===t)return[];var i=[t];if(this.Dn){var n=this.Xt.direction,r=this.Xt.page[t].image.pagespread;n===k.Direction.LTR?r===k.PageSpread.Left?t+1<this.totalPage&&this.Xt.page[t+1].image.pagespread===k.PageSpread.Right&&(i=[t,t+1]):r===k.PageSpread.Right&&0<t&&this.Xt.page[t-1].image.pagespread===k.PageSpread.Left&&(i=[t-1,t]):n===k.Direction.RTL&&(r===k.PageSpread.Left?0<t&&this.Xt.page[t-1].image.pagespread===k.PageSpread.Right&&(i=[t,t-1]):r===k.PageSpread.Right&&t+1<this.totalPage&&this.Xt.page[t+1].image.pagespread===k.PageSpread.Left&&(i=[t+1,t]))}return i},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isPaginatedContent",{get:function(){return this.Xt.isPaginated},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"bookmark",{get:function(){return this.Ui},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"autoBookmark",{get:function(){return this.qi},enumerable:!1,configurable:!0}),f.prototype.resetPageError=function(t){var r=this;void 0===t&&(t=null);var e=0;if(null===t)for(var i=0;i<this.totalPage;i++){var n=this.content.page[i].id,s=document.getElementById(n);k.PowerThumb.PtimgLoader.resetError(s)&&e++}else("number"==typeof t?[t]:t).forEach(function(t){if(0<=t&&t<r.totalPage){var i=r.content.page[t].id,n=document.getElementById(i);k.PowerThumb.PtimgLoader.resetError(n)&&e++}});return e&&(this.an(),k.PowerThumb.PtimgLoader.activate()),e},f.prototype.movePage=function(t,i){void 0===i&&(i=!1);var n=this.Nn(t,i);return this.gn[n].page},f.prototype.Nn=function(t,i){void 0===i&&(i=!1),this.Sn.setScale(1);for(var n=this.Ln(t,this.Dn),r=0,e=0;e<this.gn.length;e++){var s=this.gn[e];if(s.page===n.page&&s.section===n.section){r=e;break}}return this.Sn.moveToAnchor(r,i),i||(this.an(),k.PowerThumb.PtimgLoader.activate()),-1===n.outside?this.Ji.onTurnPageToOutside(0,"head"):1===n.outside&&this.Ji.onTurnPageToOutside(0,"tail"),r},f.prototype.scroll=function(t,i,n){void 0===n&&(n=!1);var r=this.Sn.scroll(t,i,n);return n||(this.an(),k.PowerThumb.PtimgLoader.activate()),this.gn[r].page},Object.defineProperty(f.prototype,"scale",{get:function(){return this.Sn.getScale()},set:function(t){this.Sn.setScale(t)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"scrollMode",{get:function(){return this.ri},set:function(t){this.Qi(t)&&this.refresh()},enumerable:!1,configurable:!0}),f.prototype.Qi=function(t){var i=t||f.defaultScrollMode;if(!(i in this.Rn))return!1;this.ri=i;var n=!1,r=this.Rn[i],e=this.ui.offsetParent;this.In={width:e.clientWidth,height:e.clientHeight},this.dn!==r.isVerticalView&&(this.dn=r.isVerticalView,n=!0);var s=this.In.width>this.In.height,h=function(t,i){return t!==o.Off&&(t===o.On||i)}(r.isSpread,s);return this.Dn!==h&&(this.Dn=h,n=!0),this.Fn!==r.isFitWidth&&(this.Fn=r.isFitWidth,n=!0),this.Jn!==r.isMargined&&(this.Jn=r.isMargined,n=!0),this.Bn!==r.isSwipeByPage&&(this.Bn=r.isSwipeByPage,n=!0),n},Object.defineProperty(f.prototype,"renderStatus",{get:function(){return{isSpread:this.Dn}},enumerable:!1,configurable:!0}),f.prototype.isPageVisible=function(t,i){if(void 0===i&&(i=10),t<0||this.totalPage<=t)return!1;var n=this.Xt.page[t].id,r=document.getElementById(n);if(!r)return!1;if("none"===getComputedStyle(r).display)return!1;var e=r.getBoundingClientRect(),s=new k.Rectangle(e.left,e.top,e.width,e.height);s.left+=i,s.top+=i,s.width-=2*i,s.height-=2*i;var h=new k.Rectangle(this.ui.offsetParent.getBoundingClientRect());return null!==k.Rectangle.intersect(s,h)},f.prototype.isPageAppeared=function(t){if(t===this.currentPage)return!0;if(this.Fn||this.dn||2<=Math.abs(t-this.currentPage))return!this.Bn&&this.isPageVisible(t,0);for(var i=null,n=null,r=0;r<this.gn.length;r++)if(null===i&&this.gn[r].page===t&&(i=r),null===n&&this.gn[r].page===this.currentPage&&(n=r),null!==n&&null!==i){var e=Math.abs(this.gn[i].x-this.gn[n].x),s=Math.abs(this.gn[i].y-this.gn[n].y);return e<=1&&s<=1}return!1},Object.defineProperty(f.prototype,"nextTapDirection",{get:function(){return this.Hn},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"maxContentWidth",{get:function(){return this.Kt?this.Kt.num.toString(10)+this.Kt.unit:""},set:function(t){this.Ki(t),this.dn&&this.refresh()},enumerable:!1,configurable:!0}),f.prototype.Ki=function(t){if(t){var i=t.match(/^(\d+(\.\d+)?|(\.\d+))(px|%|)$/);if(!i)throw new Error(t+" is not a length.");var n=parseFloat(i[1]),r=i[4];if(""===r){if(0!==n)throw new Error(t+" is not a length.");this.Kt={num:0,unit:"px"}}else this.Kt={num:n,unit:r}}else this.Kt=null},Object.defineProperty(f.prototype,"verticalPageMargin",{get:function(){return this.ti?this.ti.toString(10):""},set:function(t){this.tn(t),this.dn&&this.refresh()},enumerable:!1,configurable:!0}),f.prototype.tn=function(t){if("string"==typeof t){if(!t)return;var i=t.match(/^(\d+(\.\d+)?|(\.\d+))(px|)$/);if(!i)throw new Error(t+" is not a length.");var n=parseFloat(i[1]);this.ti=n}else{if(!(0<=t))throw new Error("Cannot set negative values for margin. :"+t);this.ti=t}},f.prototype.setTapAreaClasses=function(t){if(null===t||0===t.length)this.zn=null;else if("string"==typeof t)this.zn={left:t,top:t,right:t,bottom:t};else{var i=t.length,n=i<1?0:1,r=i<2?0:2,e=i<3?n:3;this.zn={left:t[e],top:t[0],right:t[n],bottom:t[r]}}this.refresh()},f.prototype.limitPage=function(t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),this.en(t,i),this.sn(),!(this.ii<=this.hn&&this.hn<=this.ni)){var n="";n=this.hn<this.ii?this.ii.toString(10)+":head":this.ni.toString(10)+":tail";var r=this.Nn(n,!1);this.bn(r)}this.cn&&(this.an(),k.PowerThumb.PtimgLoader.activate())},f.prototype.en=function(t,i){var n=null!==t?Math.max(0,t):0,r=null!==i?Math.min(this.totalPage-1,i):this.totalPage-1;this.ii=Math.min(n,r),this.ni=Math.max(n,r),this.an()},f.prototype.Ln=function(t,i){var n=this.hn,r=this.un,e=!1;if("number"==typeof t)n=t,r=0;else{var s=t.toLowerCase().split(":",2),h=s[0],u=s[1];if(""===h||"first"===h||"last"===h||h.match(/^\d+$/))""===h||(n="first"===h?0:"last"===h?this.totalPage-1:parseInt(h,10)),r=0,u&&(u.match(/^\d+$/)?r=parseInt(u,10):"head"===u||"tail"===u&&(r=this.$n[n]-1));else{var o=h.match(/^(prev|next|left|right|upper|lower)(section|page|spread)$/);if(o){var a=0,f=0,c=i&&!this.dn&&!this.Fn,l=this.Xt.direction===k.Direction.RTL,v=o[1],d=o[2];if("section"===d)"prev"===v?(f=-1,e=!0):"next"===v&&(f=1,e=!0);else if("page"===d||!c&&"spread"===d)r=0,"prev"===v?a=-1:"next"===v?a=1:"left"===v?this.dn||(a=l?1:-1):"right"===v?this.dn||(a=l?-1:1):"upper"===v?this.dn&&(a=-1):"lower"===v&&this.dn&&(a=1);else if("spread"===d){var b=this.Xt.page[this.currentPage].image.pagespread,g=1<=this.currentPage?this.Xt.page[this.currentPage-1].image.pagespread:k.PageSpread.Unset,p=this.currentPage<this.totalPage-1?this.Xt.page[this.currentPage+1].image.pagespread:k.PageSpread.Unset,m=b===k.PageSpread.Left&&g===k.PageSpread.Right,w=b===k.PageSpread.Left&&p===k.PageSpread.Right,y=b===k.PageSpread.Right&&g===k.PageSpread.Left,O=b===k.PageSpread.Right&&p===k.PageSpread.Left;r=0,"prev"===v?a=l&&m||!l&&y?-2:-1:"next"===v?a=l&&O||!l&&w?2:1:"left"===v?a=l?O?2:1:y?-2:-1:"right"===v&&(a=l?m?-2:-1:w?2:1)}n+=a,0!==f&&((r+=f)<0?(n--,r=this.$n[n]-1):r>=this.$n[n]&&(n++,r=0))}}}var M=0;for(n<this.ii?(n=this.ii,r=0,M=-1):n>this.ni&&(n=this.ni,r=e?this.$n[n]-1:0,M=1);0===this.$n[n]&&0<n;)n--,r=this.$n[n]-1;return r<0?r=0:r>=this.$n[n]&&(r=this.$n[n]-1),{page:n,section:r,outside:M}},f.prototype.sn=function(){this.Xt&&(this.Sn&&1<this.scale&&this.Sn.setScale(1),this._n(),this.dn?this.Jn?this.Fn?this.Vn(this.Bn):this.Gn(this.Bn):this.Un():this.Fn?this.Xn():this.qn(this.Dn),this.Yn=this.Jn,this.Ji.onLayout())},f.prototype.Gn=function(t){var i=this.ii,n=this.ni,r=this.In.width,e=this.In.height,s=this.Wn(r),h=(r-s)/2,u=0,o={},a=[];a.length=this.totalPage;for(var f=null,c=null,l=[],v=0;v<this.totalPage;v++){var d,b=void 0,g=void 0,p=void 0,m=this.Xt.page[v],w=m.image.orgwidth,y=m.image.orgheight;g=e*w<=s*y?(b=e*w/y,e):(b=s)*y/w,d=(s-b)/2,p=0===v?(e-g)/2:u+this.ti,o[m.id]=new k.Rectangle(h+d,p,b,g),a[v]=(e-g)/2-p,i<=v&&v<=n&&(l.push(a[v]),null===f&&(f=a[v])),u=v===this.totalPage-1?p+(e+g)/2:p+g,i<=v&&v<=n&&(c=u)}var O=0<=this.currentPage?this.currentPage:0;this.Zn=new k.Rectangle(0,a[O],r,u),this.Qn(o);var M=t?0:3;this.gn=a.map(function(t,i){return{page:i,section:0,x:0,y:t,excludeCond:M}}).filter(function(t){return i<=t.page&&t.page<=n}),this.$n=a.map(function(){return 1}),this.Kn();var j=t?l:[[e-c,-f]],x=new k.SectionAligner(this.gn,[],j),S=this.tr.verticalTapAreas();this.ir(x,S,t),this.Hn=D.Bottom,null!==this.zn&&(this.nr(S[0].area,this.zn.top),this.nr(S[1].area,this.zn.bottom))},f.prototype.Vn=function(t){var r=this,i=this.ii,e=this.ni,n=this.In.width,s=this.In.height,h=this.Wn(n),u=(n-h)/2,o=0,a={},f=[];f.length=this.totalPage;for(var c=null,l=null,v=[],d=0;d<this.totalPage;d++){var b,g=void 0,p=this.Xt.page[d],m=p.image.orgwidth;if(b=h*p.image.orgheight/m,g=0===d?Math.max(s-b,0)/2:o+this.ti,a[p.id]=new k.Rectangle(u,g,h,b),b<=s){var w=(s-b)/2-g;f[d]=[w],i<=d&&d<=e&&(v.push(w),null===c&&(c=w))}else{var y=-g,O=s-b-g,M=Math.floor((b-50)/(s-50))+1;f[d]=[];for(var j=0;j<M;j++)f[d].push(y-j*(y-O)/(M-1));i<=d&&d<=e&&(v.push([f[d][0],f[d][M-1]]),null===c&&(c=g))}o=d===this.totalPage-1&&b<s?g+b+Math.max(s-b,0)/2:g+b,i<=d&&d<=e&&(l=o)}var x=0<=this.currentPage?this.currentPage:0;this.Zn=new k.Rectangle(0,f[x][0],n,o),this.Qn(a);var S=t?0:3;this.gn=[],f.forEach(function(t,n){i<=n&&n<=e&&t.forEach(function(t,i){r.gn.push({page:n,section:i,x:0,y:t,excludeCond:S})})}),this.$n=f.map(function(t){return t.length}),this.Kn();var I=t?v:[[s-l,-c]],E=new k.SectionAligner(this.gn,[],I),T=this.tr.verticalFitWidthTapAreas();this.ir(E,T,t),this.Hn=D.Bottom,null!==this.zn&&(this.nr(T[0].area,this.zn.top),this.nr(T[1].area,this.zn.bottom))},f.prototype.Un=function(){var t=this.ii,i=this.ni,n=this.In.width,r=this.In.height,e=this.Wn(n),s=(n-e)/2,h=null;if(this.Sn&&!this.Yn){var u=this.Sn.getElementRect();h=u.top/this.Wn(u.width)}for(var o=0,a={},f=[],c=0,l=null,v=null,d=0;d<this.totalPage;d++){var b=this.Xt.page[d],g=b.image.orgwidth,p=b.image.orgheight,m=this.rr(e*p/g),w=0===d?0:o;a[b.id]=new k.Rectangle(s,w,e,m),o=w+m,t<=d&&d<=i&&(null===l&&(l=w),f.push({page:d,section:0,y:-w}),d===this.currentPage&&(c=-w),r<m&&f.push({page:d,section:1,y:r-o}),v=o)}if(this.gn=f.filter(function(t){return t.y>=r-v}).map(function(t){return{page:t.page,section:t.section,x:0,y:t.y,excludeCond:3}}),0<this.gn.length){var y=this.gn.length-1,O=0;this.gn[y].page===i&&(O=this.gn[y].section+1),this.gn.push({page:i,section:O,x:0,y:r-v,excludeCond:3})}else o-r<l&&(l=o-r),v=l+r,this.gn.push({page:t,section:0,x:0,y:-l,excludeCond:3});var M=Array.apply(null,{length:this.totalPage}).map(function(){return 0});null!==h&&(c=h*e),c<r-v?c=r-v:-l<=c&&(c=-l),this.Zn=new k.Rectangle(0,c,n,o),this.Qn(a),this.gn.forEach(function(t){M[t.page]++}),this.$n=M,this.Kn();var j=new k.SectionAligner(this.gn,[],[[r-v,-l]]),x=this.tr.tateyomiTapAreas();this.ir(j,x,!1),this.Hn=D.Bottom,null!==this.zn&&(this.nr(x[0].area,this.zn.top),this.nr(x[1].area,this.zn.bottom))},f.prototype.qn=function(t){var i=this,n=this.ii,r=this.ni,e=this.In.width,s=this.In.height,h=this.Xt.direction===k.Direction.RTL,u=h?function(t){return i.totalPage-t-1}:function(t){return t},o=k.PageSpread.Unset,a=0,f=0,c=0,l={},v=[];v.length=this.totalPage;for(var d=[],b=0;b<this.totalPage;b++){var g,p,m,w,y=u(b),O=this.Xt.page[y],M=O.image.orgwidth,j=O.image.orgheight,x=O.image.pagespread,S=e;if(!t||x!==k.PageSpread.Left&&x!==k.PageSpread.Right||(S=e/2),p=s*M<=S*j?(g=s*M/j,s):(g=S)*j/M,g=this.rr(g),0===b)m=t?x===k.PageSpread.Left?e/2-g:x===k.PageSpread.Right?e/2:(e-g)/2:(e-g)/2;else if(o===k.PageSpread.Left&&x===k.PageSpread.Right)m=a;else{var I=0,E=0;E=t?(I=o===k.PageSpread.Left?e/2:o===k.PageSpread.Right?e/2-f:(e-f)/2,x===k.PageSpread.Left?e/2-g:x===k.PageSpread.Right?e/2:(e-g)/2):(I=(e-f)/2,(e-g)/2),m=a+Math.max(I,E,50)}if(m=this.rr(m),w=(s-p)/2,l[O.id]=new k.Rectangle(m,w,g,p),t?x===k.PageSpread.Left?v[y]=e/2-g-m:x===k.PageSpread.Right?o===k.PageSpread.Left?v[y]=c:v[y]=e/2-m:v[y]=(e-g)/2-m:v[y]=(e-g)/2-m,n<=y&&y<=r)if(t)d.push(v[y]);else if(o===k.PageSpread.Left&&x===k.PageSpread.Right)if(0<d.length){var T=d.pop();"number"==typeof T?d.push([T,v[y]]):(d.push(T),d.push(v[y]))}else d.push(v[y]);else d.push(v[y]);a=b===this.totalPage-1?t?x===k.PageSpread.Left?m+g+e/2:x===k.PageSpread.Right?o===k.PageSpread.Left?m+e/2+1:m+e/2:m+(e+g)/2:m+(e+g)/2:m+g,o=x,f=g,c=v[y]}var P=0<=this.currentPage?this.currentPage:0;this.Zn=new k.Rectangle(v[P],0,a,s),this.Qn(l),this.gn=v.map(function(t,i){return{page:i,section:0,x:t,y:0,excludeCond:0}}).filter(function(t){return n<=t.page&&t.page<=r}),this.$n=v.map(function(){return 1}),this.Kn();var C=new k.SectionAligner(this.gn,d,[]),A=this.tr.horizontalTapAreas();this.ir(C,A,!0),this.Hn=h?D.Left:D.Right,null!==this.zn&&(this.nr(A[0].area,this.zn.left),this.nr(A[1].area,this.zn.right))},f.prototype.Xn=function(){var r=this,i=this.ii,e=this.ni,t=this.rr(this.In.width),n=this.In.height,s=this.Xt.direction===k.Direction.RTL,h=s?function(t){return r.totalPage-t-1}:function(t){return t},u=k.PageSpread.Unset,o=0,a={},f=[];f.length=this.totalPage;for(var c=[],l=n,v=0;v<this.totalPage;v++){var d=h(v),b=(w=this.Xt.page[d]).image.orgwidth;l<(g=t*(y=w.image.orgheight)/b)&&(l=g)}for(v=0;v<this.totalPage;v++){d=h(v),b=(w=this.Xt.page[d]).image.orgwidth;var g,p,m,w,y=w.image.orgheight,O=w.image.pagespread;if(g=t*y/b,p=0===v?0:u===k.PageSpread.Left&&O===k.PageSpread.Right?o:o+50,p=this.rr(p),m=(l-g)/2,a[w.id]=new k.Rectangle(p,m,t,g),g<=n)f[d]=[{x:-p,y:n-l}];else{var M=-m,j=n-g-m,x=Math.floor((g-50)/(n-50))+1;f[d]=[];for(var S=0;S<x;S++)f[d].push({x:-p,y:M-S*(M-j)/(x-1)})}if(i<=d&&d<=e)if(u===k.PageSpread.Left&&O===k.PageSpread.Right)if(0<c.length){var I=c.pop();"number"==typeof I?c.push([I,-p]):(c.push(I),c.push(-p))}else c.push(-p);else c.push(-p);o=p+t,u=O}var E=0<=this.currentPage?this.currentPage:0;this.Zn=new k.Rectangle(f[E][0].x,f[E][0].y,o,l),this.Qn(a);var T=0;this.gn=[],f.forEach(function(t,n){i<=n&&n<=e&&t.forEach(function(t,i){r.gn.push({page:n,section:i,x:t.x,y:t.y,excludeCond:0===i?8:9}),T=Math.max(T,i)})}),this.$n=f.map(function(t){return t.length}),this.Kn();var P=new k.SectionAligner(this.gn,c,[[n-l,0]]),C=this.tr.horizontalFitWidthTapAreas(T);this.ir(P,C,!0),this.Hn=0===T?s?D.Left:D.Right:D.Bottom,null!==this.zn&&(0===T?(this.nr(C[0].area,this.zn.left),this.nr(C[1].area,this.zn.right)):(this.nr(C[0].area,this.zn.top),this.nr(C[1].area,this.zn.bottom)))},f.prototype.Wn=function(t){var i=t;return this.Kt&&t<(i="%"===this.Kt.unit?t*this.Kt.num/100:this.Kt.num)&&(i=t),i},f.prototype.Qn=function(t){for(var i in t){var n=t[i],r=document.getElementById(i)||(i in this.Gi?this.Gi[i].element:null);r&&(r.style.width=n.width+"px",r.style.height=n.height+"px",this.Cn(r,n,1))}this.En=t},f.prototype.yn=function(t,i,n){for(var r in this.Zn.left=t,this.Zn.top=i,this.En){var e=this.En[r],s=document.getElementById(r);s&&this.Cn(s,e,n)}},f.prototype.Cn=function(t,i,n){var r=this.Zn.left,e=this.Zn.top,s=r+i.left*n,h=this.rr(s),u=(this.rr(s+i.width*n)-h)/i.width,o=e+i.top*n,a=this.rr(o),f="translate("+h+"px,"+a+"px) scale("+u+","+(this.rr(o+i.height*n)-a)/i.height+")";t.style.webkitTransform=f,t.style.transform=f},f.prototype.rr=function(t){var i=H.devicePixelRatio||1;return Math.floor(t*i)/i},f.prototype.er=function(t,i){void 0===i&&(i=0);var n=this.sr(t),r=this.hr(n),e=this.ur(r,n),s=this.Xt.page[r],h=this.Sn.getScale(),u=this.ui.getBoundingClientRect(),o=this.sr({x:1,y:1}),a=new k.Rectangle(o.x,o.y,(u.width-2)/h,(u.height-2)/h),f=this.En[s.id],c=k.Rectangle.intersect(f,a);if(null===c)return{pageIndex:r,bboxIndexes:[]};for(var l=this.ur(r,{x:c.left,y:c.top}),v=this.ur(r,{x:c.right,y:c.bottom}),d=new k.Rectangle(l.x,l.y,v.x-l.x,v.y-l.y),b=s.image.texts,g=Number.POSITIVE_INFINITY,p=[],m=0;m<b.length;m++){var w=b[m],y=new k.Rectangle(w.left,w.top,w.right-w.left,w.bottom-w.top);if(d.intersects(y)){var O=y.distance(e);(0===i||O<=i)&&(O<g?(g=O,p=[m]):g===O&&p.push(m))}}return{pageIndex:r,bboxIndexes:p}},f.prototype.hr=function(t){for(var i=Number.POSITIVE_INFINITY,n="",r=Object.keys(this.En),e=0;e<r.length;e++){var s=r[e],h=this.En[s].distance(t);if(h<i&&(i=h,n=s),0===i)break}var u=this.Xt.page;for(e=0;e<u.length;e++)if(u[e].id===n)return e;return-1},f.prototype.sr=function(t){var i=this.Sn.getScale();return{x:(t.x-this.Zn.left)/i,y:(t.y-this.Zn.top)/i}},f.prototype.ur=function(t,i){var n=this.Xt.page[t],r=this.En[n.id];return{x:(i.x-r.left)/r.width*n.image.orgwidth,y:(i.y-r.top)/r.height*n.image.orgheight}},f.prototype.or=function(t,i){var n=this.Xt.page[t],r=this.En[n.id],e=i.x/n.image.orgwidth*r.width+r.left,s=i.y/n.image.orgheight*r.height+r.top,h=this.Sn.getScale();return{x:e*h+this.Zn.left,y:s*h+this.Zn.top}},f.prototype.Kn=function(){var n=this;this.pn=Array.apply(null,{length:this.totalPage}).map(function(){return-1}),this.gn.forEach(function(t,i){0===t.section&&(n.pn[t.page]=i)})},f.prototype.ir=function(t,i,n){this.Sn&&(this.Sn.release(),this.Sn=null);var r=this.rn&&this.Xt.permissions.selection!==k.ContentPermissionState.Denied,e={clientRect:this.Zn,aligner:t,tapAreas:i,userActionEnabled:this.in,scaleByDoubleTap:this.nn,forceAnchorByFlick:n,selectionEnabled:r,selectionStartLatency:this.Xi.options.selectionStartLatency};this.Sn=new k.ElementDragger(this.ui,this.vn,e)},f.prototype.nr=function(t,i){var n=t.split(" ");if(4===n.length){var r=document.createElement("div");r.style.top=n[0],r.style.right=n[1],r.style.bottom=n[2],r.style.left=n[3],r.className=g+" "+i.trim(),this.ui.appendChild(r)}},f.prototype._n=function(){for(var t=document.getElementsByClassName(g),i=t.length-1;0<=i;i--){var n=t[i];n.parentNode.removeChild(n)}},f.prototype.Mn=function(t){var i=this.er(t,20);return 0===i.bboxIndexes.length?null:{pageIndex:i.pageIndex,boundingBoxIndex:i.bboxIndexes[0]}},f.prototype.jn=function(t){var i=this.er(t);if(0===i.bboxIndexes.length)return null;var n=i.bboxIndexes[0];if(1<i.bboxIndexes.length){var r=i.bboxIndexes.reduce(function(t,i){return Math.min(t,i)}),e=i.bboxIndexes.reduce(function(t,i){return Math.max(t,i)}),s=this.Xi.anchor.pageIndex,h=this.Xi.anchor.boundingBoxIndex;n=i.pageIndex===s?Math.abs(r-h)>Math.abs(e-h)?r:e:i.pageIndex<s?e:r}return{pageIndex:i.pageIndex,boundingBoxIndex:n}},f.prototype.ar=function(){var i=this,t=this.Sn.getScale(),n=this.ui.getBoundingClientRect(),r=this.sr({x:n.left+1,y:n.top+1}),e=new k.Rectangle(r.x,r.y,(n.width-2)/t,(n.height-2)/t);return Object.keys(this.En).filter(function(t){return i.En[t].intersects(e)})},f.prototype.Zi=function(i){if(i){function t(){var t=k.timer();200<=t-e&&i(),e=t}var n,r,e=0;if("hidden"in document)n="hidden",r="visibilitychange";else if("msHidden"in document)n="msHidden",r="msvisibilitychange";else{if(!("webkitHidden"in document))return;n="webkitHidden",r="webkitvisibilitychange"}document.addEventListener(r,function(){document[n]&&t()},!1),H.addEventListener("pagehide",function(){t()},!1),H.addEventListener("beforeunload",function(){t()},!1)}},f.prototype.Yi=function(){var t=null;if("items"in this.Hi&&0<this.Hi.items.length){var i=this.Hi.items[0];"InlineRecommendPageURL"in i&&(t=this.fr(i.InlineRecommendPageURL))}null===t&&(t=this.fr(this.ui.getAttribute("data-binbsp-recommend")||[])),this.kn=[];for(var n=0;n<t.length;n++){var r=t[n];if(r&&r.id){if(r.url){if(document.getElementById(r.id))continue;var e=document.createElement("div");e.id=r.id,this.ui.appendChild(e)}else this.ui.appendChild(document.getElementById(r.id));var s={id:r.id,src:"",orgwidth:r.orgwidth,orgheight:r.orgheight,pagespread:r.pagespread,anchors:[],texts:[],usemap:""},h=this.Xt.page.length;this.Xt.page.push({id:r.id,src:r.url+"#"+r.id,index:-1,image:s,isContent:!1,isFromHtml:!0}),this.kn.push({id:r.id,url:r.url,index:h,isLoaded:""===r.url})}}},f.prototype.fr=function(t){var i=this.Xt.page[this.Xt.page.length-1].image.pagespread,n=[];if("string"==typeof t)for(var r=t.trim().split(/\s+/),e=0;e<r.length;e++)(h=this.cr(r[e],i))&&h.id&&(n.push(h),i=h.pagespread);else if(Array.isArray(t))for(e=0;e<t.length;e++){var s=t[e];if(s&&"Url"in s){var h,u=s.Url;"string"==typeof u&&(h=this.cr(u+"[next]",i))&&h.id&&(n.push(h),i=h.pagespread)}}return n},f.prototype.cr=function(t,i){var n=848,r=1200,e=k.PageSpread.Center,s=!1,h=t.match(/^([^#\[\]]*)(#([^\[\]]*))?(\[([^\]]*)\])?$/);if(!h)return null;var u=h[1]||"";if(!u&&!h[2])return null;for(var o=h[3]||"recommend",a=(h[5]||"").split(","),f=0;f<a.length;f++){var c=a[f].toLowerCase();if("left"===c)e=k.PageSpread.Left,s=!1;else if("right"===c)e=k.PageSpread.Right,s=!1;else if("center"===c)e=k.PageSpread.Center,s=!1;else if("next"===c)e=this.Xt.direction===k.Direction.RTL?k.PageSpread.Right:k.PageSpread.Left,s=!0;else if("nextcenter"===c)e=k.PageSpread.Center,s=!0;else{var l=c.match(/^([1-9][0-9]*):([1-9][0-9]*)$/);l&&(n=parseInt(l[1],10),r=parseInt(l[2],10))}}return s&&0<this.Xt.page.length&&(this.Xt.direction===k.Direction.RTL&&i===k.PageSpread.Right?e=k.PageSpread.Left:this.Xt.direction===k.Direction.LTR&&i===k.PageSpread.Left&&(e=k.PageSpread.Right)),{url:u,id:o,orgwidth:n,orgheight:r,pagespread:e}},f.prototype.mn=function(){function t(t){var n=h.kn[t];if(n.url&&!n.isLoaded){var i=h.ui.offsetParent.getBoundingClientRect(),r=Math.max(i.width,i.height)/2;if(h.isPageVisible(n.index,-r)){h.kn[t].isLoaded=!0;var e=document.getElementById(n.id);e&&k.HtmlEmbedder.embed(e,n.url).then(function(t){if(t){var i=t.getElementsByTagName("iframe");i&&0<i.length&&(s.Pn[n.id]=!0)}})}}}for(var s=this,h=this,i=0;i<this.kn.length;i++)t(i)},Object.defineProperty(f.prototype,"receiveMessage",{get:function(){var h=this;return function(t){var i=new k.UrlParser(t.origin),n=new k.UrlParser(H.location.href);if(i.scheme===n.scheme&&i.host===n.host&&i.port===n.port&&t.source instanceof Window){var r;try{r=JSON.parse(t.data)}catch(t){return}if("request"in r&&"string"==typeof r.request){var e=r.request.toString();if(e in h.lr){var s="id"in r&&"string"==typeof r.id?r.id.toString():"";s&&h.ui.id!==s||h.lr[e](r,t.source)}}}}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isDraggerInitialized",{get:function(){return null!=this.Sn},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"selector",{get:function(){return this.Xi},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"selectionEnabled",{get:function(){return this.rn},set:function(t){this.rn=t,this.sn()},enumerable:!1,configurable:!0}),f);function f(t,i,n,r){var s=this;this.Rn={horizontal:{isVerticalView:!1,isSpread:o.Auto,isFitWidth:!1,isSwipeByPage:!0,isMargined:!0},"horizontal-fitwidth":{isVerticalView:!1,isSpread:o.Off,isFitWidth:!0,isSwipeByPage:!0,isMargined:!0},vertical:{isVerticalView:!0,isSpread:o.Off,isFitWidth:!1,isSwipeByPage:!0,isMargined:!0},"vertical-fitwidth":{isVerticalView:!0,isSpread:o.Off,isFitWidth:!0,isSwipeByPage:!1,isMargined:!0},"vertical-seamless":{isVerticalView:!0,isSpread:o.Off,isFitWidth:!1,isSwipeByPage:!1,isMargined:!0},tateyomi:{isVerticalView:!0,isSpread:o.Off,isFitWidth:!0,isSwipeByPage:!1,isMargined:!1}},this.In=null,this.cn=!1,this.Xt=null,this.An=null,this.Ui=null,this.qi=null,this.Sn=null,this.vn=null,this.hn=-1,this.un=-1,this.kn=[],this.ri=f.defaultScrollMode,this.dn=!1,this.Dn=!1,this.Fn=!1,this.Bn=!1,this.Jn=!1,this.Yn=!1,this.Zn=null,this.En=null,this.gn=null,this.$n=[],this.pn=[],this.Kt=null,this.ti=50,this.in=!0,this.nn=2,this.ii=0,this.ni=-1,this.Hn=D.Invalid,this.Fi=[],this.vr=0,this.dr=null,this.Xi=null,this.rn=!1,this.Hi=null,this.zi="",this.Gi={},this.Pn={},this.zn=null,this.tr=null,this.lr={getContentInfo:function(t,i){var n={title:document.title,author:"",publisher:"",description:""};s.Xt instanceof k.PowerThumb.BinbContent&&(n.title=s.Xt.reader.bibliography.title,n.author=s.Xt.reader.bibliography.author,n.publisher=s.Xt.reader.bibliography.publisher,n.description=s.Xt.reader.bibliography.description),i.postMessage(JSON.stringify({id:s.ui.id,response:"getContentInfo",total:s.totalPage,direction:s.Xt.direction===k.Direction.RTL?"rtl":"ltr",bibliography:n,toc:[]}),"*")},getRawBibGetCntntInfoResponse:function(t,i){i.postMessage(JSON.stringify({id:s.ui.id,response:"getRawBibGetCntntInfoResponse",data:s.Hi}),"*")},getRawTTX:function(t,i){i.postMessage(JSON.stringify({id:s.ui.id,response:"getRawTTX",data:s.zi}),"*")},refresh:function(t,i){s.refresh(),i.postMessage(JSON.stringify({id:s.ui.id,response:"refresh"}),"*")},getPage:function(t,i){i.postMessage(JSON.stringify({id:s.ui.id,response:"getPage",pagePosition:s.currentPage,total:s.totalPage}),"*")},setPage:function(t,i){var n,r,e=!1;"to"in t&&(r=t.to),"isSmooth"in t&&(e=!!t.isSmooth),n=-1!==r?s.movePage(r,e):s.currentPage,i.postMessage(JSON.stringify({id:s.ui.id,response:"setPage",pagePosition:n}),"*")},getScale:function(t,i){i.postMessage(JSON.stringify({id:s.ui.id,response:"getScale",scale:s.scale}),"*")},setScale:function(t,i){if("scale"in t){var n=t.scale,r=s.Sn.setScale(n);i.postMessage(JSON.stringify({id:s.ui.id,response:"setScale",scale:r}),"*")}}},this.ui=t,this.Ji=n;var e=t.offsetParent;this.In={width:e.clientWidth,height:e.clientHeight},this.cn=!1,this.Gi={},this.Pn={},this.tr=r,this.Xi=new k.Selector({onSelectionChange:function(){s.Ji.onSelectionChange()},getClientPosition:function(t,i){return s.or(t,i)},isSpreadView:function(){return s.Dn}});function h(){clearTimeout(s.vr),s.vr=setTimeout(function(){s.vr=0,s.Qi(s.ri),s.sn()},100)}"ResizeObserver"in H?(this.dr=new ResizeObserver(function(t){for(var i=0,n=t;i<n.length;i++){n[i].target===s.ui&&h()}}),this.dr.observe(this.ui)):H.addEventListener("resize",h,!1),H.addEventListener("click",function(t){if(t.target instanceof HTMLElement)for(var i=t.target;null!==i;){if(i instanceof HTMLAnchorElement){var n=location.href.replace(location.hash,""),r=i.href;if(0===r.indexOf(n)&&(r=r.replace(n,"")),0===r.indexOf("#")&&(r=r.substr(1)).match(/^(0|[1-9][0-9]*)$/)){var e=parseInt(r,10);return 0<=e&&e<s.totalPage&&s.movePage(e,!0),void t.preventDefault()}}i=i.parentElement}},!1),this.ui.addEventListener("ptimg-activate",function(t){t.target instanceof Element&&(s.Ri(t.target),k.Indicator.refreshElement(t.target.id))}),this.ui.addEventListener("ptimg-error",function(t){t.target instanceof Element&&s.Ri(t.target)}),this.ln();var u=t.id+"-p";t.getAttribute(k.PowerThumb.PTBINB_ATTR_NAME)?this.Vi(u,i):this.Bi(u,i)}k.ContentRenderer=u}(g=g||{}),function(c){var a,t,f,i,d=1e-10,b=-.001953125,g=-.001953125,s=1.03125,n="pt-active",r="antimoire";(t=a=a||{})[t.Unset=0]="Unset",t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom",t[t.Next=5]="Next",t[t.Previous=6]="Previous",t[t.ScrollUp=7]="ScrollUp",t[t.ScrollDown=8]="ScrollDown",t[t.Others=9]="Others",(i=f=f||{})[i.Start=0]="Start",i[i.Move=1]="Move",i[i.End=2]="End";var o,e,h=(Object.defineProperty(l.prototype,"touches",{get:function(){return this.br},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"defaultPrevented",{get:function(){return this.gr.defaultPrevented},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isTouchOutsideClient",{get:function(){return this.pr},enumerable:!1,configurable:!0}),l.mr=[],l);function l(t,i,n){this.pr=!1;var r=0,e=0;if(n){var s=n.getBoundingClientRect();r=s.left,e=s.top}var h=[];if("undefined"!=typeof PointerEvent&&t instanceof PointerEvent)if("touch"===t.pointerType){if(i===f.Start&&t.isPrimary)h=[{pointerId:t.pointerId,offsetX:t.clientX-r,offsetY:t.clientY-e}];else{for(var u=0;u<l.mr.length;u++){var o=l.mr[u];t.pointerId===o.pointerId?i===f.Move&&h.push({pointerId:o.pointerId,offsetX:t.clientX-r,offsetY:t.clientY-e}):h.push({pointerId:o.pointerId,offsetX:o.offsetX,offsetY:o.offsetY})}i===f.Start&&h.push({pointerId:t.pointerId,offsetX:t.clientX-r,offsetY:t.clientY-e})}t.screenX<0&&(this.pr=!0)}else i!==f.End&&(h=[{pointerId:1,offsetX:t.clientX-r,offsetY:t.clientY-e}]);else if("undefined"!=typeof TouchEvent&&t instanceof TouchEvent)for(u=0;u<t.touches.length;u++){o=t.touches[u];h.push({pointerId:u+1,offsetX:o.clientX-r,offsetY:o.clientY-e}),o.screenX<0&&(this.pr=!0)}else t instanceof MouseEvent&&i!==f.End&&(h=[{pointerId:1,offsetX:t.clientX-r,offsetY:t.clientY-e}]);l.mr=[];for(u=0;u<h.length;u++)l.mr.push({pointerId:h[u].pointerId,offsetX:h[u].offsetX,offsetY:h[u].offsetY});this.gr=t,this.br=h}(e=o=o||{})[e.Unset=0]="Unset",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Up=3]="Up",e[e.Down=4]="Down";var u=(v.prototype.release=function(){this.wr&&(clearTimeout(this.yr),this.yr=0,this.wr=!1),this.hi&&this.hi.forEach(function(t){t.target.removeEventListener(t.type,t.listener,t.capture)})},v.prototype.Or=function(t){if(t.target instanceof HTMLElement)for(var i=t.target;null!==i;){if(i===this.ui)return!0;i=i.parentElement}return!1},v.prototype.Mr=function(t,i){if(t.target instanceof HTMLElement)for(var n=t.target;null!==n&&n!==this.ui;){if(n instanceof HTMLAnchorElement)return i&&this.jr(n),!0;if(n instanceof HTMLButtonElement)return!0;if(n instanceof HTMLInputElement&&"button"===n.type)return!0;n=n.parentElement}return t.preventDefault(),!1},v.prototype.xr=function(t){if(c.UserAgent.os.iOS||c.UserAgent.os.iPadOS){var i=H.orientation||0,n=H.parent.innerWidth,r=H.parent.innerWidth/(0===i?H.parent.screen.width:H.parent.screen.height),e=10*r,s=n-10*r;if("undefined"!=typeof PointerEvent&&t instanceof PointerEvent){if("touch"===t.pointerType&&(t.screenX<e||s<t.screenX))return!0}else if("undefined"!=typeof TouchEvent&&t instanceof TouchEvent)for(var h=0;h<t.touches.length;h++){var u=t.touches[h];if(u.screenX<e||s<u.screenX)return!0}}return!1},v.prototype.jr=function(t){this.Sr(),this.Ir=t,c.addClass(this.Ir,n)},v.prototype.Sr=function(){this.Ir&&c.removeClass(this.Ir,n),this.Ir=null},v.prototype.Er=function(t,i){void 0===i&&(i=!1),this.Tr=!1,this.Or(t)&&(this.Mr(t,!0),this.Pr||0!==t.button||(this.Pr=!0,i||this.Cr(new h(t,f.Start,this.ui.offsetParent))))},v.prototype.Ar=function(t,i){void 0===i&&(i=!1),this.Pr&&(t.preventDefault(),10<=this.kr&&this.Sr(),i||this.Dr(new h(t,f.Move,this.ui.offsetParent)))},v.prototype.Nr=function(t,i){void 0===i&&(i=!1),this.Pr&&(this.Lr=c.timer(),this.Sr(),this.Mr(t,!1)&&10<=this.kr&&(t.preventDefault(),this.Tr=!0),this.Pr=!1,i||this.Rr(new h(t,f.End,this.ui.offsetParent)))},v.prototype.Fr=function(t,i){void 0===i&&(i=!1),this.xr(t)||(this.Tr=!1,this.Mr(t,!0),c.timer()-this.Lr<200&&t.preventDefault(),i||this.Cr(new h(t,f.Start,this.ui.offsetParent)))},v.prototype.Jr=function(t,i){void 0===i&&(i=!1),t.preventDefault(),10<=this.kr&&this.Sr(),i||this.Dr(new h(t,f.Move,this.ui.offsetParent))},v.prototype.Br=function(t,i){void 0===i&&(i=!1),this.Lr=c.timer(),this.Sr(),this.Mr(t,!1)&&10<=this.kr&&(t.preventDefault(),this.Tr=!0),i||this.Rr(new h(t,f.End,this.ui.offsetParent))},v.prototype.getElementRect=function(){return new c.Rectangle(this.Hr[0],this.Hr[1],this.zr[0],this.zr[1])},v.prototype.moveToAnchor=function(t,i){if(i)this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this._r(c.timer(),t);else{this.Vr(t);var n=this.Gr.getAnchorPosition(t);this.Ur(n.x,n.y),this.vn.onScrollEndX(this.Xr,n.x),this.vn.onScrollEndY(this.Xr,n.y)}},v.prototype.scroll=function(t,i,n){var r=this.qr(t,i);if(0===r.x&&0===r.y)return this.Xr;var e=this.Yr(r.x,r.y,n);return r.direction===o.Left?this.vn.onScrollLeft(e.isOutsideHorizontal):r.direction===o.Right?this.vn.onScrollRight(e.isOutsideHorizontal):r.direction===o.Up?this.vn.onScrollUp(e.isOutsideVertical):r.direction===o.Down&&this.vn.onScrollDown(e.isOutsideVertical),e.index},v.prototype.getScale=function(){return this.Wr},v.prototype.setScale=function(t){if(this.Wr!==t){var i=c.timer(),n=t;t<s?n=1:5<t&&(n=5),this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.Zr=this.Wr;var r=[this.In.width/2,this.In.height/2],e=this.Qr(r,r,n);return this.Ur(e.pos[0],e.pos[1],n),this.Kr(e.overflow,!1),this.te(),this.vn.onChangeScale(n),1!==n||this.Gr.contains(0,e.pos[0])&&this.Gr.contains(1,e.pos[1])||(this.$r[0]=this.ie[0]=e.pos[0],this.$r[1]=this.ie[1]=e.pos[1],this.ne(i,0,0)),n}},v.prototype.re=function(t){var i=c.timer(),n=t.touches[0].offsetX,r=t.touches[0].offsetY;this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.ee=!1,this.se[0]=!0,this.se[1]=!0,this.Zr=this.Wr,this.he[0]=n,this.he[1]=r,this.he[2]=i,this.Kr([0,0],!1),this.ue=[],this.ue.unshift([i,n,r]),this.kr=0,this.oe=!0,this.ae=!1,0<this.fe&&(this.ce(),this.vn.onClearSelection()&&(this.ae=!0)),this.te()},v.prototype.le=function(t){this.ve(),this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.Zr=this.Wr,this.he[0]=t.touches[0].offsetX,this.he[1]=t.touches[0].offsetY,this.de[0]=t.touches[1].offsetX,this.de[1]=t.touches[1].offsetY,this.be[0]=(this.he[0]+this.de[0])/2,this.be[1]=(this.he[1]+this.de[1])/2,this.ge=!0,this.te()},v.prototype.pe=function(t){if(1===t.touches.length){if(t.isTouchOutsideClient&&(this.ee=!0,this.se[0]=!1,this.se[1]=!1,this.ue=[]),!this.ee&&this.se[0]&&this.se[1])if(1<this.Wr)this.ee=!0;else{var i=Math.abs(t.touches[0].offsetX-this.he[0]),n=Math.abs(t.touches[0].offsetY-this.he[1]);n<=1.2*i?15<=i&&(this.se[1]=!1,this.ee=!0):15<=n&&(this.se[0]=!1,this.ee=!0)}var r=c.timer(),e=this.se[0]?t.touches[0].offsetX:this.he[0],s=this.se[1]?t.touches[0].offsetY:this.he[1];if(0<this.ue.length){var h=this.ue[0][1],u=this.ue[0][2];this.kr+=Math.sqrt((e-h)*(e-h)+(s-u)*(s-u))}10<=this.kr&&this.ve();for(var o=5;o<this.ue.length;o++)if(r-100>this.ue[o][0]){this.ue.splice(o,this.ue.length-o);break}if(this.ue.unshift([r,e,s]),this.ee){var a=[this.he[0],this.he[1]],f=this.Qr([e,s],a,this.Wr);this.Ur(f.pos[0],f.pos[1]),this.Kr(f.overflow,!1),this.me(f.pos[0],f.pos[1])}}},v.prototype.we=function(t){if(2===t.touches.length){this.ve(),this.ye();var i=this.Oe(t.touches[0].offsetX,t.touches[0].offsetY,t.touches[1].offsetX,t.touches[1].offsetY),n=[(t.touches[0].offsetX+t.touches[1].offsetX)/2,(t.touches[0].offsetY+t.touches[1].offsetY)/2],r=this.Qr(n,this.be,i),e=this.Wr!=i;this.Ur(r.pos[0],r.pos[1],i),this.Kr(r.overflow,!1),e&&(this.te(),this.vn.onChangeScale(i)),this.me(r.pos[0],r.pos[1])}},v.prototype.Kr=function(t,i){var n=this.Me[0]!==t[0],r=this.Me[1]!==t[1];this.Me[0]=t[0],this.Me[1]=t[1],n&&this.vn.onMoveToOutsideX(t[0],i),r&&this.vn.onMoveToOutsideY(t[1],i)},v.prototype.Qr=function(t,i,n){for(var r=[this.In.width,this.In.height],e=[0,0],s=[0,0],h=0;h<2;h++){var u=r[h]*(1-n)+this.Gr.min(h)*n,o=n*this.Gr.max(h);e[h]=t[h]-n/this.Zr*(i[h]-this.$r[h]),e[h]<u?(s[h]=u-e[h],e[h]=u):e[h]>o&&(s[h]=o-e[h],e[h]=o)}return{pos:e,overflow:s}},v.prototype.je=function(){this.ve(),this.ye(),0!==this.Me[0]&&this.vn.onTouchEndOutsideX(this.Me[0]),0!==this.Me[1]&&this.vn.onTouchEndOutsideY(this.Me[1]),this.Kr([0,0],!0);for(var t=c.timer(),i=5;i<this.ue.length;i++)if(t-100>this.ue[i][0]){this.ue.splice(i,this.ue.length-i);break}var n=this.ue[this.ue.length-1][0],r=Math.max(n+50,this.Lr);this.ue.unshift([r,this.ue[0][1],this.ue[0][2]]),this.oe=!1,this.ee=!1,this.se[0]=!0,this.se[1]=!0,this.te()},v.prototype.xe=function(){0!==this.Me[0]&&this.vn.onTouchEndOutsideX(this.Me[0]),0!==this.Me[1]&&this.vn.onTouchEndOutsideY(this.Me[1]),this.Kr([0,0],!0),this.ge=!1,this.te()},v.prototype.Cr=function(t){if(this.Se)2===t.touches.length&&this.Ie();else if(1===t.touches.length){if(this.oe)return;this.Ee(),this.Te&&this.Pe(),this.re(t)}else 2===t.touches.length&&(this.oe&&(this.je(),this.Ee()),this.le(t))},v.prototype.Dr=function(t){this.Se?this.Ce(t):this.oe?this.pe(t):this.ge&&this.we(t)},v.prototype.Rr=function(t){if(this.Se)this.Ie();else{var i=this.Lr;if(this.oe){if(this.je(),this.ie[0]=this.Hr[0],this.ie[1]=this.Hr[1],10<=this.kr){this.Ae&&this.ue.pop();var n=[this.ke(this.ue,0,1),this.ke(this.ue,0,2)];if(1===this.Wr){var r=this.De(n[0],this.kr),e=this.De(n[1],this.kr);if(r||e)if(this.Ne){var s=!e||Math.abs(n[0])>=Math.abs(n[1])?0:1;250<i-this.he[2]||this.kr<200?this.Le(i,s,n[0],n[1]):this.Re(i,s,n[0],n[1])}else this.Fe(i,n[0],n[1]);else this.ne(i,n[0],n[1])}else this.Je(i,n[0],n[1])}else if(t.defaultPrevented)if(this.Te){var h=this.he[0]-this.Be[0],u=this.he[1]-this.Be[1],o=h*h+u*u;i-this.Be[2]<=400&&o<=2500?(this.He(i),this.Te=!1):(this.Be=[this.he[0],this.he[1],this.he[2]],this.ze(i))}else this.Te=!0,this.Be=[this.he[0],this.he[1],this.he[2]],this.ze(i);else 1===this.Wr&&this.ne(i,0,0);this.Ae=!1}else this.ge?(this.xe(),this.Ae=!0,1===t.touches.length?this.re(t):(this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.ie[0]=this.Hr[0],this.ie[1]=this.Hr[1],this.ue=[],this.kr=0,1===this.Wr&&this.ne(i,0,0))):1===t.touches.length&&(this.Ae=!0,this.re(t));this.$e=!1}},v.prototype.De=function(t,i){var n=Math.abs(t);return!(i<0)&&(.0625<=n||0<100*(n-0)-.0625*(i-0))},v.prototype.ze=function(t){var i=this;if(1===this.Wr){var n=!0;if(!this.Ae){var r=this._e(this.he[0],this.he[1]);r===a.Left?(this.Ve(t),n=!1):r===a.Right?(this.Ge(t),n=!1):r===a.Top?(this.Ue(t),n=!1):r===a.Bottom?(this.Xe(t),n=!1):r===a.Next?(this.qe(t),n=!1):r===a.Previous?(this.Ye(t),n=!1):r===a.ScrollUp?(this.We(t,-90),n=!1):r===a.ScrollDown?(this.We(t,90),n=!1):r===a.Others&&!this.$e&&this.kr<10&&5<=t-this.he[2]&&this.Ze(t-this.he[2],function(){i.vn.onMenu()})}n&&this.ne(t,0,0)}this.Ae=!1},v.prototype.Ze=function(t,i){var n=this;this.Pe(),this.Qe=setTimeout(function(){n.Te=!1,i()},300-t)},v.prototype.Pe=function(){this.Qe&&clearTimeout(this.Qe),this.Qe=0},v.prototype.Ve=function(t){var i=this.Ke(this.ie[0]+1,this.ie[1],this.ie[0]+1,null,null,null,this.Xr,0);if(t-this.ts<200&&0<this.ns[0]&&null!==i){var n=this.Gr.getAnchorPosition(i),r=this.Gr.getNearestAnchorIndexInArea(n.x+1,n.y,n.x+1,null,null,null,this.Xr,0);null!==r&&(i=r)}null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnLeft(null===i)},v.prototype.Ge=function(t){var i=this.Ke(this.ie[0]-1,this.ie[1],null,this.ie[0]-1,null,null,this.Xr,0);if(t-this.ts<200&&this.ns[0]<0&&null!==i){var n=this.Gr.getAnchorPosition(i),r=this.Gr.getNearestAnchorIndexInArea(n.x-1,n.y,null,n.x-1,null,null,this.Xr,0);null!==r&&(i=r)}null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnRight(null===i)},v.prototype.Ue=function(t){var i=this.Ke(this.ie[0],this.ie[1]+1,null,null,this.ie[1]+1,null,this.Xr,0);if(t-this.ts<200&&0<this.ns[1]&&null!==i){var n=this.Gr.getAnchorPosition(i),r=this.Gr.getNearestAnchorIndexInArea(n.x,n.y+1,null,null,n.y+1,null,this.Xr,0);null!==r&&(i=r)}null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnTop(null===i)},v.prototype.Xe=function(t){var i=this.Ke(this.ie[0],this.ie[1]+1,null,null,null,this.ie[1]-1,this.Xr,0);if(t-this.ts<200&&this.ns[1]<0&&null!==i){var n=this.Gr.getAnchorPosition(i),r=this.Gr.getNearestAnchorIndexInArea(n.x,n.y+1,null,null,null,n.y-1,this.Xr,0);null!==r&&(i=r)}null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnBottom(null===i)},v.prototype.qe=function(t){var i=this.rs(this.Xr,this.Xr+1);null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnNext(null===i)},v.prototype.Ye=function(t){var i=this.rs(this.Xr,this.Xr-1);null!==i&&this._r(c.timer(),i),this.Te=!1,this.vn.onTurnPrevious(null===i)},v.prototype.We=function(t,i){var n=this.qr(0,i.toString(10)+"%"),r=this.Yr(n.x,n.y,!0);n.direction===o.Up?this.vn.onScrollUp(r.isOutsideVertical):n.direction===o.Down&&this.vn.onScrollDown(r.isOutsideVertical)},v.prototype.qr=function(t,i){var n=0,r=0,e=this.In.width,s=this.In.height;if("string"==typeof t){if(t.match(/^(\-|\+)?([0-9]+(\.[0-9]+)?)%$/)){var h=parseFloat(t.substr(0,t.length-1));isNaN(h)||(n=-e*h/100)}}else n=-t;"string"==typeof i?i.match(/^(\-|\+)?([0-9]+(\.[0-9]+)?)%$/)&&(h=parseFloat(i.substr(0,i.length-1)),isNaN(h)||(r=-s*h/100)):r=-i;var u=o.Unset;return Math.abs(n)<Math.abs(r)?0<r?u=o.Up:r<0&&(u=o.Down):0<n?u=o.Left:n<0&&(u=o.Right),{x:n,y:r,direction:u}},v.prototype.Yr=function(t,i,n){var r=this.es?this.ss[0]:this.Hr[0],e=this.es?this.ss[1]:this.Hr[1],s=r+t,h=e+i,u=!1,o=!1;this.es=!1;var a=this.Xr;if(1<=Math.abs(s-r)||1<=Math.abs(h-e)){this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.Zr=this.Wr;var f=this.Qr([s-r,h-e],[0,0],this.Wr);a=this.hs(f.pos[0],f.pos[1],this.Xr,0),u=Math.abs(f.overflow[0])>=d,o=Math.abs(f.overflow[1])>=d,n?(this.es=!0,this.ss[0]=s,this.ss[1]=h,this.us(c.timer(),s,h)):(null!==a&&this.Vr(a),this.Ur(f.pos[0],f.pos[1]),this.vn.onScrollEndX(this.Xr,s),this.vn.onScrollEndY(this.Xr,h))}return this.Te=!1,{index:a,isOutsideHorizontal:u,isOutsideVertical:o}},v.prototype.rs=function(t,i){var n=this.Gr.getAnchorPosition(t),r=this.Gr.getAnchorPosition(i),e=n.x-this.ie[0],s=n.y-this.ie[1],h=Math.sqrt(e*e+s*s),u=null;if(h<10)null!==r&&(u=i);else if(null!==r){var o=r.x-this.ie[0],a=r.y-this.ie[1];u=(e*o+s*a)/(h*Math.sqrt(o*o+a*a))<-.96592582628?i:t}else u=t;return u},v.prototype._e=function(t,i){var n=this.In.width,r=this.In.height;if(this.ae)return this.ae=!1,a.Unset;for(var e=0;e<this.Li.length;e++){var s=this.Li[e];if(s.left<=t&&t<n-s.right&&s.top<=i&&i<r-s.bottom)return s.action}return a.Others},v.prototype.He=function(t){this.Pe();var i=1===this.Wr?this.nn:1,n=[this.he[0],this.he[1]],r=this.Qr(n,n,i),e=this.Wr!=i;this.Ur(r.pos[0],r.pos[1],i),this.Kr(r.overflow,!1),e&&(this.te(),this.vn.onChangeScale(i)),this.me(r.pos[0],r.pos[1]),1===i&&(this.Gr.contains(0,r.pos[0])&&this.Gr.contains(1,r.pos[1])||(this.$r[0]=this.ie[0]=r.pos[0],this.$r[1]=this.ie[1]=r.pos[1],this.ne(t,0,0)))},v.prototype.Vr=function(t){this.Xr!==t&&this.vn.onChangeAnchor(t),this.Xr=t},v.prototype.me=function(t,i){var n=this.hs(t,i,this.Xr,0);null!==n&&this.Vr(n)},v.prototype.ne=function(t,i,n){var r=this.as(0,i),e=this.as(1,n);this.fs(t,r.vel,e.vel,r.acc,e.acc)},v.prototype.Je=function(t,i,n){var r=0<i?b:i<0?-b:0,e=0<n?g:n<0?-g:0;this.fs(t,i,n,r,e)},v.prototype.as=function(t,i){var n=0,r=0,e=0;if(null===(n=10<=Math.abs(this.ie[t]-this.$r[t])?0<i||0===i&&this.ie[t]>this.$r[t]?this.Gr.getLargerMinAllowValue(t,this.ie[t]/this.Wr):this.Gr.getSmallerMaxAllowValue(t,this.ie[t]/this.Wr):this.Gr.getNearestAllowValue(t,this.ie[t]/this.Wr)))return null;var s=n*this.Wr-this.ie[t];return Math.abs(s)>=d&&(r=this.cs(s),e=this.ls(r,s)),{vel:r,acc:e}},v.prototype.Fe=function(t,i,n){var r=this.ie[0]+this.vs(i,b),e=this.ie[1]+this.vs(n,g),s=this.ds(0,r,i),h=this.ds(1,e,n);this.fs(t,s.vel,h.vel,s.acc,h.acc)},v.prototype.ds=function(t,i,n){if(this.Gr.containsLimit(t,i/this.Wr)&&!this.Gr.contains(t,i/this.Wr)){var r=0;if(null!==(r=10<=Math.abs(i-this.$r[t])?0<n||0===n&&i>this.$r[t]?this.Gr.getLargerMinAllowValue(t,i/this.Wr):this.Gr.getSmallerMaxAllowValue(t,i/this.Wr):this.Gr.getNearestAllowValue(t,i/this.Wr))){var e=r*this.Wr-this.ie[t];if(Math.abs(e)>=d)return{vel:n,acc:this.ls(n,e)}}}var s=0===t?b:g;return{vel:n,acc:0<n?s:n<0?-s:0}},v.prototype.Le=function(t,i,n,r){var e=this.bs(i,this.ie[0],this.ie[1],n,r);if(null===e)this.Fe(t,n,r);else{for(var s=[0,0],h=[0,0],u=0;u<2;u++){var o=e[u]-this.ie[u];Math.abs(o)>=d&&(s[u]=this.cs(o),h[u]=this.ls(s[u],o))}this.fs(t,s[0],s[1],h[0],h[1])}},v.prototype.Re=function(t,i,n,r){var e=[this.vs(n,b),this.vs(r,g)],s=this.ie[0]+e[0],h=this.ie[1]+e[1],u=this.bs(i,s,h,n,r);if(null===u)this.Fe(t,n,r);else{for(var o=[Math.abs(e[0])/this.In.width,Math.abs(e[1])/this.In.height],a=[n,r],f=[0,0],c=0;c<2;c++)if(Math.abs(o[c])<d)a[c]=0;else{var l=u[c]-this.ie[c],v=2*l/(this.gs*o[c]);(Math.abs(v)>Math.abs(a[c])||c!==i&&l*e[c]<0)&&(a[c]=v),Math.abs(l)<d?a[c]=0:f[c]=this.ls(a[c],l)}this.fs(t,a[0],a[1],f[0],f[1])}},v.prototype.bs=function(t,i,n,r,e){var s=this.In.width/2,h=this.In.height/2,u=0,o=null,a=null,f=null,c=null,l=0,v=null,d=null,b=null,g=null;l=0===t?(0<r?o=v=i:r<0&&(a=d=i),f=n-h,c=n+h,u=1,5):(0<e?f=b=n:e<0&&(c=g=n),o=i-s,a=i+s,u=2,10);var p=null,m=this.Ke(i,n,o,a,f,c,this.Xr,u),w=this.Ke(i,n,v,d,b,g,this.Xr,l);if(null!==m||null!==w)if(null===m)p=w;else if(null===w)p=m;else if(m===w)p=m;else{var y=this.Gr.getAnchorPosition(m),O=this.Gr.getAnchorPosition(w);p=(0===t?Math.abs(y.x-i)<=Math.abs(O.x-i):Math.abs(y.y-n)<=Math.abs(O.y-n))?m:w}if(null===p&&(p=this.hs(i,n,this.Xr,l)),null===p)return null;var M=this.Gr.getAnchorPosition(p);return[M.x,M.y]},v.prototype._r=function(t,i){if(null!==i){var n=this.Gr.getAnchorPosition(i);this.us(t,n.x,n.y)}else this.fs(t,0,0,0,0)},v.prototype.us=function(t,i,n){this.ie[0]=this.Hr[0],this.ie[1]=this.Hr[1];var r=this.cs(i-this.ie[0]),e=this.ls(r,i-this.ie[0]),s=this.cs(n-this.ie[1]),h=this.ls(s,n-this.ie[1]);this.fs(t,r,s,e,h)},v.prototype.fs=function(t,i,n,r,e){this.$r[0]=this.Hr[0],this.$r[1]=this.Hr[1],this.Zr=this.Wr,this.ps=t,this.ms=[i,n],this.ws=[r,e],this.ys(t,!0)},v.prototype.ys=function(t,i){var n=this;if(this.ts=t,i)this.wr=!0,this.Os=0,this.ns=[0,0];else{if(!this.wr)return;this.Os++}var r=t-this.ps,e=[0,0],s=[0,0],h=[this.$r[0],this.$r[1]];if(0<r){for(var u=0;u<2;u++)0!==this.ws[u]&&(e[u]=this.ms[u]+this.ws[u]*r,Math.abs(e[u])<d&&(e[u]=0)),this.ms[u]*e[u]<0?(s[u]=-this.ms[u]*this.ms[u]/(2*this.ws[u]),e[u]=0):s[u]=this.ms[u]*r+this.ws[u]*r*r/2;var o=this.Qr(s,[0,0],this.Wr);0!==o.overflow[0]&&(e[0]=0),0!==o.overflow[1]&&(e[1]=0),h=[o.pos[0],o.pos[1]],this.Ur(o.pos[0],o.pos[1]);var a=this.hs(o.pos[0],o.pos[1],this.Xr,0);null!==a&&this.Vr(a)}if(0<r&&0===e[0]&&0===e[1])this.yr=0,this.wr=!1,this.es=!1,this.Ms(),i||(this.te(),this.vn.onStopFlip()),Math.abs(this.$r[0]-h[0])>=d&&this.vn.onScrollEndX(this.Xr,h[0]),Math.abs(this.$r[1]-h[1])>=d&&this.vn.onScrollEndY(this.Xr,h[1]);else{for(i&&(this.vn.onStartFlip(),this.te()),u=0;u<2;u++)0!==e[u]&&(this.ns[u]=0<e[u]?1:-1);this.yr=c.requestAnimationFrame(function(){var t=c.timer();n.ys(t,!1)})}},v.prototype.Ee=function(){this.wr?(clearTimeout(this.yr),this.yr=0,this.wr=!1,this.es=!1,this.$e=!0,this.Ms(),this.te(),this.vn.onStopFlip()):this.$e=!1},v.prototype.Ms=function(){var t=this.Os,i=this.ts-this.ps;if(!(t<1)){var n=i/t;if(0==n)this.gs=150;else{var r=3e3/n;150<r?r=150:r<10&&(r=10),this.gs=r}}},v.prototype.ke=function(t,i,n){var r=t.length;if(r<2)return 0;for(var e=[t[0][i]],s=[t[0][n]],h=0,u=0,o=0,a=1;a<r;a++){var f=t[a][i],c=t[a][n],l=t[a-1][n];if(0===o)c<l?o=-1:l<c&&(o=1);else if((c-l)*o<0)break;e.push(f),s.push(c),h+=f,u+=c}var v=e.length,d=h/v,b=u/v,g=0,p=0,m=0,w=0;for(a=0;a<v;a++){var y=e[a]-d,O=s[a]-b;g+=y,p+=y*y,m+=O,w+=y*O}return(v*w-g*m)/(v*p-g*g)},v.prototype.vs=function(t,i){return 0<t?-t*t/(2*i):t<0?t*t/(2*i):0},v.prototype.cs=function(t){return 2*t/this.gs},v.prototype.ls=function(t,i){return Math.abs(i)<d?0:-t*t/(2*i)},v.prototype.Oe=function(t,i,n,r){var e=this.Zr*Math.sqrt(((n-t)*(n-t)+(r-i)*(r-i))/((this.de[0]-this.he[0])*(this.de[0]-this.he[0])+(this.de[1]-this.he[1])*(this.de[1]-this.he[1])));return e<s?e=1:5<e&&(e=5),e},v.prototype.Ur=function(t,i,n){void 0===n&&(n=null);var r=null!==n?n:this.Wr;this.vn.updateElementPosition(t,i,r),this.Hr[0]=t,this.Hr[1]=i,this.Wr=r},v.prototype.te=function(){c.UserAgent.os.iOS&&(this.oe||this.ge||this.wr||1.5<this.Wr?c.removeClass(this.ui,r):c.addClass(this.ui,r))},v.prototype.hs=function(t,i,n,r){var e=this.In.width*(this.Wr-1)/2,s=this.In.height*(this.Wr-1)/2,h=(t+e)/this.Wr,u=(i+s)/this.Wr;return this.Gr.getNearestAnchorIndex(h,u,n,r)},v.prototype.Ke=function(t,i,n,r,e,s,h,u){var o=this.In.width*(this.Wr-1)/2,a=this.In.height*(this.Wr-1)/2,f=(t+o)/this.Wr,c=(i+a)/this.Wr,l=null===n?null:(n+o)/this.Wr,v=null===r?null:(r+o)/this.Wr,d=null===e?null:(e+a)/this.Wr,b=null===s?null:(s+a)/this.Wr;return this.Gr.getNearestAnchorIndexInArea(f,c,l,v,d,b,h,u)},v.prototype.ce=function(){var t=this;this.ve(),this.js=!0,this.xs=setTimeout(function(){t.Ss()},this.fe)},v.prototype.ve=function(){this.js&&(this.Se=!1,this.js=!1,this.xs&&(clearTimeout(this.xs),this.xs=0))},v.prototype.Ss=function(){var t=this.ue[0][1],i=this.ue[0][2];this.vn.onStartSelection(t,i)?(this.oe=!1,this.ee=!1,this.se[0]=!0,this.se[1]=!0,this.xs=0,this.Se=!0,this.js=!1,this.Is(t,i,!0)):this.ve()},v.prototype.Ce=function(t){var i=t.touches[0].offsetX,n=t.touches[0].offsetY;this.vn.onMoveSelection(i,n),this.Is(i,n,!1)},v.prototype.Ie=function(){this.vn.onEndSelection(),this.ye(),this.ve(),this.Se=!1},v.prototype.Is=function(t,i,n){var r=0;t<50?r=-1:this.In.width-50<=t&&(r=1);var e=0;if(i<50?e=-1:this.In.height-50<=i&&(e=1),(n||this.Es!==r||this.Ts!==e)&&(this.ye(),this.Es=r,this.Ts=e,0!==r||0!==e)){var s=this.Ps(t,i,r,e);this.Cs=setTimeout(s,1e3)}},v.prototype.ye=function(){this.Cs&&(clearTimeout(this.Cs),this.Cs=0,this.Es=0,this.Ts=0)},v.prototype.Ps=function(n,r,e,s){var h=this;return function(){var t=h.As(e,s);if(h.vn.onMoveSelection(n,r),0<t){var i=h.Ps(n,r,e,s);h.Cs=setTimeout(i,t)}}},v.prototype.As=function(t,i){var n=0;if(0!==t||0!==i)if(1===this.Wr&&this.Ne){var r=this.Hr[0]-t,e=this.Hr[1]-i,s=t<0?this.Hr[0]-t:null,h=0<t?this.Hr[0]-t:null,u=i<0?this.Hr[1]-i:null,o=0<i?this.Hr[1]-i:null,a=this.Ke(r,e,s,h,u,o,this.Xr,0);null!==a&&this.moveToAnchor(a,!0),n=2e3}else{var f=100*t,c=100*i;this.scroll(f,c,!0),n=500}return n},v);function v(t,i,n){var u=this;this.ui=null,this.In=null,this.Gr=null,this.nn=2,this.Ne=!0,this.Xr=null,this.oe=!1,this.ee=!1,this.se=[!0,!0],this.Hr=[0,0],this.zr=[0,0],this.wr=!1,this.yr=0,this.ps=0,this.Os=0,this.ts=0,this.ns=[0,0],this.$e=!1,this.Te=!1,this.Be=[0,0,0],this.Qe=0,this.ie=[0,0],this.ms=[0,0],this.ws=[0,0],this.$r=[0,0],this.he=[0,0,0],this.ue=[],this.kr=0,this.Me=[0,0],this.Wr=1,this.ge=!1,this.Ae=!1,this.Zr=1,this.de=[0,0],this.be=[0,0],this.Lr=0,this.gs=150,this.Ir=null,this.Pr=!1,this.Tr=!1,this.es=!1,this.ss=[0,0],this.fe=0,this.xs=0,this.Cs=0,this.Es=0,this.Ts=0,this.js=!1,this.ae=!1,this.ui=t,this.vn=i;var r=this.ui.offsetParent;this.In={width:r.clientWidth,height:r.clientHeight},this.Li=[],this.Gr=n.aligner,n.scaleByDoubleTap<=1?this.nn=1:n.scaleByDoubleTap<=s?this.nn=s:5<n.scaleByDoubleTap?this.nn=5:this.nn=n.scaleByDoubleTap,this.Ne=n.forceAnchorByFlick,n.selectionEnabled?"number"==typeof n.selectionStartLatency&&0<n.selectionStartLatency?this.fe=n.selectionStartLatency:this.fe=500:this.fe=0;var e=n.clientRect;this.Hr=[e.left,e.top],this.zr=[e.width,e.height];var o=[this.In.height,this.In.width,this.In.height,this.In.width];n.userActionEnabled&&n.tapAreas.forEach(function(t){var i=t.area.trim().replace(/\s+/g," ").split(" ",4);if(4===i.length){for(var n=[],r=0;r<4;r++){var e=i[r].match(/^(\d+|\d+\.\d+)(\%|px)?$/);if(!e)return;var s=parseFloat(e[1]);if(e[2]&&"px"!==e[2]){if("%"!==e[2])return;n[r]=Math.floor(o[r]*s/100)}else n[r]=Math.floor(s)}var h=a.Unset;"left"===t.action?h=a.Left:"right"===t.action?h=a.Right:"top"===t.action?h=a.Top:"bottom"===t.action?h=a.Bottom:"next"===t.action?h=a.Next:"previous"===t.action?h=a.Previous:"scrollup"===t.action?h=a.ScrollUp:"scrolldown"===t.action?h=a.ScrollDown:""===t.action&&(h=a.Others),h!==a.Unset&&u.Li.push({action:h,left:n[3],top:n[0],right:n[1],bottom:n[2]})}}),n.userActionEnabled&&("undefined"!=typeof PointerEvent?this.hi=[{target:document,type:"pointerdown",listener:function(t){"touch"!==t.pointerType&&u.Er(t)},capture:!1},{target:document,type:"pointermove",listener:function(t){"touch"!==t.pointerType&&u.Ar(t)},capture:!1},{target:document,type:"pointerup",listener:function(t){"touch"!==t.pointerType&&u.Nr(t)},capture:!1},{target:this.ui,type:"pointerdown",listener:function(t){"touch"===t.pointerType&&u.Fr(t)},capture:!1},{target:this.ui,type:"pointermove",listener:function(t){"touch"===t.pointerType&&u.Jr(t)},capture:!1},{target:this.ui,type:"pointerup",listener:function(t){"touch"===t.pointerType&&u.Br(t)},capture:!1},{target:this.ui,type:"touchstart",listener:function(t){u.Fr(t,!0)},capture:!1},{target:this.ui,type:"touchmove",listener:function(t){u.Jr(t,!0)},capture:!1},{target:this.ui,type:"touchend",listener:function(t){u.Br(t,!0)},capture:!1},{target:document,type:"mousedown",listener:function(t){u.Er(t,!0)},capture:!1},{target:document,type:"mousemove",listener:function(t){u.Ar(t,!0)},capture:!1},{target:document,type:"mouseup",listener:function(t){u.Nr(t,!0)},capture:!1}]:this.hi=[{target:this.ui,type:"touchstart",listener:function(t){u.Fr(t)},capture:!1},{target:this.ui,type:"touchmove",listener:function(t){u.Jr(t)},capture:!1},{target:this.ui,type:"touchend",listener:function(t){u.Br(t)},capture:!1},{target:document,type:"mousedown",listener:function(t){u.Er(t)},capture:!1},{target:document,type:"mousemove",listener:function(t){u.Ar(t)},capture:!1},{target:document,type:"mouseup",listener:function(t){u.Nr(t)},capture:!1}],this.hi.push({target:this.ui,type:"contextmenu",listener:function(t){t.preventDefault()},capture:!1},{target:this.ui,type:"dragstart",listener:function(t){u.Or(t)&&t.preventDefault()},capture:!0},{target:this.ui,type:"click",listener:function(t){u.Tr&&(t.preventDefault(),t.stopPropagation(),u.Tr=!1)},capture:!0}),this.hi.forEach(function(t){t.target.addEventListener(t.type,t.listener,t.capture)})),null===this.Xr&&(this.Xr=this.hs(this.Hr[0],this.Hr[1],0,0)),this.te()}c.ElementDragger=u;var p=(Object.defineProperty(m.prototype,"numAnchors",{get:function(){return this.ks.length},enumerable:!1,configurable:!0}),m.prototype.min=function(t){return this.Ds[t]},m.prototype.max=function(t){return this.Ns[t]},m.prototype.getAnchorPosition=function(t){return!this.ks||t<0||this.ks.length<=t?null:{x:this.ks[t].x,y:this.ks[t].y}},m.prototype.containsLimit=function(t,i){return this.Ds[t]-d<=i&&i<=this.Ns[t]+d},m.prototype.contains=function(t,i){return this.Ls[t].contains(i)},m.prototype.getLargerMinAllowValue=function(t,i){return this.Ls[t].getLargerMinAllowValue(i)},m.prototype.getSmallerMaxAllowValue=function(t,i){return this.Ls[t].getSmallerMaxAllowValue(i)},m.prototype.getNearestAllowValue=function(t,i,n){return void 0===n&&(n=null),this.Ls[t].getNearestAllowValue(i,n)},m.prototype.getNearestAnchorIndex=function(t,i,n,r){for(var e=null,s=null,h=0;h<this.ks.length;h++)if(0==(this.ks[h].excludeCond&r)){var u=this.ks[h].x,o=this.ks[h].y,a=(u-t)*(u-t)+(o-i)*(o-i);null===s||a<e?(s=h,e=a):null!==n&&Math.abs(a-e)<.015625&&Math.abs(h-n)<Math.abs(s-n)&&(s=h)}return s},m.prototype.getNearestAnchorIndexInArea=function(t,i,n,r,e,s,h,u){if(null===n&&null===r&&null===e&&null===s)return this.getNearestAnchorIndex(t,i,h,u);var o=null!==n?n:Number.NEGATIVE_INFINITY,a=null!==r?r:Number.POSITIVE_INFINITY,f=null!==e?e:Number.NEGATIVE_INFINITY,c=null!==s?s:Number.POSITIVE_INFINITY;if(a<o||c<f)return null;for(var l=null,v=null,d=0;d<this.ks.length;d++)if(0==(this.ks[d].excludeCond&u)){var b=this.ks[d].x,g=this.ks[d].y;if(o<=b&&b<=a&&f<=g&&g<=c){var p=(b-t)*(b-t)+(g-i)*(g-i);null===v||p<l?(v=d,l=p):null!==h&&Math.abs(p-l)<.015625&&Math.abs(d-h)<Math.abs(v-h)&&(v=d)}}return v},m);function m(t,i,n){this.Ds=[0,0],this.Ns=[0,0],this.ks=[],this.Ls=[null,null];var r=new w(i),e=new w(n);this.Ds=[r.min,e.min],this.Ns=[r.max,e.max],t&&0<t.length&&(this.ks=t.map(function(t){return{x:t.x,y:t.y,excludeCond:t.excludeCond}})),this.Ls=[r,e]}c.SectionAligner=p;var w=(Object.defineProperty(y.prototype,"min",{get:function(){return this.Ds},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"max",{get:function(){return this.Ns},enumerable:!1,configurable:!0}),y.prototype.contains=function(i){return this.Rs.some(function(t){return t[0]<=i&&i<=t[1]})},y.prototype.getLargerMinAllowValue=function(t){for(var i=0;i<this.Rs.length;i++){if(!(this.Rs[i][0]-.25<t))return Math.max(this.Rs[i][0],t);if(t<=this.Rs[i][1]+.25)return Math.min(this.Rs[i][1],t)}return null},y.prototype.getSmallerMaxAllowValue=function(t){for(var i=this.Rs.length-1;0<=i;i--){if(!(t<this.Rs[i][1]+.25))return Math.min(this.Rs[i][1],t);if(this.Rs[i][0]-.25<=t)return Math.max(this.Rs[i][0],t)}return null},y.prototype.getNearestAllowValue=function(t,i){void 0===i&&(i=null);var n=this.getLargerMinAllowValue(t);if(n===t)return t;var r=this.getSmallerMaxAllowValue(t);if(r===t)return t;if(null===n||null===r)return null===n?r:n;var e=n+r-2*t;return 0<e?r:e<0?n:null!==i&&Math.abs(n-i)<Math.abs(r-i)?n:r},y);function y(t,r,e){void 0===r&&(r=null),void 0===e&&(e=null),this.Ds=null,this.Ns=null,this.Rs=[];var s=[];if(t.forEach(function(t){var i,n;"number"==typeof t?i=n=t:n=t[0]<t[1]?(i=t[0],t[1]):(i=t[1],t[0]),(null===r||r<=n)&&(null===e||i<=e)&&(null!==r&&i<r&&(i=r),null!==e&&e<n&&(n=e),s.push([i,n]))}),s.sort(function(t,i){return t[0]<i[0]?-1:t[0]>i[0]?1:i[1]-t[1]}),this.Rs=[],0<s.length){for(var i=s[0][0],n=s[0][1],h=1;h<s.length;h++)s[h][0]>n?(this.Rs.push([i,n]),i=s[h][0],n=s[h][1]):s[h][1]>n&&(n=s[h][1]);this.Rs.push([i,n]),this.Ds=this.Rs[0][0],this.Ns=this.Rs[this.Rs.length-1][1]}else this.Rs.push([0,0]),this.Ds=this.Ns=0}}(g=g||{}),o=g=g||{},w.embed=function(e,t){var s=this,i=t.split("#",2),h=e.id||2===i.length&&i[1]||"",u=i[0];return u in this.Fs||(this.Fs[u]=o.AjaxLoader.fromUrl(u).then(function(t){var n=s.Js(t.toString());if(!n||"parsererror"===n.documentElement.nodeName)return $.reject(new Error("Failed to parse html of the recommend page."));var i=[];Array.prototype.forEach.call(n.querySelectorAll("script[data-binbsp-include][src]"),function(t){t instanceof HTMLScriptElement&&i.push(new o.UrlParser(t.getAttribute("src"),u).toString())}),s.embedScript(i);var r=[];return Array.prototype.forEach.call(n.querySelectorAll('link[data-binbsp-include][rel="stylesheet"][href]'),function(t){t instanceof HTMLLinkElement&&r.push(new o.UrlParser(t.getAttribute("href"),u).toString())}),s.embedStyle(r),["src","href"].forEach(function(i){var t="*["+i+"]";Array.prototype.forEach.call(n.body.querySelectorAll(t),function(t){t instanceof HTMLElement&&t.setAttribute(i,new o.UrlParser(t.getAttribute(i),u).toString())})}),$.resolve(n)})),this.Fs[u].then(function(t){var i=t.getElementById(h)||t.body;if(!i)return $.reject(new Error(""));for(var n=i.childNodes,r=0;r<n.length;r++)e.appendChild(document.importNode(n[r],!0));return $.resolve(e)})},w.embedScript=function(t){var r=this;("string"==typeof t?[t]:t).forEach(function(t){if(!(t in r.Bs)){var i=new o.UrlParser(t);i.query.set((new Date).getTime().toString(),null);var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",i.toString()),document.body.appendChild(n),r.Bs[t]=!0}})},w.embedStyle=function(t){var i,n=this;i="string"==typeof t?[t]:t;var r=document.getElementsByTagName("head")[0];i.forEach(function(t){if(!(t in n.Hs)){var i=document.createElement("link");i.setAttribute("href",t),i.setAttribute("rel","stylesheet"),r.appendChild(i),n.Hs[t]=!0}})},w.Js=function(t){var i,n=new DOMParser;try{i=n.parseFromString(t,"text/html")}catch(t){i=null}return i||(i=document.implementation.createHTMLDocument(""),-1<t.toLowerCase().indexOf("<!doctype")?i.documentElement.innerHTML=t:i.body.innerHTML=t),i&&"parsererror"!==i.documentElement.nodeName?i:null},w.Fs={},w.Bs={},w.Hs={},u=w,o.HtmlEmbedder=u,function(h){var s=(Object.defineProperty(t.prototype,"src",{get:function(){return this.zs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.$s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.$s.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.$s.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRevocable",{get:function(){return this._s},enumerable:!1,configurable:!0}),t);function t(t,i,n){void 0===n&&(n=!1),this.zs=t,this.$s=i,this._s=n}h.ImageMetadata=s;var i=(u.Vs=function(){var t=0;if(h.UserAgent.os.iOS){if(12<=h.UserAgent.os.version.major)return new $(function(i,t){u.Gs(function(t){u.Us=1===t||2===t?u.Xs(t):u.qs(0),i()})});t=-.01}return u.Us=u.qs(t),$.resolve()},u.qs=function(f){return function(t,i,n,r,e,s,h,u,o,a){t.drawImage(i,n,r,e+f,s+f,h,u,o,a)}},u.Gs=function(u){var t=document.createElement("canvas");t.width=1023,t.height=91;var i=t.getContext("2d");i.fillStyle="rgba(0,0,0,1)",i.fillRect(0,0,t.width,t.height);for(var n=i.createImageData(16,1),r=0;r<n.width*n.height;r++){var e=4*r,s=255*(1&r);n.data[0+e]=s,n.data[1+e]=s,n.data[2+e]=s,n.data[3+e]=255}i.putImageData(n,504,0);var h=t.toDataURL("image/jpeg",.95),o=document.createElement("img");o.onload=function(){var t=document.createElement("canvas");t.width=16,t.height=1;var i=t.getContext("2d");i.drawImage(o,504,0,16,1,0,0,16,1);for(var n=i.getImageData(0,0,16,1),r=0,e=n.data[0],s=1;s<16;s++){var h=n.data[4*s];if(Math.abs(h-e)<=192){r=s;break}e=h}u(0===r?0:7===r||8===r?1:9===r||10===r?2:3)},o.onerror=o.onabort=function(){u(-1)},o.src=h},u.Xs=function(t){function v(t,i,n,r,e){var s=[];if(t%2==0)s.push([i,n,r,e]);else{var h=l(t);if(i+n<=h)s.push([i,n,r,e]);else if(h<=i)s.push([i+1,n,r,e]);else{var u=h-i,o=n-u,a=e*u/n,f=r+a,c=e-a;s.push([i,u,r,a]),s.push([h+1,o,f,c])}}return s}var l=2===t?function(t){return Math.floor(t/2)+Math.round(t/512)}:function(t){return Math.floor(t/2)};return function(n,r,t,i,e,s,h,u,o,a){var f=r.naturalWidth,c=r.naturalHeight;if(92416<=f*c){var l=v(f,t,e,h,o);v(c,i,s,u,a).forEach(function(i){l.forEach(function(t){n.drawImage(r,t[0],i[0],t[1],i[1],t[2],i[2],t[3],i[3])})})}else n.drawImage(r,t,i,e,s,h,u,o,a)}},u.Ys=function(s){return new $(function(n,r){var e=new Image;h.CorsOption.isSameOrigin(s)||(e.crossOrigin=h.CorsOption.needsCredential(s)?"use-credentials":"anonymous"),e.onload=function(t){e.onload=e.onerror=e.onabort=null;var i=function(){e.complete?0===e.naturalWidth||0===e.naturalHeight?r(new Error("Image is corrupted. : "+s)):n(e):setTimeout(i,500)};i()},e.onerror=function(t){e.onload=e.onerror=e.onabort=null,r(new Error("Failed to load image. : "+s))},e.onabort=function(t){e.onload=e.onerror=e.onabort=null,r(new Error("Failed to load image. : "+s))},e.src=s})},u.Ws=function(t,e){return(null===u.Us?u.Vs():$.resolve()).then(function(){return o.get(t.width,t.height)}).then(function(r){var n=r.getContext("2d");return t.transfers.forEach(function(i){i.coords.forEach(function(t){u.Us(n,e[i.index],t.xsrc,t.ysrc,t.width,t.height,t.xdest,t.ydest,t.width,t.height)})}),new $(function(i,n){h.canvasToBlob(r,function(t){o.release(r),t?i(t):n(new Error("Can't create Blob."))},"image/jpeg",.9)})}).then(function(t){var i=H.URL.createObjectURL(t);return i?$.resolve(i):$.reject(new Error("Can't create Blob URL."))})},u.load=function(t){if(t in u.Zs)return u.Zs[t].refCount++,u.Zs[t].promise;var i=u.Ys(t).then(function(t){var i=t.src,n={width:t.naturalWidth,height:t.naturalHeight};return t.onload=t.onerror=t.onabort=null,t.src="",$.resolve(new s(i,n))});return u.Zs[t]={promise:i,refCount:1},i},u.rebuild=function(t,r){var e=null;return $.resolve().then(function(){return $.all(t.map(function(t){return u.Ys(t)}))}).then(function(i){var t=(e=i).map(function(t){return{width:t.naturalWidth,height:t.naturalHeight}}),n=r(t);return $.all(n.map(function(t){var n={width:t.width,height:t.height};return u.Ws(t,i).then(function(t){var i=$.resolve(new s(t,n,!0));return u.Zs[t]={promise:i,refCount:1},i})}))}).then(function(t){return e.forEach(function(t){t.onload=t.onerror=t.onabort=null,t.src=""}),$.resolve(t)})},u.unload=function(t){var i="";(i="string"==typeof t?t:t.src)in u.Zs&&(u.Zs[i].refCount--,0===u.Zs[i].refCount&&u.Zs[i].promise.then(function(t){t.isRevocable&&H.URL.revokeObjectURL(t.src),delete u.Zs[i]}))},u.Zs={},u.Us=null,u);function u(){}h.ImageLoader=i;var o=(a.get=function(r,e){if(0===a.Qs.length){a.Qs=[],a.Ks=[];for(var t=0;t<1;t++){var i=document.createElement("canvas");if(!i||!i.getContext)return $.reject(new Error("Can't create Canvas."));a.Qs.push(i),a.Ks.push(!1)}}return new $(function(i,t){var n=function(){var t=a.th(r,e);t?i(t):a.ih.push(n)};n()})},a.th=function(t,i){for(var n=0;n<1;n++)if(!a.Ks[n]){a.Ks[n]=!0;var r=a.Qs[n];return r.width===t&&r.height===i||(r.width=t,r.height=i),r.getContext("2d").clearRect(0,0,r.width,r.height),r}return null},a.release=function(t){var i=a.Qs.indexOf(t);if(0<=i){a.Ks[i]=!1;var n=a.ih.shift();n&&n()}},a.Qs=[],a.Ks=[],a.ih=[],a);function a(){}}(g=g||{}),a=g=g||{},Object.defineProperty(O.prototype,"id",{get:function(){return this.Wt},enumerable:!1,configurable:!0}),O.Zt=function(){var t=O.nh;return++O.nh,t.toString(10)},O.prototype.show=function(){if(this.parentid in O.rh||(O.rh[this.parentid]={}),O.rh[this.parentid][this.id]=this,!document.querySelector("["+O.eh+"='"+this.id+"']")){var t=document.getElementById(this.parentid);if(t&&!document.querySelector("["+O.eh+"='"+this.id+"']")){var i=O.rh[this.parentid][this.id];t.appendChild(O.createIndicatorElement(i))}}},O.prototype.hide=function(){this.parentid in O.rh&&(delete O.rh[this.parentid][this.id],0===Object.keys(O.rh[this.parentid]).length&&delete O.rh[this.parentid]);var t=document.querySelector("["+O.eh+"='"+this.id+"']");t&&t.parentNode&&t.parentNode.removeChild(t)},O.clear=function(t){void 0===t&&(t=null),Object.keys(O.rh).forEach(function(i){t&&t.id!==i&&!t.querySelector("#"+i)||(Object.keys(O.rh[i]).forEach(function(t){O.rh[i][t].hide()}),delete O.rh[i])})},O.refreshElement=function(n){if(n in O.rh){var r=document.getElementById(n);r&&Object.keys(O.rh[n]).forEach(function(t){if(!document.querySelector("["+O.eh+"='"+t+"']")){var i=O.rh[n][t];r.appendChild(O.createIndicatorElement(i))}})}},O.createIndicatorElement=function(t){var i=document.createElement("div");return i.className=t.cssclass,i.setAttribute(O.eh,t.id),i.style.left=t.cssleft,i.style.top=t.csstop,i.style.right=t.cssright,i.style.bottom=t.cssbottom,i},O.eh="data-binbsp-indicatorid",O.nh=1,O.rh={},f=O,a.Indicator=f,function(p){p.PTBINB_ATTR_NAME="data-ptbinb";var h=(Object.defineProperty(t.prototype,"reader",{get:function(){return this.sh},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.sh.cid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"direction",{get:function(){return this.sh.direction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.hh},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mapInfo",{get:function(){return this.sh.mapInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bibliography",{get:function(){return this.sh.bibliography},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toc",{get:function(){return this.sh.toc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaginated",{get:function(){return this.sh.isPaginated},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveBookmarkToServer",{get:function(){return this.sh.saveBookmarkToServer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textPositionLevel",{get:function(){return this.sh.textPositionLevel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"permissions",{get:function(){return this.sh.permissions},enumerable:!1,configurable:!0}),t);function t(t,i){this.sh=null,this.hh=null,this.sh=t,this.hh=i}p.BinbContent=h;var i=(m.activateElement=function(r,g,t,e,i){var n=r.getAttribute(p.PTBINB_ATTR_NAME);if(n){var s=r.getAttribute("data-ptbinb-cid")||"";s&&(m.uh.get(r)||(m.uh.set(r,{hasError:!1,isLoadedBinb:!1}),c.Binb.Reader.load(n,s,g.binb,t).then(function(l){function t(t){var i=b[t],n=g.idprefix+v.toString(10),r=null;if(i.usemap&&l.mapInfo){var e=i.usemap.replace("#","");if(e in l.mapInfo){for(var s=l.mapInfo[e],h=[],u=0;u<s.length;u++){var o=m.oh(s[u].href,b);""!==o&&h.push({href:o,left:s[u].left,top:s[u].top,right:s[u].right,bottom:s[u].bottom})}0<h.length&&(r=h)}}var a=new p.PtimgPreCombinedDelegator(l.getImageUrl(i.src),i.orgwidth,i.orgheight,r,function(t){return l.getImageDescrambleCoords(i,t.width,t.height)}),f=m.ah(a),c=m.fh(i);d.push({id:n,src:f,index:c,image:i,isContent:!0,isFromHtml:!1}),++v}m.uh.get(r).isLoadedBinb=!0;for(var v=1,d=[],b=l.timgsLandscape,i=b.length,n=0;n<i;n++)t(n);e&&e(new h(l,d))}).catch(function(t){m.uh.get(r).hasError=!0,i&&i(t)})))}},m.fh=function(t){var i=t.id.replace(/^\D*/,"");return i.match(/^\d+/)?parseInt(i,10):-1},m.oh=function(t,i){if(""===t||"#"!==t[0])return t;for(var n=t.substr(1),r=i.length,e=0;e<r;e++)if(i[e].anchors)for(var s=i[e].anchors,h=s.length,u=0;u<h;u++)if(s[u]===n)return"#"+e.toString(10);return""},m.ah=function(t){var i;for(m.ch||(p.PtimgLoader.registerScheme("binb",function(t){return t in m.lh?$.resolve(m.lh[t]):$.reject(new Error("url not found."))}),m.ch=!0);(i="binb://"+c.getRandomString(16))in m.lh;);return m.lh[i]=t,i},m.uh=new _,m.lh={},m.ch=!1,m);function m(){}p.PtBinbLoader=i}((c=g=g||{}).PowerThumb||(c.PowerThumb={})),function(t){var c,i,l="data-ptimg",n=(v.initialize=function(){var t=this;"ResizeObserver"in H?this.dr=new ResizeObserver(function(){t.onResize()}):H.addEventListener("resize",function(){t.onResize()},!1),H.addEventListener("scroll",function(){t.onScroll()},!1)},v.vh=function(t){10===v.dh.length&&v.dh.shift(),v.dh.push(t)},v.getBuildDomTime=function(){var t=v.dh.length;if(0===t)return 1/0;var i=0;return v.dh.forEach(function(t){i+=t}),i/t},v.onResize=function(){clearTimeout(v.vr),v.vr=setTimeout(function(){v.vr=0,v.activate()},200)},v.onScroll=function(){clearTimeout(v.bh),v.bh=p.requestAnimationFrame(function(){v.bh=0,v.activate()})},v.registerScheme=function(t,i){v.gh[t]=i},v.unregisterScheme=function(t){delete v.gh[t]},v.activate=function(t){void 0===t&&(t=!1),0!==v.ph&&clearTimeout(v.ph);var i=0;t&&((i=500*(4-v.mh)/4)<=0&&(i=0),++v.mh),0===i?(v.ph=0,v.mh=0,v.wh()):(++v.mh,v.ph=setTimeout(v.wh,i))},v.wh=function(){v.ph=0;var i=document.querySelectorAll("div["+l+"]"),t=p.getDistancesFromWindow(i).map(function(t,i){return{i:i,d:t}});if(0<t.length){t.sort(function(t,i){return t.d-i.d});var n=t[0].i;t.forEach(function(t){v.yh(i[t.i],t.d,t.i<=n)})}},v.suppressBackgroundLoading=function(){v.Oh||(v.Oh=!0)},v.resumeBackgroundLoading=function(){v.Oh&&(v.Oh=!1,v.activate())},v.load=function(t,n){var r=new p.UrlParser(t);r.fragment="";var i,e=r.toString();return e in v.Mh?i=v.Mh[e]:(i=r.scheme in this.gh?this.gh[r.scheme](r.toString()):p.AjaxLoader.fromUrl(r.toString()).then(function(t){var i=null;try{i=JSON.parse(t)}catch(t){}return n&&i&&i.views&&i.views[0]&&(i.views[0].areas=n),s.fromObject(i,r.toString(),!0)}),v.Mh[e]=i),i},v.releaseElement=function(t){var i=this.uh.get(t);i&&(this.dr&&this.dr.unobserve(t),i.delegator=null,this.uh.delete(t))},v.getState=function(t){var i=this.uh.get(t);return i?i.state:c.disabled},v.resetError=function(t){var i=this.uh.get(t);return!(!i||i.state!==c.error||(v.jh(t),0))},v.yh=function(r,t,e){var s=this,i=r.getAttribute(l);if(i){var n=this.uh.get(r);if(n&&n.state!==c.disabled)this.xh(r,t,e);else{n?n.state=c.preparing:(v.uh.set(r,{delegator:null,images:[],state:c.preparing,task:null,priority:0,baseWidth:0}),this.dr&&this.dr.observe(r));var h=null,u=r.getAttribute("data-binbsp-usemap");if(u){var o=u.replace(/^#/,""),a=document.getElementsByName(o);if(a&&0<a.length)for(var f=0;f<a.length;f++)if("map"===a[f].tagName.toLowerCase()){h=p.getAreasInfoFromString(a[f].innerHTML);break}}this.load(i,h).then(function(t){p.removeAllChildren(r);var i=t.getTemporaryViewSize(),n=v.uh.get(r);n&&(n.baseWidth=i.width,n.delegator=t,n.state=c.standby,s.xh(r,p.getDistanceFromWindow(r),e))},function(t){var i=v.uh.get(r);i&&(i.state=c.disabled)})}}},v.xh=function(r,t,i){var e=this,n=this.uh.get(r);if(n&&n.state!==c.disabled&&n.state!==c.preparing){var s=p.getWindowClientSize(),h=Math.min(s.width,s.height),u=v.Oh?0:t<=-.25*h?4:t<=1*h?3:i?1:2;if(n.state===c.standby)t<=4*h&&(a.setLoadingDOMObject(r,n.delegator),n.state=c.waitingLoad,n.priority=u,n.task=v.Sh.register(function(t,i){if(r.id&&null===document.getElementById(r.id)){var n=e.uh.get(r);n&&(n.state=c.standby),t()}else v.Ih(r,t,i)},u));else if(n.state===c.waitingLoad)8*h<=t?(v.Sh.unregister(n.task),n.state=c.standby):u!==n.priority&&(v.Sh.setPriority(n.task,u),n.priority=u);else if(n.state===c.loading);else if(n.state===c.active)if(8*h<=t)v.jh(r);else{var o=a.rearrangeDOMObject(r,n.delegator,!1,n.baseWidth);n.baseWidth=o.width}else n.state===c.error&&5*h<=t&&v.jh(r)}},v.Ih=function(e,s,n){var t=v.uh.get(e);if(t){if(t.state===c.waitingLoad){function i(n){r[n].callback?u.push(p.ImageLoader.rebuild(r[n].srcs,r[n].callback).then(function(t){var i=v.uh.get(e);if(i){if(i.state===c.error)return t.forEach(function(t){p.ImageLoader.unload(t)}),$.reject(new Error("An error occurred while loading the other images."));h.callbackLoadedImage(n,t),t.forEach(function(t){i.images.push(t)})}return $.resolve(t)})):r[n].srcs.forEach(function(t){u.push(p.ImageLoader.load(t).then(function(t){var i=v.uh.get(e);if(i){if(i.state===c.error)return p.ImageLoader.unload(t),$.reject(new Error("An error occurred while loading the other images."));h.callbackLoadedImage(n,[t]),i.images.push(t)}return $.resolve([t])}))})}t.state=c.loading;var h=t.delegator,r=h.getPreloadImages(),u=[];for(var o in r)i(o);$.all(u).then(function(t){var i=e.scrollWidth,n=v.uh.get(e);if(n){n.baseWidth=i;var r=p.timer();p.removeAllChildren(e),a.buildDOMObject(e,h),v.vh(p.timer()-r),n.state=c.active,p.raiseCustomEvent(e,"ptimg-activate",null,!0,!1)}s()},function(t){var i=v.uh.get(e);i&&(i.state=c.error,i.images.forEach(function(t){p.ImageLoader.unload(t)}),i.images=[]),p.raiseCustomEvent(e,"ptimg-error",{error:t},!0,!1),n(t)})}}else n(new Error("Element is already removed."))},v.jh=function(t){var i=v.uh.get(t);!i||i.state!==c.error&&i.state!==c.active||(p.removeAllChildren(t),i.images.forEach(function(t){p.ImageLoader.unload(t)}),i.images=[],i.state=c.standby,p.raiseCustomEvent(t,"ptimg-deactivate",null,!0,!1))},v.uh=new _,v.Mh={},v.Eh=[1,3,3,3,4],v.Sh=new p.TaskRunner(v.Eh),v.Oh=!1,v.gh={},v.ph=0,v.mh=0,v.vr=0,v.bh=0,v.dh=[],v.dr=null,v);function v(){}(t.PtimgLoader=n).initialize(),(i=c=t.PtimgState||(t.PtimgState={}))[i.disabled=0]="disabled",i[i.preparing=1]="preparing",i[i.standby=2]="standby",i[i.waitingLoad=3]="waitingLoad",i[i.loading=4]="loading",i[i.active=5]="active",i[i.error=6]="error";var s=(d.fromObject=function(t,i,n){void 0===n&&(n=!1);var r=new p.UrlParser(i);if(t instanceof Object){if("ptimg-version"in t){if("number"!=typeof t["ptimg-version"]||1!==t["ptimg-version"])throw new Error("Unsupported PTImg version : "+t["ptimg-version"]);var e=d.Th(t,r);if(!n||1!==Object.keys(e.resources).length||1!==e.views.length)return new b(e.resources,e.views);var s=Object.keys(e.resources)[0],h=e.resources[s].src,u=e.views[0],o=u.width,a=u.height,f=u.areas;return new g(h,o,a,f,function(t){for(var i=[],n=u.coords.length,r=0;r<n;r++){var e=u.coords[r];i.push({xsrc:e.xsrc,ysrc:e.ysrc,width:e.width,height:e.height,xdest:e.xdest,ydest:e.ydest})}return{width:u.width,height:u.height,transfers:[{index:0,coords:i}]}})}throw new Error("ptimg-version not found.")}throw new Error("Unsupported format.")},d.Th=function(t,i){var n={},r=[];if(!("resources"in t))throw new Error("resources not found.");for(var e in t.resources){var s=t.resources[e];if(!("src"in s))throw new Error("resources["+e+"].src not found.");if("string"!=typeof s.src||""===s.src)throw new Error("Invalid value "+s.src+" in resources["+e+"].src");var h=-1,u=-1;if("width"in s){if(!("number"==typeof s.width&&0<s.width))throw new Error("Invalid value "+s.width+" in resources["+e+"].width");h=s.width}if("height"in s){if(!("number"==typeof s.height&&0<s.height))throw new Error("Invalid value "+s.height+" in resources["+e+"].height");u=s.height}n[e]={src:i.resolveRelativePath(s.src).toString(),width:h,height:u}}if(!("views"in t))throw new Error("views not found.");if(!Array.isArray(t.views))throw new Error("views is not array.");for(var o=0;o<t.views.length;o++){var a=t.views[o];if(!("width"in a))throw new Error("views["+o+"].width not found.");if("number"!=typeof a.width||a.width<=0)throw new Error("Invalid value "+a.width+" in views["+o+"].width");if(!("height"in a))throw new Error("views["+o+"].height not found.");if("number"!=typeof a.height||a.height<=0)throw new Error("Invalid value "+a.height+" in views["+o+"].height");if(!("coords"in a))throw new Error("views["+o+"].coords not found.");if(!Array.isArray(a.coords))throw new Error("views["+o+"].coords is not array.");if(0===a.coords.length)throw new Error("views["+o+"].coords is empty.");for(var f=[],c=0;c<a.coords.length;c++){if("string"!=typeof a.coords[c])throw new Error("views["+o+"].coords["+c+"] is not string.");f.push(d.Ph(n,a.coords[c]))}r.push({width:a.width,height:a.height,coords:f,areas:a.areas||null})}return{resources:n,views:r}},d.Ph=function(t,i){var n=i.match(/^([^:]+):(\d+),(\d+)\+(\d+),(\d+)>(\d+),(\d+)$/);if(!n)throw new Error("Invalid format for Image Transfer : "+i);var r=n[1];if(!(r in t))throw new Error("resid "+r+" not found.");return{resid:r,xsrc:parseInt(n[2],10),ysrc:parseInt(n[3],10),width:parseInt(n[4],10),height:parseInt(n[5],10),xdest:parseInt(n[6],10),ydest:parseInt(n[7],10)}},d);function d(){}var b=(r.prototype.getTemporaryViewSize=function(){return{width:this.Ch[0].width,height:this.Ch[0].height}},r.prototype.getPreloadImages=function(){var i=this,n={};return Object.keys(this.Ah).forEach(function(t){n[t]={srcs:[i.Ah[t].src]}}),n},r.prototype.callbackLoadedImage=function(t,i){},r.prototype.getResources=function(){return this.Ah},r.prototype.getViews=function(){return this.Ch},r);function r(t,i){this.Ah={},this.Ch=[],this.Ah=t,this.Ch=i}var g=(e.prototype.getTemporaryViewSize=function(){return{width:this.kh,height:this.Dh}},e.prototype.getPreloadImages=function(){var u=this;return{i:{srcs:[this.Nh],callback:function(t){var i=t[0],n=u.Lh(i);function r(t){var r=u.Rh(t),e=[];s.forEach(function(t){var i=new p.Rectangle(t.xdest,t.ydest,t.width,t.height),n=p.Rectangle.intersect(r,i);null!==n&&e.push({xsrc:t.xsrc+(n.left-t.xdest),ysrc:t.ysrc+(n.top-t.ydest),width:n.width,height:n.height,xdest:n.left-r.left,ydest:n.top-r.top})});var i={index:0,coords:e};h.push({width:r.width,height:r.height,transfers:[i]})}u.In={width:n.width,height:n.height};for(var s=n.transfers[0].coords,h=[],e=0;e<u.Fh;e++)r(e);return h}}}},e.prototype.callbackLoadedImage=function(t,i){var n=this;if("i"===t&&i.length===this.Fh){this.Ah={};for(var r=0;r<this.Fh;r++){var e="i"+r.toString();this.Ah[e]={src:i[r].src,width:i[r].width,height:i[r].height}}var s=[];for(r=0;r<this.Fh;r++){var h=this.Rh(r);s.push({resid:"i"+r.toString(),xsrc:0,ysrc:0,width:h.width,height:h.height,xdest:h.left,ydest:h.top})}this.Jh={width:this.In.width,height:this.In.height,coords:s},this.Bh&&(this.Jh.areas=this.Bh.map(function(t){return{href:t.href,left:t.left*n.In.width/n.kh,top:t.top*n.In.height/n.Dh,right:t.right*n.In.width/n.kh,bottom:t.bottom*n.In.height/n.Dh}}))}},e.prototype.Rh=function(t){var i=this.In.height,n=Math.ceil((i+this.Hh*(this.Fh-1))/this.zh),r=Math.ceil(t*n/this.Fh)*this.zh,e=Math.ceil((t+1)*n/this.Fh)*this.zh,s=n*this.zh,h=r*i/s,u=e*i/s,o=e-r,a=1===this.Fh?0:Math.round(h+(u-h-o)*t/(this.Fh-1));return new p.Rectangle(0,a,this.In.width,o)},e.prototype.getResources=function(){return this.Ah},e.prototype.getViews=function(){return this.Jh?[this.Jh]:null},e);function e(t,i,n,r,e){this.Nh="",this.kh=0,this.Dh=0,this.Bh=null,this.Lh=null,this.Ah=null,this.Jh=null,this.In=null,this.Fh=3,this.zh=8,this.Hh=4,this.Nh=t,this.kh=i,this.Dh=n,this.Bh=r,this.Lh=e}t.PtimgPreCombinedDelegator=g;var a=(w.$h=function(t,i,n){var r=i instanceof HTMLElement&&(""===i.style.height||"auto"===i.style.height),e=getComputedStyle(i),s=e.width.match(/px$/)?parseFloat(e.width):i.clientWidth,h=e.height.match(/px$/)?parseFloat(e.height):i.clientHeight,u=n.width,o=n.height,a={width:u,height:o},f=!1;if(r){var c=t;t||(c=document.createElement("div"),i.appendChild(c)),c.style.width="100%",c.style.height="0",c.style.paddingBottom=100*o/u+"%",a.width=s,a.height=s*o/u}else if(0<s){var l=1;0<h&&(l=h*u/(o*s),Math.abs(l-1)<.01&&(l=1,f=!0)),t&&(f?(t.style.width="100%",t.style.height="100%",t.style.paddingBottom="0"):1<=l?(t.style.width="100%",t.style.height="0",t.style.paddingBottom=100*o/u+"%"):(t.style.width=100*l+"%",t.style.height="100%",t.style.paddingBottom="0")),f?(a.width=s,a.height=h):(a.width=s*l,a.height=s*l*o/u)}else 0<h?(t&&(t.style.width=u*h/o+"px",t.style.height="100%",t.style.paddingBottom="0"),a.width=u*h/o,a.height=h):t&&(t.style.width=u+"px",t.style.height=o+"px",t.style.paddingBottom="0");return{size:a,isFillin:f}},w.setLoadingDOMObject=function(t,i){var n=i.getTemporaryViewSize(),r=document.createElement("div");p.addClass(r,"pt-loading"),t.appendChild(r);var e=t.firstElementChild instanceof HTMLElement?t.firstElementChild:null;return w.$h(e,t,n).size},w.buildDOMObject=function(t,i){var n=i.getViews()[0],r=document.createElement("div");p.addClass(r,"pt-img");for(var e=0;e<n.coords.length;e++){var s=document.createElement("img"),h=document.createElement("div");h.appendChild(s),r.appendChild(h)}if(n.areas&&0<n.areas.length)for(e=0;e<n.areas.length;e++){var u=document.createElement("a"),o=n.areas[e].href;if(document.baseURI!==document.location.href)if(0===o.indexOf("#")){var a=new p.UrlParser(document.location.href);a.fragment=o,u.href=a.toString()}else u.href=new p.UrlParser(o,document.location.href).toString(),u.target="_blank";else 0!==(u.href=o).indexOf("#")&&(u.target="_blank");u.style.left=100*n.areas[e].left/n.width+"%",u.style.top=100*n.areas[e].top/n.height+"%",u.style.right=100*(n.width-n.areas[e].right)/n.width+"%",u.style.bottom=100*(n.height-n.areas[e].bottom)/n.height+"%",r.appendChild(u)}return t.appendChild(r),w.rearrangeDOMObject(t,i,!0)},w.rearrangeDOMObject=function(t,i,n,r){var e=t.firstElementChild;if(!(e instanceof HTMLDivElement))return{width:0,height:0};var s=i.getViews()[0],h=w.$h(e,t,s),u=h.size,o=h.isFillin;if(n||r!==u.width)for(var a=u.width/s.width,f=u.height/s.height,c=0;c<s.coords.length;c++){var l=e.childNodes[c];if(l instanceof HTMLDivElement){var v=l.firstElementChild;if(v instanceof HTMLImageElement){var d=s.coords[c],b=i.getResources()[d.resid];if(v.src=b.src,v.alt="",0<b.width&&(v.width=b.width),0<b.height&&(v.height=b.height),o)v.style.width="100%",v.style.height="100%",v.style.webkitTransformOrigin="",v.style.transformOrigin="",v.style.webkitTransform="",v.style.transform="";else{v.style.width="",v.style.height="";var g=d.xsrc+"px "+d.ysrc+"px 0";v.style.webkitTransformOrigin=g,v.style.transformOrigin=g;var p="translate("+-d.xsrc+"px,"+-d.ysrc+"px) scale("+a+", "+f+") translate("+d.xsrc+"px,"+d.ysrc+"px)";v.style.webkitTransform=p,v.style.transform=p}if(o)l.style.left=100*d.xdest/s.width+"%",l.style.top=100*d.ydest/s.height+"%",l.style.right=100*(1-(d.xdest+d.width)/s.width)+"%",l.style.bottom=100*(1-(d.ydest+d.height)/s.height)+"%",l.style.width="",l.style.height="",l.style.webkitTransform="",l.style.transform="";else{l.style.left="",l.style.top="",l.style.right="",l.style.bottom="",l.style.width=d.width*a+"px",l.style.height=d.height*f+"px";var m="translate("+d.xdest*a+"px,"+d.ydest*f+"px)";l.style.webkitTransform=m,l.style.transform=m}}}}return u},w);function w(){}}((p=g=g||{}).PowerThumb||(p.PowerThumb={})),function(c){var n=(t.prototype.toString=function(){return this.vn&&this.vn.getSelectedText?this.vn.getSelectedText():""},t.prototype.getAnchorArea=function(){return this.vn&&this.vn.getAnchorArea?this.vn.getAnchorArea():null},t.prototype.getFocusArea=function(){return this.vn&&this.vn.getFocusArea?this.vn.getFocusArea():null},Object.defineProperty(t.prototype,"isReverse",{get:function(){return!(!this.vn||!this.vn.isReverse)&&this.vn.isReverse()},enumerable:!1,configurable:!0}),t.prototype.removeAllRanges=function(){this.vn&&this.vn.removeAllRanges&&this.vn.removeAllRanges()},t.empty=new t({getSelectedText:function(){return""},getAnchorArea:null,getFocusArea:null,isReverse:null,removeAllRanges:null}),t);function t(t){this.vn=t}c.Selection=n;var i=(Object.defineProperty(l.prototype,"anchor",{get:function(){return this._h},set:function(t){this._h=t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"focus",{get:function(){return this.Vh},set:function(t){this.Vh=t},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"selection",{get:function(){return this.Gh},enumerable:!1,configurable:!0}),l.prototype.Uh=function(t){if(!t)return new c.Rectangle;var i=this.Xt.page[t.pageIndex].image.texts[t.boundingBoxIndex],n=this.vn.getClientPosition(t.pageIndex,{x:i.left,y:i.top}),r=this.vn.getClientPosition(t.pageIndex,{x:i.right,y:i.bottom});return new c.Rectangle(n.x,n.y,r.x-n.x,r.y-n.y)},l.prototype.Xh=function(t,i){return null===t&&null===i?0:null===t?-1:null===i?1:t.pageIndex<i.pageIndex?-1:t.pageIndex>i.pageIndex?1:t.boundingBoxIndex<i.boundingBoxIndex?-1:t.boundingBoxIndex>i.boundingBoxIndex?1:0},l.prototype.qh=function(t,i){var n=i.pageIndex,r=i.boundingBoxIndex;for(r++;t.page[n].image.texts.length===r;)if(n++,r=0,t.page.length===n)return null;return{pageIndex:n,boundingBoxIndex:r}},l.prototype.Yh=function(t,i){var n=i.pageIndex,r=i.boundingBoxIndex;for(r--;r<0;){if(--n<0)return null;r=t.page[n].image.texts.length-1}return{pageIndex:n,boundingBoxIndex:r}},l.prototype.setContent=function(t){this.Xt!==t&&(this.Xt=t,this._h=null,this.Vh=null,this.Wh=null,this.Zh=null,this.Qh=[],this.refreshValidSelectionArea())},l.prototype.Kh=function(){if(null===this.anchor||null===this.focus)return"";var i="";return this.Qh.forEach(function(t){i+=c.fromCodePoint(t)}),i},l.prototype.refreshValidSelectionArea=function(){var n=this,t=this.tu();if(0!==this.Xh(this.Wh,t.from)||0!==this.Xh(this.Zh,t.to)){if(this.Wh=t.from,this.Zh=t.to,this.iu=t.isReverse,this.Qh=t.codepoints,null===this.Wh||null===this.Zh)this.nu.forEach(function(t){t.indicator.hide()}),this.nu=[];else{var i=this.nu.filter(function(t){return!(n.Xh(t.position,n.Wh)<0||n.Xh(n.Zh,t.position)<0)||(t.indicator.hide(),!1)});i.sort(function(t,i){return n.Xh(t.position,i.position)});for(var r=[],e=0<i.length?0:-1,s=this.Wh;s&&this.Xh(s,this.Zh)<=0;){if(-1===e||0!==this.Xh(s,i[e].position)){var h=this.ru(s);r.push({position:s,indicator:h}),h.show()}else e++,i.length===e&&(e=-1);s=this.qh(this.Xt,s)}this.nu=i.concat(r)}this.vn&&this.vn.onSelectionChange&&this.vn.onSelectionChange()}},l.prototype.ru=function(t){if(null===this.Xt)return null;var i=this.Xt.page[t.pageIndex],n=i.id,r=i.image,e=r.texts[t.boundingBoxIndex],s=r.orgwidth,h=r.orgheight,u=100*e.left/s+"%",o=100*e.top/h+"%",a=100-100*e.right/s+"%",f=100-100*e.bottom/h+"%";return new c.Indicator(n,u,o,a,f,l.eu)},l.prototype.tu=function(){var t=this;if(null===this.anchor||null===this.focus)return{from:null,to:null,isReverse:!1,codepoints:[]};for(var i=null,n=!0,r=[],e=this.anchor,s=t.options.maxSelectionLength<=0&&!t.Xt.permissions.maxSelectionLength?Number.MAX_VALUE:t.Xt.permissions.maxSelectionLength?t.options.maxSelectionLength<=0?t.Xt.permissions.maxSelectionLength:Math.min(t.options.maxSelectionLength,t.Xt.permissions.maxSelectionLength):t.options.maxSelectionLength,h=this.anchor.pageIndex>this.focus.pageIndex||this.anchor.pageIndex===this.focus.pageIndex&&this.anchor.boundingBoxIndex>this.focus.boundingBoxIndex,u=h?this.Yh:this.qh,o=h?this.qh:this.Yh,a=h?function(t){for(var i=t.length-1;0<=i;i--)r.unshift(t[i])}:function(t){for(var i=0;i<t.length;i++)r.push(t[i])};;){var f=this.Xt.page[e.pageIndex].image.texts[e.boundingBoxIndex],c=r.length,l=0<this.options.maxSelectionColumns&&this.su(f);if((0<r.length&&l||this.hu(i,f))&&a([10]),l){var v=f.codepoints.concat();this.uu(v,this.options.maxSelectionColumns),a(v)}else a(f.codepoints);if(!n&&r.length>s){var d=r.length-c;r.splice(h?0:-d,d),e=o(this.Xt,e);break}if(n=!1,this.focus.pageIndex===e.pageIndex&&this.focus.boundingBoxIndex===e.boundingBoxIndex)break;var b=u(this.Xt,e);if(null===b)break;if(this.anchor.pageIndex!==b.pageIndex){if("pageonly"===this.options.selectionAcrossPages)break;if(!("spreadonly"!==this.options.selectionAcrossPages||this.vn.isSpreadView()&&this.ou(this.anchor.pageIndex,b.pageIndex)))break}e=b,i=f}return h?{from:e,to:this.anchor,isReverse:h,codepoints:r}:{from:this.anchor,to:e,isReverse:h,codepoints:r}},l.prototype.hu=function(t,i){if(null===t||null===i||0===t.codepoints.length||0===i.codepoints.length)return!1;var n=3*(t.right-t.left+(i.right-i.left))/4,r=3*(t.bottom-t.top+(i.bottom-i.top))/4,e=Math.min(t.left,i.left),s=Math.min(t.top,i.top),h=Math.max(t.right,i.right)-e,u=Math.max(t.bottom,i.bottom)-s;if(n<=h&&u<r){if((o=h/(t.codepoints.length+i.codepoints.length))<l.au*(a=u)&&a<l.au*o)return!1}else if(h<n&&r<=u){var o=h,a=u/(t.codepoints.length+i.codepoints.length);if(o<l.au*a&&a<l.au*o)return!1}return!0},l.prototype.su=function(t){if(null===t||0===t.codepoints.length)return!1;if(1===this.Xt.textPositionLevel)return!0;var i=t.codepoints.length,n=t.right-t.left,r=t.bottom-t.top,e=r*i;if(n<l.au*e&&e<l.au*n)return!1;var s=n*i;return!(s<l.au*r&&r<l.au*s)},l.prototype.uu=function(t,i){if(!(i<=0))for(var n=0,r=-1,e=0;n<t.length;){var s=t[n];if(10===s)e=0,r=-1;else{var h=-1!==l.fu.indexOf(s);if(i<++e){var u=0<=r?r+1:h?n-1:n;t.splice(u,0,10),e=++n-u,r=-1}h&&(r=n)}n++}},l.prototype.ou=function(t,i){if(t===i)return!0;var n=Math.min(t,i),r=Math.max(t,i);if(n+1===r){var e=this.Xt;if(e.direction===c.Direction.LTR){if(e.page[n].image.pagespread===c.PageSpread.Left&&e.page[r].image.pagespread===c.PageSpread.Right)return!0}else if(e.direction===c.Direction.RTL&&e.page[n].image.pagespread===c.PageSpread.Right&&e.page[r].image.pagespread===c.PageSpread.Left)return!0}return!1},l.au=4,l.eu="ptbinb-selection-indicator",l.fu=[12290],l);function l(t){var i=this;this.vn=null,this.Gh=n.empty,this.Xt=null,this._h=null,this.Vh=null,this.Wh=null,this.Zh=null,this.iu=!1,this.Qh=[],this.nu=[],this.options={selectionStartLatency:500,maxSelectionLength:0,selectionAcrossPages:"",maxSelectionColumns:80},this.vn=t,this.Gh=new n({getSelectedText:function(){return i.Kh()},getAnchorArea:function(){return i.Uh(i.anchor)},getFocusArea:function(){return i.Uh(i.iu?i.Wh:i.Zh)},isReverse:function(){return i.iu},removeAllRanges:function(){i.anchor=null,i.focus=null,i.refreshValidSelectionArea()}})}c.Selector=i}(g=g||{}),l=g=g||{},Object.defineProperty(M,"VERSION",{get:function(){return"1.6700.0001"},enumerable:!1,configurable:!0}),Object.defineProperty(M,"Direction",{get:function(){return l.Direction},enumerable:!1,configurable:!0}),Object.defineProperty(M,"PageSpread",{get:function(){return l.PageSpread},enumerable:!1,configurable:!0}),M.getInstance=function(t){var i=document.getElementById(t);if(!i)throw Error("Element not found: "+t);if(t in M.cu)return M.cu[t];var n=new M(i);return M.cu[t]=n},M.prototype.load=function(t){var r=this;if(void 0===t&&(t={}),!this.isLoaded){if("cors"in t&&"originsUseCredentials"in t.cors){var i=t.cors.originsUseCredentials;Array.isArray(i)&&l.CorsOption.setOriginsUseCredentials(i.map(function(t){return t.toString()}))}("useQuery"in t&&t.useQuery||"usequery"in t&&t.usequery)&&this.lu(this.ui);var n=this.vu(t);this.Qt=new l.ContentRenderer(this.ui,n,{onContentInfoLoaded:function(t,i){return l.raiseCustomEvent(r,"onContentInfoLoaded",{type:t,data:i}),!!r.onContentInfoLoaded&&r.onContentInfoLoaded(t,i)},onLoad:function(){l.raiseCustomEvent(r,"onLoad"),r.onLoad&&r.onLoad(),r.du("onLoadContent",{result:"complete"})},onError:function(){l.raiseCustomEvent(r,"onError"),r.onError&&r.onError(),r.du("onLoadContent",{result:"error"})},onLayout:function(){l.raiseCustomEvent(r,"onLayout")},onPageChange:function(t,i){l.raiseCustomEvent(r,"onPageChange",{pagePosition:t}),r.onPageChange&&r.onPageChange(t),r.du("onPageChange",{pagePosition:t,total:i})},onPageScrollEnd:function(t,i,n){l.raiseCustomEvent(r,"onPageScrollEnd",{pagePosition:t,deviation:i}),r.onPageScrollEnd&&r.onPageScrollEnd(t,i),r.du("onPageScrollEnd",{pagePosition:t,deviation:i,total:n})},onScaleChange:function(t){l.raiseCustomEvent(r,"onScaleChange",{scale:t}),r.onScaleChange&&r.onScaleChange(t),r.du("onScaleChange",{scale:t})},onMenu:function(){l.raiseCustomEvent(r,"onMenu"),r.onMenu&&r.onMenu(),r.du("onMenu")},onSwipeToOutside:function(t,i){l.raiseCustomEvent(r,"onSwipeToOutside",{length:t,side:i}),r.onSwipeToOutside&&r.onSwipeToOutside(t,i),r.du("onSwipeToOutside",{length:t,side:i})},onTurnPageToOutside:function(t,i){l.raiseCustomEvent(r,"onTurnPageToOutside",{length:t,side:i}),r.onTurnPageToOutside&&r.onTurnPageToOutside(t,i),r.du("onTurnPageToOutside",{length:t,side:i})},onPageRendered:function(t){l.raiseCustomEvent(r,"onPageRendered",{pagePosition:t}),r.onPageRendered&&r.onPageRendered(t)},onSelectionStart:function(){l.raiseCustomEvent(r,"selectionstart",{})},onSelectionChange:function(){l.raiseCustomEvent(r,"selectionchange",{})},onSelectionEnd:function(){l.raiseCustomEvent(r,"selectionend",{})}},this.tapArea),this.ei&&this.showTapArea(),H.addEventListener("message",this.Qt.receiveMessage,!1),this.du("onInitialize"),this.tapArea.ki(this.Qt)}},Object.defineProperty(M.prototype,"isLoaded",{get:function(){return null!==this.Qt},enumerable:!1,configurable:!0}),M.prototype.addEventListener=function(t,i,n){t in this.hi||(this.hi[t]=[]),this.hi[t].push(i)},M.prototype.removeEventListener=function(t,i,n){if(t in this.hi)for(var r=this.hi[t],e=0;e<r.length;e++)if(r[e]===i)return void r.splice(e,1)},M.prototype.dispatchEvent=function(t){if(!(t.type in this.hi))return!0;for(var i=this.hi[t.type].slice(),n=0;n<i.length;n++)"handleEvent"in i[n]?i[n].handleEvent.call(this,t):i[n].call(this,t);return!t.defaultPrevented},M.prototype.refresh=function(){this.isLoaded&&this.Qt.refresh()},Object.defineProperty(M.prototype,"total",{get:function(){return this.isLoaded?this.Qt.totalPage:0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"current",{get:function(){return this.isLoaded?this.Qt.currentPage:0},set:function(t){this.isLoaded&&(this.Qt.currentPage=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"currentPosition",{get:function(){return this.isLoaded?this.Qt.currentPosition:""},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"currentPages",{get:function(){return this.isLoaded?this.Qt.currentPages:[]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"bookmark",{get:function(){return this.isLoaded?this.Qt.bookmark:null},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"autoBookmark",{get:function(){return this.isLoaded?this.Qt.autoBookmark:null},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"content",{get:function(){return this.isLoaded?this.Qt.content:null},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isContentLoaded",{get:function(){return!!this.Qt&&this.Qt.isContentLoaded},enumerable:!1,configurable:!0}),M.prototype.limitPage=function(t,i){void 0===t&&(t=null),void 0===i&&(i=null),this.ii=t,this.ni=i,this.isLoaded&&this.Qt.limitPage(this.ii,this.ni)},M.prototype.moveTo=function(t,i){return void 0===i&&(i=!1),this.isLoaded&&this.Qt.isDraggerInitialized?this.Qt.movePage(t,i):0},M.prototype.scrollTo=function(t,i,n){return void 0===n&&(n=!1),this.isLoaded&&this.Qt.isDraggerInitialized?this.Qt.scroll(t,i,n):0},Object.defineProperty(M.prototype,"scale",{get:function(){return this.isLoaded?this.Qt.scale:0},set:function(t){this.isLoaded&&(this.Qt.scale=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"scrollMode",{get:function(){return this.isLoaded&&(this.ri=this.Qt.scrollMode),this.ri},set:function(t){this.ri=t,this.isLoaded&&(this.Qt.scrollMode=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"renderStatus",{get:function(){return this.Qt?this.Qt.renderStatus:null},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"tapAreaStyle",{get:function(){return this.si},set:function(t){""==t.trim()&&(this.tapArea&&(this.si="",this.tapArea.horizontalEdge.width="30%"),this.isLoaded&&this.Qt.refresh()),"thinpageturningarea"==t.trim().toLowerCase()&&(this.tapArea&&(this.si="thinPageTurningArea",this.tapArea.horizontalEdge.width="20%"),this.isLoaded&&this.Qt.refresh())},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"maxContentWidth",{get:function(){return this.isLoaded&&(this.Kt=this.Qt.maxContentWidth),this.Kt},set:function(t){this.Kt=t,this.isLoaded&&(this.Qt.maxContentWidth=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"verticalPageMargin",{get:function(){return this.isLoaded&&(this.ti=this.Qt.verticalPageMargin),this.ti},set:function(t){this.ti=t,this.isLoaded&&(this.Qt.verticalPageMargin=t)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"recommendPageIndex",{get:function(){return this.Qt?this.Qt.recommendPageIndex:null},enumerable:!1,configurable:!0}),M.prototype.isPageAppeared=function(t){return!!this.Qt&&this.Qt.isPageAppeared(t)},Object.defineProperty(M.prototype,"nextTapDirection",{get:function(){if(this.Qt){if(this.Qt.nextTapDirection===l.NextTapDirection.Left)return"left";if(this.Qt.nextTapDirection===l.NextTapDirection.Right)return"right";if(this.Qt.nextTapDirection===l.NextTapDirection.Top)return"top";if(this.Qt.nextTapDirection===l.NextTapDirection.Bottom)return"bottom"}return""},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isPaginatedContent",{get:function(){return!!this.Qt&&this.Qt.isPaginatedContent},enumerable:!1,configurable:!0}),M.prototype.resetPageError=function(t){return void 0===t&&(t=null),this.Qt?this.Qt.resetPageError(t):0},Object.defineProperty(M.prototype,"hasSearchText",{get:function(){return!(!this.Qt||!this.Qt.content)&&l.TextSearch.hasSearchText(this.Qt.content)},enumerable:!1,configurable:!0}),M.prototype.searchText=function(t,i,n,r){return void 0===i&&(i=!1),void 0===n&&(n=-1),void 0===r&&(r=!1),this.Qt&&this.Qt.content?l.TextSearch.create(this.Qt.content,t,{descend:i,startPage:n,wrapAround:r}):null},M.prototype.clearSearchTextIndicator=function(){l.Indicator.clear(this.ui)},M.prototype.getSelection=function(){return this.isLoaded&&this.Qt?this.Qt.selector.selection:l.Selection.empty},Object.defineProperty(M.prototype,"selectionEnabled",{get:function(){return!(!this.isLoaded||!this.Qt)&&this.Qt.selectionEnabled},set:function(t){this.isLoaded&&this.Qt&&(this.Qt.selectionEnabled=t)},enumerable:!1,configurable:!0}),M.prototype.showTapArea=function(){this.ei=!0,this.Qt&&this.Qt.setTapAreaClasses(["ptbinb-taparea ptbinb-taparea-top","ptbinb-taparea ptbinb-taparea-right","ptbinb-taparea ptbinb-taparea-bottom","ptbinb-taparea ptbinb-taparea-left"])},M.prototype.hideTapArea=function(){this.ei=!1,this.Qt&&this.Qt.setTapAreaClasses(null)},M.prototype.lu=function(t){var n=new l.UrlParser(location.href),i=n.query.get("cid");i&&t.setAttribute("data-ptbinb-cid",i);var r=n.query.get("adr");if(r)t.setAttribute("data-ptbinb-adr",r);else{var e=n.fragment.substr(1);e.match(/^(0|[1-9][0-9]*)$/)&&t.setAttribute("data-ptbinb-adr",e)}var s=new l.UrlParser(t.getAttribute("data-ptbinb")||"");if(s){var h=!1;["u0","u1","u2","u3","u4","u5","u6","u7","u8","u9"].forEach(function(t){var i=n.query.get(t);void 0!==i&&(s.query.set(t,i),h=!0)}),h&&t.setAttribute("data-ptbinb",s.toString())}},M.prototype.vu=function(t){var i={autoBookmark:{enabled:!1,externalSaveInterval:5e3},bookmark:{enabled:!1},useHighQualityImage:!1,userActionEnabled:!0,selection:{enabled:!1,options:{}},scaleByDoubleTap:2,scrollmode:l.ContentRenderer.defaultScrollMode},n="autoBookmark"in t?t.autoBookmark:"autobookmark"in t&&t.autobookmark;"boolean"==typeof n?i.autoBookmark.enabled=n:(i.autoBookmark.enabled=!("enabled"in n&&!n.enabled),"externalSaveInterval"in n&&"number"==typeof n.externalSaveInterval&&(i.autoBookmark.externalSaveInterval=n.externalSaveInterval));var r="bookmark"in t&&t.bookmark;i.bookmark.enabled="boolean"==typeof r?r:!("enabled"in r&&!r.enabled);var e="renderer"in t?t.renderer:{};"imageQuality"in e&&"high"===e.imageQuality?i.useHighQualityImage=!0:i.useHighQualityImage=!1;var s="userAction"in t?t.userAction:{};"enabled"in s&&"boolean"==typeof s.enabled&&(i.userActionEnabled=s.enabled),"scaleByDoubleTap"in s&&"number"==typeof s.scaleByDoubleTap&&(i.scaleByDoubleTap=s.scaleByDoubleTap);var h="selection"in t?t.selection:{};return"enabled"in h&&"boolean"==typeof h.enabled&&(i.selection.enabled=h.enabled),"options"in h&&(i.selection.options=h.options),"binb"in t&&t.binb&&(i.binb=t.binb),i.scrollmode=this.ri,i.maxcontentwidth=this.Kt,i.verticalPageMargin=this.ti,null===this.ii&&null===this.ni||(i.limitpage={min:this.ii,max:this.ni}),i},M.prototype.du=function(t,i){void 0===i&&(i={});var n=Object.assign({id:this.ui.id,response:t},i);parent.postMessage(JSON.stringify(n),"*")},M.cu={},v=M,l.SpeedBinb=v,function(w){var v=(t.prototype.showIndicator=function(){this.indicators.forEach(function(t){t.show()})},t.prototype.hideIndicator=function(){this.indicators.forEach(function(t){t.hide()})},t.bu="data-binbsp-matchid",t);function t(t,i,n,r){this.nearby=t,this.content=i,this.page=n,this.indicators=r}w.TextSearchMatch=v;var e=(s.prototype.clone=function(){var t=new s(this.Xt,this.hh,this.gu,this.pu);return t.mu=this.mu,t.wu=this.wu,t},s.first=function(t,i){if(void 0===i&&(i=0),!t)return null;if(i>=t.page.length)return null;for(var n=Math.max(0,i);n<t.page.length;){for(var r=0;r<t.page[n].image.texts.length;){if(0<t.page[n].image.texts[r].codepoints.length)return new s(t,n,r,0);++r}++n}return null},s.last=function(t,i){if(void 0===i&&(i=-1),!t)return null;for(var n=i<0?t.page.length-1:Math.min(t.page.length-1,i);0<=n;){for(var r=t.page[n].image.texts.length-1;0<=r;){if(0<t.page[n].image.texts[r].codepoints.length)return new s(t,n,r,t.page[n].image.texts[r].codepoints.length-1);--r}--n}return null},Object.defineProperty(s.prototype,"page",{get:function(){return this.hh},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"bidx",{get:function(){return this.gu},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"cidx",{get:function(){return this.pu},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"enabled",{get:function(){if(this.mu)return this.wu;this.mu=!0;var t=this.Xt.page;if(!(this.hh in t))return this.wu=!1;var i=t[this.hh].image.texts;if(!(this.gu in i))return this.wu=!1;var n=i[this.gu].codepoints;return this.pu in n?this.wu=!0:this.wu=!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"codePoint",{get:function(){return this.enabled?this.Xt.page[this.hh].image.texts[this.gu].codepoints[this.pu]:null},enumerable:!1,configurable:!0}),s.prototype.next=function(){if(this.enabled){var t=this.Xt.page[this.hh].image.texts[this.gu].codepoints;if(this.pu+1<t.length)++this.pu;else{var i=this.Xt.page[this.hh].image.texts;for(++this.gu;this.gu<i.length;){if(0<i[this.gu].codepoints.length)return void(this.pu=0);++this.gu}var n=this.Xt.page;for(++this.hh;this.hh<n.length;){if(0<n[this.hh].image.texts.length){var r=n[this.hh].image.texts;for(this.gu=0;this.gu<r.length;){if(0<r[this.gu].codepoints.length)return void(this.pu=0);++this.gu}}++this.hh}this.gu=0,this.pu=0,this.mu=!0,this.wu=!1}}},s.prototype.prev=function(){if(this.enabled)if(0<=this.pu-1)--this.pu;else{var t=this.Xt.page[this.hh].image.texts;for(--this.gu;0<=this.gu;){if(0<t[this.gu].codepoints.length)return void(this.pu=t[this.gu].codepoints.length-1);--this.gu}var i=this.Xt.page;for(--this.hh;0<=this.hh;){if(0<i[this.hh].image.texts.length){var n=i[this.hh].image.texts;for(this.gu=n.length-1;0<=this.gu;){if(0<n[this.gu].codepoints.length)return void(this.pu=n[this.gu].codepoints.length-1);--this.gu}}--this.hh}this.gu=0,this.pu=0,this.mu=!0,this.wu=!1}},s);function s(t,i,n,r){this.mu=!1,this.wu=!1,this.Xt=t,this.hh=i,this.gu=n,this.pu=r,this.mu=!1,this.wu=!1}var r=(Object.defineProperty(i.prototype,"done",{get:function(){return this.yu},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this.Ou.clone()},enumerable:!1,configurable:!0}),i.prototype.get=function(t){if(this.yu||t<=0)return[];if(this.Mu||(this.ju=this.Ou.clone(),this.Mu=[this.ju.codePoint]),this.xu)for(;this.Mu.length<t&&(this.ju.prev(),null!==(i=this.ju.codePoint));)this.Mu.push(i);else for(;this.Mu.length<t;){var i;if(this.ju.next(),null===(i=this.ju.codePoint))break;this.Mu.push(i)}return this.Mu.slice(0,t)},i.prototype.shift=function(t){if(!(t<=0)){t<this.Mu.length?this.Mu=this.Mu.slice(t):(this.Mu=null,this.ju=null);var i=t-1;if(this.xu)for(;0<=i;){if(this.Ou.prev(),!this.Ou.enabled){if(!this.Su||this.Iu){this.yu=!0;break}this.Ou=e.last(this.Xt),this.Iu=!0}if(this.Iu&&this.Ou.page<=this.Eu){this.yu=!0;break}--i}else for(;0<=i;){if(this.Ou.next(),!this.Ou.enabled){if(!this.Su||this.Iu){this.yu=!0;break}this.Ou=e.first(this.Xt),this.Iu=!0}if(this.Iu&&this.Ou.page>=this.Eu){this.yu=!0;break}--i}}},i);function i(t,i,n,r){this.yu=!1,this.Xt=null,this.xu=!1,this.Su=!1,this.Iu=!1,this.Eu=0,this.Mu=null,this.Ou=null,this.ju=null,this.xu=n,this.Su=r,this.Iu=!1,this.Eu=i,t&&t.page&&0!==t.page.length?(this.Xt=t,this.xu?(this.Ou=e.last(this.Xt,i),!this.Ou&&this.Su&&(this.Iu=!0,this.Ou=e.last(this.Xt))):(this.Ou=e.first(this.Xt,i),!this.Ou&&this.Su&&(this.Iu=!0,this.Ou=e.first(this.Xt))),null===this.Ou&&(this.yu=!0)):this.yu=!0}var n=(y.hasSearchText=function(t){if(!t)return!1;for(var i=t.page.length,n=0;n<i;n++){var r=t.page[n].image;if(r&&r.texts&&0<r.texts.length)return!0}return!1},y.create=function(t,i,n){if(!i||!y.hasSearchText(t))return null;var r=w.buildSearchTextArray(i);return r&&0!==r.length?new y(t,r,n):null},y.prototype.Tu=function(){var t=this.Pu.length;this.Cu={};for(var i=0;i<t-1;i++)this.Cu[this.Pu[i]]=t-1-i},y.prototype.Au=function(){var t=this.Pu.length;this.ku=new Array(t);for(var i=t,n=t-1;0<=n;--n)this.Du(n+1)&&(i=n+1),this.ku[t-1-n]=i-n+t-1;for(n=0;n<t-1;++n){var r=this.Nu(n);this.ku[r]=t-1-n+r}},y.prototype.Du=function(t){for(var i=this.Pu.length,n=t,r=0;n<i;){if(this.Pu[n]!==this.Pu[r])return!1;++n,++r}return!0},y.prototype.Nu=function(t){for(var i=0,n=t,r=this.Pu.length-1;0<=n&&this.Pu[n]===this.Pu[r];)++i,--n,--r;return i},y.prototype[V.iterator]=function(){return this},y.prototype.next=function(){if(this.yu)return{done:!0,value:void 0};for(var t=this.Pu.length,i=0;!this.Lu.done;){var n=this.Lu.get(t);if(n.length>=t){for(var r=t-1;n[r]===this.Pu[r];){if(0===r){var e=this.Lu.position;if(this.xu)for(var s=t-1;0<=s;--s)e.prev();this.Lu.shift(t);var h=this.Lu.get(y.Ru)||[],u=void 0,o=void 0,a=void 0;a=this.xu?(u=w.escapeEntity(h.reduceRight(function(t,i){return t+w.fromCodePoint(i)},"")||""),o=w.escapeEntity(n.reduceRight(function(t,i){return t+w.fromCodePoint(i)},"")||""),w.escapeEntity(this.Fu.reduceRight(function(t,i){return t+w.fromCodePoint(i)},"")||"")):(u=w.escapeEntity(this.Fu.reduce(function(t,i){return t+w.fromCodePoint(i)},"")||""),o=w.escapeEntity(n.reduce(function(t,i){return t+w.fromCodePoint(i)},"")||""),w.escapeEntity(h.reduce(function(t,i){return t+w.fromCodePoint(i)},"")||""));var f=u+"<"+o+">"+a;for(s=0;s<t;++s)this.Fu.push(n[s]);return{done:!1,value:new v(f,this.Xt,e.page,this.Ju(e,t))}}--r}var c=this.Cu[n[r]]||t,l=this.ku[t-1-r];i=Math.max(c,l)-(t-1-r)}else i=n.length;for(s=0;s<i;++s)this.Fu.push(n[s]);for(;this.Fu.length>y.Ru;)this.Fu.shift();this.Lu.shift(i)}return{done:this.yu=!0,value:void 0}},Object.defineProperty(y.prototype,"done",{get:function(){return this.yu},enumerable:!1,configurable:!0}),y.prototype.Ju=function(t,i){for(var n=[],r=t.page,e=t.bidx,s=t.cidx,h=i;0<h;){var u=this.Xt.page[r],o=u.id,a=u.image.orgwidth,f=u.image.orgheight,c=u.image.texts[e],l=c.codepoints.length;if(0===l)return null;var v=c.right-c.left,d=c.bottom-c.top,b=v/l,g=d/l,p=s,m=Math.min(l-p,h);b<y.au*d&&d<y.au*b?n.push(new w.Indicator(o,100*(c.left+p*b)/a+"%",100*c.top/f+"%",100-100*(c.right-(l-(p+m))*b)/a+"%",100-100*c.bottom/f+"%",y.eu+" "+y.Bu)):g<y.au*v&&v<y.au*g?n.push(new w.Indicator(o,100*c.left/a+"%",100*(c.top+p*g)/f+"%",100-100*c.right/a+"%",100-100*(c.bottom-(l-(p+m))*g)/f+"%",y.eu+" "+y.Bu)):n.push(new w.Indicator(o,"0","0","0","0",y.eu+" "+y.Hu)),0<(h-=m)&&(s=0,this.Xt.page[r].image.texts.length>e+1?++e:(e=0,++r<this.Xt.page.length&&0===this.Xt.page[r].image.texts.length&&++r,r===this.Xt.page.length&&(h=0)))}return n},y.Ru=20,y.au=4,y.eu="ptbinb-textsearch-indicator",y.Hu="ptbinb-textsearch-indicator-page",y.Bu="ptbinb-textsearch-indicator-area",y);function y(t,i,n){this.Pu=null,this.xu=!1,this.Lu=null,this.Cu={},this.ku=null,this.yu=!1,this.Fu=null,this.Xt=t,this.xu=!!n.descend,this.Pu=i,this.xu&&this.Pu.reverse(),this.yu=!1,this.Lu=new r(t,n.startPage,n.descend,n.wrapAround),this.Tu(),this.Au(),this.Fu=[]}w.TextSearch=n}(g=g||{}),g.SpeedBinb}(window);